Revoke Shared Records
Purpose
To revoke access to a shared record that was shared to users.
Request URL
https://www.zohoapis.com/crm/v2/{module_api_name}/{record_id}/actions/share
Request Method
DELETE
Scope
scope=ZohoCRM.share.{module_name}.{operation_type}
Possible module names | Possible operation types |
---|---|
leads, accounts, contacts, deals, campaigns, cases, solutions, products, vendors, pricebooks, quotes, salesorders, purchaseorders, invoices, and custom. | ALL - Full access to the record DELETE - To revoke access permissions |
Note
You can revoke only one shared record per API call.
Possible Errors
HTTP Status | Error Code | Message | Reason |
---|---|---|---|
401 | OAUTH_SCOPE_MISMATCH | invalid oauth scope to access this URL | 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. |
404 | INVALID_URL_PATTERN | Please check if the URL trying to access is a correct one. | The URL given has syntactical errors. |
403 | INVALID_DATA | ENTITY_ID_INVALID | The record ID given in the URL is either invalid (or) does not belong to the module mentioned. |
400 | BAD_REQUEST | No sharing through this record is available to revoke. | The record has not been shared with any user. |
Sample Request
Copiedcurl "https://www.zohoapis.com/crm/v2/Contacts/4150868000001148212/actions/share"
-X DELETE
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"
Sample Response
Copied{
"share": {
"code": "SUCCESS",
"details": {
"id": "4150868000001148212"
},
"message": "Sharing Revoked",
"status": "success"
}
}