Delete User Photo

Introduction 
The Delete User Photo API is used to remove a specific image uploaded by a user from the system. By providing the required parameters such as websiteIdwebApiClientKeyuserId, and photoId, the API securely identifies and deletes the corresponding photo associated with the user.

This API is particularly useful for managing user-uploaded assets and maintaining storage hygiene by removing unwanted, outdated, or unused images. Once deleted, the photo will no longer be available for the user to access or use in any customization workflows.

Use Cases

  • User Removes Uploaded Image 
    When a user decides to delete an uploaded image from their media library, this API ensures the image is permanently removed from the system.
  • Cleanup of Unused Assets 
    Helps in removing images that are no longer in use, reducing unnecessary storage consumption.
  • Content Moderation 
    Enables administrators or automated systems to delete inappropriate or non-compliant user-uploaded images.
  • Data Privacy Compliance 
    Supports user requests for data deletion by removing their uploaded images from the platform.
  • Workflow Optimization 
    Prevents deleted or irrelevant images from appearing in the customization process, ensuring a cleaner user experience.

API Details

Endpoint

GET /api/4/UploadImage/DeleteUserPhoto

--header 'webApiClientKey: c961461a-b287-448c-b9ea-e1162bd80b8e' \

--header 'websiteId: 422'

Parameters

Header validation

Header Name 

Type 

Required 

Description 

websiteId 

int 

Yes 

Unique identifier of the website. 

webApiClientKey 

string 

Yes 

API client key used for authentication. 

Query Parameters

Name 

Type 

Required 

Description 

userId 

string 

Yes 

This parameter is a code that is associated with cliparts. 

Passing the Clipart Code in the API will delete the details of the associated clipart. 

photoId 

String 

Yes 

This parameter refers to the unique ID of the photo uploaded by the user. This ID identifies the specific image that is to be deleted from the system. 

Success Responses

{

   "Response": "Success",

   "Message": "The Image has been successfully deleted.",

   "Data": null,

   "ErrorCode": ""

}

Error Code List (Click Here)

Q&A

Q1: What parameters are required to delete a user photo? 
A: The API requires websiteIdwebApiClientKeyuserId, and photoId to identify and delete the specific image.

Q2: Can a deleted photo be recovered? 
A: No, once the photo is deleted using this API, it is permanently removed and cannot be recovered.

Q3: What happens if an invalid photoId is provided? 
A: The API will return an error response indicating that the specified photo does not exist or could not be found.

{

  "Response": "Error",

   "Message": "Invalid Photo Id",

   "Data": null,

   "ErrorCode": "327"

}

Q4: Is authentication required to use this API? 
A: Yes, a valid webApiClientKey and WebsiteId must be provided to authorize the request.

Q5: Can this API delete multiple photos at once? 
A: No, this API is designed to delete a single photo per request.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.