Delete a Photo
Purpose
To delete a photo from a record in a module in Zoho CRM.
Endpoints
- DELETE /{module_api_name}/{record_ID}/photo
Request Details
Request URL
{api-domain}/crm/{version}/{module_API_name}/{record_ID}/photo
Supported modules
Leads, Contacts, Accounts, Products, Vendors, and Custom modules
Header
Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52
Scope
ZohoCRM.modules.ALL
(or)
ZohoCRM.modules.{module_name}.{operation_type}
Possible module names
leads, contacts, accounts, products, vendors and custom modules
Possible operation types
ALL - Full access to images
DELETE - Delete photo
Sample Request
Copiedcurl "https://www.zohoapis.com/crm/v8/Leads/3000000038009/photo"
-X DELETE
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"Possible Errors
- INVALID_MODULEHTTP 400- The module name given seems to be invalid.
 Resolution: Specify a valid module name.
- The given module is not supported in API.
 Resolution: Specify a supported module API name. Refer to the Supported Modules list at the beginning of this page.
 
- The module name given seems to be invalid.
- INVALID_REQUEST_METHODHTTP 400The request method is incorrect. 
 Resolution: Use the HTTP DELETE method to make this API call. Any other request method will result in this error.
- AUTHORIZATION_FAILEDHTTP 400User does not have sufficient privilege to delete images. 
 Resolution: Contact your system administrator.
- INVALID_DATAHTTP 400The id given seems to be invalid. 
 Resolution: The record ID specified in the URL is invalid. Use the Get Records API to get valid record IDs.
- RECORD_LOCKEDHTTP 400You cannot perform this operation as the record is locked. 
 Resolution: Please wait until the record is unlocked.
- OAUTH_SCOPE_MISMATCHHTTP 401The access token you have used to make this API call does not have the required scope. 
 Resolution: Client does not have ZohoCRM.modules.{module_name}.DELETE scope. Generate a new access token with valid scope. Refer to Scope section at the beginning of this page for more details.
- NO_PERMISSIONHTTP 403Permission denied to delete images. 
 Resolution: Contact your system administrator.
- INVALID_URL_PATTERNHTTP 404The request URL is incorrect. 
 Resolution: Specify a valid request URL. Refer to the request URL section at the beginning of this page for more details.
- INTERNAL_ERRORHTTP 500Unexpected and unhandled exception in the server. 
 Resolution: Contact the support team at support@zohocrm.com.
Sample Response
Copied{
    "code": "SUCCESS",
    "details": {},
    "message": "Photo deleted",
    "status": "success"
}