Revoke Shared Records
Purpose
To revoke access to a shared record in Zoho CRM, removing sharing permissions granted to users, groups, or roles.
Endpoints
- DELETE /{module_API_name}/{record_ID}/actions/share
Request Details
Request URL
{api-domain}/crm/{version}/{module_API_name}/{record_ID}/actions/share
Supported modules
Leads, Accounts, Contacts, Deals, Campaigns, Cases, Solutions, Products, Vendors, Price Books, Quotes, Sales Orders, Purchase Orders, Invoices, and Custom.
Header
Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52
Scope
ZohoCRM.share.{module_name}.{operation_type}
Possible module names
leads, accounts, contacts, deals, campaigns, cases, solutions, products, vendors, pricebooks, quotes, salesorders, purchaseorders, invoices, and custom.
Possible operation types
ALL - Full access to the record
DELETE - To revoke access permissions
Note
- You can revoke access to only one shared record per API call.
Sample Request
Copiedcurl "https://www.zohoapis.com/crm/v8/Contacts/4150868000001148212/actions/share"
-X DELETE
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"
Copiedresponse = invokeurl
[
url: "https://www.zohoapis.com/crm/v8/Contacts/4150868000001148212/actions/share"
type: DELETE
connection:"crm_oauth_connection"
];
info response;
Possible Errors
- INVALID_REQUEST_METHODHTTP 400
The 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 400
User does not have sufficient privilege to delete records.
Resolution: Contact your system administrator. - INVALID_MODULEHTTP 400
You have specified an invalid or unsupported module name or there is no tab permission, or the module could have been removed from the available modules.
Resolution: Specify a valid supported module API name. - INVALID_DATAHTTP 400
The record ID given in the URL is either invalid or does not belong to the module mentioned.
Resolution: Specify a valid record ID. - BAD_REQUESTHTTP 400
No sharing through this record is available to revoke.
Resolution:The record has not been shared with any user. - OAUTH_SCOPE_MISMATCHHTTP 401
The client does not have the scope to ZohoCRM.share.{module_name}.DELETE
(or)
The module name given in the URL is either Events, Calls, Tasks or any Linking module.
(or)
The module name given in the URL is invalid.
Resolution: Generate a new access token with the required scopes for this API. Refer to the Scope section at the beginning of this page for the list of required scopes. - NO_PERMISSIONHTTP 403
Permission denied to delete records
Resolution: Contact your system administrator. - INVALID_URL_PATTERNHTTP 404
The 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 500
Unexpected and unhandled exception in the server.
Resolution: Contact the support team at support@zohocrm.com.
Sample Response
Copied{
"share": {
"code": "SUCCESS",
"details": {
"id": "4150868000001148212"
},
"message": "Sharing Revoked",
"status": "success"
}
}