Record-Level Sharing of Emails
Zoho CRM provides an option to share emails of a record with other users in your Zoho CRM organization. This enhances collaboration among team members. You can share emails of records in Leads, Contacts and custom modules. Users who have set their email sharing permissions to custom sharing can use this API.
Purpose
To share 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/share_emails
- POST /{module_API_name}/{record_ID}/actions/share_emails
Request Details
Request URL
To share emails of multiple records at record-level:
{api-domain}/crm/{version}/{module_API_name}/actions/share_emails
To share emails of a specific record at record level:
{api-domain}/crm/{version}/{module_API_name}/{record_ID}/actions/share_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/share_emails"
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"
-d @shareemails.json
-X POST
Input JSON
- idsJSON array, mandatory when sharing emails of multiple record IDs. You can share up to 200 records through a single API call.
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 share.
Note
- When sharing emails of a single record, skip the input JSON. The system will ignore input JSON, if provided.
- Only the emails of the user account used to authenticate the connection can be shared using the Record Level Email Sharing API.
Sample Input
Copied{
"ids": [
"5843104000000425566",
"5843104000000425570"
]
}
Possible Errors
- ALREADY_SHAREDHTTP 400
Emails are already shared with colleagues for the specified IDs
Resolution: No action needed; emails have already been shared. - 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": "Successfully shared",
"status": "success"
},
{
"code": "SUCCESS",
"details": {
"id": "5843104000000425570"
},
"message": "Successfully shared",
"status": "success"
}
]
}