Zoho: Create a custom module
Zoho modules.createModules: arguments, response, policy and SDK examples.
← Modules operations · Get started
Operation zoho.createmodules
Provider route: POST /crm/v8/settings/modules. 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["modules"]["createModules"]>[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.modules.createModules(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.modules.create_modules(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
body | object | Required within parent | Represents the request body structure for creating a custom module, containing the module definition in the modules array. Additional keys: not allowed |
body.modules | array | Required within parent | Specify the module definitions to create. Only one module definition object can be included per request. Maximum items: 1 Minimum items: 1 |
body.modules[] | object | Each item | Specify the details of the Module definition object containing module metadata, optional access_type, profiles (not applicable for team_based), and optional display field configuration Additional keys: not allowed |
body.modules[].access_type | string | Optional | Specify the access type for the module.Defaults to org_based when omitted. Use team_based to create a team module. Possible values: org_based - The module is accessible based on organizational profile settings. team_based - The module is restricted to team-based access. Default: org_based One of: org_based, team_based |
body.modules[].api_name | string | Optional | Specify the unique API name for the module. The name must begin with an English alphabet character, must not end with an underscore, and must not contain two consecutive underscores. If omitted, the system generates the API name from the plural_label value. Maximum length: 50 Minimum length: 1 Pattern: ^[a-zA-Z0-9]+$ |
body.modules[].display_field | object | Optional | Specify the details of the display field for the module. This is optional, but if provided, either field_label or data_type is mandatory. Supported data types are autonumber and text. If this is not specified, the system generates a text display field. If data_type is ‘autonumber’, then auto_number configuration with start_number is mandatory. Additional keys: not allowed |
body.modules[].display_field.auto_number | object | Optional | Specify the auto-number configuration for the display field. Required when data_type is autonumber. Additional keys: not allowed |
body.modules[].display_field.auto_number.prefix | string | Optional | Specify the prefix to prepend to each auto-generated number value in the display field. Maximum length: 50 |
body.modules[].display_field.auto_number.start_number | string | Required within parent | Specify the starting number for the auto-number sequence. Only numeric characters are allowed. Maximum length: 16 Pattern: ^[0-9]+$ |
body.modules[].display_field.auto_number.suffix | string | Optional | Specify the suffix to append to each auto-generated number value in the display field. Maximum length: 50 |
body.modules[].display_field.data_type | string | Optional | Specify the data type of the display field. Possible values: autonumber - Automatically generates a unique number sequence for each record. text - Allows users to enter text values manually. One of: autonumber, text |
body.modules[].display_field.field_label | string | Optional | Specify the unique display label of the field used as the module’s display field. Either this property or data_type must be provided when specifying the display field. Maximum length: 100 Minimum length: 1 |
body.modules[].plural_label | string | Required within parent | Specify the unique plural name of the module. Only letters, numbers, and spaces are supported. Maximum length: 50 Minimum length: 1 Pattern: ^[a-zA-Z0-9]+$ |
body.modules[].profiles | array | Optional | Specify the array of profile IDs that determine which user profiles can access this module. Required for org_based modules. Do not pass this key for team_based modules. Duplicate profile IDs are not allowed. Maximum items: 203 Minimum items: 1 Unique items: true |
body.modules[].profiles[] | object | Each item | Specify the details of a profile to be granted access to the module. Additional keys: not allowed |
body.modules[].profiles[].id | string | Required within parent | Specify the unique ID of the profile to be granted access to the module. Format: int64 Maximum length: 19 Minimum length: 1 Pattern: ^[0-9]{1,19}$ |
body.modules[].singular_label | string | Required within parent | Specify the unique singular name of the module. Only letters, numbers, and spaces are supported. Maximum length: 50 Minimum length: 1 Pattern: ^[a-zA-Z0-9]+$ |
body.modules[] (allOf 1) | JSON | All variants apply | Specifies the fields available for defining a new custom module, including name labels, API name, and optional display field configuration. |
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 | Represents the response body returned when a custom module is successfully created, containing the resulting module details in a modules array. Additional keys: not allowed |
modules | array | Required within parent | Represents the array containing the result of the single module creation request. Contains exactly one item for each module creation request. Maximum items: 1 Minimum items: 1 |
modules[] | object | Each item | Represents the result of the module creation request, including the status, message, and identifier of the created module. Additional keys: not allowed |
modules[].code | string | Required within parent | Represents the status code of the module creation operation. Possible values: SUCCESS - The module creation completed successfully. Known values: SUCCESS |
modules[].details | object | Required within parent | Represents the details of the created module, including its unique identifier. Additional keys: not allowed |
modules[].details.id | string | Required within parent | Represents the unique identifier of the newly created module. Format: int64 |
modules[].message | string | Required within parent | Represents the confirmation message for the module creation operation. Possible values: module created successfully - The module creation completed without errors. Known values: module created successfully |
modules[].status | string | Required within parent | Represents the overall status of the module creation operation. Possible values: success - The module creation completed successfully. Known values: success |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: zoho.createmodules. Catalog operation: createModules. 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.