Empty Recycle Bin

Purpose

To permanently delete all records from the Recycle Bin in your Zoho CRM account. This action is irreversible, as deleted records cannot be restored after this operation.

Endpoints

  • POST /settings/recycle_bin/actions/empty

Request Details

Request URL

{api-domain}/crm/{version}settings/recycle_bin/actions/empty
 

Header

Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52

Scope

ZohoCRM.settings.recycle_bin.UPDATE
 

Sample Request

Copiedcurl "https://www.zohoapis.com/crm/v8/settings/recycle_bin/actions/empty"
-X POST
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"

Note

  • When the number of records in the Recycle Bin exceeds 1000, including child records, the deletion will be scheduled as a scheduled background job. If the count is 1000 or fewer, the records are deleted immediately.
  • Only users with the Admin profile can empty the Recycle Bin.

Sample Response when there are 1000 or fewer records in the Recycle Bin

Copied{
    "code": "SUCCESS",
    "details": {},
    "message": "recyclebin is cleared",
    "status": "success"
}

Possible Errors

  • AUTHORIZATION_FAILEDHTTP 400

    Non admin user can't empty the recycle bin
    Resolution: Only users with the Admin profile can perform this operation. 

  • INVALID_REQUEST_METHODHTTP 400

    The http request method type is not a valid one
    Resolution: You have specified an invalid HTTP method to access the API URL. Please retry this request with POST method.

  • OAUTH_SCOPE_MISMATCHHTTP 401

    Unauthorized
    Resolution: Client does not have the required OAUTH SCOPE. Generate a new token with the valid scope. Refer to the Scope section for more details.

  • INVALID_URL_PATTERNHTTP 404

    Please check if the URL trying to access is a correct one
    Resolution: The request URL specified is incorrect. Specify a valid request URL. Refer to the Request URL section for more details.

  • INTERNAL_ERRORHTTP 500

    Internal Server Error
    Resolution: Unexpected and unhandled exception in Server. Contact support team.

Sample Response when there are more than 1000 records

Copied{
    "code": "SCHEDULED",
    "details": {},
    "message": "Empty bin action has been scheduled",
    "status": "success"
}