Skip to content

Zoho: Share a record

Zoho shareRecords.createShareRecords: arguments, response, policy and SDK examples.

← Share records operations · Get started

Operation zoho.createsharerecords

Provider route: POST /crm/v8/{moduleApiName}/{recordId}/actions/share. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/zoho with npm, or alter-sdk-zoho with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { ZohoIntegration } from "@alter-ai/zoho";
async function execute(input: Parameters<ZohoIntegration["shareRecords"]["createShareRecords"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new ZohoIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.shareRecords.createShareRecords(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_zoho import ZohoIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = ZohoIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.share_records.create_share_records(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.moduleApiNamestringRequired within parentUnique API identifier for the module used in third-party integrations; starts with a letter, contains only alphanumeric characters and underscores, and has no consecutive or trailing underscores.
Maximum length: 50
path.recordIdstringRequired within parentRepresents the unique identifier of the RecordGETDataItem record.
Format: int64
bodyobjectRequired within parentRepresents the request body.
Additional keys: not allowed
body.notify_on_completionbooleanOptionalSpecify whether to send an email notification to the record
owner once the share action is completed.

Possible values:

- true

- false
body.notify_shared_membersbooleanOptionalSpecify whether to send a notification to the members with
whom the record is shared.

Possible values:

- true

- false
body.sharearrayRequired within parentSpecify the list of share entries to apply. Each entry defines a recipient, the access level, and the type of sharing. You can provide a maximum of 20 entries in a single request.
Maximum items: 20
body.share[]objectEach itemEach object represents an entry in the array.
Additional keys: not allowed
body.share[].permissionstringRequired within parentSpecify the level of access to grant for the shared
record.

Possible values:

- read_only

- read_write

- full_access

One of: read_only, read_write, full_access
body.share[].share_related_recordsbooleanOptionalSpecify whether to share the related records along
with the record.


Possible values:

- true

- false
body.share[].shared_withJSONRequired within parentSpecify the details of the entity (user, role, or group) with which to share the record.
body.share[].shared_with (anyOf 1)objectAlternativeIndicates that you can share the record along with roles.
Additional keys: not allowed
body.share[].shared_with (anyOf 1).idstringRequired within parentRepresents the ID of the role with whom the record is being shared.
Maximum length: 19
body.share[].shared_with (anyOf 1).typestringRequired within parenttype of entity with whom the record is shared
One of: roles
body.share[].shared_with (anyOf 2)objectAlternativeIndicates that you can share the record along with groups.
Additional keys: not allowed
body.share[].shared_with (anyOf 2).idstringRequired within parentRepresents the ID of the group with whom the record is being shared.
Maximum length: 19
body.share[].shared_with (anyOf 2).typestringRequired within parenttype of entity with whom the record is shared
One of: groups
body.share[].shared_with (anyOf 3)objectAlternativeIndicates that you can share the record along with users.
Additional keys: not allowed
body.share[].shared_with (anyOf 3).idstringRequired within parentRepresents the ID of the user with whom the record is being shared.
Maximum length: 19
body.share[].shared_with (anyOf 3).typestringRequired within parenttype of entity with whom the record is shared
One of: users
body.share[].typestringRequired within parentSpecify the type of sharing to apply to the record.

Possible values:
- private
- public

One of: private, public

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$JSONRoot
$ (anyOf 1)objectAlternativeRepresents the success response of the API request.
Additional keys: not allowed
$ (anyOf 1).sharearrayRequired within parentRepresents details of each share record creation result.
Maximum items: 20
$ (anyOf 1).share[]ModelEach itemExpand Update share permissions — response body — share share item
$ (anyOf 2)objectAlternativeRepresents the response of partial success.
Additional keys: not allowed
$ (anyOf 2).sharearrayOptionalRepresents the details of each share record creation result.
Maximum items: 20
$ (anyOf 2).share[]objectEach itemRepresents the per-entry result for one share entry, which can be either a success result or a specific error.
Additional keys: allowed
$ (anyOf 2).share[] (anyOf 1)ModelAlternativeExpand Update share permissions — response body — share share item
$ (anyOf 2).share[] (anyOf 2)JSONAlternativeEach string represents the per-entry result for one share entry, which can be either a success or a specific error.
$ (anyOf 2).share[] (anyOf 2) (anyOf 1)ModelAlternativeExpand Update share permissions — response body — Represents the partial success response / share / item / value / code: MANDATORY NOT FOUND, message: required field not found, status: error
$ (anyOf 2).share[] (anyOf 2) (anyOf 2)ModelAlternativeExpand Update share permissions — response body — Represents the partial success response / share / item / value / code: INVALID DATA, message: invalid data, status: error — Invalid Type Error Response
$ (anyOf 2).share[] (anyOf 2) (anyOf 3)ModelAlternativeExpand Update share permissions — response body — Represents the partial success response / share / item / value / code: INVALID DATA, message: invalid data, status: error — Invalid Share With Value Error Response
$ (anyOf 2).share[] (anyOf 2) (anyOf 4)ModelAlternativeExpand Update share permissions — response body — Represents the partial success response / share / item / value / code: INVALID DATA, status: error
$ (anyOf 2).share[] (anyOf 2) (anyOf 5)ModelAlternativeExpand Update share permissions — response body — Represents the partial success response / share / item / value / code: INVALID DATA, message: cannot share the related records, status: error
$ (anyOf 2).share[] (anyOf 2) (anyOf 6)ModelAlternativeExpand Update share permissions — response body — Represents the partial success response / share / item / value / code: LIMIT EXCEEDED, status: error

Referenced models: Update share permissions — response body — Represents the partial success response / share / item / value / code: INVALID DATA, message: cannot share the related records, status: error, Update share permissions — response body — share share item, Update share permissions — response body — Represents the partial success response / share / item / value / code: INVALID DATA, status: error, Update share permissions — response body — Represents the partial success response / share / item / value / code: INVALID DATA, message: invalid data, status: error — Invalid Share With Value Error Response, Update share permissions — response body — Represents the partial success response / share / item / value / code: INVALID DATA, message: invalid data, status: error — Invalid Type Error Response, Update share permissions — response body — Represents the partial success response / share / item / value / code: LIMIT EXCEEDED, status: error, Update share permissions — response body — Represents the partial success response / share / item / value / code: MANDATORY NOT FOUND, message: required field not found, status: error

Update share permissions — response body — Represents the partial success response / share / item / value / code: INVALID DATA, message: cannot share the related records, status: error
FieldTypePresenceDescription and constraints
$objectRootRepresents the error response returned when **share_related_records** is set on a module that does not support sharing related records.
Additional keys: not allowed
codestringRequired within parentRepresents the response code returned by the API.
Known values: INVALID_DATA
detailsobjectRequired within parentRepresents the additional information about the response.
Additional keys: not allowed
details.api_namestringRequired within parentRepresents the API name of the parameter that caused the error.
Maximum length: 50
details.json_pathstringRequired within parentRepresents the JSON path of the parameter that caused the error.
Maximum length: 100
messagestringRequired within parentRepresents the response message returned by the API.
Known values: cannot share the related records
statusstringRequired within parentRepresents the status of the API call.
Known values: error
Update share permissions — response body — share share item
FieldTypePresenceDescription and constraints
$objectRootRepresents the per-entry success result of a share record create or update operation.
Additional keys: not allowed
codestringRequired within parentRepresents the response code returned by the API.
Known values: SUCCESS
detailsobjectRequired within parentRepresents the additional information about the response.
Additional keys: not allowed
messagestringRequired within parentRepresents the response message returned by the API.
Known values: record will be shared successfully
statusstringRequired within parentRepresents the status of the API call.
Known values: success
Update share permissions — response body — Represents the partial success response / share / item / value / code: INVALID DATA, status: error
FieldTypePresenceDescription and constraints
$objectRootRepresents the error response returned when the recipient ID in **shared_with** is invalid or when the record cannot be shared with the specified entity.
Additional keys: not allowed
codestringRequired within parentRepresents the response code returned by the API.
Known values: INVALID_DATA
detailsobjectRequired within parentRepresents the additional information about the response.
Additional keys: not allowed
details.api_namestringRequired within parentRepresents the API name of the parameter that caused the error.
Maximum length: 50
details.json_pathstringRequired within parentRepresents the JSON path of the parameter that caused the error.
Maximum length: 100
messagestringRequired within parentRepresents the response message returned by the API.

**Possible values**:
- invalid data
- invalid user Id
- invalid role Id
- invalid group Id
- cannot share to the user

Known values: invalid data, invalid user Id, invalid role Id, invalid group Id, cannot share to the user
statusstringRequired within parentRepresents the status of the API call.
Known values: error
Update share permissions — response body — Represents the partial success response / share / item / value / code: INVALID DATA, message: invalid data, status: error — Invalid Share With Value Error Response
FieldTypePresenceDescription and constraints
$objectRootRepresents the error response returned when the **shared_with** object in a share entry is invalid due to a dependent field mismatch.
Additional keys: not allowed
codestringRequired within parentRepresents the response code returned by the API.
Known values: INVALID_DATA
detailsModelRequired within parentExpand Update share permissions — response body — Represents the partial success response / share / item / value / code: INVALID DATA, message: invalid data, status: error details
messagestringRequired within parentRepresents the response message returned by the API.
Known values: invalid data
statusstringRequired within parentRepresents the status of the API call.
Known values: error

Referenced models: Update share permissions — response body — Represents the partial success response / share / item / value / code: INVALID DATA, message: invalid data, status: error details

Update share permissions — response body — Represents the partial success response / share / item / value / code: INVALID DATA, message: invalid data, status: error — Invalid Type Error Response
FieldTypePresenceDescription and constraints
$objectRootRepresents the error response returned when the `type` or `permission` field in a share entry does not match the expected pattern.
Additional keys: not allowed
codestringRequired within parentRepresents the response code returned by the API.
Known values: INVALID_DATA
detailsobjectRequired within parentRepresents the additional information about the response.
Additional keys: not allowed
details.api_namestringRequired within parentRepresents the API name of the parameter that caused the error.

**Possible values**:
- type
- permission

Known values: type, permission
details.json_pathstringRequired within parentRepresents the JSON path of the parameter that caused the error.
Maximum length: 100
details.regexstringRequired within parentRepresents the regular expression pattern expected for the parameter value.
Known values: private|public, read_only|read_write|full_access
messagestringRequired within parentRepresents the response message returned by the API.
Known values: invalid data
statusstringRequired within parentRepresents the status of the API call.
Known values: error
Update share permissions — response body — Represents the partial success response / share / item / value / code: LIMIT EXCEEDED, status: error
FieldTypePresenceDescription and constraints
$objectRootRepresents the error response returned when the share entry exceeds the per-record sharing limit for the recipient type.
Additional keys: not allowed
codestringRequired within parentRepresents the response code returned by the API.
Known values: LIMIT_EXCEEDED
detailsobjectRequired within parentRepresents the additional information about the response.
Additional keys: not allowed
details.api_namestringOptionalRepresents the API name of the parameter that caused the error.
Known values: type
details.json_pathstringOptionalRepresents the JSON path of the parameter that caused the error.
Maximum length: 100
details.limitJSONOptional
details.limit (anyOf 1)integerAlternativeRepresents the maximum number of share records allowed for the entity type.
Format: int32
details.limit (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
messagestringRequired within parentRepresents the response message returned by the API.
Maximum length: 100
statusstringRequired within parentRepresents the status of the API call.
Known values: error
Update share permissions — response body — Represents the partial success response / share / item / value / code: MANDATORY NOT FOUND, message: required field not found, status: error
FieldTypePresenceDescription and constraints
$objectRootRepresents the error response returned when a mandatory field is missing from the share entry.
Additional keys: not allowed
codestringRequired within parentRepresents the response code returned by the API.
Known values: MANDATORY_NOT_FOUND
detailsobjectRequired within parentRepresents the additional information about the response.
Additional keys: not allowed
details.api_namestringRequired within parentRepresents the API name of the parameter that caused the error.
Maximum length: 50
details.json_pathstringRequired within parentRepresents the JSON path of the parameter that caused the error.
Maximum length: 100
messagestringRequired within parentRepresents the response message returned by the API.
Known values: required field not found
statusstringRequired within parentRepresents the status of the API call.
Known values: error
Update share permissions — response body — Represents the partial success response / share / item / value / code: INVALID DATA, message: invalid data, status: error details
FieldTypePresenceDescription and constraints
$objectRootRepresents the additional information about the response.
Additional keys: not allowed
api_namestringRequired within parentRepresents the API name of the parameter that caused the error.
Maximum length: 50
dependeeobjectRequired within parentRepresents the details of the parameter on which this parameter depends.
Additional keys: not allowed
dependee.api_namestringRequired within parentRepresents the API name of the parameter that caused the error.
Maximum length: 50
dependee.json_pathstringRequired within parentRepresents the JSON path of the parameter that caused the error.
Maximum length: 100
json_pathstringRequired within parentRepresents the JSON path of the parameter that caused the error.
Maximum length: 100

SDK function policy ID: zoho.createsharerecords. Catalog operation: createShareRecords. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.