Record-Level Unsharing of Emails

Purpose

To unshare emails at record-level for a specific record or multiple records with other users in your Zoho CRM organization through API.

Endpoints

  • POST /{module_API_name}/actions/unshare_emails
  • POST /{module_API_name}/{record_ID}/actions/unshare_emails

Request Details

Request URL

To unshare emails of multiple records at record-level:
{api-domain}/crm/{version}/{module_API_name}/actions/unshare_emails

To unshare emails of a specific record at record-level:
{api-domain}/crm/{version}/{module_API_name}/{record_ID}/actions/unshare_emails

Supported modules

Leads, Contacts, and custom modules

Header

Authorization: Zoho-oauthtokend92d4xxxxxxxxxxxxx15f52

Scope

ZohoCRM.modules.ALL
(or)
ZohoCRM.modules.{module_name}.{operation_type}

Possible module names

leads, contacts, and custom modules

Possible operation types

ALL - Full access to the record
CREATE - Create access to the record

Sample Request

Copiedcurl "https://www.zohoapis.com/crm/v8/Leads/actions/unshare_emails"
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"
-d @unshareemails.json
-X POST

Input JSON

  • idsJSON array, mandatory when unsharing emails of multiple record IDs.

    An array containing the record IDs in comma separated format. These are the unique IDs of the records of the supported modules whose emails you wish to unshare. You can unshare up to 200 records through a single API call.

Note

When unsharing emails of a single record, skip the input JSON. The system will ignore input JSON, if provided.

Sample Input

Copied{
    "ids": [
        "5843104000000425566",
        "5843104000000425570"
    ]
}

Possible Errors

  • NOT_SHAREDHTTP 400

    Emails are not shared to the colleagues already
    Resolution: No action needed; emails have already been unshared.

  • INVALID_DATAHTTP 400

    The record ID given seems to be invalid.
    Resolution: Ensure the record ID in the Input JSON is correct.

  • INVALID_DATAHTTP 400

    The related id given seems to be invalid
    Resolution: Ensure the record ID in the endpoint is correct.

  • NOT_ALLOWEDHTTP 400

    Email Configuration does not exist
    Resolution: Configure email integration for your Zoho CRM organization.

  • NOT_ALLOWEDHTTP 400

    User did not enable custom sharing
    Resolution: Setup custom email sharing permissions for your Zoho CRM organization.

  • NOT_SUPPORTEDHTTP 400

    The given module is not supported in the API
    Resolution: The supported modules are Leads, Contacts and custom modules.

  • INVALID_REQUEST_METHODHTTP 400

    The request method is incorrect
    Resolution: Use the HTTP POST method to make this API call. Any other request method will result in this error.

  • OAUTH_SCOPE_MISMATCHHTTP 401

    The access token you have used to make this API call does not have the required scope
    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.

  • 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{
    "data": [
        {
            "code": "SUCCESS",
            "details": {
                "id": "5843104000000425566"
            },
            "message": "Sharing revoked successfully",
            "status": "success"
        },
        {
            "code": "SUCCESS",
            "details": {
                "id": "5843104000000425570"
            },
            "message": "Sharing revoked successfully",
            "status": "success"
        }
    ]
}