Zoho CRM Record Level Sharing Of Emails

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

OpenAPI Specification

zoho-crm-record-share-email-openapi.json Raw ↑
{
  "openapi": "3.1.0",
  "info": {
    "title": "Record Level Sharing Of Emails",
    "description": "API To share emails at record-level for a specific record or multiple records with other users in your Zoho CRM organization through API.",
    "version": "8.0"
  },
  "servers": [
    {
      "url": "https://www.zohoapis.{dc}/crm/{version}",
      "description": "API Server URL",
      "variables": {
        "dc": {
          "enum": [
            "com",
            "eu",
            "in",
            "cn",
            "au"
          ],
          "default": "com",
          "description": "API Server URL TLD"
        },
        "version": {
          "enum": [
            "v8"
          ],
          "default": "v8",
          "description": "API version"
        }
      }
    }
  ],
  "paths": {
    "/{moduleApiName}/{id}/actions/share_emails": {
      "post": {
        "description": "To share emails of specific record with other users in your organization",
        "summary": "Share Emails of a record",
        "operationId": "shareEmails",
        "parameters": [
          {
            "name": "moduleApiName",
            "in": "path",
            "required": true,
            "description": "Module  Api Name of the record",
            "schema": {
              "type": "string",
              "enum": [
                "Leads",
                "Contacts",
                "Accounts",
                "Deals",
                "CustomModule1"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/Id"
          }
        ],
        "security": [
          {
            "iam-oauth2-schema": [
              "ZohoCRM.modules.Leads.CREATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.modules.Contacts.CREATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.modules.Accounts.CREATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.modules.Deals.CREATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.modules.Tasks.CREATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.modules.Events.CREATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.modules.Calls.CREATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.modules.Products.CREATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.modules.Vendors.CREATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.modules.Campaigns.CREATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.modules.Cases.CREATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.modules.Solutions.CREATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.modules.Quotes.CREATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.modules.Invoices.CREATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.modules.Forecasts.CREATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.modules.Activities.CREATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.modules.Notes.CREATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.modules.Attachments.CREATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.modules.custom.CREATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.modules.CREATE"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Emails shared successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Response schema for successful email sharing.",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "type": "array",
                      "description": "List of results for the sharing operation.",
                      "maxItems": 100,
                      "items": {
                        "type": "object",
                        "description": "Result for a single record.",
                        "additionalProperties": false,
                        "properties": {
                          "code": {
                            "type": "string",
                            "description": "Status code of the operation.",
                            "enum": [
                              "SUCCESS"
                            ]
                          },
                          "details": {
                            "type": "object",
                            "description": "Details of the shared record.",
                            "additionalProperties": false,
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "The ID of the record.",
                                "format": "string"
                              }
                            },
                            "required": [
                              "id"
                            ]
                          },
                          "message": {
                            "type": "string",
                            "description": "A message indicating the result.",
                            "enum": [
                              "Successfully shared"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "description": "The status of the operation.",
                            "enum": [
                              "success"
                            ]
                          }
                        },
                        "required": [
                          "code",
                          "details",
                          "message",
                          "status"
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Failure in email sharing",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "description": "Invalid data provided.",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Error code for invalid data.",
                          "enum": [
                            "INVALID_DATA"
                          ]
                        },
                        "details": {
                          "type": "object",
                          "description": "Details about the invalid data.",
                          "additionalProperties": false,
                          "properties": {
                            "resource_path_index": {
                              "type": "integer",
                              "description": "Index of the resource path with an error.",
                              "format": "int32"
                            }
                          },
                          "required": [
                            "resource_path_index"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "description": "Error message for invalid data.",
                          "enum": [
                            "the related id given seems to be invalid"
                          ]
                        },
                        "status": {
                          "type": "string",
                          "description": "Status of the error.",
                          "enum": [
                            "error"
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "details",
                        "message",
                        "status"
                      ]
                    },
                    {
                      "type": "object",
                      "description": "Invalid module provided.",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Error code for invalid module.",
                          "enum": [
                            "INVALID_MODULE"
                          ]
                        },
                        "details": {
                          "type": "object",
                          "description": "Details about the invalid module.",
                          "additionalProperties": false,
                          "properties": {
                            "resource_path_index": {
                              "type": "integer",
                              "description": "Index of the resource path with an error.",
                              "format": "int32"
                            }
                          },
                          "required": [
                            "resource_path_index"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "description": "Error message for invalid module.",
                          "enum": [
                            "the module name given seems to be invalid"
                          ]
                        },
                        "status": {
                          "type": "string",
                          "description": "Status of the error.",
                          "enum": [
                            "error"
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "details",
                        "message",
                        "status"
                      ]
                    },
                    {
                      "type": "object",
                      "description": "Module not supported.",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Error code for unsupported module.",
                          "enum": [
                            "NOT_SUPPORTED"
                          ]
                        },
                        "details": {
                          "type": "object",
                          "description": "Details about the unsupported module.",
                          "additionalProperties": false,
                          "properties": {
                            "resource_path_index": {
                              "type": "integer",
                              "description": "Index of the resource path with an error.",
                              "format": "int32"
                            }
                          },
                          "required": [
                            "resource_path_index"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "description": "Error message for unsupported module.",
                          "enum": [
                            "the given module is not supported in api"
                          ]
                        },
                        "status": {
                          "type": "string",
                          "description": "Status of the error.",
                          "enum": [
                            "error"
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "details",
                        "message",
                        "status"
                      ]
                    },
                    {
                      "type": "object",
                      "description": "Custom sharing not enabled.",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Error code for custom sharing not enabled.",
                          "enum": [
                            "NOT_ALLOWED"
                          ]
                        },
                        "details": {
                          "type": "object",
                          "description": "Details about the error.",
                          "additionalProperties": false
                        },
                        "message": {
                          "type": "string",
                          "description": "Error message for custom sharing not enabled.",
                          "enum": [
                            "User did not enable custom sharing"
                          ]
                        },
                        "status": {
                          "type": "string",
                          "description": "Status of the error.",
                          "enum": [
                            "error"
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "details",
                        "message",
                        "status"
                      ]
                    },
                    {
                      "type": "object",
                      "description": "Email configuration does not exist.",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Error code for missing email configuration.",
                          "enum": [
                            "NOT_ALLOWED"
                          ]
                        },
                        "details": {
                          "type": "object",
                          "description": "Details about the error.",
                          "additionalProperties": false
                        },
                        "message": {
                          "type": "string",
                          "description": "Error message for missing email configuration.",
                          "enum": [
                            "Email Configuration does not exist"
                          ]
                        },
                        "status": {
                          "type": "string",
                          "description": "Status of the error.",
                          "enum": [
                            "error"
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "details",
                        "message",
                        "status"
                      ]
                    },
                    {
                      "type": "object",
                      "description": "Emails already shared.",
                      "additionalProperties": false,
                      "properties": {
                        "data": {
                          "type": "array",
                          "description": "List of results indicating already shared status.",
                          "maxItems": 100,
                          "items": {
                            "type": "object",
                            "description": "Result for a single record.",
                            "additionalProperties": false,
                            "properties": {
                              "code": {
                                "type": "string",
                                "description": "Status code of the operation.",
                                "enum": [
                                  "ALREADY_SHARED"
                                ]
                              },
                              "details": {
                                "type": "object",
                                "description": "Details of the record.",
                                "additionalProperties": false,
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "description": "The ID of the record.",
                                    "format": "string"
                                  }
                                },
                                "required": [
                                  "id"
                                ]
                              },
                              "message": {
                                "type": "string",
                                "description": "A message indicating the result.",
                                "enum": [
                                  "Emails are already shared to the colleagues already"
                                ]
                              },
                              "status": {
                                "type": "string",
                                "description": "The status of the operation.",
                                "enum": [
                                  "error"
                                ]
                              }
                            },
                            "required": [
                              "code",
                              "details",
                              "message",
                              "status"
                            ]
                          }
                        }
                      }
                    },
                    {
                      "type": "object",
                      "description": "Invalid data type.",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Error code for invalid data type.",
                          "enum": [
                            "INVALID_DATA"
                          ]
                        },
                        "details": {
                          "type": "object",
                          "description": "Details about the invalid data type.",
                          "additionalProperties": false,
                          "properties": {
                            "expected_data_type": {
                              "type": "string",
                              "description": "The expected data type.",
                              "format": "string"
                            },
                            "api_name": {
                              "type": "string",
                              "description": "The API name of the field with the wrong data type.",
                              "format": "string"
                            }
                          },
                          "required": [
                            "expected_data_type",
                            "api_name"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "description": "Error message for invalid data type.",
                          "format": "string"
                        },
                        "status": {
                          "type": "string",
                          "description": "Status of the error.",
                          "enum": [
                            "error"
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "details",
                        "message",
                        "status"
                      ]
                    },
                    {
                      "type": "object",
                      "description": "Operation not allowed.",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Error code for not allowed operation.",
                          "enum": [
                            "NOT_ALLOWED"
                          ]
                        },
                        "details": {
                          "type": "object",
                          "description": "Details about the error.",
                          "additionalProperties": false,
                          "properties": {
                            "resource_path_index": {
                              "type": "integer",
                              "description": "Index of the resource path with an error.",
                              "format": "int32"
                            }
                          },
                          "required": [
                            "resource_path_index"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "description": "Error message for not allowed operation.",
                          "format": "string"
                        },
                        "status": {
                          "type": "string",
                          "description": "Status of the error.",
                          "enum": [
                            "error"
                          ]
                        }
                      },
                      "required": [
                        "code",
                        "details",
                        "message",
                        "status"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Permission denied",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Permission denied error response.",
                  "additionalProperties": false,
                  "properties": {
                    "code": {
                      "type": "string",
                      "description": "Error code for permission denied.",
                      "enum": [
                        "NO_PERMISSION"
                      ]
                    },
                    "details": {
                      "type": "object",
                      "description": "Details about the missing permissions.",
                      "additionalProperties": false,
                      "properties": {
                        "permissions": {
                          "type": "array",
                          "description": "List of required permissions.",
                          "maxItems": 10,
                          "items": {
                            "type": "string",
                            "description": "A required permission.",
                            "format": "string"
                          }
                        }
                      }
                    },
                    "message": {
                      "type": "string",
                      "description": "Error message for permission denied.",
                      "enum": [
                        "permission denied"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "description": "Status of the error.",
                      "enum": [
                        "error"
                      ]
                    }
                  },
                  "required": [
                    "code",
                    "details",
                    "message",
                    "status"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/{moduleApiName}/{id}/actions/unshare_emails": {
      "post": {
        "description": "To unshare emails of specific record with other users in your organization",
        "summary": "Unshare Emails of a record",
        "operationId": "unshareEmails",
        "parameters": [
          {
            "name": "moduleApiName",
            "in": "path",
            "required": true,
            "description": "Module  Api Name of the record",
            "schema": {
              "type": "string",
              "enum": [
                "Leads",
                "Contacts",
                "Accounts",
                "Deals",
                "CustomModule1"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/Id"
          }
        ],
        "security": [
          {
            "iam-oauth2-schema": [
              "ZohoCRM.modules.Leads.DELETE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.modules.Contacts.DELETE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.modules.Accounts.DELETE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.modules.Deals.DELETE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.modules.Tasks.DELETE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.modules.Events.DELETE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.modules.Calls.DELETE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.modules.Products.DELETE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.modules.Vendors.DELETE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.modules.Campaigns.DELETE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.modules.Cases.DELETE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.modules.Solutions.DELETE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.modules.Quotes.DELETE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.modules.Invoices.DELETE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.modules.Forecasts.DELETE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.modules.Activities.DELETE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.modules.Notes.DELETE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.modules.Attachments.DELETE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.modules.custom.DELETE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.modules.DELETE"
            ]
          }
        ],
        "responses": {
          "200": {
            "description": "Emails sharing revoked successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Response schema for successful email unsharing.",
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "type": "array",
                      "description": "List of results for the unsharing operation.",
                      "maxItems": 100,
                      "items": {
                        "type": "object",
                        "description": "Result for a single record.",
                        "additionalProperties": false,
                        "properties": {
                          "code": {
                            "type": "string",
                            "description": "Status code of the operation.",
                            "enum": [
                              "SUCCESS"
                            ]
                          },
                          "details": {
                            "type": "object",
                            "description": "Details of the unshared record.",
                            "additionalProperties": false,
                            "properties": {
                              "id": {
                                "type": "string",
                                "description": "The ID of the record.",
                                "format": "string"
                              }
                            },
                            "required": [
                              "id"
                            ]
                          },
                          "message": {
                            "type": "string",
                            "description": "A message indicating the result.",
                            "enum": [
                              "Sharing revoked successfully"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "description": "The status of the operation.",
                            "enum": [
                              "success"
                            ]
                          }
                        },
                        "required": [
                          "code",
                          "details",
                          "message",
                          "status"
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Failure in revoking",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "description": "Invalid data provided.",
                      "additionalProperties": false,
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Error code for invalid data.",
                          "enum": [
                            "INVALID_DATA"
                          ]
                        },
                        "details": {
                          "type": "object",
                          "description": "Details about the invalid data.",
                          "additionalProperties": false,
                          "properties": {
                            "resource_path_index": {
                              "type": "integer",
                              "description": "Index of the resource path with an error.",
                              "format": "int32"
               

# --- truncated at 32 KB (93 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/zoho-crm/refs/heads/main/openapi/zoho-crm-record-share-email-openapi.json