Skip to content

Zoho: Update Contact Roles

Zoho contactRoles.updateContactRoles: arguments, response, policy and SDK examples.

← Contact roles operations · Get started

Operation zoho.updatecontactroles

Provider route: PUT /crm/v8/Contacts/roles. 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["contactRoles"]["updateContactRoles"]>[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.contactRoles.updateContactRoles(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.contact_roles.update_contact_roles(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
bodyobjectRequired within parentSpecify the contact role details to update in the CRM organization.
Additional keys: not allowed
body.contact_rolesarrayRequired within parentSpecify the list of contact roles to update.
Maximum items: 100
body.contact_roles[]objectEach itemSpecify the details of a single contact role to update.
Additional keys: not allowed
body.contact_roles[].idstringRequired within parentSpecify the unique ID of the contact role to update. Use the [List Contact Roles](contact_roles.yaml#$.paths./contacts/roles.get) resource to retrieve contact role IDs.
Maximum length: 19
body.contact_roles[].namestringRequired within parentSpecify the name of the contact role.
Maximum length: 50
Pattern: [A-Za-z0-9 ]{1,50}
body.contact_roles[].sequence_numbernumberOptionalSpecify the display position of the contact role in the CRM UI picklist.

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)objectAlternativeContains the results of the contact role update operation.
Additional keys: not allowed
$ (anyOf 1).contact_rolesarrayRequired within parentContains the update results for each contact role in the request.
Maximum items: 100
$ (anyOf 1).contact_roles[]objectEach itemRepresents the update result for a single contact role in the request.
Additional keys: not allowed
$ (anyOf 1).contact_roles[].codestringRequired within parentRepresents the status code of the update operation.

Possible values:
- SUCCESS - The contact role update completed successfully.

Known values: SUCCESS
$ (anyOf 1).contact_roles[].detailsobjectRequired within parentRepresents the details of the updated contact role.
Additional keys: not allowed
$ (anyOf 1).contact_roles[].details.idstringRequired within parentRepresents the unique ID of the updated contact role.
Maximum length: 19
$ (anyOf 1).contact_roles[].messagestringRequired within parentRepresents the message describing the result of the update operation.
Maximum length: 255
$ (anyOf 1).contact_roles[].statusstringRequired within parentRepresents the overall status of the update operation.

Possible values:
- success - The contact role update completed successfully.

Known values: success
$ (anyOf 2)objectAlternativeContains mixed success and error results for bulk contact role update.
Additional keys: not allowed
$ (anyOf 2).contact_rolesarrayRequired within parentContains the mixed results for each contact role in the request.
Maximum items: 100
$ (anyOf 2).contact_roles[]JSONEach itemRepresents a single result entry, which is either a success record or an error record.
$ (anyOf 2).contact_roles[] (anyOf 1)ModelAlternativeExpand Create Contact Roles — response body — contact_roles / contact_roles / item / code: MANDATORY NOT FOUND, status: error
$ (anyOf 2).contact_roles[] (anyOf 2)ModelAlternativeExpand Update Contact Roles — response body — contact_roles / contact_roles / item / code: INVALID DATA, status: error
$ (anyOf 2).contact_roles[] (anyOf 3)ModelAlternativeExpand Update Contact Roles — response body — contact_roles / contact_roles / item / code: DUPLICATE DATA, status: error
$ (anyOf 2).contact_roles[] (anyOf 4)ModelAlternativeExpand Update Contact Roles — response body — contact roles contact roles item array
$ (anyOf 2).contact_roles[] (anyOf 5)ModelAlternativeExpand Create Contact Roles — response body — contact roles contact roles item
$ (anyOf 2).contact_roles (allOf 1)JSONAll variants applyEnsures the array contains at least one successfully updated contact role.
$ (anyOf 2).contact_roles (allOf 2)JSONAll variants applyEnsures the array contains at least one contact role that failed validation.

Referenced models: Update Contact Roles — response body — contact roles contact roles item array, Create Contact Roles — response body — contact roles contact roles item, Update Contact Roles — response body — contact_roles / contact_roles / item / code: DUPLICATE DATA, status: error, Update Contact Roles — response body — contact_roles / contact_roles / item / code: INVALID DATA, status: error, Create Contact Roles — response body — contact_roles / contact_roles / item / code: MANDATORY NOT FOUND, status: error

Update Contact Roles — response body — contact roles contact roles item array
FieldTypePresenceDescription and constraints
$arrayRootContains the list of duplicate data errors for contact role operations.
Maximum items: 100
$[]objectEach itemRepresents a duplicate data error for a contact role field.
Additional keys: not allowed
$[].codestringRequired within parentRepresents the error code.

**Possible values:**
- **DUPLICATE_DATA** - A contact role with the same name already exists.

Known values: DUPLICATE_DATA
$[].detailsJSONRequired within parentRepresents the error details for the duplicate data.
$[].details (anyOf 1)ModelAlternativeExpand Update Contact Roles — response body — contact roles contact roles item array item details api name, id, json path
$[].details (anyOf 2)objectAlternativeRepresents duplicate data error details that include the API name and JSON path of the conflicting field.
Additional keys: not allowed
$[].details (anyOf 2).api_namestringRequired within parentRepresents the API name of the field that contains a duplicate value.
Maximum length: 100
$[].details (anyOf 2).json_pathstringRequired within parentRepresents the JSON path to the field that contains a duplicate value.
Maximum length: 255
$[].messagestringRequired within parentRepresents the error message.
Maximum length: 255
$[].statusstringRequired within parentRepresents the error status.

**Possible values:**
- **error** - The request failed.

Known values: error

Referenced models: Update Contact Roles — response body — contact roles contact roles item array item details api name, id, json path

Create Contact Roles — response body — contact roles contact roles item
FieldTypePresenceDescription and constraints
$objectRootRepresents the result of a successful contact role operation.
Additional keys: not allowed
codestringRequired within parentRepresents the status code of the operation.

**Possible values:**
- **SUCCESS** - The contact role operation completed successfully.

Known values: SUCCESS
detailsobjectRequired within parentRepresents the details of the contact role for the create or update operation.
Additional keys: not allowed
details.idstringRequired within parentRepresents the unique ID of the contact role.
Maximum length: 19
messagestringRequired within parentRepresents the message describing the result of the operation.
Maximum length: 255
statusstringRequired within parentRepresents the overall status of the operation.

**Possible values:**
- **success** - The contact role operation completed successfully.

Known values: success
Update Contact Roles — response body — contact_roles / contact_roles / item / code: DUPLICATE DATA, status: error
FieldTypePresenceDescription and constraints
$objectRootRepresents an error when a contact role with the same name already exists in the CRM organization.
Additional keys: not allowed
codestringRequired within parentRepresents the error code.

**Possible values:**
- **DUPLICATE_DATA** - A contact role with the same name already exists.

Known values: DUPLICATE_DATA
detailsModelRequired within parentExpand Update Contact Roles — response body — contact_roles / contact_roles / item / code: DUPLICATE DATA, status: error details
messagestringRequired within parentRepresents the error message.
Maximum length: 255
statusstringRequired within parentRepresents the error status.

**Possible values:**
- **error** - The request failed.

Known values: error

Referenced models: Update Contact Roles — response body — contact_roles / contact_roles / item / code: DUPLICATE DATA, status: error details

Update Contact Roles — response body — contact_roles / contact_roles / item / code: INVALID DATA, status: error
FieldTypePresenceDescription and constraints
$objectRootRepresents an invalid data error for a contact role field in an update operation.
Additional keys: not allowed
codestringRequired within parentRepresents the error code.

**Possible values:**
- **INVALID_DATA** - The contact role data is invalid.

Known values: INVALID_DATA
detailsModelRequired within parentExpand Update Contact Roles — response body — contact_roles / contact_roles / item / code: INVALID DATA, status: error details
messagestringRequired within parentRepresents the error message.
Maximum length: 255
statusstringRequired within parentRepresents the error status.

**Possible values:**
- **error** - The request failed.

Known values: error

Referenced models: Update Contact Roles — response body — contact_roles / contact_roles / item / code: INVALID DATA, status: error details

Create Contact Roles — response body — contact_roles / contact_roles / item / code: MANDATORY NOT FOUND, status: error
FieldTypePresenceDescription and constraints
$objectRootRepresents an error when a required field is missing from the request.
Additional keys: not allowed
codestringRequired within parentRepresents the error code.

**Possible values:**
- **MANDATORY_NOT_FOUND** - A required field is missing from the request.

Known values: MANDATORY_NOT_FOUND
detailsobjectRequired within parentRepresents the error details for the missing field.
Additional keys: not allowed
details.api_namestringRequired within parentRepresents the API name of the missing required field.
Maximum length: 100
details.json_pathstringRequired within parentRepresents the JSON path to the missing required field.
Maximum length: 255
messagestringRequired within parentRepresents the error message.
Maximum length: 255
statusstringRequired within parentRepresents the error status.

**Possible values:**
- **error** - The request failed.

Known values: error
Update Contact Roles — response body — contact roles contact roles item array item details api name, id, json path
FieldTypePresenceDescription and constraints
$objectRootRepresents duplicate data error details that include the ID of the conflicting record.
Additional keys: not allowed
api_namestringRequired within parentRepresents the API name of the field that contains a duplicate value.
Maximum length: 100
idstringRequired within parentRepresents the ID of the existing contact role that conflicts with the duplicate name.
Maximum length: 19
json_pathstringRequired within parentRepresents the JSON path to the field that contains a duplicate value.
Maximum length: 255
Update Contact Roles — response body — contact_roles / contact_roles / item / code: DUPLICATE DATA, status: error details
FieldTypePresenceDescription and constraints
$objectRootRepresents the error details for the duplicate data.
Additional keys: not allowed
api_namestringRequired within parentRepresents the API name of the field that contains a duplicate value.
Maximum length: 100
idstringOptionalRepresents the ID of the contact role that has the duplicate name.
Maximum length: 19
json_pathstringRequired within parentRepresents the JSON path to the field that contains a duplicate value.
Maximum length: 255
Update Contact Roles — response body — contact_roles / contact_roles / item / code: INVALID DATA, status: error details
FieldTypePresenceDescription and constraints
$objectRootRepresents the error details for the invalid data.
Additional keys: not allowed
api_namestringRequired within parentRepresents the API name of the field that contains invalid data.
Maximum length: 100
idstringOptionalRepresents the ID of the contact role that triggered the invalid data error.
Maximum length: 19
json_pathstringRequired within parentRepresents the JSON path to the field that contains invalid data.
Maximum length: 255

SDK function policy ID: zoho.updatecontactroles. Catalog operation: updateContactRoles. 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.