Zoho CRM Share Records

Share Records. Published by Zoho in its first-party OpenAPI 3.1.0 repository github.com/zoho/crm-oas; 4 operation(s).

OpenAPI Specification

zoho-crm-share-records-openapi.json Raw ↑
{
  "openapi": "3.1.0",
  "info": {
    "title": "Share Records",
    "description": "Share Records",
    "version": "8.0"
  },
  "servers": [
    {
      "url": "https://zohoapis.{dc}/crm/{version}",
      "description": "API Server URL",
      "variables": {
        "dc": {
          "enum": [
            "com",
            "eu",
            "in",
            "cn",
            "au"
          ],
          "default": "com",
          "description": "API Server URL TLD"
        },
        "version": {
          "default": "v8",
          "description": "API Version"
        }
      }
    }
  ],
  "paths": {
    "/{moduleApiName}/{recordId}/actions/share": {
      "get": {
        "operationId": "getShareRecords",
        "summary": "Get Share Records",
        "description": "Get Share Records. API exposed to customers",
        "security": [
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.leads.READ"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.contacts.READ"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.accounts.READ"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.deals.READ"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.products.READ"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.tasks.READ"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.events.READ"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.calls.READ"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.quotes.READ"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.invoices.READ"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.campaigns.READ"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.vendors.READ"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.pricebooks.READ"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.salesorders.READ"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.purchaseorders.READ"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.solutions.READ"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.cases.READ"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.cross_sellings.READ"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.next_buys.READ"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.first_buys.READ"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.rebuys.READ"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.bundles.READ"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.custom.READ"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ModuleApiName"
          },
          {
            "$ref": "#/components/parameters/RecordId"
          },
          {
            "$ref": "#/components/parameters/SharedTo"
          },
          {
            "$ref": "#/components/parameters/View"
          }
        ],
        "responses": {
          "200": {
            "description": "Success Response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Get Share Records Success Response",
                  "type": "object",
                  "properties": {
                    "share": {
                      "type": "array",
                      "description": "list of share records",
                      "maxItems": 2147483647,
                      "items": {
                        "type": "object",
                        "description": "share record details",
                        "properties": {
                          "shared_with": {
                            "type": "object",
                            "description": "details of whom the record is shared with",
                            "properties": {
                              "name": {
                                "type": "string",
                                "description": "name of the entity with whom the record is shared",
                                "maxLength": 100
                              },
                              "id": {
                                "type": "string",
                                "description": "id of the entity with whom the record is shared",
                                "maxLength": 20
                              },
                              "type": {
                                "type": "string",
                                "description": "type of entity with whom the record is shared",
                                "enum": [
                                  "users",
                                  "roles",
                                  "groups"
                                ]
                              }
                            },
                            "additionalProperties": false,
                            "required": [
                              "name",
                              "id",
                              "type"
                            ]
                          },
                          "share_related_records": {
                            "type": "boolean",
                            "description": "indicates if related records are shared"
                          },
                          "shared_through": {
                            "type": "object",
                            "description": "details of the record through which sharing is done",
                            "properties": {
                              "module": {
                                "type": "object",
                                "description": "module details",
                                "properties": {
                                  "name": {
                                    "type": "string",
                                    "description": "module name",
                                    "maxLength": 100
                                  },
                                  "id": {
                                    "type": "string",
                                    "description": "module id",
                                    "maxLength": 20
                                  }
                                },
                                "additionalProperties": false,
                                "required": [
                                  "name",
                                  "id"
                                ]
                              },
                              "id": {
                                "type": "string",
                                "description": "id of the record through which sharing is done",
                                "maxLength": 20
                              }
                            },
                            "additionalProperties": false,
                            "required": [
                              "module",
                              "id"
                            ]
                          },
                          "shared_time": {
                            "type": "string",
                            "description": "time when the record was shared",
                            "format": "date-time"
                          },
                          "permission": {
                            "type": "string",
                            "description": "level of access granted",
                            "enum": [
                              "read_only",
                              "read_write",
                              "full_access"
                            ]
                          },
                          "shared_by": {
                            "type": "object",
                            "description": "details of the user who shared the record",
                            "properties": {
                              "name": {
                                "type": "string",
                                "description": "name of the user who shared the record",
                                "maxLength": 100
                              },
                              "id": {
                                "type": "string",
                                "description": "id of the user who shared the record",
                                "maxLength": 20
                              },
                              "zuid": {
                                "type": "string",
                                "description": "zuid of the user who shared the record",
                                "maxLength": 20
                              }
                            },
                            "additionalProperties": false,
                            "required": [
                              "name",
                              "id",
                              "zuid"
                            ]
                          },
                          "type": {
                            "type": "string",
                            "description": "type of sharing",
                            "enum": [
                              "private",
                              "public"
                            ]
                          }
                        },
                        "additionalProperties": false,
                        "required": [
                          "shared_with",
                          "share_related_records",
                          "shared_through",
                          "permission",
                          "type"
                        ]
                      }
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "204": {
            "description": "No Content"
          },
          "400": {
            "description": "Bad Request Response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "bad request response",
                  "type": "object",
                  "additionalProperties": true,
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/ViewParamWithManageValueErrorResponse"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidRecordIdErrorResponse"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidModuleNameErrorResponse"
                    }
                  ]
                }
              }
            }
          },
          "403": {
            "description": "Forbidden Response",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/CommonForbiddenErrorResponse"
                    },
                    {
                      "$ref": "#/components/schemas/RecordForbiddenErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "createShareRecords",
        "summary": "Create Share Records",
        "description": "Create Share Records. API exposed to customers",
        "security": [
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.leads.CREATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.contacts.CREATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.accounts.CREATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.deals.CREATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.products.CREATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.tasks.CREATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.events.CREATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.calls.CREATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.quotes.CREATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.invoices.CREATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.campaigns.CREATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.vendors.CREATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.pricebooks.CREATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.salesorders.CREATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.purchaseorders.CREATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.solutions.CREATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.cases.CREATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.cross_sellings.CREATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.next_buys.CREATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.first_buys.CREATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.rebuys.CREATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.bundles.CREATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.custom.CREATE"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ModuleApiName"
          },
          {
            "$ref": "#/components/parameters/RecordId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Create Share Records Request",
                "properties": {
                  "share": {
                    "type": "array",
                    "description": "additional information",
                    "maxItems": 20,
                    "items": {
                      "type": "object",
                      "description": "share record details",
                      "properties": {
                        "type": {
                          "type": "string",
                          "description": "type of sharing",
                          "enum": [
                            "private",
                            "public"
                          ]
                        },
                        "share_related_records": {
                          "type": "boolean",
                          "description": "indicates if related records are shared"
                        },
                        "permission": {
                          "type": "string",
                          "description": "level of access granted",
                          "enum": [
                            "read_only",
                            "read_write",
                            "full_access"
                          ]
                        },
                        "shared_with": {
                          "type": "object",
                          "description": "details of whom the record is shared with",
                          "properties": {
                            "type": {
                              "type": "string",
                              "description": "type of entity with whom the record is shared",
                              "enum": [
                                "roles",
                                "groups",
                                "users"
                              ]
                            },
                            "id": {
                              "type": "string",
                              "description": "id of the entity with whom the record is shared",
                              "maxLength": 20
                            }
                          },
                          "additionalProperties": false,
                          "required": [
                            "type",
                            "id"
                          ]
                        }
                      },
                      "additionalProperties": false,
                      "required": [
                        "type",
                        "permission",
                        "shared_with"
                      ]
                    }
                  },
                  "notify_shared_members": {
                    "type": "boolean",
                    "description": "indicates whether to notify the shared members"
                  },
                  "notify_on_completion": {
                    "type": "boolean",
                    "description": "indicates whether to notify on completion"
                  }
                },
                "additionalProperties": false,
                "required": [
                  "share"
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Create Share Records Success Response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Create Share Records Success Response",
                  "type": "object",
                  "properties": {
                    "share": {
                      "type": "array",
                      "description": "list of share record creation responses",
                      "maxItems": 20,
                      "items": {
                        "type": "object",
                        "description": "share record creation response details",
                        "properties": {
                          "code": {
                            "type": "string",
                            "description": "response code",
                            "enum": [
                              "SUCCESS"
                            ]
                          },
                          "details": {
                            "type": "object",
                            "description": "additional information",
                            "additionalProperties": false
                          },
                          "message": {
                            "type": "string",
                            "description": "response message",
                            "enum": [
                              "record will be shared successfully"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "description": "response status",
                            "enum": [
                              "success"
                            ]
                          }
                        },
                        "additionalProperties": false,
                        "required": [
                          "code",
                          "details",
                          "message",
                          "status"
                        ]
                      }
                    }
                  },
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Bad Request Response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "bad request response",
                  "type": "object",
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/InvalidShareWithValueErrorResponse"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidShareWithIdErrorResponse"
                    },
                    {
                      "$ref": "#/components/schemas/ActivityModuleRelatedIssueErrorResponse"
                    },
                    {
                      "$ref": "#/components/schemas/ShareLimitExceedErrorResponse"
                    },
                    {
                      "$ref": "#/components/schemas/AmbiguousShareErrorResponse"
                    },
                    {
                      "$ref": "#/components/schemas/MandatoryNotFound"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidTypeErrorResponse"
                    },
                    {
                      "$ref": "#/components/schemas/MaximumLengthErrorResponse"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidRecordIdErrorResponse"
                    },
                    {
                      "$ref": "#/components/schemas/UnsupportedModule"
                    },
                    {
                      "$ref": "#/components/schemas/InvalidModuleNameErrorResponse"
                    }
                  ],
                  "additionalProperties": true
                }
              }
            }
          },
          "403": {
            "description": "Forbidden Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "forbidden response",
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/CommonForbiddenErrorResponse"
                    },
                    {
                      "$ref": "#/components/schemas/SchedularAlreadyRunningErrorResponse"
                    },
                    {
                      "$ref": "#/components/schemas/SharingSharedRecordErrorResponse"
                    },
                    {
                      "$ref": "#/components/schemas/RecordLevelSharingNotSupportedForModuleErrorResponse"
                    },
                    {
                      "$ref": "#/components/schemas/NotifyMembersWithoutFeeds"
                    },
                    {
                      "$ref": "#/components/schemas/RecordForbiddenErrorResponse"
                    }
                  ],
                  "additionalProperties": true
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "updateShareRecords",
        "summary": "Update Share Records",
        "description": "Update Share Records. API exposed to customers",
        "security": [
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.leads.UPDATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.contacts.UPDATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.accounts.UPDATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.deals.UPDATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.products.UPDATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.tasks.UPDATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.events.UPDATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.calls.UPDATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.quotes.UPDATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.invoices.UPDATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.campaigns.UPDATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.vendors.UPDATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.pricebooks.UPDATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.salesorders.UPDATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.purchaseorders.UPDATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.solutions.UPDATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.cases.UPDATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.cross_sellings.UPDATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.next_buys.UPDATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.first_buys.UPDATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.rebuys.UPDATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.bundles.UPDATE"
            ]
          },
          {
            "iam-oauth2-schema": [
              "ZohoCRM.share.custom.UPDATE"
            ]
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ModuleApiName"
          },
          {
            "$ref": "#/components/parameters/RecordId"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Update Share Records Request",
                "properties": {
                  "share": {
                    "type": "array",
                    "description": "additional information",
                    "maxItems": 20,
                    "items": {
                      "type": "object",
                      "description": "share record details",
                      "properties": {
                        "type": {
                          "type": "string",
                          "description": "type of sharing",
                          "enum": [
                            "private",
                            "public"
                          ]
                        },
                        "share_related_records": {
                          "type": "boolean",
                          "description": "indicates if related records are shared"
                        },
                        "permission": {
                          "type": "string",
                          "description": "level of access granted",
                          "enum": [
                            "read_only",
                            "read_write",
                            "full_access"
                          ]
                        },
                        "shared_with": {
                          "type": "object",
                          "description": "details of whom the record is shared with",
                          "properties": {
                            "type": {
                              "type": "string",
                              "description": "type of entity with whom the record is shared",
                              "enum": [
                                "roles",
                                "groups",
                                "users"
                              ]
                            },
                            "id": {
                              "type": "string",
                              "description": "id of the entity with whom the record is shared",
                              "maxLength": 20
                            }
                          },
                          "additionalProperties": false,
                          "required": [
                            "type",
                            "id"
                          ]
                        }
                      },
                      "additionalProperties": false,
                      "required": [
                        "type",
                        "permission",
                        "shared_with"
                      ]
                    }
                  },
                  "notify_shared_members": {
                    "type": "boolean",
                    "description": "indicates whether to notify the shared members"
                  },
                  "notify_on_completion": {
                    "type": "boolean",
                    "description": "indicates whether to notify on completion"
                  }
                },
                "additionalProperties": false,
                "required": [
                  "share"
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Update Share Records Success Response",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Update Share Records Success Response",
                  "type": "object",
                  "properties": {
                    "share": {
                      "type": "array",
                      "description": "list of share record update responses",
                      "maxItems": 20,
                      "items": {
                        "type": "object",
                        "description": "share record update response details",
                        "properties": {
                          "code": {
                            "type": "string",
                            "description": "response code",
                            "enum": [
                              "SUCCESS"
                            ]
                          },
                          "details": {
                            "type": "object",
                            "description": "additional information",
                            "additionalProperties": false
                          },
                          "message": {
                            "type": "string",
                            "description": "response message",
                            "enum": [
                              "record will be shared successfully"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "description": "response status",
                            "enum": [
                              "success"
                            ]
                          }
                        },
                        "additionalProperties": false,
                        "requ

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