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 namesPossible 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 StatusError CodeMessageReason
401OAUTH_SCOPE_MISMATCHinvalid oauth scope to access this URLThe 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.
404INVALID_URL_PATTERNPlease check if the URL trying to access is a correct one.The URL given has syntactical errors.
403INVALID_DATAENTITY_ID_INVALIDThe record ID given in the URL is either invalid
(or)
does not belong to the module mentioned.
400BAD_REQUESTNo 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"
    }
}