Zoho: Update a user group
Zoho userGroups.updateGroup: arguments, response, policy and SDK examples.
← User groups operations · Get started
Operation zoho.updategroup
Provider route: PUT /crm/v8/settings/user_groups/{group}. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”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["userGroups"]["updateGroup"]>[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.userGroups.updateGroup(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom 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.user_groups.update_group(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
path | object | Required within parent | Additional keys: not allowed |
path.group | string | Required within parent | One of: 1234567890 |
body | object | Required within parent | Request body schema for updating a user group. Additional keys: not allowed |
body.user_groups | array | Required within parent | Specify an array containing one user group object to update. Maximum items: 1 |
body.user_groups[] | object | Each item | Specify the updated details for the user group, including the name, optional description, and member sources. Additional keys: not allowed |
body.user_groups[].description | JSON | Optional | Specify an updated text description for the user group, or null to remove the description. |
body.user_groups[].description (anyOf 1) | string | Alternative | Specify the updated text description for the user group. Maximum length: 250 |
body.user_groups[].description (anyOf 2) | null | Alternative | Use null to remove the existing description. |
body.user_groups[].name | string | Required within parent | The name to be updated for the user group. Accepts alphanumeric characters. Note that the name must be unique for each group. Maximum length: 250 |
body.user_groups[].sources | array | Required within parent | Specify the updated array of member sources for the user group. Replaces all existing sources. Maximum items: 200 |
body.user_groups[].sources[] | object | Each item | Specify one member source entry to add to the user group, including the source type, identifier, and optional flags. Additional keys: not allowed |
body.user_groups[].sources[].source | object | Required within parent | Specify the identifier of the source to add to the user group. Additional keys: not allowed |
body.user_groups[].sources[].source.id | string | Required within parent | Specify the unique ID of the user, role, or territory to add as a member source. Maximum length: 19 |
body.user_groups[].sources[].sub_territories | JSON | Optional | Specify whether to include members from sub-territories when the source type is territories. Possible values: true - Include members from sub-territories. false - Do not include members from sub-territories. |
body.user_groups[].sources[].sub_territories (anyOf 1) | boolean | Alternative | Specify true to include members from sub-territories, or false to exclude them. |
body.user_groups[].sources[].sub_territories (anyOf 2) | null | Alternative | Use null to omit the sub-territories flag. |
body.user_groups[].sources[].subordinates | JSON | Optional | Specify whether to include users in subordinate roles when the source type is roles or territories. Possible values: true - Include users in subordinate roles. false - Do not include users in subordinate roles. |
body.user_groups[].sources[].subordinates (anyOf 1) | boolean | Alternative | Specify true to include users in subordinate roles, or false to exclude them. |
body.user_groups[].sources[].subordinates (anyOf 2) | null | Alternative | Use null to omit the subordinates flag. |
body.user_groups[].sources[].type | string | Required within parent | Specify the type of the member source being updated for the user group. Possible values: territories - Add a CRM territory as a member source. roles - Add a CRM role as a member source. users - Add individual CRM users as a member source. One of: territories, roles, users |
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Response schema for a successful user group update. Additional keys: not allowed |
user_groups | array | Required within parent | Represents the array containing the result of the user group update operation. Maximum items: 1 |
user_groups[] | object | Each item | Represents the update result for the user group, including the status, result code, message, and the group ID. Additional keys: not allowed |
user_groups[].code | string | Required within parent | Represents the result code for the user group update operation. Possible values: SUCCESS - The user group update succeeds. Known values: SUCCESS |
user_groups[].details | object | Required within parent | Represents additional details about the updated user group. Additional keys: not allowed |
user_groups[].details.id | string | Required within parent | Represents the unique ID of the updated user group. Maximum length: 19 |
user_groups[].message | string | Required within parent | Represents the result message for the user group update operation. Maximum length: 500 |
user_groups[].status | string | Required within parent | Represents the status of the user group update operation. Possible values: success - The user group update succeeds. Known values: success |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: zoho.updategroup. Catalog operation: updateGroup. 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.