> ## Documentation Index
> Fetch the complete documentation index at: https://docs.corsair.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Zoho CRM API reference

> API reference for the Zoho CRM plugin in Corsair: every `zohocrm.api.*` operation with its input and output types, taken from the plugin's Zod schemas.

> [!NOTE]
>
> **New to Corsair?** See [API access](https://docs.corsair.dev/concepts/api.md), [authentication](https://docs.corsair.dev/concepts/auth.md), and [error handling](https://docs.corsair.dev/concepts/error-handling).

## Ab Testing

### checkLaunchSuggestions

`abTesting.checkLaunchSuggestions`

Retrieve launch suggestions for an AB Testing configuration. To retrieve Zia AI launch suggestions for a Webform A/B Testing configuration in your Zoho CRM organization, indicating whether the test is ready to launch based on conversion rate analysis.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.abTesting.checkLaunchSuggestions({ id: '487687600000033300' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Specify the unique [Webform ID](webforms.yaml#\$.paths./settings/webforms.get). |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   AB_testing_launch_suggestions?: {
>     has_launch_suggestion?: boolean | null,
>     conversion_rate_in_abtest?: number | null,
>     conversion_rate_outside_abtest?: number | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### create

`abTesting.create`

Create AB testing configuration. To create a Webform A/B Test in your Zoho CRM organization. Webform A/B testing lets you run an experiment where two or more variations of a webform are shown to different segments of your website visitors, so you can compare their performance and identify the version that delivers the best…

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.abTesting.create({
	module: 'Leads',
	AB_testing: [{
		base_form: {},
		condition: { type: 'duration' },
		module: {},
		name: 'example',
		status: 'drafted',
		variant_form: [{}],
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the module API name for the AB test operation. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve module ID and API name. Possible values: **Leads** - Target the Leads module. |
| `AB_testing` | `object[]` | Yes | Represents the array of AB test configurations to create. The request body must contain a **AB\_testing** array with one object. |

> [accordion] AB\_testing full type
>
> ```ts theme={null}
> {
>   dynamic_allocation_by_zia?: boolean,
>   base_form: {
>     id?: string,
>     traffic?: number | string
>   },
>   notify?: boolean,
>   traffic_diversion?: null,
>   variant_form: {
>     form_attributes?: {
>       width?: 600 | 700 | 800 | 900,
>       font_attributes?: {
>         size?: number | string,
>         color?: string,
>         family?: string
>       },
>       display_form_name?: boolean,
>       color?: string,
>       align?: right | left | top
>     },
>     button_attributes?: {
>       color?: string,
>       name: string
>     }[],
>     form_fields?: {
>       type: general | advanced | portal,
>       help?: {
>       } | null,
>       field?: {
>         api_name: string,
>         field_label?: string,
>         id: string
>       },
>       hidden?: boolean | null,
>       date_format?: string | null,
>       required?: boolean | null,
>       field_name?: string | null,
>       site_key?: string | null,
>       secret_key?: string | null,
>       recaptcha_label?: string | null,
>       theme?: dark | light | null,
>       privacy_value?: string | null,
>       default_value?: string | null,
>       field_info?: {
>         type: string,
>         field_label?: string
>       } | null
>     }[],
>     traffic?: number | string
>   }[],
>   traffic?: number | string,
>   module: {
>     api_name?: string,
>     id?: string
>   },
>   condition: {
>     visitors?: number | string,
>     unit?: number | string,
>     period?: days | weeks | months,
>     from?: string,
>     to?: string,
>     type: duration | range | visits,
>     remaining?: number | string
>   },
>   name: string,
>   winner_configuration?: {
>     announce_automatically?: true | false,
>     conversion_percentage_difference?: number | string
>   },
>   status: drafted | running | scheduled
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `AB_testing` | `object[] \| null` | No | Represents the list of results for the AB test creation operation. |

> [accordion] AB\_testing full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### delete

`abTesting.delete`

Delete an A/B Testing configuration by ID. To delete a Webform A/B Testing configuration by its unique ID from your Zoho CRM organization. Notes: - Deleting an A/B test is permanent. The test configuration and all metrics collected for it are removed and cannot be recovered. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.abTesting.delete({ id: '4876876000000333001', module: 'Leads' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Specify the unique [AB Testing ID](ab_testing.yaml#\$.paths./settings/AB_testing.get). |
| `module` | `string` | Yes | Specify the module API name for the AB test operation. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve module ID and API name. Possible values: **Leads** - Target the Leads module. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `AB_testing` | `object[] \| null` | No | Represents the list of results for the AB test delete operation. |

> [accordion] AB\_testing full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### get

`abTesting.get`

Get AB Testing configuration by ID. To retrieve the details of a specific AB Testing configuration by ID in your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.abTesting.get({ id: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Specify the unique [AB Testing ID](ab_testing.yaml#\$.paths./settings/AB_testing.get). |
| `module` | `string` | No | Specify the module API name to filter AB test configurations. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve module ID and API name. Possible values: **Leads** - Filter by the Leads module. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   AB_testing?: {
>     dynamic_allocation_by_zia?: boolean | null,
>     code?: string | null,
>     base_form?: {
>       embed_code?: string | null,
>       leading?: boolean | null,
>       module?: {
>         api_name?: string | null,
>         id?: string | null
>       } | null,
>       active?: boolean | null,
>       iframe_code?: string | null,
>       code_formats?: string[] | null,
>       winner?: boolean | null,
>       old_traffic?: null | null,
>       name?: string | null,
>       id?: string | null,
>       no_of_submission?: number | null,
>       winner_confidence?: null | null,
>       source_code?: string | null,
>       no_of_visits?: number | null,
>       traffic?: number | null
>     } | null,
>     notify?: boolean | null,
>     traffic_diversion?: null | null,
>     variant_form?: {
>       embed_code?: string | null,
>       encrypted_form_id?: string | null,
>       leading?: boolean | null,
>       module?: {
>         api_name?: string | null,
>         id?: string | null
>       } | null,
>       button_attributes?: {
>         color?: string | null,
>         name?: string | null
>       }[] | null,
>       active?: boolean | null,
>       form_attributes?: {
>         width?: number | null,
>         font_attributes?: {
>           size?: number | null,
>           color?: string | null,
>           family?: string | null
>         } | null,
>         display_form_name?: boolean | null,
>         color?: string | null,
>         align?: string | null
>       } | null,
>       tracking_code?: string | null,
>       iframe_code?: string | null,
>       code_formats?: string[] | null,
>       winner?: boolean | null,
>       old_traffic?: null | null,
>       name?: string | null,
>       id?: string | null,
>       no_of_submission?: number | null,
>       form_fields?: {
>         type?: string | null,
>         help?: {
>         } | null | null,
>         field?: {
>           api_name?: string | null,
>           field_label?: string | null,
>           id?: string | null
>         } | null,
>         hidden?: boolean | null | null,
>         date_format?: string | null | null,
>         required?: boolean | null | null,
>         field_name?: string | null | null,
>         site_key?: string | null | null,
>         secret_key?: string | null | null,
>         recaptcha_label?: string | null | null,
>         theme?: string | null | null,
>         privacy_value?: string | null | null,
>         default_value?: string | null | null,
>         field_info?: {
>           type?: string | null,
>           field_label?: string | null
>         } | null | null
>       }[] | null,
>       winner_confidence?: null | null,
>       source_code?: string | null,
>       no_of_visits?: number | null,
>       traffic?: number | null
>     }[] | null,
>     pause_resume_info?: null | null,
>     id?: string | null,
>     traffic?: number | null,
>     created_time?: string | null,
>     complete_restart_info?: null | null,
>     started_time?: string | null,
>     module?: {
>       api_name?: string | null,
>       id?: string | null
>     } | null,
>     suggestion?: null | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     start_time?: string | null,
>     visitors?: number | null,
>     condition?: {
>       visitors?: number | null,
>       unit?: number | null,
>       period?: string | null,
>       from?: string | null,
>       to?: string | null,
>       type?: string | null,
>       remaining?: number | null
>     } | null,
>     name?: string | null,
>     days?: number | null,
>     winner_configuration?: {
>       announce_automatically?: boolean | null,
>       conversion_percentage_difference?: number | null
>     } | null,
>     status?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### getPreview

`abTesting.getPreview`

Get AB Testing form preview. To retrieve the HTML preview details of the base form and variant forms configured for a specific Webform A/B Testing in your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.abTesting.getPreview({ id: '4876876000000333001', module: 'Leads' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Specify the unique [AB Testing ID](ab_testing.yaml#\$.paths./settings/AB_testing.get). |
| `module` | `string` | Yes | Specify the module API name for the AB test operation. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve module ID and API name. Possible values: **Leads** - Target the Leads module. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   AB_testing?: {
>     id?: string | null,
>     variant_form?: {
>       source_code?: string | null,
>       embed_code?: string | null,
>       iframe_code?: string | null,
>       code_formats?: string[] | null,
>       module?: {
>         api_name?: string | null,
>         id?: string | null
>       } | null,
>       name?: string | null,
>       active?: boolean | null,
>       id?: string | null
>     }[] | null,
>     base_form?: {
>       source_code?: string | null,
>       embed_code?: string | null,
>       iframe_code?: string | null,
>       code_formats?: string[] | null,
>       module?: {
>         api_name?: string | null,
>         id?: string | null
>       } | null,
>       name?: string | null,
>       active?: boolean | null,
>       id?: string | null
>     } | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### getSuggestions

`abTesting.getSuggestions`

Get AB testing optimization suggestions. To retrieve optimization suggestions for a specific AB test configuration in your Zoho CRM organization, based on the current performance of the base form and variant forms.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.abTesting.getSuggestions({ id: '487687600000033300' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Specify the unique [Webform ID](webforms.yaml#\$.paths./settings/webforms.get). |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   AB_testing_suggestions?: {
>     suggestion_details?: {
>       variant_form?: {
>         underperforming_variant?: boolean | null,
>         name?: string | null,
>         id?: string | null,
>         no_of_submission?: number | null,
>         conversion_rate?: number | null,
>         no_of_visits?: number | null,
>         traffic?: number | null
>       }[] | null,
>       base_form?: {
>         underperforming_variant?: boolean | null,
>         id?: string | null,
>         no_of_submission?: number | null,
>         no_of_visits?: number | null,
>         traffic?: number | null
>       } | null
>     } | null,
>     type?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### getVisitors

`abTesting.getVisitors`

Get visitor metrics for a specific Webform A/B Testing. To retrieve the visitor metrics of a specific Webform A/B Testing configuration in your Zoho CRM organization, including the total visitor count, test start time, and number of days elapsed.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.abTesting.getVisitors({ id: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Specify the unique [AB Testing ID](ab_testing.yaml#\$.paths./settings/AB_testing.get). |
| `module` | `string` | No | Specify the module API name to filter AB test configurations. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve module ID and API name. Possible values: **Leads** - Filter by the Leads module. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   AB_testing?: {
>     started_time?: string | null,
>     visitors?: number | null,
>     days?: number | null,
>     id?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### list

`abTesting.list`

List Webform A/B Testing configurations. To retrieve all Webform A/B Testing configurations created in your Zoho CRM organization. You can optionally filter the results by module or by the ID of a base webform.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.abTesting.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | No | Specify the module API name to filter AB test configurations. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve module ID and API name. Possible values: **Leads** - Filter by the Leads module. |
| `base_form` | `number` | No | Specify the ID of the base webform to filter AB test configurations. Accepts a single base form ID. Use the [Get Webforms API](webforms.yaml#\$.paths./settings/webforms.get) to retrieve the webform ID. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   AB_testing?: {
>     dynamic_allocation_by_zia?: boolean | null,
>     base_form?: {
>       embed_code?: string | null,
>       leading?: boolean | null,
>       module?: {
>         api_name?: string | null,
>         id?: string | null
>       } | null,
>       active?: boolean | null,
>       iframe_code?: string | null,
>       code_formats?: string[] | null,
>       winner?: boolean | null,
>       old_traffic?: null | null,
>       name?: string | null,
>       id?: string | null,
>       no_of_submission?: number | null,
>       winner_confidence?: null | null,
>       source_code?: string | null,
>       no_of_visits?: number | null,
>       traffic?: number | null
>     } | null,
>     notify?: boolean | null,
>     traffic_diversion?: null | null,
>     variant_form?: {
>       winner?: boolean | null,
>       old_traffic?: null | null,
>       name?: string | null,
>       id?: string | null,
>       traffic?: number | null
>     }[] | null,
>     id?: string | null,
>     traffic?: number | null,
>     created_time?: string | null,
>     complete_restart_info?: null | null,
>     started_time?: string | null,
>     module?: {
>       api_name?: string | null,
>       id?: string | null
>     } | null,
>     suggestion?: null | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     start_time?: string | null,
>     condition?: {
>       visitors?: number | null,
>       unit?: number | null,
>       period?: string | null,
>       from?: string | null,
>       to?: string | null,
>       type?: string | null,
>       remaining?: number | null
>     } | null,
>     name?: string | null,
>     winner_configuration?: {
>       announce_automatically?: boolean | null,
>       conversion_percentage_difference?: number | null
>     } | null,
>     status?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### listVisitors

`abTesting.listVisitors`

Get A/B testing visitor counts. To retrieve the visitor count of Webform A/B Testing configurations in your Zoho CRM organization, including all tests that are currently running as well as completed ones.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.abTesting.listVisitors({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | No | Specify the module API name to filter AB test configurations. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve module ID and API name. Possible values: **Leads** - Filter by the Leads module. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   AB_testing?: {
>     started_time?: string | null,
>     visitors?: number | null,
>     days?: number | null,
>     id?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### update

`abTesting.update`

Update AB testing configuration by ID. To update the configuration of an existing Webform A/B testing in your Zoho CRM organization.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.abTesting.update({
	id: '4876876000000333001',
	module: 'Leads',
	AB_testing: [{
		base_form: { id: '4876876000000333001', traffic: 1 },
		condition: { type: 'duration' },
		module: {},
		name: 'example',
		status: 'drafted',
		variant_form: [{
			button_attributes: [{ name: 'example' }],
			form_fields: [{ type: 'general' }],
			traffic: 1,
		}],
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Specify the unique [AB Testing ID](ab_testing.yaml#\$.paths./settings/AB_testing.get). |
| `module` | `string` | Yes | Specify the module API name for the AB test operation. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve module ID and API name. Possible values: **Leads** - Target the Leads module. |
| `AB_testing` | `object[]` | Yes | Represents the array of AB test configurations to update. The request body must contain a **AB\_testing** array with one object. |

> [accordion] AB\_testing full type
>
> ```ts theme={null}
> {
>   dynamic_allocation_by_zia?: boolean,
>   code?: string,
>   base_form: {
>     embed_code?: string,
>     leading?: boolean,
>     module?: {
>       api_name?: string,
>       id?: string
>     },
>     active?: boolean,
>     iframe_code?: string,
>     code_formats?: string[],
>     winner?: boolean,
>     old_traffic?: null,
>     name?: string,
>     id: string,
>     no_of_submission?: number | string,
>     winner_confidence?: null,
>     source_code?: string,
>     no_of_visits?: number | string,
>     traffic: number | string
>   },
>   notify?: boolean,
>   traffic_diversion?: null,
>   variant_form: {
>     embed_code?: string,
>     encrypted_form_id?: string,
>     leading?: boolean,
>     module?: {
>       api_name?: string,
>       id?: string
>     },
>     button_attributes: {
>       color?: string,
>       name: string
>     }[],
>     active?: boolean,
>     form_attributes?: {
>       width?: 600 | 700 | 800 | 900,
>       font_attributes?: {
>         size?: number | string,
>         color?: string,
>         family?: string
>       },
>       display_form_name?: boolean,
>       color?: string,
>       align?: right | left | top
>     },
>     tracking_code?: string,
>     iframe_code?: string,
>     code_formats?: string[],
>     winner?: boolean,
>     old_traffic?: null,
>     name?: string,
>     id?: string,
>     no_of_submission?: number | string,
>     form_fields: {
>       type: general | advanced | portal,
>       help?: {
>       } | null,
>       field?: {
>         api_name: string,
>         field_label?: string,
>         id: string
>       },
>       hidden?: boolean | null,
>       date_format?: string | null,
>       required?: boolean | null,
>       field_name?: string | null,
>       site_key?: string | null,
>       secret_key?: string | null,
>       recaptcha_label?: string | null,
>       theme?: dark | light | null,
>       privacy_value?: string | null,
>       default_value?: string | null,
>       field_info?: {
>         type: string,
>         field_label?: string
>       } | null
>     }[],
>     winner_confidence?: null,
>     source_code?: string,
>     no_of_visits?: number | string,
>     traffic: number | string
>   }[],
>   pause_resume_info?: null,
>   id?: string,
>   traffic?: number | string,
>   created_time?: string,
>   complete_restart_info?: null,
>   started_time?: string,
>   module: {
>     api_name?: string,
>     id?: string
>   },
>   suggestion?: null,
>   created_by?: {
>     name?: string,
>     id?: string
>   },
>   start_time?: string,
>   visitors?: number | string,
>   condition: {
>     visitors?: number | string,
>     unit?: number | string,
>     period?: days | weeks | months,
>     from?: string,
>     to?: string,
>     type: duration | range | visits,
>     remaining?: number | string
>   },
>   name: string,
>   days?: number | string,
>   winner_configuration?: {
>     announce_automatically?: true | false,
>     conversion_percentage_difference?: number | string
>   },
>   status: drafted | running | scheduled | completed | launched | paused
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `AB_testing` | `object[] \| null` | No | Represents the list of results for the AB test update operation. |

> [accordion] AB\_testing full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

## Apis

### list

`apis.list`

List available REST APIs. To retrieve the list of available REST API endpoints in your Zoho CRM organization for a specific API version. You can filter the results by module, OAuth scope, or request method using the filters parameter.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.apis.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `filters` | `string` | No | This parameter allows you to filter the supported APIs for the version specified in the URL. You can filter based on three criteria: module, request method, and OAuth scope. The filter syntax is a JSON object with three fields: **field**, **comparator**, and **value**. The **field** can be one of the following: `module`, `operation_types.method`, or `operation_types.oauth_scope`. The **comparator** can be either `equals` or `contains`. The **value** is the value to filter by. Encode the filter while using it in any API platform. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   __apis?: {
>     path?: string | null,
>     operation_types?: {
>       method?: string | null,
>       oauth_scope?: string | null,
>       max_credits?: number | null,
>       min_credits?: number | null
>     }[] | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

## Appointment Preferences

### get

`appointmentPreferences.get`

Get Appointment Preferences. Fetches the existing configuration for appointment preferences, including rules for deal creation, job sheet visibility, and mark as complete configurations.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.appointmentPreferences.get({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `include` | `string` | No | Specify this key to fetch deal record configuration when **when\_appointment\_completed:create\_deal**. Possible values: **deal\_record\_configuration**. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   appointment_preferences?: {
>     show_job_sheet?: boolean | null,
>     when_duration_exceeds?: string | null,
>     when_appointment_completed?: string | null,
>     allow_booking_outside_service_availability?: boolean | null,
>     allow_booking_outside_businesshours?: boolean | null,
>     sharing_enabled?: boolean | null,
>     sharing_details?: {
>       sharing_computation_status?: boolean | null,
>       permission?: string | null
>     } | null,
>     deal_record_configuration?: {
>       layout?: {
>         name?: string | null,
>         id?: string | null
>       } | null,
>       field_mappings?: {
>         type?: string | null,
>         value?: string | {
>         } | null,
>         field?: {
>           api_name?: string | null,
>           id?: string | null
>         } | null
>       }[] | null,
>       id?: string | null
>     } | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### update

`appointmentPreferences.update`

Update Appointment Preferences. To update the appointment preference settings in your Zoho CRM organization, including booking constraints, job sheet requirements, deal creation configuration, and record-sharing settings.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.appointmentPreferences.update({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `appointment_preferences` | `object` | No | Specify the appointment preferences to configure for the Zoho CRM organization. |

> [accordion] appointment\_preferences full type
>
> ```ts theme={null}
> {
>   show_job_sheet?: boolean,
>   when_duration_exceeds?: mark_as_complete | ask_appointment_provider_to_complete,
>   when_appointment_completed?: do_not_create_deal | create_deal,
>   allow_booking_outside_service_availability: boolean,
>   allow_booking_outside_businesshours: boolean,
>   sharing_enabled?: boolean,
>   sharing_details?: {
>     permission: read_only | read_write | full_access
>   },
>   deal_record_configuration: {
>     layout: {
>       id: string,
>       name?: string
>     },
>     field_mappings: {
>       type: static | merge_field,
>       value: string | {
>       },
>       field: {
>         api_name: string,
>         id: string
>       }
>     }[]
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `appointment_preferences` | `object \| null` | No | Represents the response details confirming the outcome of the update operation. |

> [accordion] appointment\_preferences full type
>
> ```ts theme={null}
> {
>   status?: string | null,
>   code?: string | null,
>   message?: string | null,
>   details?: {
>   } | null
> } | null
> ```

***

## Appointments

### create

`appointments.create`

Create Appointment records. To create one or more appointment records in your Zoho CRM organization.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.appointments.create({
	data: [{
		Appointment_For: {},
		Appointment_Start_Time: 'example',
		Owner: {},
		Service_Name: {},
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[]` | Yes | Represents the data array containing the appointment objects to create. |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   Owner: {
>     name?: string | null,
>     id?: string | null,
>     email?: string | null
>   },
>   Address?: string | null,
>   $currency_symbol?: string | null,
>   Appointment_Start_Time: string,
>   Cancellation_Reason?: string | null,
>   Appointment_For: {
>     name?: string | null,
>     id?: string | null,
>     module?: {
>       api_name?: string | null,
>       id?: string | null
>     }
>   },
>   $field_states?: string | null,
>   Rescheduled_To?: string | null,
>   $sharing_permission?: string | null,
>   Reschedule_Reason?: string | null,
>   Job_Sheet_Name__s?: string | null,
>   Additional_Information?: string | null,
>   Last_Activity_Time?: string | null,
>   Job_Sheet_Created__s?: boolean | null,
>   Cancelled_Time?: string | null,
>   Cancellation_Note?: string | null,
>   Modified_By?: {
>     name?: string | null,
>     id?: string | null,
>     email?: string | null
>   },
>   Reschedule_Count?: number | string | null,
>   $state?: string | null,
>   Rescheduled_By?: {
>     name?: string | null,
>     id?: string | null,
>     email?: string | null
>   } | null,
>   Date_1?: string | null,
>   Rescheduled_Time?: string | null,
>   Remind_At?: {
>     period?: minutes | hours | days,
>     unit?: number | string
>   }[] | null,
>   Appointment_End_Time?: string | null,
>   Status?: string | null,
>   Modified_Time?: string | null,
>   Service_Name: {
>     name?: string | null,
>     id?: string | null
>   },
>   Created_Time?: string | null,
>   Rescheduled_From?: string | null,
>   Cancelled_By?: {
>   } | null,
>   Duration?: number | string | null,
>   Appointment_Name?: string | null,
>   $editable?: boolean | null,
>   Job_Sheet_Section__s?: string | null,
>   Record_Status__s?: string | null,
>   $status?: string | null,
>   Job_Sheet_Description__s?: string | null,
>   Tag?: string[] | null,
>   Created_By?: {
>     name?: string | null,
>     id?: string | null,
>     email?: string | null
>   },
>   Location?: Client Address | Business Address | null,
>   Reschedule_Note?: string | null
> }[]
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data?: {
>     code?: string | null,
>     details?: {
>       Modified_Time?: string | null,
>       Modified_By?: {
>         name?: string | null | null,
>         id?: string | null | null,
>         email?: string | null | null
>       } | null,
>       Created_Time?: string | null,
>       id?: string | null,
>       Created_By?: {
>         name?: string | null | null,
>         id?: string | null | null,
>         email?: string | null | null
>       } | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   data?: any & any | null
> }
> ```

***

### delete

`appointments.delete`

Delete an Appointment by ID. To delete a single appointment record from your Zoho CRM organization by its unique ID. Note that this operation will not delete any deals created upon completion of the appointment. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.appointments.delete({ appointmentId: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `appointmentId` | `string` | Yes | Specify the unique identifier of the appointment record. Use the [Get Appointments API](appointments.yaml#\$.paths./Appointments__s.get) to retrieve all appointment records and obtain the ID of the required appointment record. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | Represents the list of deletion result objects for the deleted appointment record. |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     Modified_Time?: string | null,
>     Modified_By?: {
>       name?: string | null | null,
>       id?: string | null | null,
>       email?: string | null | null
>     } | null,
>     Created_Time?: string | null,
>     id?: string | null,
>     Created_By?: {
>       name?: string | null | null,
>       id?: string | null | null,
>       email?: string | null | null
>     } | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### deleteMany

`appointments.deleteMany`

Delete one or more appointment records. To delete one or more appointment records in your Zoho CRM organization. Note that this API will not delete any deals created on the completion of the deleted appointments. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.appointments.deleteMany({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `ids` | `111115000000147280 \| 111115000000147230` | No | Specify the IDs of the appointment records to delete. Accepts comma-separated record IDs. Use the [Get Appointments API](appointments.yaml#\$.paths./Appointments__s.get) to get the IDs. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data?: {
>     code?: string | null,
>     details?: {
>       Modified_Time?: string | null,
>       Modified_By?: {
>         name?: string | null | null,
>         id?: string | null | null,
>         email?: string | null | null
>       } | null,
>       Created_Time?: string | null,
>       id?: string | null,
>       Created_By?: {
>         name?: string | null | null,
>         id?: string | null | null,
>         email?: string | null | null
>       } | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   data?: any & any | null
> }
> ```

***

### get

`appointments.get`

Get an Appointment Record by ID. To retrieve the details of a single appointment record from your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.appointments.get({ appointmentId: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `appointmentId` | `string` | Yes | Specify the unique identifier of the appointment record. Use the [Get Appointments API](appointments.yaml#\$.paths./Appointments__s.get) to retrieve all appointment records and obtain the ID of the required appointment record. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data?: {
>     Owner?: {
>       name?: string | null,
>       id?: string | null,
>       email?: string | null
>     } | null,
>     $currency_symbol?: string | null,
>     Address?: string | null | null,
>     Appointment_Start_Time?: string | null,
>     Cancellation_Reason?: string | null | null,
>     $field_states?: string | null | null,
>     Appointment_For?: {
>       module?: {
>         api_name?: string | null,
>         id?: string | null
>       } | null,
>       name?: string | null,
>       id?: string | null
>     } | null,
>     Rescheduled_To?: string | null | null,
>     $sharing_permission?: string | null,
>     Reschedule_Reason?: string | null | null,
>     Job_Sheet_Name__s?: string | null | null,
>     Additional_Information?: string | null | null,
>     Last_Activity_Time?: string | null | null,
>     Job_Sheet_Created__s?: boolean | null,
>     Cancelled_Time?: string | null | null,
>     Cancellation_Note?: string | null | null,
>     Modified_By?: {
>       name?: string | null,
>       id?: string | null,
>       email?: string | null
>     } | null,
>     Reschedule_Count?: number | null,
>     Rescheduled_By?: {
>     } | null | null,
>     Date_1?: string | null | null,
>     id?: string | null,
>     Rescheduled_Time?: string | null | null,
>     Remind_At?: {
>       period?: string | null,
>       unit?: number | null
>     }[] | null | null,
>     Appointment_End_Time?: string | null,
>     Status?: string | null,
>     Modified_Time?: string | null,
>     Service_Name?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     Created_Time?: string | null,
>     Rescheduled_From?: string | null | null,
>     Cancelled_By?: {
>     } | null | null,
>     $editable?: boolean | null,
>     Appointment_Name?: string | null,
>     Duration?: number | null,
>     Job_Sheet_Section__s?: string | null | null,
>     Record_Status__s?: string | null,
>     $status?: string | null,
>     Job_Sheet_Description__s?: string | null | null,
>     Created_By?: {
>       name?: string | null,
>       id?: string | null,
>       email?: string | null
>     } | null,
>     Tag?: string[] | null,
>     Location?: string | null,
>     Reschedule_Note?: string | null | null,
>     Contact_Name__s?: string | null | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### list

`appointments.list`

Get Appointment Records. To retrieve appointment records from your Zoho CRM organization. Use the page and per\_page parameters to paginate up to 2,000 records, or use the page\_token received in a prior response to paginate beyond 2,000 records up to a maximum of 100,000. Each request returns a maximum of 200 records.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.appointments.list({ fields: 'Last_Name,Email' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `fields` | `string` | Yes | Specify a comma-separated list of field API names to include in the response. Use the [Get Fields Metadata API](fields.yaml#\$.paths./settings/fields.get) to retrieve the field IDs and API names. |
| `cvid` | `string` | No | Specify the unique ID of the Custom View. Use the [Get Custom Views Metadata API](custom_views.yaml#\$.paths./settings/custom_views.get) to retrieve the Custom View IDs. |
| `page_token` | `string` | No | Specify the page token to retrieve records beyond the first 2,000 results. Use the **next\_page\_token** value from a previous response to access the next page of results. |
| `page` | `number \| string` | No | Specify the page number to retrieve. Starts at 1. |
| `per_page` | `number \| string` | No | Specify the number of records to return per page. Maximum is 200. |
| `sort_order` | `desc \| asc` | No | Specify the sort order for the records.\<br/> \<b>Possible values:\</b> \<br/>desc - Returns records in descending order.\<br/> asc - Returns records in ascending order. |
| `sort_by` | `id \| Created_Time \| Modified_Time` | No | Specify the field to sort records by. Possible values:**id** - Sorts by record ID. **Created\_Time** - Sorts by creation timestamp. **Modified\_Time** - Sorts by last modification timestamp. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data?: {
>     Owner?: {
>       name?: string | null,
>       id?: string | null,
>       email?: string | null
>     } | null,
>     $currency_symbol?: string | null,
>     Address?: string | null | null,
>     Appointment_Start_Time?: string | null,
>     Cancellation_Reason?: string | null | null,
>     $field_states?: string | null | null,
>     Appointment_For?: {
>       module?: {
>         api_name?: string | null,
>         id?: string | null
>       } | null,
>       name?: string | null,
>       id?: string | null
>     } | null,
>     Rescheduled_To?: string | null | null,
>     $sharing_permission?: string | null,
>     Reschedule_Reason?: string | null | null,
>     Job_Sheet_Name__s?: string | null | null,
>     Additional_Information?: string | null | null,
>     Last_Activity_Time?: string | null | null,
>     Job_Sheet_Created__s?: boolean | null,
>     Cancelled_Time?: string | null | null,
>     Cancellation_Note?: string | null | null,
>     Modified_By?: {
>       name?: string | null,
>       id?: string | null,
>       email?: string | null
>     } | null,
>     Reschedule_Count?: number | null,
>     Rescheduled_By?: {
>     } | null | null,
>     Date_1?: string | null | null,
>     id?: string | null,
>     Rescheduled_Time?: string | null | null,
>     Remind_At?: {
>       period?: string | null,
>       unit?: number | null
>     }[] | null | null,
>     Appointment_End_Time?: string | null,
>     Status?: string | null,
>     Modified_Time?: string | null,
>     Service_Name?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     Created_Time?: string | null,
>     Rescheduled_From?: string | null | null,
>     Cancelled_By?: {
>     } | null | null,
>     $editable?: boolean | null,
>     Appointment_Name?: string | null,
>     Duration?: number | null,
>     Job_Sheet_Section__s?: string | null | null,
>     Record_Status__s?: string | null,
>     $status?: string | null,
>     Job_Sheet_Description__s?: string | null | null,
>     Created_By?: {
>       name?: string | null,
>       id?: string | null,
>       email?: string | null
>     } | null,
>     Tag?: string[] | null,
>     Location?: string | null,
>     Reschedule_Note?: string | null | null,
>     Contact_Name__s?: string | null | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### update

`appointments.update`

Update an Appointment Record by ID. To update a single appointment record by its ID in your Zoho CRM organization.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.appointments.update({
	appointmentId: 'example',
	data: [{
		Appointment_For: {},
		Appointment_Start_Time: 'example',
		Owner: {},
		Service_Name: {},
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number` | No | Specify the ID of the appointment record to update. Use the [Get Appointments API](appointments.yaml#\$.paths./Appointments__s.get) to get the ID. |
| `appointmentId` | `string` | Yes | Specify the unique identifier of the appointment record. Use the [Get Appointments API](appointments.yaml#\$.paths./Appointments__s.get) to retrieve all appointment records and obtain the ID of the required appointment record. |
| `data` | `object[]` | Yes | Represents the data array containing the appointment objects to update. |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   Owner: {
>     name?: string | null,
>     id?: string | null,
>     email?: string | null
>   },
>   Address?: string | null,
>   $currency_symbol?: string | null,
>   Appointment_Start_Time: string,
>   Cancellation_Reason?: string | null,
>   Appointment_For: {
>     name?: string | null,
>     id?: string | null,
>     module?: {
>       api_name?: string | null,
>       id?: string | null
>     }
>   },
>   $field_states?: string | null,
>   Rescheduled_To?: string | null,
>   $sharing_permission?: string | null,
>   Reschedule_Reason?: string | null,
>   Job_Sheet_Name__s?: string | null,
>   Additional_Information?: string | null,
>   Last_Activity_Time?: string | null,
>   Job_Sheet_Created__s?: boolean | null,
>   Cancelled_Time?: string | null,
>   Cancellation_Note?: string | null,
>   Modified_By?: {
>     name?: string | null,
>     id?: string | null,
>     email?: string | null
>   },
>   Reschedule_Count?: number | string | null,
>   $state?: string | null,
>   Rescheduled_By?: {
>     name?: string | null,
>     id?: string | null,
>     email?: string | null
>   } | null,
>   Date_1?: string | null,
>   Rescheduled_Time?: string | null,
>   Remind_At?: {
>     period?: minutes | hours | days,
>     unit?: number | string
>   }[] | null,
>   Appointment_End_Time?: string | null,
>   Status?: string | null,
>   Modified_Time?: string | null,
>   Service_Name: {
>     name?: string | null,
>     id?: string | null
>   },
>   Created_Time?: string | null,
>   Rescheduled_From?: string | null,
>   Cancelled_By?: {
>   } | null,
>   Duration?: number | string | null,
>   Appointment_Name?: string | null,
>   $editable?: boolean | null,
>   Job_Sheet_Section__s?: string | null,
>   Record_Status__s?: string | null,
>   $status?: string | null,
>   Job_Sheet_Description__s?: string | null,
>   Tag?: string[] | null,
>   Created_By?: {
>     name?: string | null,
>     id?: string | null,
>     email?: string | null
>   },
>   Location?: Client Address | Business Address | null,
>   Reschedule_Note?: string | null
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | Represents the list of result objects for each updated appointment record. |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     Modified_Time?: string | null,
>     Modified_By?: {
>       name?: string | null | null,
>       id?: string | null | null,
>       email?: string | null | null
>     } | null,
>     Created_Time?: string | null,
>     id?: string | null,
>     Created_By?: {
>       name?: string | null | null,
>       id?: string | null | null,
>       email?: string | null | null
>     } | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### updateMany

`appointments.updateMany`

Update appointment records. To update one or more appointment records in your Zoho CRM organization. You can update a maximum of 100 appointments per API call.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.appointments.updateMany({
	data: [{
		Appointment_For: {},
		Appointment_Start_Time: 'example',
		Owner: {},
		Service_Name: {},
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[]` | Yes | Represents the data array containing the appointment objects to update. |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   Owner: {
>     name?: string | null,
>     id?: string | null,
>     email?: string | null
>   },
>   Address?: string | null,
>   $currency_symbol?: string | null,
>   Appointment_Start_Time: string,
>   Cancellation_Reason?: string | null,
>   Appointment_For: {
>     name?: string | null,
>     id?: string | null,
>     module?: {
>       api_name?: string | null,
>       id?: string | null
>     }
>   },
>   $field_states?: string | null,
>   Rescheduled_To?: string | null,
>   $sharing_permission?: string | null,
>   Reschedule_Reason?: string | null,
>   Job_Sheet_Name__s?: string | null,
>   Additional_Information?: string | null,
>   Last_Activity_Time?: string | null,
>   Job_Sheet_Created__s?: boolean | null,
>   Cancelled_Time?: string | null,
>   Cancellation_Note?: string | null,
>   Modified_By?: {
>     name?: string | null,
>     id?: string | null,
>     email?: string | null
>   },
>   Reschedule_Count?: number | string | null,
>   $state?: string | null,
>   Rescheduled_By?: {
>     name?: string | null,
>     id?: string | null,
>     email?: string | null
>   } | null,
>   Date_1?: string | null,
>   Rescheduled_Time?: string | null,
>   Remind_At?: {
>     period?: minutes | hours | days,
>     unit?: number | string
>   }[] | null,
>   Appointment_End_Time?: string | null,
>   Status?: string | null,
>   Modified_Time?: string | null,
>   Service_Name: {
>     name?: string | null,
>     id?: string | null
>   },
>   Created_Time?: string | null,
>   Rescheduled_From?: string | null,
>   Cancelled_By?: {
>   } | null,
>   Duration?: number | string | null,
>   Appointment_Name?: string | null,
>   $editable?: boolean | null,
>   Job_Sheet_Section__s?: string | null,
>   Record_Status__s?: string | null,
>   $status?: string | null,
>   Job_Sheet_Description__s?: string | null,
>   Tag?: string[] | null,
>   Created_By?: {
>     name?: string | null,
>     id?: string | null,
>     email?: string | null
>   },
>   Location?: Client Address | Business Address | null,
>   Reschedule_Note?: string | null
> }[]
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data?: {
>     code?: string | null,
>     details?: {
>       Modified_Time?: string | null,
>       Modified_By?: {
>         name?: string | null | null,
>         id?: string | null | null,
>         email?: string | null | null
>       } | null,
>       Created_Time?: string | null,
>       id?: string | null,
>       Created_By?: {
>         name?: string | null | null,
>         id?: string | null | null,
>         email?: string | null | null
>       } | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   data?: any & any | null
> }
> ```

***

## Approval Processes

### clone

`approvalProcesses.clone`

Clone Approval Process. To clone an existing Approval Process in your Zoho CRM organization, use this endpoint to create a new Approval Process that inherits the same configuration as the original.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.approvalProcesses.clone({ approvalProcessId: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `approvalProcessId` | `string` | Yes | The unique identifier of the approval process to clone |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `approval_process` | `object[] \| null` | No | Field: approval\_process |

> [accordion] approval\_process full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### create

`approvalProcesses.create`

Create Approval Process. To create an Approval Process in your Zoho CRM organization.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.approvalProcesses.create({
	approval_process: [{
		active: true,
		execute_on: 'create',
		module: {},
		name: 'example',
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `approval_process` | `object[]` | Yes | List of approval processes to create/update. (Required) |

> [accordion] approval\_process full type
>
> ```ts theme={null}
> {
>   module: {
>     api_name?: string | null,
>     id?: string | null
>   },
>   name: string,
>   description?: string | null,
>   active: boolean,
>   generated_type?: custom | internal | null,
>   rules?: {
>     actions_per_approval?: {
>       approval_order: number | string,
>       actions: {
>         name?: string | null,
>         id: string,
>         type: string
>       }[]
>     }[] | null,
>     overall_approval_type: anyone | everyone_parallel | everyone_sequential,
>     criteria: {
>       comparator?: string | null,
>       field?: {
>         api_name?: string | null,
>         id?: string | null
>       },
>       value?: string | null
>     },
>     name: string,
>     process_admin_configuration?: {
>       notify_original_approvers_via?: {
>         feed: boolean,
>         email: boolean
>       },
>       process_admin: {
>         resources: {
>           name?: string | null,
>           id: string
>         }[],
>         type: string
>       }[],
>       record_modification: {
>         update_allowed_for: all_fields | no_fields | approver_stages_record_modification_fields
>       }
>     },
>     actions_upon_final_approval?: {
>       send_default_emails_enabled?: boolean | null,
>       actions?: (
>         {
>           name?: string | null,
>           id: string,
>           type: string
>         } | {
>           name?: string | null,
>           id: string,
>           type: string
>         } | {
>           name?: string | null,
>           id: string,
>           type: string
>         } | {
>           name?: string | null,
>           id: string,
>           type: string
>         } | {
>           name?: string | null,
>           id: string,
>           type: string
>         } | {
>           name?: string | null,
>           details: {
>             layout: {
>               name?: string | null,
>               id?: string | null
>             },
>             field_mappings: {
>               field: {
>                 api_name?: string | null,
>                 id?: string | null
>               },
>               type: static | merge_field,
>               value: string
>             }[],
>             module: {
>               api_name?: string | null,
>               id?: string | null
>             }
>           },
>           type: string
>         } | {
>           name?: string | null,
>           details: {
>             message: string,
>             notify_to: {
>               id: string,
>               name?: string | null,
>               type: string
>             } | {
>               id: string,
>               name?: string | null,
>               type: string
>             } | {
>               module: {
>                 id: string
>               },
>               notify_fields?: {
>                 fields?: {
>                   id: string
>                 }[] | null,
>                 static_fields?: {
>                   name: string
>                 }[] | null
>               },
>               type: string
>             }
>           },
>           type: string
>         }
>       )[] | null
>     },
>     actions_upon_rejection?: {
>       notify_original_approvers_via?: {
>         feed: boolean,
>         email: boolean
>       },
>       rejection_type?: all_previous_stages | current_stage | current_approver_decide | null,
>       actions?: (
>         {
>           name?: string | null,
>           id: string,
>           type: string
>         } | {
>           name?: string | null,
>           id: string,
>           type: string
>         } | {
>           name?: string | null,
>           id: string,
>           type: string
>         } | {
>           name?: string | null,
>           id: string,
>           type: string
>         } | {
>           name?: string | null,
>           id: string,
>           type: string
>         } | {
>           name?: string | null,
>           details: {
>             layout: {
>               name?: string | null,
>               id?: string | null
>             },
>             field_mappings: {
>               field: {
>                 api_name?: string | null,
>                 id?: string | null
>               },
>               type: static | merge_field,
>               value: string
>             }[],
>             module: {
>               api_name?: string | null,
>               id?: string | null
>             }
>           },
>           type: string
>         } | {
>           name?: string | null,
>           details: {
>             message: string,
>             notify_to: {
>               id: string,
>               name?: string | null,
>               type: string
>             } | {
>               id: string,
>               name?: string | null,
>               type: string
>             } | {
>               module: {
>                 id: string
>               },
>               notify_fields?: {
>                 fields?: {
>                   id: string
>                 }[] | null,
>                 static_fields?: {
>                   name: string
>                 }[] | null
>               },
>               type: string
>             }
>           },
>           type: string
>         }
>       )[] | null
>     },
>     overall_stages_record_modification?: {
>       during_approval_waiting: {
>         fields?: {
>           api_name?: string | null,
>           id?: string | null
>         }[] | null,
>         update_allowed_for: no_fields | all_fields | specific_fields
>       },
>       after_record_rejection: {
>         fields?: {
>           api_name?: string | null,
>           id?: string | null
>         }[] | null,
>         update_allowed_for: no_fields | all_fields | specific_fields
>       }
>     },
>     approver_stages: any[]
>   }[] | null,
>   execute_on: create | edit | create_or_edit
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `approval_process` | `object[] \| null` | No | Field: approval\_process |

> [accordion] approval\_process full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### delete

`approvalProcesses.delete`

Delete an Approval Process. To delete a single Approval Process from your Zoho CRM organization using its unique ID. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.approvalProcesses.delete({ approvalProcessId: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `approvalProcessId` | `string` | Yes | The unique identifier of the approval process to clone |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `approval_process` | `object[] \| null` | No | Field: approval\_process |

> [accordion] approval\_process full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### get

`approvalProcesses.get`

Get a single Approval Process. To retrieve the full configuration details of a single Approval Process in your Zoho CRM organization by its unique identifier. The response includes the process name, associated module, active status, execution trigger, and the complete list of approval rules defined for the Approval Process.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.approvalProcesses.get({ approvalProcessId: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `approvalProcessId` | `string` | Yes | The unique identifier of the approval process to clone |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   approval_process?: {
>     sequence_number?: number | null,
>     created_time?: string | null,
>     modified_time?: string | null,
>     module?: {
>       api_name?: string | null,
>       id?: string | null
>     } | null,
>     name?: string | null,
>     description?: string | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     active?: boolean | null,
>     generated_type?: string | null,
>     rules?: {
>       sequence_number?: number | null,
>       overall_approval_type?: string | null,
>       name?: string | null,
>       id?: string | null
>     }[] | null,
>     id?: string | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     execute_on?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### getCount

`approvalProcesses.getCount`

Retrieve the count of approval processes for a module. To retrieve the total, active, and inactive counts of approval processes configured for a specific module in your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.approvalProcesses.getCount({ module: 'Leads' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the API name of the CRM module, such as Leads, Contacts, or Deals, to retrieve the Approval Process count for that module. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   total?: number | null,
>   active?: number | null,
>   inactive?: number | null
> } | {
>   success: true
> }
> ```

***

### getProcessConfigurations

`approvalProcesses.getProcessConfigurations`

Retrieve the Approval Process configuration limits. To retrieve the configuration limits for approval processes in your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.approvalProcesses.getProcessConfigurations({});
```

**Input:** *empty object*

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   approval_process?: {
>     total_available_levels?: number | null,
>     maximum_allowed_fields_for_record_modification?: number | null,
>     maximum_allowed_levels?: number | null,
>     maximum_allowed_stages_per_rule?: number | null,
>     maximum_allowed_active_process_per_module?: number | null,
>     maximum_allowed_rules_per_process?: number | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### getRule

`approvalProcesses.getRule`

Retrieve an Approval Process Rule. To retrieve the configuration of a specific rule within an Approval Process. The response includes the rule name, sequence number, overall approval type, entry criteria, approver stages, process admin configuration, and the actions defined for final approval and rejection.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.approvalProcesses.getRule({ approvalProcessId: '4876876000000333001', ruleId: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `approvalProcessId` | `string` | Yes | The unique identifier of the approval process to clone |
| `ruleId` | `string` | Yes | The unique identifier of the approval process to clone |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   rules?: {
>     sequence_number?: number | null,
>     actions_per_approval?: {
>       approval_order?: number | null,
>       actions?: {
>         related_details?: null | null,
>         name?: string | null,
>         id?: string | null,
>         type?: string | null
>       }[] | null
>     }[] | null,
>     overall_approval_type?: string | null,
>     criteria?: {
>       group_operator?: string | null,
>       group?: {
>         comparator?: string | null,
>         field?: string | null,
>         value?: string[] | null
>       }[] | null
>     } | {
>       comparator?: string | null,
>       field?: string | null,
>       value?: string[] | null
>     } | null,
>     name?: string | null,
>     process_admin_configuration?: {
>       notify_original_approvers_via?: {
>         feed?: boolean | null,
>         email?: boolean | null
>       } | null,
>       process_admin?: {
>         resources?: {
>           name?: string | null,
>           id?: string | null
>         }[] | null,
>         type?: string | null
>       }[] | null,
>       record_modification?: {
>         update_allowed_for?: string | null
>       } | null
>     } | null | null,
>     actions_upon_final_approval?: {
>       actions?: {
>         related_details?: null | null,
>         name?: string | null,
>         id?: string | null,
>         type?: string | null
>       }[] | null
>     } | null | null,
>     actions_upon_rejection?: {
>       notify_original_approvers_via?: {
>         feed?: boolean | null,
>         email?: boolean | null
>       } | null,
>       rejection_type?: string | null,
>       actions?: {
>         related_details?: null | null,
>         name?: string | null,
>         id?: string | null,
>         type?: string | null
>       }[] | null
>     } | null | null,
>     id?: string | null,
>     overall_stages_record_modification?: {
>       during_approval_waiting?: {
>         update_allowed_for?: string | null
>       } | null,
>       after_record_rejection?: {
>         update_allowed_for?: string | null
>       } | null
>     } | null,
>     approver_stages?: (
>       {
>         sequence_number?: number | null,
>         approver?: {
>           resource?: {
>             name?: string | null,
>             id?: string | null
>           } | null,
>           type?: string | null
>         } | null,
>         name?: string | null,
>         record_modification?: {
>           during_approval_waiting?: {
>             update_allowed_for?: string | null,
>             fields?: {
>               api_name?: string | null,
>               id?: string | null
>             }[] | null
>           } | null,
>           after_record_rejection?: {
>             update_allowed_for?: string | null
>           } | null
>         } | null,
>         actions?: {
>           on_approve?: {
>             related_details?: null | null,
>             name?: string | null,
>             id?: string | null,
>             type?: string | null
>           }[] | null | null,
>           on_approval_trigger?: {
>             related_details?: null | null,
>             name?: string | null,
>             id?: string | null,
>             type?: string | null
>           }[] | null | null
>         } | null,
>         id?: string | null
>       } | {
>         sequence_number?: number | null,
>         approver?: {
>           based_on_field?: {
>             api_name?: string | null,
>             id?: string | null
>           } | null,
>           level?: number | null,
>           everyone_approval_required?: boolean | null,
>           type?: string | null
>         } | null,
>         name?: string | null,
>         record_modification?: {
>           during_approval_waiting?: {
>             update_allowed_for?: string | null,
>             fields?: {
>               api_name?: string | null,
>               id?: string | null
>             }[] | null
>           } | null,
>           after_record_rejection?: {
>             update_allowed_for?: string | null
>           } | null
>         } | null,
>         actions?: {
>           on_approve?: {
>             related_details?: null | null,
>             name?: string | null,
>             id?: string | null,
>             type?: string | null
>           }[] | null | null,
>           on_approval_trigger?: {
>             related_details?: null | null,
>             name?: string | null,
>             id?: string | null,
>             type?: string | null
>           }[] | null | null
>         } | null,
>         id?: string | null
>       } | {
>         sequence_number?: number | null,
>         approver?: {
>           based_on_field?: {
>             api_name?: string | null,
>             id?: string | null
>           } | null,
>           level_up_to?: string | null,
>           everyone_approval_required?: boolean | null,
>           type?: string | null
>         } | null,
>         name?: string | null,
>         record_modification?: {
>           during_approval_waiting?: {
>             update_allowed_for?: string | null,
>             fields?: {
>               api_name?: string | null,
>               id?: string | null
>             }[] | null
>           } | null,
>           after_record_rejection?: {
>             update_allowed_for?: string | null
>           } | null
>         } | null,
>         actions?: {
>           actions_per_approval?: {
>             approval_order?: number | null,
>             actions?: {
>               related_details?: null | null,
>               name?: string | null,
>               id?: string | null,
>               type?: string | null
>             }[] | null
>           }[] | null | null,
>           on_approval_trigger?: {
>             related_details?: null | null,
>             name?: string | null,
>             id?: string | null,
>             type?: string | null
>           }[] | null | null
>         } | null,
>         id?: string | null
>       } | {
>         sequence_number?: number | null,
>         approver?: {
>           based_on_field?: {
>             api_name?: string | null,
>             id?: string | null
>           } | null,
>           type?: string | null
>         } | null,
>         name?: string | null,
>         record_modification?: {
>           during_approval_waiting?: {
>             update_allowed_for?: string | null,
>             fields?: {
>               api_name?: string | null,
>               id?: string | null
>             }[] | null
>           } | null,
>           after_record_rejection?: {
>             update_allowed_for?: string | null
>           } | null
>         } | null,
>         actions?: {
>           on_approve?: {
>             related_details?: null | null,
>             name?: string | null,
>             id?: string | null,
>             type?: string | null
>           }[] | null | null,
>           on_approval_trigger?: {
>             related_details?: null | null,
>             name?: string | null,
>             id?: string | null,
>             type?: string | null
>           }[] | null | null
>         } | null,
>         id?: string | null
>       } | {
>         sequence_number?: number | null,
>         approver?: {
>           field?: {
>             api_name?: string | null,
>             data_type?: string | null,
>             id?: string | null
>           } | null,
>           type?: string | null
>         } | null,
>         name?: string | null,
>         record_modification?: {
>           during_approval_waiting?: {
>             update_allowed_for?: string | null,
>             fields?: {
>               api_name?: string | null,
>               id?: string | null
>             }[] | null
>           } | null,
>           after_record_rejection?: {
>             update_allowed_for?: string | null
>           } | null
>         } | null,
>         actions?: {
>           on_approve?: {
>             related_details?: null | null,
>             name?: string | null,
>             id?: string | null,
>             type?: string | null
>           }[] | null | null,
>           on_approval_trigger?: {
>             related_details?: null | null,
>             name?: string | null,
>             id?: string | null,
>             type?: string | null
>           }[] | null | null
>         } | null,
>         id?: string | null
>       } | {
>         sequence_number?: number | null,
>         approver?: {
>           resource?: {
>             name?: string | null,
>             id?: string | null
>           } | null,
>           everyone_approval_required?: boolean | null,
>           type?: string | null
>         } | null,
>         name?: string | null,
>         record_modification?: {
>           during_approval_waiting?: {
>             update_allowed_for?: string | null
>           } | null,
>           after_record_rejection?: {
>             update_allowed_for?: string | null
>           } | null
>         } | null,
>         actions?: {
>           on_approve?: {
>             related_details?: null | null,
>             name?: string | null,
>             id?: string | null,
>             type?: string | null
>           }[] | null | null,
>           on_approval_trigger?: {
>             related_details?: null | null,
>             name?: string | null,
>             id?: string | null,
>             type?: string | null
>           }[] | null | null
>         } | null,
>         id?: string | null
>       } | {
>         sequence_number?: number | null,
>         approver?: {
>           resource?: {
>             name?: string | null,
>             id?: string | null
>           } | null,
>           everyone_approval_required?: string | null,
>           type?: string | null
>         } | null,
>         name?: string | null,
>         id?: string | null,
>         record_modification?: {
>           during_approval_waiting?: {
>             update_allowed_for?: string | null,
>             fields?: {
>               api_name?: string | null,
>               id?: string | null
>             }[] | null
>           } | null,
>           after_record_rejection?: {
>             update_allowed_for?: string | null
>           } | null
>         } | null,
>         actions?: {
>           on_approve?: {
>             related_details?: null | null,
>             name?: string | null,
>             id?: string | null,
>             type?: string | null
>           }[] | null | null,
>           on_approval_trigger?: {
>             related_details?: null | null,
>             name?: string | null,
>             id?: string | null,
>             type?: string | null
>           }[] | null | null
>         } | null
>       }
>     )[] | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### list

`approvalProcesses.list`

Get Approval Processes. To get the list of Approval Processes configured in your Zoho CRM organization, including each process's details such as name, module, execution trigger, approval type, active status, and rules with stages and approver configuration, along with pagination info.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.approvalProcesses.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | No | Filter approval process based on module name |
| `filter` | `string` | No | For filtering the approval process using name |
| `page` | `number \| string` | No | Param for pagination |
| `per_page` | `number \| string` | No | Param for pagination |
| `ids` | `string` | No | Approval process ids |
| `generated_type` | `custom \| internal` | No | Used to fetch "internal" approval processes If not provided, by default fetch only user created approval processes. (generated\_type = custom) |
| `active` | `boolean` | No | To filter active and inactive processes. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   approval_process?: (
>     {
>       created_time?: string | null,
>       module?: {
>         api_name?: string | null,
>         id?: string | null
>       } | null,
>       description?: string | null,
>       active?: boolean | null,
>       rules_count?: number | null,
>       created_by?: {
>         name?: string | null,
>         id?: string | null
>       } | null,
>       execute_on?: string | null,
>       sequence_number?: number | null,
>       modified_time?: string | null,
>       name?: string | null,
>       modified_by?: {
>         name?: string | null,
>         id?: string | null
>       } | null,
>       generated_type?: string | null,
>       id?: string | null
>     } | {
>       sequence_number?: number | null,
>       created_time?: string | null,
>       modified_time?: string | null,
>       module?: {
>         api_name?: string | null,
>         id?: string | null
>       } | null,
>       name?: string | null,
>       modified_by?: {
>         name?: string | null,
>         id?: string | null
>       } | null,
>       active?: boolean | null,
>       rules_count?: number | null,
>       generated_type?: string | null,
>       id?: string | null,
>       created_by?: {
>         name?: string | null,
>         id?: string | null
>       } | null,
>       execute_on?: string | null
>     }
>   )[] | null,
>   info?: {
>     per_page?: number | null,
>     count?: number | null,
>     page?: number | null,
>     more_records?: boolean | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### listRules

`approvalProcesses.listRules`

Get rules for an Approval Process. To retrieve the rules associated with a specific Approval Process in your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.approvalProcesses.listRules({ approvalProcessId: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `ids` | `string` | No | Approval process ids |
| `approvalProcessId` | `string` | Yes | The unique identifier of the approval process to clone |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   rules?: {
>     sequence_number?: number | null,
>     actions_per_approval?: {
>       approval_order?: number | null,
>       actions?: {
>         related_details?: null | null,
>         name?: string | null,
>         id?: string | null,
>         type?: string | null
>       }[] | null
>     }[] | null,
>     overall_approval_type?: string | null,
>     criteria?: {
>       group_operator?: string | null,
>       group?: {
>         comparator?: string | null,
>         field?: string | null,
>         value?: string[] | null
>       }[] | null
>     } | {
>       comparator?: string | null,
>       field?: string | null,
>       value?: string[] | null
>     } | null,
>     name?: string | null,
>     process_admin_configuration?: {
>       notify_original_approvers_via?: {
>         feed?: boolean | null,
>         email?: boolean | null
>       } | null,
>       process_admin?: {
>         resources?: {
>           name?: string | null,
>           id?: string | null
>         }[] | null,
>         type?: string | null
>       }[] | null,
>       record_modification?: {
>         update_allowed_for?: string | null
>       } | null
>     } | null | null,
>     actions_upon_final_approval?: {
>       actions?: {
>         related_details?: null | null,
>         name?: string | null,
>         id?: string | null,
>         type?: string | null
>       }[] | null
>     } | null | null,
>     actions_upon_rejection?: {
>       notify_original_approvers_via?: {
>         feed?: boolean | null,
>         email?: boolean | null
>       } | null,
>       rejection_type?: string | null,
>       actions?: {
>         related_details?: null | null,
>         name?: string | null,
>         id?: string | null,
>         type?: string | null
>       }[] | null
>     } | null | null,
>     id?: string | null,
>     overall_stages_record_modification?: {
>       during_approval_waiting?: {
>         update_allowed_for?: string | null
>       } | null,
>       after_record_rejection?: {
>         update_allowed_for?: string | null
>       } | null
>     } | null,
>     approver_stages?: (
>       {
>         sequence_number?: number | null,
>         approver?: {
>           resource?: {
>             name?: string | null,
>             id?: string | null
>           } | null,
>           type?: string | null
>         } | null,
>         name?: string | null,
>         record_modification?: {
>           during_approval_waiting?: {
>             update_allowed_for?: string | null,
>             fields?: {
>               api_name?: string | null,
>               id?: string | null
>             }[] | null
>           } | null,
>           after_record_rejection?: {
>             update_allowed_for?: string | null
>           } | null
>         } | null,
>         actions?: {
>           on_approve?: {
>             related_details?: null | null,
>             name?: string | null,
>             id?: string | null,
>             type?: string | null
>           }[] | null | null,
>           on_approval_trigger?: {
>             related_details?: null | null,
>             name?: string | null,
>             id?: string | null,
>             type?: string | null
>           }[] | null | null
>         } | null,
>         id?: string | null
>       } | {
>         sequence_number?: number | null,
>         approver?: {
>           based_on_field?: {
>             api_name?: string | null,
>             id?: string | null
>           } | null,
>           level?: number | null,
>           everyone_approval_required?: boolean | null,
>           type?: string | null
>         } | null,
>         name?: string | null,
>         record_modification?: {
>           during_approval_waiting?: {
>             update_allowed_for?: string | null,
>             fields?: {
>               api_name?: string | null,
>               id?: string | null
>             }[] | null
>           } | null,
>           after_record_rejection?: {
>             update_allowed_for?: string | null
>           } | null
>         } | null,
>         actions?: {
>           on_approve?: {
>             related_details?: null | null,
>             name?: string | null,
>             id?: string | null,
>             type?: string | null
>           }[] | null | null,
>           on_approval_trigger?: {
>             related_details?: null | null,
>             name?: string | null,
>             id?: string | null,
>             type?: string | null
>           }[] | null | null
>         } | null,
>         id?: string | null
>       } | {
>         sequence_number?: number | null,
>         approver?: {
>           based_on_field?: {
>             api_name?: string | null,
>             id?: string | null
>           } | null,
>           level_up_to?: string | null,
>           everyone_approval_required?: boolean | null,
>           type?: string | null
>         } | null,
>         name?: string | null,
>         record_modification?: {
>           during_approval_waiting?: {
>             update_allowed_for?: string | null,
>             fields?: {
>               api_name?: string | null,
>               id?: string | null
>             }[] | null
>           } | null,
>           after_record_rejection?: {
>             update_allowed_for?: string | null
>           } | null
>         } | null,
>         actions?: {
>           actions_per_approval?: {
>             approval_order?: number | null,
>             actions?: {
>               related_details?: null | null,
>               name?: string | null,
>               id?: string | null,
>               type?: string | null
>             }[] | null
>           }[] | null | null,
>           on_approval_trigger?: {
>             related_details?: null | null,
>             name?: string | null,
>             id?: string | null,
>             type?: string | null
>           }[] | null | null
>         } | null,
>         id?: string | null
>       } | {
>         sequence_number?: number | null,
>         approver?: {
>           based_on_field?: {
>             api_name?: string | null,
>             id?: string | null
>           } | null,
>           type?: string | null
>         } | null,
>         name?: string | null,
>         record_modification?: {
>           during_approval_waiting?: {
>             update_allowed_for?: string | null,
>             fields?: {
>               api_name?: string | null,
>               id?: string | null
>             }[] | null
>           } | null,
>           after_record_rejection?: {
>             update_allowed_for?: string | null
>           } | null
>         } | null,
>         actions?: {
>           on_approve?: {
>             related_details?: null | null,
>             name?: string | null,
>             id?: string | null,
>             type?: string | null
>           }[] | null | null,
>           on_approval_trigger?: {
>             related_details?: null | null,
>             name?: string | null,
>             id?: string | null,
>             type?: string | null
>           }[] | null | null
>         } | null,
>         id?: string | null
>       } | {
>         sequence_number?: number | null,
>         approver?: {
>           field?: {
>             api_name?: string | null,
>             data_type?: string | null,
>             id?: string | null
>           } | null,
>           type?: string | null
>         } | null,
>         name?: string | null,
>         record_modification?: {
>           during_approval_waiting?: {
>             update_allowed_for?: string | null,
>             fields?: {
>               api_name?: string | null,
>               id?: string | null
>             }[] | null
>           } | null,
>           after_record_rejection?: {
>             update_allowed_for?: string | null
>           } | null
>         } | null,
>         actions?: {
>           on_approve?: {
>             related_details?: null | null,
>             name?: string | null,
>             id?: string | null,
>             type?: string | null
>           }[] | null | null,
>           on_approval_trigger?: {
>             related_details?: null | null,
>             name?: string | null,
>             id?: string | null,
>             type?: string | null
>           }[] | null | null
>         } | null,
>         id?: string | null
>       } | {
>         sequence_number?: number | null,
>         approver?: {
>           resource?: {
>             name?: string | null,
>             id?: string | null
>           } | null,
>           everyone_approval_required?: boolean | null,
>           type?: string | null
>         } | null,
>         name?: string | null,
>         record_modification?: {
>           during_approval_waiting?: {
>             update_allowed_for?: string | null
>           } | null,
>           after_record_rejection?: {
>             update_allowed_for?: string | null
>           } | null
>         } | null,
>         actions?: {
>           on_approve?: {
>             related_details?: null | null,
>             name?: string | null,
>             id?: string | null,
>             type?: string | null
>           }[] | null | null,
>           on_approval_trigger?: {
>             related_details?: null | null,
>             name?: string | null,
>             id?: string | null,
>             type?: string | null
>           }[] | null | null
>         } | null,
>         id?: string | null
>       } | {
>         sequence_number?: number | null,
>         approver?: {
>           resource?: {
>             name?: string | null,
>             id?: string | null
>           } | null,
>           everyone_approval_required?: string | null,
>           type?: string | null
>         } | null,
>         name?: string | null,
>         id?: string | null,
>         record_modification?: {
>           during_approval_waiting?: {
>             update_allowed_for?: string | null,
>             fields?: {
>               api_name?: string | null,
>               id?: string | null
>             }[] | null
>           } | null,
>           after_record_rejection?: {
>             update_allowed_for?: string | null
>           } | null
>         } | null,
>         actions?: {
>           on_approve?: {
>             related_details?: null | null,
>             name?: string | null,
>             id?: string | null,
>             type?: string | null
>           }[] | null | null,
>           on_approval_trigger?: {
>             related_details?: null | null,
>             name?: string | null,
>             id?: string | null,
>             type?: string | null
>           }[] | null | null
>         } | null
>       }
>     )[] | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### reorder

`approvalProcesses.reorder`

Reorder the execution sequence of approval processes. To reorder the execution sequence of approval processes for a specific module in Zoho CRM. Specify the approval process IDs in the desired sequence. The system updates the execution order of the approval processes for that module.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.approvalProcesses.reorder({
	module: 'Leads',
	reorder: {
		approval_process: [{ id: '4876876000000333001', sequence_number: 1 }],
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Approval process's module which needs to be reordered. |
| `reorder` | `object` | Yes | root key for reordering the approval processes. |

> [accordion] reorder full type
>
> ```ts theme={null}
> {
>   approval_process: {
>     sequence_number: number | string,
>     id: string
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `reorder` | `object \| null` | No | Nested schema for reorder |

> [accordion] reorder full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>   } | null,
>   message?: string | null,
>   status?: string | null
> } | null
> ```

***

### reorderRules

`approvalProcesses.reorderRules`

Reorder the rules of an Approval Process. To update the sequence of rules within one Approval Process, reorder the rules by assigning new sequence numbers to each rule ID in your Zoho CRM organization.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.approvalProcesses.reorderRules({
	approvalProcessId: '4876876000000333001',
	reorder: {
		rules: [{ id: '4876876000000333001', sequence_number: 1 }],
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `approvalProcessId` | `string` | Yes | The unique identifier of the approval process to clone |
| `reorder` | `object` | Yes | The main object that contains the information required to update the order of rules within an approval process. |

> [accordion] reorder full type
>
> ```ts theme={null}
> {
>   rules: {
>     sequence_number: number | string,
>     id: string
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `reorder` | `object \| null` | No | Nested schema for reorder |

> [accordion] reorder full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>   } | null,
>   message?: string | null,
>   status?: string | null
> } | null
> ```

***

### update

`approvalProcesses.update`

Update Approval Process. To update the configuration of a single Approval Process in your Zoho CRM organization.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.approvalProcesses.update({
	approvalProcessId: '4876876000000333001',
	approval_process: [{
		active: true,
		execute_on: 'example',
		module: {},
		name: 'example',
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `approvalProcessId` | `string` | Yes | The unique identifier of the approval process to clone |
| `approval_process` | `object[]` | Yes | a (Required) |

> [accordion] approval\_process full type
>
> ```ts theme={null}
> {
>   sequence_number?: number | string,
>   module: {
>     api_name?: string,
>     id?: string
>   },
>   name: string,
>   description?: string,
>   active: boolean,
>   generated_type?: string,
>   rules?: {
>     sequence_number?: number | string,
>     actions_per_approval?: {
>       approval_order?: number | string,
>       actions?: {
>         name?: string,
>         id?: string,
>         type?: string
>       }[]
>     }[],
>     overall_approval_type?: string,
>     criteria?: {
>       comparator?: string,
>       field?: {
>         api_name?: string,
>         id?: string
>       },
>       value?: string
>     },
>     name?: string,
>     process_admin_configuration?: {
>       notify_original_approvers_via?: {
>         feed?: boolean,
>         email?: boolean
>       },
>       process_admin?: {
>         resources?: {
>           name?: string,
>           id?: string
>         }[],
>         type?: string
>       }[],
>       record_modification?: {
>         update_allowed_for?: string
>       }
>     },
>     actions_upon_final_approval?: {
>       send_default_emails_enabled?: boolean,
>       actions?: {
>         name?: string,
>         details?: {
>           layout?: {
>             name?: string,
>             id?: string
>           },
>           field_mappings?: {
>             field?: {
>               api_name?: string,
>               id?: string
>             },
>             type?: string,
>             value?: string
>           }[],
>           module?: {
>             api_name?: string,
>             id?: string
>           }
>         },
>         id?: string,
>         type?: string
>       }[]
>     },
>     actions_upon_rejection?: {
>       notify_original_approvers_via?: {
>         feed?: boolean,
>         email?: boolean
>       },
>       rejection_type?: string,
>       actions?: {
>         name?: string,
>         details?: {
>           layout?: {
>             name?: string,
>             id?: string
>           },
>           field_mappings?: {
>             field?: {
>               api_name?: string,
>               id?: string
>             },
>             type?: string,
>             value?: string
>           }[],
>           module?: {
>             api_name?: string,
>             id?: string
>           }
>         },
>         id?: string,
>         type?: string
>       }[]
>     },
>     id?: string,
>     overall_stages_record_modification?: {
>       during_approval_waiting?: {
>         update_allowed_for?: string,
>         fields?: {
>           api_name?: string,
>           id?: string
>         }[]
>       },
>       after_record_rejection?: {
>         update_allowed_for?: string,
>         fields?: {
>           api_name?: string,
>           id?: string
>         }[]
>       }
>     },
>     approver_stages?: {
>       sequence_number?: number | string,
>       approver?: {
>         based_on_field?: {
>           api_name?: string,
>           id?: string
>         },
>         field?: {
>           api_name?: string,
>           id?: string
>         },
>         resource?: {
>           name?: string,
>           id?: string
>         },
>         level?: number | string,
>         level_up_to?: number | string | null,
>         everyone_approval_required?: boolean,
>         type?: string
>       },
>       name?: string,
>       id?: string,
>       record_modification?: {
>         during_approval_waiting?: {
>           update_allowed_for?: string,
>           fields?: {
>             api_name?: string,
>             id?: string
>           }[]
>         },
>         after_record_rejection?: {
>           update_allowed_for?: string,
>           fields?: {
>             api_name?: string,
>             id?: string
>           }[]
>         }
>       },
>       actions?: {
>         on_approve?: {
>           name?: string,
>           id?: string,
>           type?: string
>         }[],
>         on_approval_trigger?: {
>           name?: string,
>           id?: string,
>           type?: string
>         }[]
>       }
>     }[]
>   }[],
>   id?: string,
>   execute_on: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `approval_process` | `object[] \| null` | No | Field: approval\_process |

> [accordion] approval\_process full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### updateMany

`approvalProcesses.updateMany`

Update Approval Process. To update the configuration of an existing approval process in your Zoho CRM organization.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.approvalProcesses.updateMany({
	approval_process: [{}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `approval_process` | `object[]` | Yes | a (Required) |

> [accordion] approval\_process full type
>
> ```ts theme={null}
> {
>   sequence_number?: number | string,
>   module?: {
>     api_name?: string,
>     id?: string
>   },
>   name?: string,
>   description?: string,
>   active?: boolean,
>   generated_type?: string,
>   rules?: {
>     sequence_number?: number | string,
>     actions_per_approval?: {
>       approval_order?: number | string,
>       actions?: {
>         name?: string,
>         id?: string,
>         type?: string
>       }[]
>     }[],
>     overall_approval_type?: string,
>     criteria?: {
>       comparator?: string,
>       field?: {
>         api_name?: string,
>         id?: string
>       },
>       value?: string
>     },
>     name?: string,
>     process_admin_configuration?: {
>       notify_original_approvers_via?: {
>         feed?: boolean,
>         email?: boolean
>       },
>       process_admin?: {
>         resources?: {
>           name?: string,
>           id?: string
>         }[],
>         type?: string
>       }[],
>       record_modification?: {
>         update_allowed_for?: string
>       }
>     },
>     actions_upon_final_approval?: {
>       send_default_emails_enabled?: boolean,
>       actions?: {
>         name?: string,
>         details?: {
>           layout?: {
>             name?: string,
>             id?: string
>           },
>           field_mappings?: {
>             field?: {
>               api_name?: string,
>               id?: string
>             },
>             type?: string,
>             value?: string
>           }[],
>           module?: {
>             api_name?: string,
>             id?: string
>           }
>         },
>         id?: string,
>         type?: string
>       }[]
>     },
>     actions_upon_rejection?: {
>       notify_original_approvers_via?: {
>         feed?: boolean,
>         email?: boolean
>       },
>       rejection_type?: string,
>       actions?: {
>         name?: string,
>         details?: {
>           layout?: {
>             name?: string,
>             id?: string
>           },
>           field_mappings?: {
>             field?: {
>               api_name?: string,
>               id?: string
>             },
>             type?: string,
>             value?: string
>           }[],
>           module?: {
>             api_name?: string,
>             id?: string
>           }
>         },
>         id?: string,
>         type?: string
>       }[]
>     },
>     id?: string,
>     overall_stages_record_modification?: {
>       during_approval_waiting?: {
>         update_allowed_for?: string,
>         fields?: {
>           api_name?: string,
>           id?: string
>         }[]
>       },
>       after_record_rejection?: {
>         update_allowed_for?: string,
>         fields?: {
>           api_name?: string,
>           id?: string
>         }[]
>       }
>     },
>     approver_stages?: {
>       sequence_number?: number | string,
>       approver?: {
>         based_on_field?: {
>           api_name?: string,
>           id?: string
>         },
>         field?: {
>           api_name?: string,
>           id?: string
>         },
>         resource?: {
>           name?: string,
>           id?: string
>         },
>         level?: number | string,
>         level_up_to?: number | string | null,
>         everyone_approval_required?: boolean,
>         type?: string
>       },
>       name?: string,
>       id?: string,
>       record_modification?: {
>         during_approval_waiting?: {
>           update_allowed_for?: string,
>           fields?: {
>             api_name?: string,
>             id?: string
>           }[]
>         },
>         after_record_rejection?: {
>           update_allowed_for?: string,
>           fields?: {
>             api_name?: string,
>             id?: string
>           }[]
>         }
>       },
>       actions?: {
>         on_approve?: {
>           name?: string,
>           id?: string,
>           type?: string
>         }[],
>         on_approval_trigger?: {
>           name?: string,
>           id?: string,
>           type?: string
>         }[]
>       }
>     }[]
>   }[],
>   id?: string,
>   execute_on?: string
> }[]
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   approval_process?: {
>     code?: string | null,
>     details?: {
>       id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   approval_process?: any & any | null
> }
> ```

***

## Assignment Rules

### clone

`assignmentRules.clone`

Clone Assignment Rule. To clone a single Assignment Rule in your Zoho CRM organization.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.assignmentRules.clone({
	id: '4876876000000333001',
	module: 'Leads',
	assignment_rules: [{ name: 'example' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Specify the request path param ID value for the request. Use the [Assignment Rule API](assignment_rules.yaml#\$.paths./settings/automation/assignment_rules.get) to retrieve the Assignment Rule ID. |
| `module` | `string` | Yes | Specify the param query module required schema value for the request. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve module ID and API name. |
| `assignment_rules` | `object[]` | Yes | Array of Assignment Rule objects to be created. |

> [accordion] assignment\_rules full type
>
> ```ts theme={null}
> {
>   name: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `assignment_rules` | `object[] \| null` | No | Represents the Assignment Rules returned for the Assignment Rule operation. |

> [accordion] assignment\_rules full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null,
>     rule_entries?: {
>       id?: string | null
>     }[] | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### cloneEntries

`assignmentRules.cloneEntries`

Clone Assignment Rule Entries. To clone rule entries for a single Assignment Rule in your Zoho CRM organization.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.assignmentRules.cloneEntries({
	id: '4876876000000333001',
	module: 'Leads',
	assignment_rules: [{
		rule_entries: [{ id: '4876876000000333001' }],
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Specify the request path param ID value for the request. Use the [Assignment Rule API](assignment_rules.yaml#\$.paths./settings/automation/assignment_rules.get) to retrieve the Assignment Rule ID. |
| `module` | `string` | Yes | Specify the param query module required schema value for the request. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve module ID and API name. |
| `assignment_rules` | `object[]` | Yes | Specify the **assignment\_rules** array that contains the rule entries to clone into the target Assignment Rule. |

> [accordion] assignment\_rules full type
>
> ```ts theme={null}
> {
>   rule_entries: {
>     id: string,
>     criteria?: {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: string,
>       value: (string | number | {
>         id: string & any,
>         name?: string
>       } | {
>         name: string
>       } | {
>         id: string,
>         name?: string
>       })[] | string | number | boolean | {
>         id: string & any,
>         name?: string
>       } | {
>         name: string
>       } | {
>         id: string,
>         name?: string
>       } | ${
>         EMPTY
>       } | ${
>         NOTEMPTY
>       } | ${
>         TODAY
>       } | ${
>         TOMORROW
>       } | ${
>         TOMORROWPLUS
>       } | ${
>         YESTERDAY
>       } | ${
>         YESTERDAYMINUS
>       } | ${
>         LASTMONTH
>       } | ${
>         THISMONTH
>       } | ${
>         NEXTMONTH
>       } | ${
>         LASTWEEK
>       } | ${
>         THISWEEK
>       } | ${
>         NEXTWEEK
>       } | ${
>         THISYEAR
>       } | ${
>         THISFY
>       } | ${
>         THISFQ
>       } | ${
>         LASTYEAR
>       } | ${
>         PREVFY
>       } | ${
>         PREVFQ
>       } | ${
>         NEXTYEAR
>       } | ${
>         NEXTFY
>       } | ${
>         NEXTFQ
>       } | ${
>         EMPTY
>       } | ${
>         NOTEMPTY
>       } | string | string,
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: string,
>       value: (string | number | {
>         id: string & any,
>         name?: string
>       } | {
>         name: string
>       } | {
>         id: string,
>         name?: string
>       })[] | string | number | boolean | {
>         id: string & any,
>         name?: string
>       } | {
>         name: string
>       } | {
>         id: string,
>         name?: string
>       } | string,
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>       value: string[] | string,
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: less_than | less_equal | greater_than | greater_equal,
>       value: string | number | string,
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: between | not_between,
>       value: (string | number)[],
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: in | not_in,
>       value: (string | number)[],
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: include_all | include_any | exclude_all | exclude_any,
>       value: {
>         id: string & any,
>         name?: string
>       }[],
>       type?: merge_field | pre_defined | value | field
>     } | {
>       group: (
>         {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: string,
>           value: (string | number | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           })[] | string | number | boolean | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           } | ${
>             EMPTY
>           } | ${
>             NOTEMPTY
>           } | ${
>             TODAY
>           } | ${
>             TOMORROW
>           } | ${
>             TOMORROWPLUS
>           } | ${
>             YESTERDAY
>           } | ${
>             YESTERDAYMINUS
>           } | ${
>             LASTMONTH
>           } | ${
>             THISMONTH
>           } | ${
>             NEXTMONTH
>           } | ${
>             LASTWEEK
>           } | ${
>             THISWEEK
>           } | ${
>             NEXTWEEK
>           } | ${
>             THISYEAR
>           } | ${
>             THISFY
>           } | ${
>             THISFQ
>           } | ${
>             LASTYEAR
>           } | ${
>             PREVFY
>           } | ${
>             PREVFQ
>           } | ${
>             NEXTYEAR
>           } | ${
>             NEXTFY
>           } | ${
>             NEXTFQ
>           } | ${
>             EMPTY
>           } | ${
>             NOTEMPTY
>           } | string | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: string,
>           value: (string | number | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           })[] | string | number | boolean | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           } | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>           value: string[] | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: less_than | less_equal | greater_than | greater_equal,
>           value: string | number | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: between | not_between,
>           value: (string | number)[],
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: in | not_in,
>           value: (string | number)[],
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: include_all | include_any | exclude_all | exclude_any,
>           value: {
>             id: string & any,
>             name?: string
>           }[],
>           type?: merge_field | pre_defined | value | field
>         } | {
>           group: (
>             {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: string,
>               value: (string | number | {
>                 id: string & any,
>                 name?: string
>               } | {
>                 name: string
>               } | {
>                 id: string,
>                 name?: string
>               })[] | string | number | boolean | {
>                 id: string & any,
>                 name?: string
>               } | {
>                 name: string
>               } | {
>                 id: string,
>                 name?: string
>               } | ${
>                 EMPTY
>               } | ${
>                 NOTEMPTY
>               } | ${
>                 TODAY
>               } | ${
>                 TOMORROW
>               } | ${
>                 TOMORROWPLUS
>               } | ${
>                 YESTERDAY
>               } | ${
>                 YESTERDAYMINUS
>               } | ${
>                 LASTMONTH
>               } | ${
>                 THISMONTH
>               } | ${
>                 NEXTMONTH
>               } | ${
>                 LASTWEEK
>               } | ${
>                 THISWEEK
>               } | ${
>                 NEXTWEEK
>               } | ${
>                 THISYEAR
>               } | ${
>                 THISFY
>               } | ${
>                 THISFQ
>               } | ${
>                 LASTYEAR
>               } | ${
>                 PREVFY
>               } | ${
>                 PREVFQ
>               } | ${
>                 NEXTYEAR
>               } | ${
>                 NEXTFY
>               } | ${
>                 NEXTFQ
>               } | ${
>                 EMPTY
>               } | ${
>                 NOTEMPTY
>               } | string | string,
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: string,
>               value: (string | number | {
>                 id: string & any,
>                 name?: string
>               } | {
>                 name: string
>               } | {
>                 id: string,
>                 name?: string
>               })[] | string | number | boolean | {
>                 id: string & any,
>                 name?: string
>               } | {
>                 name: string
>               } | {
>                 id: string,
>                 name?: string
>               } | string,
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>               value: string[] | string,
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: less_than | less_equal | greater_than | greater_equal,
>               value: string | number | string,
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: between | not_between,
>               value: (string | number)[],
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: in | not_in,
>               value: (string | number)[],
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: include_all | include_any | exclude_all | exclude_any,
>               value: {
>                 id: string & any,
>                 name?: string
>               }[],
>               type?: merge_field | pre_defined | value | field
>             } | (recursive)
>           )[],
>           group_operator: AND | OR | and | or
>         }
>       )[],
>       group_operator: AND | OR | and | or
>     } | null,
>     assign_to?: {
>       type: string
>     } | {
>       type: string,
>       resource: {
>         id: string
>       }
>     } | {
>       type: string,
>       resource: {
>         id: string
>       }
>     } | {
>       type: string,
>       resource: {
>         id: string
>       }
>     } | {
>       type: string,
>       resources: {
>         id: string
>       }[]
>     } | {
>       type: string,
>       criteria: {
>       } | null
>     },
>     user_availability_based_on?: (online_status | shift_timing)[] | null,
>     followup_actions?: {
>       type: string,
>       resources?: {
>         id: string
>       }[]
>     }[] | null,
>     allow_agent_user?: boolean
>   }[],
>   id?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `assignment_rules` | `object[] \| null` | No | Represents the Assignment Rules returned for the Assignment Rule operation. |

> [accordion] assignment\_rules full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null,
>     rule_entries?: {
>       id?: string | null
>     }[] | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### create

`assignmentRules.create`

Create an Assignment Rule. To create a single Assignment Rule in your Zoho CRM organization.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.assignmentRules.create({
	module: 'Leads',
	assignment_rules: [{
		name: 'example',
		rule_entries: [{
			assign_to: { type: 'example' },
		}],
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the param query module required schema value for the request. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve module ID and API name. |
| `assignment_rules` | `object[]` | Yes | Array of Assignment Rule objects to be created. |

> [accordion] assignment\_rules full type
>
> ```ts theme={null}
> {
>   api_name?: string,
>   name: string,
>   description?: string,
>   rule_entries: {
>     criteria?: {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: string,
>       value: (string | number | {
>         id: string & any,
>         name?: string
>       } | {
>         name: string
>       } | {
>         id: string,
>         name?: string
>       })[] | string | number | boolean | {
>         id: string & any,
>         name?: string
>       } | {
>         name: string
>       } | {
>         id: string,
>         name?: string
>       } | ${
>         EMPTY
>       } | ${
>         NOTEMPTY
>       } | ${
>         TODAY
>       } | ${
>         TOMORROW
>       } | ${
>         TOMORROWPLUS
>       } | ${
>         YESTERDAY
>       } | ${
>         YESTERDAYMINUS
>       } | ${
>         LASTMONTH
>       } | ${
>         THISMONTH
>       } | ${
>         NEXTMONTH
>       } | ${
>         LASTWEEK
>       } | ${
>         THISWEEK
>       } | ${
>         NEXTWEEK
>       } | ${
>         THISYEAR
>       } | ${
>         THISFY
>       } | ${
>         THISFQ
>       } | ${
>         LASTYEAR
>       } | ${
>         PREVFY
>       } | ${
>         PREVFQ
>       } | ${
>         NEXTYEAR
>       } | ${
>         NEXTFY
>       } | ${
>         NEXTFQ
>       } | ${
>         EMPTY
>       } | ${
>         NOTEMPTY
>       } | string | string,
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: string,
>       value: (string | number | {
>         id: string & any,
>         name?: string
>       } | {
>         name: string
>       } | {
>         id: string,
>         name?: string
>       })[] | string | number | boolean | {
>         id: string & any,
>         name?: string
>       } | {
>         name: string
>       } | {
>         id: string,
>         name?: string
>       } | string,
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>       value: string[] | string,
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: less_than | less_equal | greater_than | greater_equal,
>       value: string | number | string,
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: between | not_between,
>       value: (string | number)[],
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: in | not_in,
>       value: (string | number)[],
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: include_all | include_any | exclude_all | exclude_any,
>       value: {
>         id: string & any,
>         name?: string
>       }[],
>       type?: merge_field | pre_defined | value | field
>     } | {
>       group: (
>         {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: string,
>           value: (string | number | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           })[] | string | number | boolean | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           } | ${
>             EMPTY
>           } | ${
>             NOTEMPTY
>           } | ${
>             TODAY
>           } | ${
>             TOMORROW
>           } | ${
>             TOMORROWPLUS
>           } | ${
>             YESTERDAY
>           } | ${
>             YESTERDAYMINUS
>           } | ${
>             LASTMONTH
>           } | ${
>             THISMONTH
>           } | ${
>             NEXTMONTH
>           } | ${
>             LASTWEEK
>           } | ${
>             THISWEEK
>           } | ${
>             NEXTWEEK
>           } | ${
>             THISYEAR
>           } | ${
>             THISFY
>           } | ${
>             THISFQ
>           } | ${
>             LASTYEAR
>           } | ${
>             PREVFY
>           } | ${
>             PREVFQ
>           } | ${
>             NEXTYEAR
>           } | ${
>             NEXTFY
>           } | ${
>             NEXTFQ
>           } | ${
>             EMPTY
>           } | ${
>             NOTEMPTY
>           } | string | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: string,
>           value: (string | number | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           })[] | string | number | boolean | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           } | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>           value: string[] | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: less_than | less_equal | greater_than | greater_equal,
>           value: string | number | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: between | not_between,
>           value: (string | number)[],
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: in | not_in,
>           value: (string | number)[],
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: include_all | include_any | exclude_all | exclude_any,
>           value: {
>             id: string & any,
>             name?: string
>           }[],
>           type?: merge_field | pre_defined | value | field
>         } | {
>           group: (
>             {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: string,
>               value: (string | number | {
>                 id: string & any,
>                 name?: string
>               } | {
>                 name: string
>               } | {
>                 id: string,
>                 name?: string
>               })[] | string | number | boolean | {
>                 id: string & any,
>                 name?: string
>               } | {
>                 name: string
>               } | {
>                 id: string,
>                 name?: string
>               } | ${
>                 EMPTY
>               } | ${
>                 NOTEMPTY
>               } | ${
>                 TODAY
>               } | ${
>                 TOMORROW
>               } | ${
>                 TOMORROWPLUS
>               } | ${
>                 YESTERDAY
>               } | ${
>                 YESTERDAYMINUS
>               } | ${
>                 LASTMONTH
>               } | ${
>                 THISMONTH
>               } | ${
>                 NEXTMONTH
>               } | ${
>                 LASTWEEK
>               } | ${
>                 THISWEEK
>               } | ${
>                 NEXTWEEK
>               } | ${
>                 THISYEAR
>               } | ${
>                 THISFY
>               } | ${
>                 THISFQ
>               } | ${
>                 LASTYEAR
>               } | ${
>                 PREVFY
>               } | ${
>                 PREVFQ
>               } | ${
>                 NEXTYEAR
>               } | ${
>                 NEXTFY
>               } | ${
>                 NEXTFQ
>               } | ${
>                 EMPTY
>               } | ${
>                 NOTEMPTY
>               } | string | string,
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: string,
>               value: (string | number | {
>                 id: string & any,
>                 name?: string
>               } | {
>                 name: string
>               } | {
>                 id: string,
>                 name?: string
>               })[] | string | number | boolean | {
>                 id: string & any,
>                 name?: string
>               } | {
>                 name: string
>               } | {
>                 id: string,
>                 name?: string
>               } | string,
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>               value: string[] | string,
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: less_than | less_equal | greater_than | greater_equal,
>               value: string | number | string,
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: between | not_between,
>               value: (string | number)[],
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: in | not_in,
>               value: (string | number)[],
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: include_all | include_any | exclude_all | exclude_any,
>               value: {
>                 id: string & any,
>                 name?: string
>               }[],
>               type?: merge_field | pre_defined | value | field
>             } | (recursive)
>           )[],
>           group_operator: AND | OR | and | or
>         }
>       )[],
>       group_operator: AND | OR | and | or
>     } | null,
>     assign_to: {
>       type: string
>     } | {
>       type: string,
>       resource: {
>         id: string
>       }
>     } | {
>       type: string,
>       resource: {
>         id: string
>       }
>     } | {
>       type: string,
>       resource: {
>         id: string
>       }
>     } | {
>       type: string,
>       resources: {
>         id: string
>       }[]
>     } | {
>       type: string,
>       criteria: {
>       } | null
>     },
>     user_availability_based_on?: (online_status | shift_timing)[] | null,
>     followup_actions?: {
>       type: string,
>       resources?: {
>         id: string
>       }[]
>     }[] | null
>   }[],
>   default_assignee?: {
>     type: string,
>     resource: {
>       id: string
>     } | {
>       api_name?: string
>     }
>   }
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `assignment_rules` | `object[] \| null` | No | Represents the Assignment Rules returned for the Assignment Rule operation. |

> [accordion] assignment\_rules full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null,
>     rule_entries?: {
>       id?: string | null
>     }[] | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### delete

`assignmentRules.delete`

Delete an Assignment Rule. To delete a single Assignment Rule from your Zoho CRM organization. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.assignmentRules.delete({ id: '4876876000000333001', module: 'Leads' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Specify the request path param ID value for the request. Use the [Assignment Rule API](assignment_rules.yaml#\$.paths./settings/automation/assignment_rules.get) to retrieve the Assignment Rule ID. |
| `module` | `string` | Yes | Specify the param query module required schema value for the request. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve module ID and API name. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `assignment_rules` | `object[] \| null` | No | Represents the Assignment Rules returned for the Assignment Rule operation. |

> [accordion] assignment\_rules full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null,
>     rule_entries?: {
>       id?: string | null
>     }[] | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### get

`assignmentRules.get`

Specific Assignment Rule details. To retrieve the details of a single Assignment Rule in your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.assignmentRules.get({ id: '4876876000000333001', module: 'Leads' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Specify the request path param ID value for the request. Use the [Assignment Rule API](assignment_rules.yaml#\$.paths./settings/automation/assignment_rules.get) to retrieve the Assignment Rule ID. |
| `include_inner_details` | `created_by.zuid \| modified_by.zuid` | No | Specify the param query include inner details value for the request. Possible values: **created\_by.zuid** - Represents created by.zuid. **modified\_by.zuid** - Represents modified by.zuid. |
| `module` | `string` | Yes | Specify the param query module required schema value for the request. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve module ID and API name. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   assignment_rules?: {
>     id?: string | null,
>     name?: string | null,
>     api_name?: string | null,
>     module?: {
>       name?: string | null,
>       id?: string | null,
>       _details?: {
>       } | null | null,
>       api_name?: string | null,
>       zuid?: string | null
>     } | null,
>     description?: string | null | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null,
>       _details?: {
>       } | null | null,
>       api_name?: string | null,
>       zuid?: string | null
>     } | null,
>     created_time?: string | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null,
>       _details?: {
>       } | null | null,
>       api_name?: string | null,
>       zuid?: string | null
>     } | null,
>     modified_time?: string | null,
>     default_assignee?: {
>       name?: string | null,
>       id?: string | string | null,
>       type?: string | null,
>       resource?: {
>         name?: string | null,
>         id?: string | null,
>         _details?: {
>         } | null | null,
>         api_name?: string | null,
>         zuid?: string | null
>       } | {
>         name?: string | null,
>         api_name?: string | null
>       } | null
>     } | null,
>     rule_entries?: {
>       id?: string | null,
>       sequence_number?: number | null,
>       criteria?: {
>       } | null | null,
>       assign_to?: {
>         type?: string | null
>       } | {
>         type?: string | null,
>         resources?: {
>           name?: string | null,
>           id?: string | null,
>           _details?: {
>           } | null | null,
>           api_name?: string | null,
>           zuid?: string | null
>         }[] | null
>       } | {
>         type?: string | null,
>         resource?: {
>           name?: string | null,
>           id?: string | null,
>           _details?: {
>           } | null | null,
>           api_name?: string | null,
>           zuid?: string | null
>         } | null
>       } | {
>         type?: string | null,
>         criteria?: {
>         } | null | null
>       } | null,
>       user_availability_based_on?: string[] | null | null,
>       followup_actions?: {
>         type?: string | null,
>         resources?: {
>           name?: string | null,
>           id?: string | null,
>           _details?: {
>           } | null | null,
>           api_name?: string | null,
>           zuid?: string | null
>         }[] | null
>       }[] | null | null,
>       allow_agent_user?: boolean | null
>     }[] | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### getAssociations

`assignmentRules.getAssociations`

Assignment Rule Associations. To retrieve the CRM features associated with a single Assignment Rule in your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.assignmentRules.getAssociations({ id: '4876876000000333001', module: 'Leads' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Specify the request path param ID value for the request. Use the [Assignment Rule API](assignment_rules.yaml#\$.paths./settings/automation/assignment_rules.get) to retrieve the Assignment Rule ID. |
| `module` | `string` | Yes | Specify the param query module required schema value for the request. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve module ID and API name. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   associations?: {
>     resources?: {
>       name?: string | null,
>       id?: string | null,
>       _details?: {
>       } | null | null,
>       api_name?: string | null,
>       zuid?: string | null
>     }[] | null,
>     type?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### getCount

`assignmentRules.getCount`

Assignment Rules Count. To retrieve the count of Assignment Rules configured for a module in your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.assignmentRules.getCount({ module: 'Leads' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the param query module required schema value for the request. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve module ID and API name. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   count?: number | null
> } | {
>   success: true
> }
> ```

***

### list

`assignmentRules.list`

Assignment Rules. To retrieve all Assignment Rules configured in your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.assignmentRules.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | No | Specify the param query module schema value for the request. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve module ID and API name. |
| `include_inner_details` | `created_by.zuid \| modified_by.zuid` | No | Specify the param query include inner details value for the request. Possible values: **created\_by.zuid** - Represents created by.zuid. **modified\_by.zuid** - Represents modified by.zuid. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   assignment_rules?: {
>     id?: string | null,
>     name?: string | null,
>     api_name?: string | null,
>     module?: {
>       name?: string | null,
>       id?: string | null,
>       _details?: {
>       } | null | null,
>       api_name?: string | null,
>       zuid?: string | null
>     } | null,
>     description?: string | null | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null,
>       _details?: {
>       } | null | null,
>       api_name?: string | null,
>       zuid?: string | null
>     } | null,
>     created_time?: string | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null,
>       _details?: {
>       } | null | null,
>       api_name?: string | null,
>       zuid?: string | null
>     } | null,
>     modified_time?: string | null,
>     default_assignee?: {
>       name?: string | null,
>       id?: string | string | null,
>       type?: string | null,
>       resource?: {
>         name?: string | null,
>         id?: string | null,
>         _details?: {
>         } | null | null,
>         api_name?: string | null,
>         zuid?: string | null
>       } | {
>         name?: string | null,
>         api_name?: string | null
>       } | null
>     } | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### reorderEntries

`assignmentRules.reorderEntries`

Reorder Assignment Rule entries. To reorder rule entries for a single Assignment Rule in your Zoho CRM organization.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.assignmentRules.reorderEntries({
	id: '4876876000000333001',
	module: 'Leads',
	assignment_rules: [{
		rule_entries: [{ id: '4876876000000333001', sequence_number: 1 }],
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Specify the request path param ID value for the request. Use the [Assignment Rule API](assignment_rules.yaml#\$.paths./settings/automation/assignment_rules.get) to retrieve the Assignment Rule ID. |
| `module` | `string` | Yes | Specify the param query module required schema value for the request. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve module ID and API name. |
| `assignment_rules` | `object[]` | Yes | Array of Assignment Rule objects to be created. |

> [accordion] assignment\_rules full type
>
> ```ts theme={null}
> {
>   rule_entries: {
>     id: string,
>     sequence_number: number | string
>   }[],
>   id?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `assignment_rules` | `object[] \| null` | No | Represents the Assignment Rules returned for the Assignment Rule operation. |

> [accordion] assignment\_rules full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null,
>     rule_entries?: {
>       id?: string | null
>     }[] | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### update

`assignmentRules.update`

Update a Specific Assignment Rule. To update a single Assignment Rule in your Zoho CRM organization.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.assignmentRules.update({
	id: '4876876000000333001',
	module: 'Leads',
	assignment_rules: [{}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Specify the request path param ID value for the request. Use the [Assignment Rule API](assignment_rules.yaml#\$.paths./settings/automation/assignment_rules.get) to retrieve the Assignment Rule ID. |
| `module` | `string` | Yes | Specify the param query module required schema value for the request. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve module ID and API name. |
| `assignment_rules` | `object[]` | Yes | Array of Assignment Rule objects to be created. |

> [accordion] assignment\_rules full type
>
> ```ts theme={null}
> {
>   api_name?: string,
>   name?: string,
>   description?: string,
>   rule_entries?: (
>     {
>       id: string,
>       _delete: null
>     } | {
>       id: string,
>       criteria?: {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: string,
>         value: (string | number | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         })[] | string | number | boolean | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         } | ${
>           EMPTY
>         } | ${
>           NOTEMPTY
>         } | ${
>           TODAY
>         } | ${
>           TOMORROW
>         } | ${
>           TOMORROWPLUS
>         } | ${
>           YESTERDAY
>         } | ${
>           YESTERDAYMINUS
>         } | ${
>           LASTMONTH
>         } | ${
>           THISMONTH
>         } | ${
>           NEXTMONTH
>         } | ${
>           LASTWEEK
>         } | ${
>           THISWEEK
>         } | ${
>           NEXTWEEK
>         } | ${
>           THISYEAR
>         } | ${
>           THISFY
>         } | ${
>           THISFQ
>         } | ${
>           LASTYEAR
>         } | ${
>           PREVFY
>         } | ${
>           PREVFQ
>         } | ${
>           NEXTYEAR
>         } | ${
>           NEXTFY
>         } | ${
>           NEXTFQ
>         } | ${
>           EMPTY
>         } | ${
>           NOTEMPTY
>         } | string | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: string,
>         value: (string | number | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         })[] | string | number | boolean | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         } | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>         value: string[] | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: less_than | less_equal | greater_than | greater_equal,
>         value: string | number | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: between | not_between,
>         value: (string | number)[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: in | not_in,
>         value: (string | number)[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: include_all | include_any | exclude_all | exclude_any,
>         value: {
>           id: string & any,
>           name?: string
>         }[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         group: (
>           {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: string,
>             value: (string | number | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             })[] | string | number | boolean | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             } | ${
>               EMPTY
>             } | ${
>               NOTEMPTY
>             } | ${
>               TODAY
>             } | ${
>               TOMORROW
>             } | ${
>               TOMORROWPLUS
>             } | ${
>               YESTERDAY
>             } | ${
>               YESTERDAYMINUS
>             } | ${
>               LASTMONTH
>             } | ${
>               THISMONTH
>             } | ${
>               NEXTMONTH
>             } | ${
>               LASTWEEK
>             } | ${
>               THISWEEK
>             } | ${
>               NEXTWEEK
>             } | ${
>               THISYEAR
>             } | ${
>               THISFY
>             } | ${
>               THISFQ
>             } | ${
>               LASTYEAR
>             } | ${
>               PREVFY
>             } | ${
>               PREVFQ
>             } | ${
>               NEXTYEAR
>             } | ${
>               NEXTFY
>             } | ${
>               NEXTFQ
>             } | ${
>               EMPTY
>             } | ${
>               NOTEMPTY
>             } | string | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: string,
>             value: (string | number | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             })[] | string | number | boolean | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             } | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>             value: string[] | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: less_than | less_equal | greater_than | greater_equal,
>             value: string | number | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: between | not_between,
>             value: (string | number)[],
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: in | not_in,
>             value: (string | number)[],
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: include_all | include_any | exclude_all | exclude_any,
>             value: {
>               id: string & any,
>               name?: string
>             }[],
>             type?: merge_field | pre_defined | value | field
>           } | {
>             group: (
>               {
>                 field: {
>                   id?: string,
>                   api_name: string
>                 },
>                 comparator: string,
>                 value: (string | number | {
>                   id: string & any,
>                   name?: string
>                 } | {
>                   name: string
>                 } | {
>                   id: string,
>                   name?: string
>                 })[] | string | number | boolean | {
>                   id: string & any,
>                   name?: string
>                 } | {
>                   name: string
>                 } | {
>                   id: string,
>                   name?: string
>                 } | ${
>                   EMPTY
>                 } | ${
>                   NOTEMPTY
>                 } | ${
>                   TODAY
>                 } | ${
>                   TOMORROW
>                 } | ${
>                   TOMORROWPLUS
>                 } | ${
>                   YESTERDAY
>                 } | ${
>                   YESTERDAYMINUS
>                 } | ${
>                   LASTMONTH
>                 } | ${
>                   THISMONTH
>                 } | ${
>                   NEXTMONTH
>                 } | ${
>                   LASTWEEK
>                 } | ${
>                   THISWEEK
>                 } | ${
>                   NEXTWEEK
>                 } | ${
>                   THISYEAR
>                 } | ${
>                   THISFY
>                 } | ${
>                   THISFQ
>                 } | ${
>                   LASTYEAR
>                 } | ${
>                   PREVFY
>                 } | ${
>                   PREVFQ
>                 } | ${
>                   NEXTYEAR
>                 } | ${
>                   NEXTFY
>                 } | ${
>                   NEXTFQ
>                 } | ${
>                   EMPTY
>                 } | ${
>                   NOTEMPTY
>                 } | string | string,
>                 type?: merge_field | pre_defined | value | field
>               } | {
>                 field: {
>                   id?: string,
>                   api_name: string
>                 },
>                 comparator: string,
>                 value: (string | number | {
>                   id: string & any,
>                   name?: string
>                 } | {
>                   name: string
>                 } | {
>                   id: string,
>                   name?: string
>                 })[] | string | number | boolean | {
>                   id: string & any,
>                   name?: string
>                 } | {
>                   name: string
>                 } | {
>                   id: string,
>                   name?: string
>                 } | string,
>                 type?: merge_field | pre_defined | value | field
>               } | {
>                 field: {
>                   id?: string,
>                   api_name: string
>                 },
>                 comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>                 value: string[] | string,
>                 type?: merge_field | pre_defined | value | field
>               } | {
>                 field: {
>                   id?: string,
>                   api_name: string
>                 },
>                 comparator: less_than | less_equal | greater_than | greater_equal,
>                 value: string | number | string,
>                 type?: merge_field | pre_defined | value | field
>               } | {
>                 field: {
>                   id?: string,
>                   api_name: string
>                 },
>                 comparator: between | not_between,
>                 value: (string | number)[],
>                 type?: merge_field | pre_defined | value | field
>               } | {
>                 field: {
>                   id?: string,
>                   api_name: string
>                 },
>                 comparator: in | not_in,
>                 value: (string | number)[],
>                 type?: merge_field | pre_defined | value | field
>               } | {
>                 field: {
>                   id?: string,
>                   api_name: string
>                 },
>                 comparator: include_all | include_any | exclude_all | exclude_any,
>                 value: {
>                   id: string & any,
>                   name?: string
>                 }[],
>                 type?: merge_field | pre_defined | value | field
>               } | (recursive)
>             )[],
>             group_operator: AND | OR | and | or
>           }
>         )[],
>         group_operator: AND | OR | and | or
>       } | null,
>       assign_to?: {
>         type: string
>       } | {
>         type: string,
>         resource: {
>           id: string
>         }
>       } | {
>         type: string,
>         resource: {
>           id: string
>         }
>       } | {
>         type: string,
>         resource: {
>           id: string
>         }
>       } | {
>         type: string,
>         resources: {
>           id: string
>         }[]
>       } | {
>         type: string,
>         criteria: {
>         } | null
>       },
>       user_availability_based_on?: (online_status | shift_timing)[] | null,
>       followup_actions?: {
>         type: string,
>         resources?: {
>           id: string
>         }[]
>       }[] | null,
>       allow_agent_user?: boolean
>     } | {
>       criteria?: {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: string,
>         value: (string | number | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         })[] | string | number | boolean | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         } | ${
>           EMPTY
>         } | ${
>           NOTEMPTY
>         } | ${
>           TODAY
>         } | ${
>           TOMORROW
>         } | ${
>           TOMORROWPLUS
>         } | ${
>           YESTERDAY
>         } | ${
>           YESTERDAYMINUS
>         } | ${
>           LASTMONTH
>         } | ${
>           THISMONTH
>         } | ${
>           NEXTMONTH
>         } | ${
>           LASTWEEK
>         } | ${
>           THISWEEK
>         } | ${
>           NEXTWEEK
>         } | ${
>           THISYEAR
>         } | ${
>           THISFY
>         } | ${
>           THISFQ
>         } | ${
>           LASTYEAR
>         } | ${
>           PREVFY
>         } | ${
>           PREVFQ
>         } | ${
>           NEXTYEAR
>         } | ${
>           NEXTFY
>         } | ${
>           NEXTFQ
>         } | ${
>           EMPTY
>         } | ${
>           NOTEMPTY
>         } | string | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: string,
>         value: (string | number | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         })[] | string | number | boolean | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         } | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>         value: string[] | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: less_than | less_equal | greater_than | greater_equal,
>         value: string | number | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: between | not_between,
>         value: (string | number)[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: in | not_in,
>         value: (string | number)[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: include_all | include_any | exclude_all | exclude_any,
>         value: {
>           id: string & any,
>           name?: string
>         }[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         group: (
>           {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: string,
>             value: (string | number | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             })[] | string | number | boolean | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             } | ${
>               EMPTY
>             } | ${
>               NOTEMPTY
>             } | ${
>               TODAY
>             } | ${
>               TOMORROW
>             } | ${
>               TOMORROWPLUS
>             } | ${
>               YESTERDAY
>             } | ${
>               YESTERDAYMINUS
>             } | ${
>               LASTMONTH
>             } | ${
>               THISMONTH
>             } | ${
>               NEXTMONTH
>             } | ${
>               LASTWEEK
>             } | ${
>               THISWEEK
>             } | ${
>               NEXTWEEK
>             } | ${
>               THISYEAR
>             } | ${
>               THISFY
>             } | ${
>               THISFQ
>             } | ${
>               LASTYEAR
>             } | ${
>               PREVFY
>             } | ${
>               PREVFQ
>             } | ${
>               NEXTYEAR
>             } | ${
>               NEXTFY
>             } | ${
>               NEXTFQ
>             } | ${
>               EMPTY
>             } | ${
>               NOTEMPTY
>             } | string | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: string,
>             value: (string | number | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             })[] | string | number | boolean | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             } | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>             value: string[] | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: less_than | less_equal | greater_than | greater_equal,
>             value: string | number | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: between | not_between,
>             value: (string | number)[],
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: in | not_in,
>             value: (string | number)[],
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: include_all | include_any | exclude_all | exclude_any,
>             value: {
>               id: string & any,
>               name?: string
>             }[],
>             type?: merge_field | pre_defined | value | field
>           } | {
>             group: (
>               {
>                 field: {
>                   id?: string,
>                   api_name: string
>                 },
>                 comparator: string,
>                 value: (string | number | {
>                   id: string & any,
>                   name?: string
>                 } | {
>                   name: string
>                 } | {
>                   id: string,
>                   name?: string
>                 })[] | string | number | boolean | {
>                   id: string & any,
>                   name?: string
>                 } | {
>                   name: string
>                 } | {
>                   id: string,
>                   name?: string
>                 } | ${
>                   EMPTY
>                 } | ${
>                   NOTEMPTY
>                 } | ${
>                   TODAY
>                 } | ${
>                   TOMORROW
>                 } | ${
>                   TOMORROWPLUS
>                 } | ${
>                   YESTERDAY
>                 } | ${
>                   YESTERDAYMINUS
>                 } | ${
>                   LASTMONTH
>                 } | ${
>                   THISMONTH
>                 } | ${
>                   NEXTMONTH
>                 } | ${
>                   LASTWEEK
>                 } | ${
>                   THISWEEK
>                 } | ${
>                   NEXTWEEK
>                 } | ${
>                   THISYEAR
>                 } | ${
>                   THISFY
>                 } | ${
>                   THISFQ
>                 } | ${
>                   LASTYEAR
>                 } | ${
>                   PREVFY
>                 } | ${
>                   PREVFQ
>                 } | ${
>                   NEXTYEAR
>                 } | ${
>                   NEXTFY
>                 } | ${
>                   NEXTFQ
>                 } | ${
>                   EMPTY
>                 } | ${
>                   NOTEMPTY
>                 } | string | string,
>                 type?: merge_field | pre_defined | value | field
>               } | {
>                 field: {
>                   id?: string,
>                   api_name: string
>                 },
>                 comparator: string,
>                 value: (string | number | {
>                   id: string & any,
>                   name?: string
>                 } | {
>                   name: string
>                 } | {
>                   id: string,
>                   name?: string
>                 })[] | string | number | boolean | {
>                   id: string & any,
>                   name?: string
>                 } | {
>                   name: string
>                 } | {
>                   id: string,
>                   name?: string
>                 } | string,
>                 type?: merge_field | pre_defined | value | field
>               } | {
>                 field: {
>                   id?: string,
>                   api_name: string
>                 },
>                 comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>                 value: string[] | string,
>                 type?: merge_field | pre_defined | value | field
>               } | {
>                 field: {
>                   id?: string,
>                   api_name: string
>                 },
>                 comparator: less_than | less_equal | greater_than | greater_equal,
>                 value: string | number | string,
>                 type?: merge_field | pre_defined | value | field
>               } | {
>                 field: {
>                   id?: string,
>                   api_name: string
>                 },
>                 comparator: between | not_between,
>                 value: (string | number)[],
>                 type?: merge_field | pre_defined | value | field
>               } | {
>                 field: {
>                   id?: string,
>                   api_name: string
>                 },
>                 comparator: in | not_in,
>                 value: (string | number)[],
>                 type?: merge_field | pre_defined | value | field
>               } | {
>                 field: {
>                   id?: string,
>                   api_name: string
>                 },
>                 comparator: include_all | include_any | exclude_all | exclude_any,
>                 value: {
>                   id: string & any,
>                   name?: string
>                 }[],
>                 type?: merge_field | pre_defined | value | field
>               } | (recursive)
>             )[],
>             group_operator: AND | OR | and | or
>           }
>         )[],
>         group_operator: AND | OR | and | or
>       } | null,
>       assign_to: {
>         type: string
>       } | {
>         type: string,
>         resource: {
>           id: string
>         }
>       } | {
>         type: string,
>         resource: {
>           id: string
>         }
>       } | {
>         type: string,
>         resource: {
>           id: string
>         }
>       } | {
>         type: string,
>         resources: {
>           id: string
>         }[]
>       } | {
>         type: string,
>         criteria: {
>         } | null
>       },
>       user_availability_based_on?: (online_status | shift_timing)[] | null,
>       followup_actions?: {
>         type: string,
>         resources?: {
>           id: string
>         }[]
>       }[] | null
>     }
>   )[],
>   default_assignee?: {
>     type: string,
>     resource: {
>       id: string
>     } | {
>       api_name?: string
>     }
>   }
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `assignment_rules` | `object[] \| null` | No | Represents the Assignment Rules returned for the Assignment Rule operation. |

> [accordion] assignment\_rules full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null,
>     rule_entries?: {
>       id?: string | null
>     }[] | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

## Attachments

### delete

`attachments.delete`

Delete Link Attachment. Deletes a link attachment associated with a specific record in a module. Note that only link attachments can be deleted using this endpoint; file attachments cannot be deleted through this API. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.attachments.delete({ recordId: '4876876000000333001', moduleApiName: 'Leads', id: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `recordId` | `string` | Yes | Specify the unique identifier of the record. Use the [Get Records API](record.yaml#\$.paths./module.get) to retrieve record IDs. |
| `moduleApiName` | `string` | Yes | Specify the API name of the module (e.g., `Leads`, `Contacts`, `Accounts`). Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve the module API names. |
| `id` | `string` | Yes | Specify the unique identifier of the attachment. Use the [Get Attachments](attachments.yaml#\$.paths./\{moduleApiName}/\{recordId}/Attachments.get) resource to retrieve attachment IDs. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | Array of deletion results |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### get

`attachments.get`

Download a specific attachment file. Download the file content of a specific attachment by its ID. This endpoint returns the actual file (image, PDF, document, etc.). Returns an error for link attachments, as they cannot be downloaded.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.attachments.get({ recordId: '4876876000000333001', moduleApiName: 'Leads', id: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `recordId` | `string` | Yes | Specify the unique identifier of the record. Use the [Get Records API](record.yaml#\$.paths./module.get) to retrieve record IDs. |
| `moduleApiName` | `string` | Yes | Specify the API name of the module (e.g., `Leads`, `Contacts`, `Accounts`). Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve the module API names. |
| `id` | `string` | Yes | Specify the unique identifier of the attachment. Use the [Get Attachments](attachments.yaml#\$.paths./\{moduleApiName}/\{recordId}/Attachments.get) resource to retrieve attachment IDs. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `contentBase64` | `string` | No | The file, base64-encoded. Missing when the file came back as text or contentOmitted is set. |
| `text` | `string` | No | The file as text, in place of contentBase64, when it is a text file (CSV, JSON, Markdown, XML and the like) in UTF-8. |
| `contentType` | `string` | Yes | Media type of the file, for example application/pdf. |
| `byteLength` | `number` | Yes | Size of the file in bytes. |
| `filename` | `string` | No | The file name, when known. |
| `contentOmitted` | `not_requested \| over_limit` | No | Set when the content was left out: the caller did not ask for it, or the file was over the limit. |
| `fileId` | `string` | No | Where the host saved the file. Over the limit it comes in place of the content; a host that keeps every file sets it beside the content too. On Corsair it is a Files id (fil\_…): pass it to another app wherever that app takes a file URL, or read a text file or PDF with files.read\_text. |

***

### list

`attachments.list`

Retrieve All Attachments. Retrieves all attachments associated with a specific record in a module.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.attachments.list({ recordId: '4876876000000333001', moduleApiName: 'Leads' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `recordId` | `string` | Yes | Specify the unique identifier of the record. Use the [Get Records API](record.yaml#\$.paths./module.get) to retrieve record IDs. |
| `moduleApiName` | `string` | Yes | Specify the API name of the module (e.g., `Leads`, `Contacts`, `Accounts`). Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve the module API names. |
| `fields` | `string` | No | Specify the fields to retrieve. Use the [Get Fields Metadata API](fields.yaml#\$.paths./settings/fields.get) to retrieve the field IDs. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data?: {
>     id?: string | null,
>     File_Name?: string | null,
>     Size?: string | null,
>     Created_Time?: string | null,
>     Created_By?: {
>       id?: string | null,
>       name?: string | null,
>       email?: string | null
>     } | null,
>     Modified_Time?: string | null,
>     Modified_By?: {
>       id?: string | null,
>       name?: string | null,
>       email?: string | null
>     } | null,
>     Owner?: {
>       id?: string | null,
>       name?: string | null,
>       email?: string | null
>     } | null,
>     Parent_Id?: {
>       id?: string | null,
>       name?: string | null
>     } | null,
>     $field_states?: {
>     } | null | null,
>     $editable?: boolean | null,
>     $file_id?: string | null | null,
>     $type?: string | null,
>     $se_module?: string | null,
>     $state?: string | null,
>     $link_url?: string | null | null,
>     $sharing_permission?: string | null
>   }[] | null,
>   info?: {
>     per_page?: number | null,
>     next_page_token?: string | null | null,
>     count?: number | null,
>     page?: number | null,
>     previous_page_token?: string | null | null,
>     page_token_expiry?: string | null | null,
>     more_records?: boolean | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### upload

`attachments.upload`

Upload an Attachment. Uploads an attachment by providing either a file or a valid URL. Maximum request body size: 100MB.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.attachments.upload({ recordId: '4876876000000333001', moduleApiName: 'Leads' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `recordId` | `string` | Yes | Specify the unique identifier of the record. Use the [Get Records API](record.yaml#\$.paths./module.get) to retrieve record IDs. |
| `moduleApiName` | `string` | Yes | Specify the API name of the module (e.g., `Leads`, `Contacts`, `Accounts`). Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve the module API names. |
| `file` | `string \| object \| custom` | No | The file to upload as an attachment |
| `attachmentUrl` | `string` | No | The URL of the attachment to be linked |
| `title` | `string \| null` | No | Optional title for the attachment |

> [accordion] file full type
>
> ```ts theme={null}
> string | {
>   url: string,
>   filename?: string,
>   contentType?: string
> } | {
>   base64: string,
>   filename?: string,
>   contentType?: string
> } | custom
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | Array of upload results |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null,
>     Modified_Time?: string | null,
>     Created_Time?: string | null,
>     Modified_By?: {
>       id?: string | null,
>       name?: string | null
>     } | null,
>     Created_By?: {
>       id?: string | null,
>       name?: string | null
>     } | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

## Audit Log Exports

### create

`auditLogExports.create`

Create an audit log export job. To create an asynchronous audit log export job in your Zoho CRM organization. The system schedules the job and returns a unique job ID with a SCHEDULED status code. Use theGet Audit Log Export API to poll for completion and retrieve the download links.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.auditLogExports.create({
	audit_log_export: [{
		criteria: {
			field: { api_name: 'example' },
			comparator: 'example',
			value: 'added',
		},
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `audit_log_export` | `object[]` | Yes | Specify the list of audit log export job configurations. |

> [accordion] audit\_log\_export full type
>
> ```ts theme={null}
> {
>   criteria: {
>     field: {
>       api_name: string
>     },
>     comparator: string,
>     value: added | updated | deleted
>   } | {
>     field: {
>       api_name: string
>     },
>     comparator: string,
>     value: (added | updated | deleted)[]
>   } | {
>     field: {
>       api_name: string
>     },
>     comparator: string,
>     value: {
>       api_name?: string,
>       id?: string
>     }[]
>   } | {
>     field: {
>       api_name: string
>     },
>     comparator: string,
>     value: {
>       api_name?: string,
>       id?: string
>     }[]
>   } | {
>     field: {
>       api_name: string
>     },
>     comparator: string,
>     value: {
>       id: string,
>       name?: string
>     }[]
>   } | {
>     field: {
>       api_name: string
>     },
>     comparator: string,
>     value: {
>       id: string,
>       name?: string
>     }[]
>   } | {
>     field: {
>       api_name: string
>     },
>     comparator: string,
>     value: string[]
>   } | {
>     group_operator: string,
>     group: (
>       {
>         field: {
>           api_name: string
>         },
>         comparator: string,
>         value: added | updated | deleted
>       } | {
>         field: {
>           api_name: string
>         },
>         comparator: string,
>         value: (added | updated | deleted)[]
>       } | {
>         field: {
>           api_name: string
>         },
>         comparator: string,
>         value: {
>           api_name?: string,
>           id?: string
>         }[]
>       } | {
>         field: {
>           api_name: string
>         },
>         comparator: string,
>         value: {
>           api_name?: string,
>           id?: string
>         }[]
>       } | {
>         field: {
>           api_name: string
>         },
>         comparator: string,
>         value: {
>           id: string,
>           name?: string
>         }[]
>       } | {
>         field: {
>           api_name: string
>         },
>         comparator: string,
>         value: {
>           id: string,
>           name?: string
>         }[]
>       } | {
>         field: {
>           api_name: string
>         },
>         comparator: string,
>         value: string[]
>       } | {
>         group_operator: string,
>         group: (
>           {
>             field: {
>               api_name: string
>             },
>             comparator: string,
>             value: added | updated | deleted
>           } | {
>             field: {
>               api_name: string
>             },
>             comparator: string,
>             value: (added | updated | deleted)[]
>           } | {
>             field: {
>               api_name: string
>             },
>             comparator: string,
>             value: {
>               api_name?: string,
>               id?: string
>             }[]
>           } | {
>             field: {
>               api_name: string
>             },
>             comparator: string,
>             value: {
>               api_name?: string,
>               id?: string
>             }[]
>           } | {
>             field: {
>               api_name: string
>             },
>             comparator: string,
>             value: {
>               id: string,
>               name?: string
>             }[]
>           } | {
>             field: {
>               api_name: string
>             },
>             comparator: string,
>             value: {
>               id: string,
>               name?: string
>             }[]
>           } | {
>             field: {
>               api_name: string
>             },
>             comparator: string,
>             value: string[]
>           } | (recursive)
>         )[]
>       }
>     )[]
>   }
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `audit_log_export` | `object[] \| null` | No | Represents the list of audit log export job responses. |

> [accordion] audit\_log\_export full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### get

`auditLogExports.get`

Get the Status of the Export Audit Log Job. Retrieves the details of a specific audit log export job in your Zoho CRM organization by its ID, including its status, filter criteria, and download link(s).

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.auditLogExports.get({ id: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Specify the unique ID of the audit log export job. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   audit_log_export?: {
>     criteria?: {
>       field?: {
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: string | null
>     } | {
>       field?: {
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: string[] | null
>     } | {
>       field?: {
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: {
>         api_name?: string | null,
>         id?: string | null
>       }[] | null
>     } | {
>       field?: {
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: {
>         api_name?: string | null,
>         id?: string | null
>       }[] | null
>     } | {
>       field?: {
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: {
>         id?: string | null,
>         name?: string | null
>       }[] | null
>     } | {
>       field?: {
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: {
>         id?: string | null,
>         name?: string | null
>       }[] | null
>     } | {
>       field?: {
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: string[] | null
>     } | {
>       group_operator?: string | null,
>       group?: (
>         {
>           field?: {
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: string | null
>         } | {
>           field?: {
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: string[] | null
>         } | {
>           field?: {
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: {
>             api_name?: string | null,
>             id?: string | null
>           }[] | null
>         } | {
>           field?: {
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: {
>             api_name?: string | null,
>             id?: string | null
>           }[] | null
>         } | {
>           field?: {
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: {
>             id?: string | null,
>             name?: string | null
>           }[] | null
>         } | {
>           field?: {
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: {
>             id?: string | null,
>             name?: string | null
>           }[] | null
>         } | {
>           field?: {
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: string[] | null
>         } | {
>           group_operator?: string | null,
>           group?: (
>             {
>               field?: {
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: string | null
>             } | {
>               field?: {
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: string[] | null
>             } | {
>               field?: {
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: {
>                 api_name?: string | null,
>                 id?: string | null
>               }[] | null
>             } | {
>               field?: {
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: {
>                 api_name?: string | null,
>                 id?: string | null
>               }[] | null
>             } | {
>               field?: {
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: {
>                 id?: string | null,
>                 name?: string | null
>               }[] | null
>             } | {
>               field?: {
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: {
>                 id?: string | null,
>                 name?: string | null
>               }[] | null
>             } | {
>               field?: {
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: string[] | null
>             } | (recursive)
>           )[] | null
>         }
>       )[] | null
>     } | null | null,
>     id?: string | null,
>     status?: string | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     download_links?: string[] | null | null,
>     job_start_time?: string | null,
>     job_end_time?: string | null,
>     expiry_date?: string | null | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### list

`auditLogExports.list`

Get audit log export jobs. To retrieve the list of all audit log export jobs in your Zoho CRM organization, along with their status, filter criteria, and download links.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.auditLogExports.list({});
```

**Input:** *empty object*

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   audit_log_export?: {
>     criteria?: {
>       field?: {
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: string | null
>     } | {
>       field?: {
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: string[] | null
>     } | {
>       field?: {
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: {
>         api_name?: string | null,
>         id?: string | null
>       }[] | null
>     } | {
>       field?: {
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: {
>         api_name?: string | null,
>         id?: string | null
>       }[] | null
>     } | {
>       field?: {
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: {
>         id?: string | null,
>         name?: string | null
>       }[] | null
>     } | {
>       field?: {
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: {
>         id?: string | null,
>         name?: string | null
>       }[] | null
>     } | {
>       field?: {
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: string[] | null
>     } | {
>       group_operator?: string | null,
>       group?: (
>         {
>           field?: {
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: string | null
>         } | {
>           field?: {
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: string[] | null
>         } | {
>           field?: {
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: {
>             api_name?: string | null,
>             id?: string | null
>           }[] | null
>         } | {
>           field?: {
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: {
>             api_name?: string | null,
>             id?: string | null
>           }[] | null
>         } | {
>           field?: {
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: {
>             id?: string | null,
>             name?: string | null
>           }[] | null
>         } | {
>           field?: {
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: {
>             id?: string | null,
>             name?: string | null
>           }[] | null
>         } | {
>           field?: {
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: string[] | null
>         } | {
>           group_operator?: string | null,
>           group?: (
>             {
>               field?: {
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: string | null
>             } | {
>               field?: {
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: string[] | null
>             } | {
>               field?: {
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: {
>                 api_name?: string | null,
>                 id?: string | null
>               }[] | null
>             } | {
>               field?: {
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: {
>                 api_name?: string | null,
>                 id?: string | null
>               }[] | null
>             } | {
>               field?: {
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: {
>                 id?: string | null,
>                 name?: string | null
>               }[] | null
>             } | {
>               field?: {
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: {
>                 id?: string | null,
>                 name?: string | null
>               }[] | null
>             } | {
>               field?: {
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: string[] | null
>             } | (recursive)
>           )[] | null
>         }
>       )[] | null
>     } | null | null,
>     id?: string | null,
>     status?: string | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     download_links?: string[] | null | null,
>     job_start_time?: string | null,
>     job_end_time?: string | null,
>     expiry_date?: string | null | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

## Automation Functions

### create

`automationFunctions.create`

Create Automation Function. To create a custom automation function in your Zoho CRM organization.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.automationFunctions.create({
	functions: [{
		function: { id: '487687600000033300' },
		language: 'deluge',
		module: {},
		name: 'example',
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `functions` | `object[]` | Yes | Represents the array of automation function definitions included in the request. |

> [accordion] functions full type
>
> ```ts theme={null}
> {
>   feature_type?: workflow | approval_process | blueprint | blueprint_transition | blueprint_state | review_process | orchestration | assignment_rules | kiosk | pathfinder | connected_workflows | commandcenter_service | cadences,
>   module: {
>     api_name?: string,
>     id?: string
>   },
>   related_module?: {
>     api_name?: string,
>     id?: string
>   },
>   function: {
>     id: string
>   },
>   name: string,
>   description?: string,
>   language: deluge | python | java | node_js | python_3_12 | java17 | nodejs_22 | nodejs | GOlang,
>   arguments?: {
>     name: string,
>     type: static | merge_field,
>     value: string
>   }[]
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `functions` | `object[] \| null` | No | The list of per-item results from the automation function creation operation. |

> [accordion] functions full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### delete

`automationFunctions.delete`

Delete Automation Function. To delete an automation function from your Zoho CRM organization. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.automationFunctions.delete({ functionId: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `functionId` | `string` | Yes | Specify the unique ID of the function for which you want to perform the operation. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `functions` | `object[] \| null` | No | The list of deletion results for the specified automation functions. |

> [accordion] functions full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### deleteMany

`automationFunctions.deleteMany`

Delete Functions. To delete one or more automation functions from your Zoho CRM organization. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.automationFunctions.deleteMany({ ids: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `ids` | `string` | Yes | Specify the unique IDs of the records for which you want to perform the operation. Accepts comma-separated values. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   functions?: {
>     code?: string | null,
>     details?: {
>       id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   functions?: any & any | null
> }
> ```

***

### get

`automationFunctions.get`

Get Automation Function. To retrieve the details of a specific automation function in your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.automationFunctions.get({ functionId: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `functionId` | `string` | Yes | Specify the unique ID of the function for which you want to perform the operation. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   functions?: {
>     created_time?: string | null,
>     lock_status?: {
>       locked?: boolean | null
>     } | null,
>     editable?: boolean | null,
>     module?: {
>       singular_label?: string | null,
>       plural_label?: string | null,
>       api_name?: string | null,
>       moduleName?: string | null,
>       id?: string | null
>     } | null,
>     related_module?: {
>       singular_label?: string | null,
>       plural_label?: string | null,
>       api_name?: string | null,
>       moduleName?: string | null,
>       id?: string | null
>     } | null | null,
>     deletable?: boolean | null,
>     description?: string | null | null,
>     language?: string | null,
>     source?: string | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     feature_type?: string | null,
>     modified_time?: string | null,
>     associated?: boolean | null,
>     function?: {
>       api_name?: string | null,
>       id?: string | null
>     } | null,
>     name?: string | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     arguments?: {
>       name?: string | null,
>       type?: string | null,
>       value?: string | null
>     }[] | null,
>     id?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### getAssociatedModules

`automationFunctions.getAssociatedModules`

Get Associated Modules for Automation Functions. To retrieve the list of modules associated with automation functions in your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.automationFunctions.getAssociatedModules({});
```

**Input:** *empty object*

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   associated_modules?: {
>     api_name?: string | null,
>     id?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### list

`automationFunctions.list`

Get Automation Functions. To retrieve all automation functions configured in your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.automationFunctions.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | No | Specify the module API name to filter the automation functions returned in the response. |
| `feature_type` | `workflow \| approval_process \| blueprint \| blueprint_transition \| blueprint_state \| review_process \| orchestration \| assignment_rules \| kiosk \| pathfinder \| connected_workflows \| commandcenter_service \| cadences` | No | Specify the automation feature type to filter the returned functions. Possible values: \* **workflow** \* **approval\_process** \* **blueprint** \* **blueprint\_transition** \* **blueprint\_state** \* **review\_process** \* **orchestration** \* **assignment\_rules** \* **kiosk** \* **pathfinder** \* **connected\_workflows** \* **commandcenter\_service** \* **cadences** |
| `page` | `number \| string` | No | Specify the page number to retrieve in the paginated list of automation functions. |
| `per_page` | `number \| string` | No | Specify the number of automation functions to return per page in the paginated response. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   functions?: {
>     created_time?: string | null,
>     lock_status?: {
>       locked?: boolean | null
>     } | null,
>     editable?: boolean | null,
>     module?: {
>       singular_label?: string | null,
>       plural_label?: string | null,
>       api_name?: string | null,
>       moduleName?: string | null,
>       id?: string | null
>     } | null,
>     related_module?: {
>       singular_label?: string | null,
>       plural_label?: string | null,
>       api_name?: string | null,
>       moduleName?: string | null,
>       id?: string | null
>     } | null | null,
>     deletable?: boolean | null,
>     description?: string | null | null,
>     language?: string | null,
>     source?: string | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     feature_type?: string | null,
>     modified_time?: string | null,
>     associated?: boolean | null,
>     function?: {
>       api_name?: string | null,
>       id?: string | null
>     } | null,
>     name?: string | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     arguments?: {
>       name?: string | null,
>       type?: string | null,
>       value?: string | null
>     }[] | null,
>     id?: string | null
>   }[] | null,
>   info?: {
>     per_page?: number | null,
>     count?: number | null,
>     page?: number | null,
>     more_records?: boolean | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### update

`automationFunctions.update`

Update Automation Function. To update an automation function configuration in your Zoho CRM organization.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.automationFunctions.update({
	functionId: 'example',
	functions: [{ id: '487687600000033300' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `functionId` | `string` | Yes | Specify the unique ID of the function for which you want to perform the operation. |
| `functions` | `object[]` | Yes | Represents the list of automation function change sets included in the modification request. |

> [accordion] functions full type
>
> ```ts theme={null}
> {
>   feature_type?: workflow | approval_process | blueprint | blueprint_transition | blueprint_state | review_process | orchestration | assignment_rules | kiosk | pathfinder | connected_workflows | commandcenter_service | cadences,
>   arguments?: {
>     name: string,
>     type: static | merge_field,
>     value: string
>   }[],
>   id: string,
>   module?: {
>     api_name?: string,
>     id?: string
>   },
>   related_module?: {
>     api_name?: string,
>     id?: string
>   }
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `functions` | `object[] \| null` | No | Represents the list of per-item results for each automation function modification submitted in the request. |

> [accordion] functions full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### updateMany

`automationFunctions.updateMany`

Update Automation Function. To update an automation function in your Zoho CRM organization.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.automationFunctions.updateMany({
	functions: [{ id: '487687600000033300' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `functions` | `object[]` | Yes | Represents the list of automation function change sets included in the modification request. |

> [accordion] functions full type
>
> ```ts theme={null}
> {
>   feature_type?: workflow | approval_process | blueprint | blueprint_transition | blueprint_state | review_process | orchestration | assignment_rules | kiosk | pathfinder | connected_workflows | commandcenter_service | cadences,
>   arguments?: {
>     name: string,
>     type: static | merge_field,
>     value: string
>   }[],
>   id: string,
>   module?: {
>     api_name?: string,
>     id?: string
>   },
>   related_module?: {
>     api_name?: string,
>     id?: string
>   }
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `functions` | `object[] \| null` | No | Represents the list of per-item results for each automation function modification submitted in the request. |

> [accordion] functions full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

## Blueprints

### activate

`blueprints.activate`

Activate Blueprint. To publish a blueprint draft, republish a blueprint draft, or activate a previously deactivated blueprint in your Zoho CRM organization.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.blueprints.activate({
	blueprintId: '4876876000000333001',
	blueprints: [{ move_records: true }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `blueprintId` | `string` | Yes | The ID of the blueprint to activate. Use the [Get Blueprint by ID](blueprints.yaml#\$.paths./settings/blueprints/\{blueprintId}.get) to retrieve the Blueprint ID. |
| `blueprints` | `object[]` | Yes | This is the root key of the request body (Required) |

> [accordion] blueprints full type
>
> ```ts theme={null}
> {
>   map_states?: {
>     existing_state?: {
>       id?: string | null
>     },
>     replacing_state?: {
>       id?: string | null
>     }
>   }[] | null,
>   move_records: boolean
> }[]
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   blueprints?: {
>     code?: string | null,
>     details?: {
>       name?: string | null | null,
>       id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### clone

`blueprints.clone`

Clone Blueprint. To clone a Blueprint in your Zoho CRM organization.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.blueprints.clone({
	blueprintId: '4876876000000333001',
	blueprints: [{
		field: {},
		layout: {},
		module: 'Leads',
		name: 'example',
		type: 'example',
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `blueprintId` | `string` | Yes | Specify the ID of the Blueprint you want to clone. Refer to the [Blueprints](blueprints.yaml#\$.paths./settings/blueprints.get) resource for valid values. |
| `blueprints` | `object[]` | Yes | Represents the list of clone settings for the Blueprint to clone. The object specifies the clone settings for one Blueprint, including the module, name, clone type, and state mappings. |

> [accordion] blueprints full type
>
> ```ts theme={null}
> {
>   layout: {
>     name?: string | null,
>     id?: string | null
>   },
>   pipeline?: {
>     name?: string | null,
>     id?: string | null
>   },
>   map_states?: {
>     clone_state?: {
>       actual_value?: string | null
>     },
>     existing_state?: {
>       actual_value?: string | null
>     }
>   }[] | null,
>   field: {
>     api_name?: string | null,
>     id?: string | null
>   },
>   module: string,
>   name: string,
>   type: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `blueprints` | `object[] \| null` | No | Represents the list of clone results. Each object reports the outcome of the clone request for one Blueprint. |

> [accordion] blueprints full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     uncopied_before_criteria_fields?: null | null,
>     id?: string | null,
>     uncopied_entry_criteria_fields?: null | null,
>     uncopied_during_transition_fields?: null | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### create

`blueprints.create`

Create a Blueprint. To create a Blueprint with states and transitions for a module in your Zoho CRM organization. After creating the Blueprint, you must update each transition to set its modified time, which the user interface requires.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.blueprints.create({
	blueprints: [{
		field: { id: '4876876000000333001' },
		layout: { id: '4876876000000333001' },
		module: { id: '4876876000000333001' },
		name: 'example',
		continuous: true,
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `blueprints` | `object[]` | Yes | Represents the root element that contains the details required to create the Blueprint. |

> [accordion] blueprints full type
>
> ```ts theme={null}
> {
>   chart_data?: {
>     canvas_size: {
>       width: number | string,
>       height: number | string
>     },
>     nodes?: {
>       position_x: number | string,
>       position_y: number | string,
>       state: {
>         api_name: string
>       }
>     }[] | null,
>     connections?: {
>       from: {
>         end_point: {
>           position_x?: 0.5,
>           position_y?: 1,
>           direction_x?: 0,
>           direction_y?: 1
>         } | {
>           position_x?: 0.5,
>           position_y?: 0,
>           direction_x?: 0,
>           direction_y?: -1
>         } | {
>           position_x?: 0,
>           position_y?: 0.5,
>           direction_x?: 0,
>           direction_y?: 0
>         } | {
>           position_x?: 1,
>           position_y?: 0.5,
>           direction_x?: 0,
>           direction_y?: 0
>         } | {
>           position_x?: 0.12,
>           position_y?: 0,
>           direction_x?: 0,
>           direction_y?: -1
>         } | {
>           position_x?: 0.88,
>           position_y?: 0,
>           direction_x?: 0,
>           direction_y?: -1
>         } | {
>           position_x?: 0.12,
>           position_y?: 1,
>           direction_x?: 0,
>           direction_y?: 1
>         } | {
>           position_x?: 0.88,
>           position_y?: 1,
>           direction_x?: 0,
>           direction_y?: 1
>         } | {
>           position_x?: 0.3,
>           position_y?: 0,
>           direction_x?: 0,
>           direction_y?: -1
>         } | {
>           position_x?: 0.7,
>           position_y?: 0,
>           direction_x?: 0,
>           direction_y?: -1
>         } | {
>           position_x?: 0.3,
>           position_y?: 1,
>           direction_x?: 0,
>           direction_y?: 1
>         } | {
>           position_x?: 0.7,
>           position_y?: 1,
>           direction_x?: 0,
>           direction_y?: 1
>         } | {
>           position_x?: 0.21,
>           position_y?: 0,
>           direction_x?: 0,
>           direction_y?: -1
>         } | {
>           position_x?: 0.79,
>           position_y?: 0,
>           direction_x?: 0,
>           direction_y?: -1
>         } | {
>           position_x?: 0.21,
>           position_y?: 1,
>           direction_x?: 0,
>           direction_y?: 1
>         } | {
>           position_x?: 0.79,
>           position_y?: 1,
>           direction_x?: 0,
>           direction_y?: 1
>         } | {
>           position_x?: 0.4,
>           position_y?: 0,
>           direction_x?: 0,
>           direction_y?: -1
>         } | {
>           position_x?: 0.6,
>           position_y?: 0,
>           direction_x?: 0,
>           direction_y?: -1
>         } | {
>           position_x?: 0.4,
>           position_y?: 1,
>           direction_x?: 0,
>           direction_y?: 1
>         } | {
>           position_x?: 0.6,
>           position_y?: 1,
>           direction_x?: 0,
>           direction_y?: 1
>         },
>         state: {
>           api_name: string
>         }
>       },
>       to: {
>         end_point: {
>           position_x?: 0.5,
>           position_y?: 1,
>           direction_x?: 0,
>           direction_y?: 1
>         } | {
>           position_x?: 0.5,
>           position_y?: 0,
>           direction_x?: 0,
>           direction_y?: -1
>         } | {
>           position_x?: 0,
>           position_y?: 0.5,
>           direction_x?: 0,
>           direction_y?: 0
>         } | {
>           position_x?: 1,
>           position_y?: 0.5,
>           direction_x?: 0,
>           direction_y?: 0
>         } | {
>           position_x?: 0.12,
>           position_y?: 0,
>           direction_x?: 0,
>           direction_y?: -1
>         } | {
>           position_x?: 0.88,
>           position_y?: 0,
>           direction_x?: 0,
>           direction_y?: -1
>         } | {
>           position_x?: 0.12,
>           position_y?: 1,
>           direction_x?: 0,
>           direction_y?: 1
>         } | {
>           position_x?: 0.88,
>           position_y?: 1,
>           direction_x?: 0,
>           direction_y?: 1
>         } | {
>           position_x?: 0.3,
>           position_y?: 0,
>           direction_x?: 0,
>           direction_y?: -1
>         } | {
>           position_x?: 0.7,
>           position_y?: 0,
>           direction_x?: 0,
>           direction_y?: -1
>         } | {
>           position_x?: 0.3,
>           position_y?: 1,
>           direction_x?: 0,
>           direction_y?: 1
>         } | {
>           position_x?: 0.7,
>           position_y?: 1,
>           direction_x?: 0,
>           direction_y?: 1
>         } | {
>           position_x?: 0.21,
>           position_y?: 0,
>           direction_x?: 0,
>           direction_y?: -1
>         } | {
>           position_x?: 0.79,
>           position_y?: 0,
>           direction_x?: 0,
>           direction_y?: -1
>         } | {
>           position_x?: 0.21,
>           position_y?: 1,
>           direction_x?: 0,
>           direction_y?: 1
>         } | {
>           position_x?: 0.79,
>           position_y?: 1,
>           direction_x?: 0,
>           direction_y?: 1
>         } | {
>           position_x?: 0.4,
>           position_y?: 0,
>           direction_x?: 0,
>           direction_y?: -1
>         } | {
>           position_x?: 0.6,
>           position_y?: 0,
>           direction_x?: 0,
>           direction_y?: -1
>         } | {
>           position_x?: 0.4,
>           position_y?: 1,
>           direction_x?: 0,
>           direction_y?: 1
>         } | {
>           position_x?: 0.6,
>           position_y?: 1,
>           direction_x?: 0,
>           direction_y?: 1
>         },
>         state: {
>           api_name: string
>         }
>       },
>       api_name: string,
>       transition: {
>         name?: string | null,
>         api_name: string
>       }
>     }[] | null
>   },
>   criteria?: {
>     comparator?: string | null,
>     field?: {
>       id: string,
>       api_name?: string | null,
>       field_label?: string | null
>     },
>     type?: string | null,
>     value?: string | null
>   },
>   module: {
>     id: string,
>     api_name?: string | null,
>     precedence?: number | string | null
>   },
>   description?: string | null,
>   owners?: {
>     type: users | role | group | record_owner | portal_user_type,
>     resources: (
>       {
>         id?: string | null
>       } | {
>         id?: string | null
>       } | {
>         id?: string | null
>       } | {
>         id: string
>       }
>     )[]
>   }[] | null,
>   transitions?: {
>     criteria?: {
>       comparator: string,
>       field: {
>         id: string,
>         api_name?: string | null,
>         field_label?: string | null
>       },
>       type: string,
>       value?: string | null
>     },
>     trigger_type: manual | automatic,
>     module?: {
>       id: string,
>       api_name?: string | null,
>       precedence?: number | string | null
>     },
>     description?: string | null,
>     owners?: {
>       type?: users | role | group | record_owner | portal_user_type | null,
>       resources?: (
>         {
>           id?: string | null
>         } | {
>           id?: string | null
>         } | {
>           id?: string | null
>         } | {
>           id?: string | null
>         }
>       )[] | null
>     }[] | null,
>     include_states?: {
>       state?: {
>         name?: string | null,
>         api_name?: string | null
>       }
>     }[] | null,
>     layout?: {
>       name?: string | null,
>       id?: string | null,
>       api_name?: string | null
>     },
>     during_inputs?: {
>       validation_filter?: {
>         criteria: {
>           comparator: string,
>           field: {
>             id: string,
>             api_name?: string | null,
>             field_label?: string | null
>           },
>           type: string,
>           value: string
>         },
>         validation_message: string
>       },
>       sequence: number | string,
>       optional?: boolean | null,
>       field?: {
>         id: string,
>         api_name?: string | null,
>         field_label?: string | null
>       },
>       type: field | related_list | info | attachment | tags | notes | checklist | widget | kiosk
>     }[] | null,
>     common?: boolean | null,
>     api_name: string,
>     name: string,
>     transition_type: standalone_transition | parallel_transition | child_transition,
>     actions?: (
>       {
>         name?: string | null,
>         details?: {
>           name?: string | null,
>           id?: string
>         },
>         id?: string | null,
>         type: string | null
>       } | {
>         name?: string | null,
>         details?: {
>           name?: string | null,
>           id?: string
>         },
>         id?: string | null,
>         type: string | null
>       } | {
>         name?: string | null,
>         details?: {
>           name?: string | null,
>           id?: string
>         },
>         id?: string | null,
>         type: string | null
>       } | {
>         name?: string | null,
>         details?: {
>           name?: string | null,
>           id?: string
>         },
>         id?: string | null,
>         type: string | null
>       } | {
>         name?: string | null,
>         details?: {
>           name?: string | null,
>           id?: string
>         },
>         id?: string | null,
>         type: string | null
>       } | {
>         name?: string | null,
>         details?: {
>           name?: string | null,
>           id?: string
>         },
>         id?: string | null,
>         type: add_tags | remove_tags | sms | whatsapp | create_record | add_meeting | schedule_call | convert | null
>       }
>     )[] | null,
>     color_code?: string | null
>   }[] | null,
>   states?: {
>     name?: string | null,
>     state_escalation?: {
>       period: days | hours | minutes | business_days | business_hours,
>       value: number | string,
>       trigger_details: {
>         period: days | hours | minutes,
>         execute_type: before | on | after,
>         value: number | string,
>         actions?: (
>           {
>             name?: string | null,
>             details?: {
>               name?: string | null,
>               id?: string
>             },
>             id?: string | null,
>             type: string | null
>           } | {
>             name?: string | null,
>             details?: {
>               name?: string | null,
>               id?: string
>             },
>             id?: string | null,
>             type: string | null
>           } | {
>             name?: string | null,
>             details?: {
>               name?: string | null,
>               id?: string
>             },
>             id?: string | null,
>             type: string | null
>           } | {
>             name?: string | null,
>             details?: {
>               name?: string | null,
>               id?: string
>             },
>             id?: string | null,
>             type: string | null
>           } | {
>             name?: string | null,
>             details?: {
>               name?: string | null,
>               id?: string
>             },
>             id?: string | null,
>             type: string | null
>           } | {
>             name?: string | null,
>             details?: {
>               name?: string | null,
>               escalate_to?: {
>                 type: user | role | group | team_user | profile,
>                 id: string
>               }[] | null,
>               id: string
>             },
>             id?: string | null,
>             type: sla | circuits | whatsapp | sms | null
>           }
>         )[] | null
>       }[]
>     },
>     api_name: string,
>     pick_list_value?: {
>       actual_value?: string | null,
>       id: string
>     },
>     module?: {
>       id: string,
>       api_name?: string | null,
>       precedence?: number | string | null
>     }
>   }[] | null,
>   pipeline?: {
>     name?: string | null,
>     display_value?: string | null,
>     id: string,
>     api_name?: string | null
>   },
>   layout: {
>     name?: string | null,
>     id: string,
>     api_name?: string | null
>   },
>   field: {
>     id: string,
>     api_name?: string | null,
>     field_label?: string | null
>   },
>   api_name?: string | null,
>   continuous: boolean,
>   name: string,
>   connections?: {
>     from_state: {
>       name?: string | null,
>       api_name: string
>     },
>     transitions: {
>       name?: string | null,
>       api_name: string,
>       precedence?: number | string | null
>     },
>     api_name: string,
>     to_state: {
>       name?: string | null,
>       api_name: string
>     }
>   }[] | null
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `blueprints` | `object[] \| null` | No | Represents the list containing the Blueprint created in the response. |

> [accordion] blueprints full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     name?: string | null | null,
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### deactivate

`blueprints.deactivate`

Deactivate Blueprint. To deactivate a published blueprint in your Zoho CRM organization.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.blueprints.deactivate({
	blueprintId: '4876876000000333001',
	blueprints: [{}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `blueprintId` | `string` | Yes | The ID of the blueprint to deactivate. Use the [Get Blueprint by ID](blueprints.yaml#\$.paths./settings/blueprints/\{blueprintId}.get) to retrieve the Blueprint ID. |
| `blueprints` | `object[]` | Yes | Root element within which data is specified (Required) |

> [accordion] blueprints full type
>
> ```ts theme={null}
> {
>   exit_records?: boolean | null
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `blueprints` | `object[] \| null` | No | Field: blueprints |

> [accordion] blueprints full type
>
> ```ts theme={null}
> {
>   status?: string | null,
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null
> }[] | null
> ```

***

### delete

`blueprints.delete`

Blueprint. Delete a specific blueprint by its blueprintId. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.blueprints.delete({ blueprintId: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `blueprintId` | `string` | Yes | Specify the unique ID of the Blueprint to delete. Use the [Get Blueprint by ID](blueprints.yaml#\$.paths./settings/blueprints.get) to retrieve the Blueprint ID. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `blueprints` | `object[] \| null` | No | Represents the list containing the deletion status of the specified Blueprint. |

> [accordion] blueprints full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     name?: string | null | null,
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### deleteMany

`blueprints.deleteMany`

Delete one or more Blueprints. To delete one or more Blueprints from your Zoho CRM organization. When multiple Blueprint IDs are passed, if some deletions succeed and others fail, the API responds with 207 Multi-Status. Check the status key in each response item to see the result of each deletion. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.blueprints.deleteMany({
	ids: ['4876876000000333001'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `ids` | `string[]` | Yes | Represents the comma-separated list (CSV) of up to 100 [unique Blueprint IDs](blueprints.yaml#\$.paths./settings/blueprints.get) to filter the results. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   blueprints?: {
>     code?: string | null,
>     details?: {
>       name?: string | null | null,
>       id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   blueprints?: any | null
> }
> ```

***

### get

`blueprints.get`

Get details of a Blueprint by ID. To get the details of a single Blueprint by its unique identifier in your Zoho CRM organization, send a GET request with the target Blueprint ID.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.blueprints.get({ blueprintId: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `blueprintId` | `string` | Yes | Specify the unique numeric ID of the Blueprint to retrieve. Use the [Get Blueprint by ID](blueprints.yaml#\$.paths./settings/blueprints.get) to retrieve the Blueprint ID. |
| `include` | `state \| transition` | No | Represents the additional fields to include in the response on demand. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   blueprints?: {
>     owner?: {
>       resources?: {
>         id?: string | null
>       }[] | null | null,
>       type?: string | null
>     }[] | null | null,
>     created_time?: string | null,
>     chart_data?: {
>       nodes?: {
>         position_x?: number | null,
>         position_y?: number | null,
>         state?: {
>           id?: string | null
>         } | null
>       }[] | null,
>       canvas_size?: {
>         width?: number | null,
>         height?: number | null
>       } | null,
>       connections?: {
>         from?: {
>           end_point?: {
>             position_x?: number | null,
>             position_y?: number | null,
>             direction_x?: number | null,
>             direction_y?: number | null
>           } | {
>             position_x?: number | null,
>             position_y?: number | null,
>             direction_x?: number | null,
>             direction_y?: number | null
>           } | {
>             position_x?: number | null,
>             position_y?: number | null,
>             direction_x?: number | null,
>             direction_y?: number | null
>           } | {
>             position_x?: number | null,
>             position_y?: number | null,
>             direction_x?: number | null,
>             direction_y?: number | null
>           } | {
>             position_x?: number | null,
>             position_y?: number | null,
>             direction_x?: number | null,
>             direction_y?: number | null
>           } | {
>             position_x?: number | null,
>             position_y?: number | null,
>             direction_x?: number | null,
>             direction_y?: number | null
>           } | {
>             position_x?: number | null,
>             position_y?: number | null,
>             direction_x?: number | null,
>             direction_y?: number | null
>           } | {
>             position_x?: number | null,
>             position_y?: number | null,
>             direction_x?: number | null,
>             direction_y?: number | null
>           } | {
>             position_x?: number | null,
>             position_y?: number | null,
>             direction_x?: number | null,
>             direction_y?: number | null
>           } | {
>             position_x?: number | null,
>             position_y?: number | null,
>             direction_x?: number | null,
>             direction_y?: number | null
>           } | {
>             position_x?: number | null,
>             position_y?: number | null,
>             direction_x?: number | null,
>             direction_y?: number | null
>           } | {
>             position_x?: number | null,
>             position_y?: number | null,
>             direction_x?: number | null,
>             direction_y?: number | null
>           } | {
>             position_x?: number | null,
>             position_y?: number | null,
>             direction_x?: number | null,
>             direction_y?: number | null
>           } | {
>             position_x?: number | null,
>             position_y?: number | null,
>             direction_x?: number | null,
>             direction_y?: number | null
>           } | {
>             position_x?: number | null,
>             position_y?: number | null,
>             direction_x?: number | null,
>             direction_y?: number | null
>           } | {
>             position_x?: number | null,
>             position_y?: number | null,
>             direction_x?: number | null,
>             direction_y?: number | null
>           } | {
>             position_x?: number | null,
>             position_y?: number | null,
>             direction_x?: number | null,
>             direction_y?: number | null
>           } | {
>             position_x?: number | null,
>             position_y?: number | null,
>             direction_x?: number | null,
>             direction_y?: number | null
>           } | {
>             position_x?: number | null,
>             position_y?: number | null,
>             direction_x?: number | null,
>             direction_y?: number | null
>           } | {
>             position_x?: number | null,
>             position_y?: number | null,
>             direction_x?: number | null,
>             direction_y?: number | null
>           } | null,
>           state?: {
>             id?: string | null
>           } | null
>         } | null,
>         id?: string | null,
>         to?: {
>           end_point?: {
>             position_x?: number | null,
>             position_y?: number | null,
>             direction_x?: number | null,
>             direction_y?: number | null
>           } | null,
>           state?: {
>             id?: string | null
>           } | null
>         } | null,
>         transition?: {
>           api_name?: string | null,
>           name?: string | null,
>           id?: string | null
>         } | null
>       }[] | null
>     } | null | null,
>     module?: {
>       api_name?: string | null,
>       _precedence?: number | null,
>       id?: string | null
>     } | null,
>     description?: string | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     layout?: {
>       api_name?: string | null,
>       name?: string | null,
>       id?: string | null
>     } | null,
>     modified_time?: string | null,
>     field?: {
>       api_name?: string | null,
>       field_label?: string | null,
>       id?: string | null
>     } | null,
>     api_name?: string | null,
>     continuous?: boolean | null,
>     criteria?: {
>       comparator?: string | null | null,
>       field?: {
>         id?: string | null,
>         api_name?: string | null | null,
>         field_label?: string | null | null
>       } | null,
>       type?: string | null | null,
>       value?: string | null | null
>     } | null,
>     name?: string | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     id?: string | null,
>     connections?: {
>       from_state?: {
>         api_name?: string | null,
>         name?: string | null,
>         id?: string | null
>       } | null,
>       id?: string | null,
>       transitions?: {
>         api_name?: string | null,
>         name?: string | null,
>         id?: string | null,
>         precedence?: number | null,
>         common?: boolean | null
>       } | null,
>       to_state?: {
>         api_name?: string | null,
>         name?: string | null,
>         id?: string | null
>       } | null
>     }[] | null,
>     pipeline?: {
>       name?: string | null | null,
>       display_value?: string | null | null,
>       id?: string | null,
>       api_name?: string | null | null
>     } | null,
>     states?: {
>       sla_configured?: boolean | null,
>       api_name?: string | null,
>       name?: string | null,
>       id?: string | null,
>       unsupported_features_present?: boolean | null
>     }[] | null,
>     transitions?: {
>       api_name?: string | null,
>       trigger_type?: string | null,
>       name?: string | null,
>       transition_type?: string | null,
>       global?: boolean | null,
>       id?: string | null,
>       parallel_transition_id?: string | null,
>       colour_code?: string | null,
>       special_features?: string[] | null,
>       unsupported_features_present?: boolean | null,
>       common?: boolean | null
>     }[] | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### getForRecord

`blueprints.getForRecord`

Get Blueprint transitions of a record. To get the next available Blueprint transitions for a record in Zoho CRM, along with the fields available for each transition, the current value of each field, and their validations, if any.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.blueprints.getForRecord({ moduleApiName: 'Leads', recordId: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `moduleApiName` | `string` | Yes | Specify the API name of the module that contains the record. Refer to the [Get Modules](modules.yaml#\$.paths./settings/modules.get) resource for valid values. |
| `recordId` | `string` | Yes | Specify the unique ID of the record for which you want to retrieve or execute Blueprint transitions. |
| `include_inner_details` | `boolean` | No | Specify whether to include inner details, such as the column name of the primary field on which the Blueprint is based, inside the **field** object of **process\_info**. Possible values: true - Includes the inner details in the response. false - Excludes the inner details from the response. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   blueprint?: {
>     process_info?: {
>       field_id?: string | null,
>       escalation?: {
>         days?: string | null,
>         status?: string | null
>       } | null | null,
>       is_continuous?: boolean | null,
>       api_name?: string | null,
>       continuous?: boolean | null,
>       field_label?: string | null,
>       name?: string | null,
>       column_name?: string | null,
>       field_value?: string | null,
>       current_picklist?: {
>         colour_code?: string | null | null,
>         id?: string | null,
>         value?: string | null
>       } | null,
>       id?: string | null,
>       field_name?: string | null
>     } | null,
>     transitions?: {
>       next_transitions?: any[] | null | null,
>       data?: {
>       } | null | null,
>       type?: string | null,
>       criteria_message?: string | null | null,
>       criteria_details?: {
>         group_operator?: string | null,
>         group?: (
>           {
>             group_operator?: string | null,
>             group?: ((recursive) | {
>               comparator?: string | null,
>               field?: {
>                 api_name?: string | null,
>                 id?: string | null
>               } | null,
>               value?: string | null | null
>             })[] | null
>           } | {
>             comparator?: string | null,
>             field?: {
>               api_name?: string | null,
>               id?: string | null
>             } | null,
>             value?: string | null | null
>           }
>         )[] | null
>       } | null | null,
>       execution_time?: null | null,
>       sequence?: number | null,
>       next_field_value?: string | null,
>       text_color_code?: string | null,
>       name?: string | null,
>       criteria_matched?: boolean | null,
>       id?: string | null,
>       parent_transition?: {
>         name?: string | null,
>         id?: string | null
>       } | null | null,
>       state?: string | null,
>       fields?: any[] | null | null,
>       color_code?: string | null,
>       percent_partial_save?: number | null,
>       is_accessible?: boolean | null
>     }[] | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### getProcessConfigurations

`blueprints.getProcessConfigurations`

Blueprints Process Configurations. To retrieve the metadata of the Blueprint process configuration in your Zoho CRM organization, such as the number of configured Blueprints, the supported features and their limits, and the supported owner models.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.blueprints.getProcessConfigurations({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `crmOrgId` | `number \| string` | No | Specify the organization ID in the request header to identify the target Zoho CRM organization. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   blueprints?: {
>     common_transitions_per_blueprint?: number | null,
>     total_blueprint_configured?: number | null,
>     supported_features?: string[] | null,
>     maximum_allowed_blueprints?: number | null,
>     active_blueprint_configured?: number | null,
>     last_seen_module?: {
>       api_name?: string | null,
>       id?: string | null | null
>     } | null,
>     supported_owner_models?: string[] | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### getRecordsCount

`blueprints.getRecordsCount`

Retrieve Blueprint stage record counts. To retrieve the number of records at each Blueprint stage for a specific Blueprint in your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.blueprints.getRecordsCount({ blueprintId: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `blueprintId` | `string` | Yes | Specify the unique ID of the Blueprint whose stage-level record counts are to be retrieved. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   blueprints?: {
>     records_count?: number | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### getUsageConfigurations

`blueprints.getUsageConfigurations`

Get blueprint usage configurations. To retrieve the configuration details required to configure a blueprint for a specific module in your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.blueprints.getUsageConfigurations({ module: 'Leads' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the API name of the module. Refer to the [Get Modules](modules.yaml#\$.paths./settings/modules.get) resource for valid values. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   blueprints?: {
>     timebox?: {
>       period?: {
>         name?: string | null,
>         display_name?: string | null
>       }[] | null,
>       minimum_values?: {
>         unit?: number | null,
>         period?: string | null
>       } | null
>     } | null,
>     process?: {
>       name?: {
>         unsupported_characters?: string[] | null,
>         max_length?: number | null
>       } | null,
>       description?: {
>         unsupported_characters?: string[] | null,
>         max_length?: number | null
>       } | null,
>       type?: (
>         {
>           blueprint_type?: string | null,
>           unsupported_components?: null | null
>         } | {
>           blueprint_type?: string | null,
>           unsupported_components?: (
>             {
>               name?: string | null,
>               input_components?: string[] | null
>             } | {
>               types?: string[] | null,
>               name?: string | null
>             }
>           )[] | null
>         }
>       )[] | null
>     } | null,
>     owners?: {
>       types?: string[] | null,
>       limit?: number | null,
>       display_name?: string | null
>     } | null,
>     transitions?: {
>       trigger_type?: {
>         supported_transition_types?: {
>           supported_components?: {
>             mandate_subcomponent?: boolean | null,
>             name?: string | null,
>             supported_subcomponents?: string[] | null | null
>           }[] | null,
>           name?: string | null,
>           limit?: number | null | null,
>           common_source?: boolean | null
>         }[] | null,
>         name?: string | null
>       }[] | null,
>       name?: {
>         unsupported_characters?: string[] | null,
>         max_length?: number | null
>       } | null,
>       description?: {
>         unsupported_characters?: string[] | null,
>         max_length?: number | null
>       } | null
>     } | null,
>     input_components?: {
>       types?: (
>         {
>           validation_supported?: boolean | null,
>           sub_components?: null | null,
>           api_name?: string | null,
>           name?: string | null,
>           standalone_component?: boolean | null,
>           limit_per_component?: number | null | null,
>           unsupported_values?: string[] | null
>         } | {
>           validation_supported?: boolean | null,
>           sub_components?: {
>             validation_supported?: boolean | null,
>             sub_components?: null | null,
>             api_name?: string | null,
>             name?: string | null,
>             standalone_component?: boolean | null,
>             limit_per_component?: number | null,
>             unsupported_values?: null | null
>           }[] | null,
>           api_name?: string | null,
>           name?: string | null,
>           standalone_component?: boolean | null,
>           limit_per_component?: number | null | null,
>           unsupported_values?: null | null
>         } | {
>           validation_supported?: boolean | null,
>           sub_components?: null | null,
>           api_name?: string | null,
>           name?: string | null,
>           standalone_component?: boolean | null,
>           limit_per_component?: null | null,
>           unsupported_values?: null | null
>         } | {
>           validation_supported?: boolean | null,
>           sub_components?: null | null,
>           api_name?: string | null,
>           name?: string | null,
>           standalone_component?: boolean | null,
>           limit_per_component?: number | null,
>           unsupported_values?: null | null
>         }
>       )[] | null,
>       limit?: number | null
>     } | null,
>     actions?: (
>       {
>         new?: boolean | null,
>         sub_actions?: {
>           api_name?: string | null,
>           name?: string | null,
>           display_name?: string | null
>         }[] | null,
>         associate_action?: boolean | null,
>         limit_per_action?: number | null | null,
>         execute_type?: null | null,
>         api_name?: string | null,
>         mandate_subactions?: boolean | null,
>         clickable?: boolean | null,
>         name?: string | null,
>         limit?: number | null,
>         display_name?: string | null
>       } | {
>         new?: boolean | null,
>         sub_actions?: null | null,
>         associate_action?: boolean | null,
>         limit_per_action?: number | null | null,
>         execute_type?: null | null,
>         api_name?: string | null,
>         mandate_subactions?: boolean | null,
>         clickable?: boolean | null,
>         name?: string | null,
>         limit?: number | null,
>         display_name?: string | null
>       } | {
>         new?: boolean | null,
>         sub_actions?: null | null,
>         associate_action?: boolean | null,
>         limit_per_action?: number | null | null,
>         execute_type?: null | null,
>         api_name?: string | null,
>         clickable?: boolean | null,
>         name?: string | null,
>         limit?: number | null,
>         display_name?: string | null,
>         mandate_subactions?: boolean | null,
>         unsupported_actions?: string[] | null
>       } | {
>         new?: boolean | null,
>         sub_actions?: {
>           api_name?: string | null,
>           name?: string | null,
>           display_name?: string | null
>         }[] | null,
>         associate_action?: boolean | null,
>         limit_per_action?: number | null | null,
>         execute_type?: (
>           {
>             period?: {
>               name?: string | null,
>               display_name?: string | null
>             }[] | null,
>             timebox_required?: boolean | null,
>             name?: string | null
>           } | {
>             timebox_required?: boolean | null,
>             name?: string | null,
>             period?: null | null
>           }
>         )[] | null,
>         api_name?: string | null,
>         mandate_subactions?: boolean | null,
>         clickable?: boolean | null,
>         name?: string | null,
>         limit?: number | null,
>         display_name?: string | null
>       }
>     )[] | null,
>     states?: {
>       supported_components?: (
>         {
>           mandate_subcomponent?: boolean | null,
>           name?: string | null,
>           supported_subcomponents?: string[] | null
>         } | {
>           mandate_subcomponent?: boolean | null,
>           name?: string | null,
>           supported_subcomponents?: null | null
>         }
>       )[] | null,
>       limit?: number | null
>     } | null,
>     transition_groups?: (
>       {
>         supported_components?: {
>           mandate_subcomponent?: boolean | null,
>           name?: string | null,
>           supported_subcomponents?: null | null
>         }[] | null,
>         name?: string | null,
>         display_name?: string | null
>       } | {
>         supported_components?: {
>           mandate_subcomponent?: boolean | null,
>           name?: string | null,
>           supported_subcomponents?: string[] | null
>         }[] | null,
>         name?: string | null,
>         display_name?: string | null
>       }
>     )[] | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### list

`blueprints.list`

Get blueprints. To retrieve the list of blueprints configured in your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.blueprints.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `page` | `number \| string` | No | Represents the page number to be accessed. |
| `per_page` | `number \| string` | No | Represents the number of items to be returned per page. |
| `module` | `string` | No | Represents the name of the module to filter the results. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve module ID and API name. |
| `status` | `string` | No | Represents the status of the Blueprint to filter the results. |
| `layout_id` | `number \| string` | No | Represents the ID of the layout to filter the results. Use the [Get Layouts Metadata API](layouts.yaml#\$.paths./settings/layouts.get) to retrieve the Layout ID. |
| `sort_by` | `string` | No | Represents the API name of the field based on which the list should be sorted. |
| `sort_order` | `asc \| desc` | No | Represents the order in which the list should be sorted. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   blueprints?: {
>     layout?: {
>       api_name?: string | null,
>       name?: string | null,
>       id?: string | null
>     } | null,
>     status?: string | null,
>     field?: {
>       api_name?: string | null,
>       field_label?: string | null,
>       id?: string | null
>     } | null,
>     continuous?: boolean | null,
>     module?: {
>       api_name?: string | null,
>       id?: string | null,
>       precedence?: number | null
>     } | null,
>     name?: string | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     id?: string | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     api_name?: string | null,
>     description?: string | null | null,
>     criteria?: {
>       comparator?: string | null | null,
>       field?: {
>         id?: string | null,
>         api_name?: string | null | null,
>         field_label?: string | null | null
>       } | null,
>       type?: string | null | null,
>       value?: string | null | null
>     } | null,
>     pipeline?: {
>       name?: string | null | null,
>       display_value?: string | null | null,
>       id?: string | null,
>       api_name?: string | null | null
>     } | null,
>     owner?: {
>       resources?: {
>         id?: string | null
>       }[] | null | null,
>       type?: string | null
>     }[] | null | null
>   }[] | null,
>   info?: {
>     per_page?: number | null,
>     count?: number | null,
>     page?: number | null,
>     more_records?: boolean | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### reorder

`blueprints.reorder`

Reorder Blueprints within a module. To update the display order of Blueprints within a Zoho CRM module, submit a list of Blueprint entries each specifying an ID and the desired sequence\_number.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.blueprints.reorder({
	module: 'Leads',
	blueprints: [{ id: '4876876000000333001', sequence_number: 1 }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the API name of the module for which the Blueprint action is to be performed. |
| `blueprints` | `object[]` | Yes | Contains the list of Blueprint entries whose display order is to be updated. |

> [accordion] blueprints full type
>
> ```ts theme={null}
> {
>   sequence_number: number | string,
>   id: string
> }[]
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   blueprints?: {
>     code?: string | null,
>     details?: {
>       id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   blueprints?: {
>     code?: string | null,
>     details?: {
>       id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> }
> ```

***

### states.create

`blueprints.states.create`

Create Blueprint States. To create one or more states for a Blueprint in your Zoho CRM organization.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.blueprints.states.create({
	blueprintId: '4876876000000333001',
	states: [{
		module: { id: '4876876000000333001' },
		pick_list_value: { id: '4876876000000333001' },
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `blueprintId` | `string` | Yes | Specify the [unique ID of the Blueprint](blueprints.yaml#\$.paths./settings/blueprints.get) for which you want to create states. |
| `states` | `object[]` | Yes | The list of Blueprint state objects to be included in the batch create request. |

> [accordion] states full type
>
> ```ts theme={null}
> {
>   process_id?: string | null,
>   state_escalation?: {
>     period: days | hours | minutes | business_days | business_hours,
>     value: number | string,
>     trigger_details: {
>       period: days | hours | minutes | business_days | business_hours,
>       execute_type: before | on | after,
>       value: number | string,
>       actions: (
>         {
>           type: string,
>           details: {
>             name?: string | null,
>             escalate_to?: {
>               type: user | role | group | team_user | profile,
>               id: string
>             }[]
>           }
>         } | {
>           type: circuits | whatsapp | sms,
>           details: {
>             name?: string | null,
>             id?: string
>           }
>         } | {
>           type: string,
>           details: {
>             name?: string | null,
>             id?: string
>           }
>         } | {
>           type: string,
>           details: {
>             name?: string | null,
>             id?: string
>           }
>         } | {
>           type: string,
>           details: {
>             name?: string | null,
>             id?: string
>           }
>         } | {
>           type: string,
>           details: {
>             name?: string | null,
>             id?: string
>           }
>         } | {
>           type: string,
>           details: {
>             name?: string | null,
>             id?: string
>           }
>         }
>       )[]
>     }[]
>   },
>   pick_list_value: {
>     actual_value?: string | null,
>     id: string
>   },
>   module: {
>     api_name?: string | null,
>     id: string
>   }
> }[]
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   states?: {
>     code?: string | null,
>     details?: {
>       name?: string | null | null,
>       id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   states?: any & any | null
> }
> ```

***

### states.delete

`blueprints.states.delete`

Delete a Blueprint state. To delete a single state from a Blueprint in your Zoho CRM organization. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.blueprints.states.delete({ blueprintId: '4876876000000333001', stateId: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `blueprintId` | `string` | Yes | Specify the [unique ID of the Blueprint](blueprints.yaml#\$.paths./settings/blueprints.get) for which you want to delete a state. |
| `stateId` | `string` | Yes | Represents the unique ID of the Blueprint state. Use the [Get Blueprint States API](blueprint_state_config.yaml#\$.paths./settings/blueprints/\{blueprintId}/states.get) to retrieve the state ID. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `states` | `object[] \| null` | No | The list of Blueprint state objects affected by the delete operation. |

> [accordion] states full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     name?: string | null | null,
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### states.deleteMany

`blueprints.states.deleteMany`

Delete Blueprint States. To delete one or more states from a Blueprint in your Zoho CRM organization. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.blueprints.states.deleteMany({
	blueprintId: '4876876000000333001',
	ids: ['4876876000000333001'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `blueprintId` | `string` | Yes | Specify the [unique ID of the Blueprint](blueprints.yaml#\$.paths./settings/blueprints.get) for which you want to delete states. |
| `ids` | `string[]` | Yes | Specify the [unique state IDs](blueprint_state_config.yaml#\$.paths./settings/blueprints/\{blueprintId}/states.get) to filter the query results. Accepts comma-separated values. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   states?: {
>     code?: string | null,
>     details?: {
>       name?: string | null | null,
>       id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   states?: any & any | null
> }
> ```

***

### states.get

`blueprints.states.get`

Get a Blueprint state by ID. To retrieve the details of a single Blueprint state in your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.blueprints.states.get({ blueprintId: '4876876000000333001', stateId: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `blueprintId` | `string` | Yes | Specify the [unique ID of the Blueprint](blueprints.yaml#\$.paths./settings/blueprints.get) for which you want to retrieve the state. |
| `stateId` | `string` | Yes | Represents the unique ID of the state. Use the [Get Blueprint States API](blueprint_state_config.yaml#\$.paths./settings/blueprints/\{blueprintId}/states.get) to retrieve the state ID. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   states?: {
>     process_id?: string | null,
>     state_escalation?: {
>       period?: string | null,
>       value?: number | null,
>       trigger_details?: {
>         period?: string | null,
>         execute_type?: string | null,
>         id?: string | null,
>         value?: number | null,
>         actions?: {
>           details?: {
>             escalate_to?: {
>               id?: string | null,
>               type?: string | null
>             }[] | null
>           } | null,
>           type?: string | null,
>           name?: string | null,
>           id?: string | null
>         }[] | null
>       }[] | null
>     } | null,
>     module?: {
>       api_name?: string | null,
>       id?: string | null
>     } | null,
>     pick_list_value?: {
>       actual_value?: string | null,
>       id?: string | null
>     } | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### states.list

`blueprints.states.list`

Get Blueprint States. To retrieve the states associated with a specific Blueprint in your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.blueprints.states.list({
	blueprintId: '4876876000000333001',
	ids: ['4876876000000333001'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `blueprintId` | `string` | Yes | Specify the [ID of the Blueprint](blueprints.yaml#\$.paths./settings/blueprints.get) for which you want to retrieve the states. |
| `ids` | `string[]` | Yes | Specify the [unique state IDs](blueprint_state_config.yaml#\$.paths./settings/blueprints/\{blueprintId}/states.get) to filter the query results. Accepts comma-separated values. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   states?: {
>     process_id?: string | null,
>     state_escalation?: {
>       period?: string | null,
>       value?: number | null,
>       trigger_details?: {
>         period?: string | null,
>         execute_type?: string | null,
>         id?: string | null,
>         value?: number | null,
>         actions?: {
>           details?: {
>             escalate_to?: {
>               type?: string | null,
>               id?: string | null
>             }[] | null,
>             name?: string | null,
>             id?: string | null
>           } | null,
>           type?: string | null,
>           name?: string | null,
>           id?: string | null
>         }[] | null
>       }[] | null
>     } | null,
>     module?: {
>       api_name?: string | null,
>       id?: string | null
>     } | null,
>     pick_list_value?: {
>       actual_value?: string | null,
>       id?: string | null
>     } | null
>   }[] | null
> } | {
>   states?: any & any | null
> } | {
>   success: true
> }
> ```

***

### states.update

`blueprints.states.update`

Update a Blueprint state by ID. To update a single state within a Blueprint in your Zoho CRM organization.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.blueprints.states.update({
	blueprintId: '4876876000000333001',
	stateId: '4876876000000333001',
	states: [{}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `blueprintId` | `string` | Yes | Specify the [unique ID of the Blueprint](blueprints.yaml#\$.paths./settings/blueprints.get) for which you want to update the state. |
| `stateId` | `string` | Yes | Specify the unique ID of the Blueprint state you want to update. Use the [Get Blueprint States API](blueprint_state_config.yaml#\$.paths./settings/blueprints/\{blueprintId}/states.get) to retrieve the state ID. |
| `states` | `object[]` | Yes | The list of Blueprint state objects to update, each containing the details required for a state transition. |

> [accordion] states full type
>
> ```ts theme={null}
> {
>   process_id?: string | null,
>   state_escalation?: {
>     period: days | hours | minutes | business_days | business_hours,
>     value: number | string,
>     trigger_details: {
>       period: days | hours | minutes | business_days | business_hours,
>       execute_type: before | on | after,
>       value: number | string,
>       actions: (
>         {
>           type: string,
>           details: {
>             name?: string | null,
>             escalate_to?: {
>               type: user | role | group | team_user | profile,
>               id: string
>             }[]
>           }
>         } | {
>           type: circuits | whatsapp | sms,
>           details: {
>             name?: string | null,
>             id?: string
>           }
>         } | {
>           type: string,
>           details: {
>             name?: string | null,
>             id?: string
>           }
>         } | {
>           type: string,
>           details: {
>             name?: string | null,
>             id?: string
>           }
>         } | {
>           type: string,
>           details: {
>             name?: string | null,
>             id?: string
>           }
>         } | {
>           type: string,
>           details: {
>             name?: string | null,
>             id?: string
>           }
>         } | {
>           type: string,
>           details: {
>             name?: string | null,
>             id?: string
>           }
>         }
>       )[]
>     }[]
>   },
>   id?: string | null
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `states` | `object[] \| null` | No | The list of Blueprint states returned in the response. |

> [accordion] states full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     name?: string | null | null,
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### states.updateMany

`blueprints.states.updateMany`

Update Blueprint States. To update Blueprint states within a specified Blueprint in your Zoho CRM organization. Actions used in state escalations must be created with feature\_type set to blueprint\_state; actions created with feature\_type set to blueprint\_transition cannot be used in state escalation contexts.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.blueprints.states.updateMany({
	blueprintId: '4876876000000333001',
	states: [{}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `blueprintId` | `string` | Yes | Specify the [unique ID of the Blueprint](blueprints.yaml#\$.paths./settings/blueprints.get) for which you want to update the states. |
| `states` | `object[]` | Yes | The list of state objects to include in the batch update request. |

> [accordion] states full type
>
> ```ts theme={null}
> {
>   process_id?: string | null,
>   state_escalation?: {
>     period: days | hours | minutes | business_days | business_hours,
>     value: number | string,
>     trigger_details: {
>       period: days | hours | minutes | business_days | business_hours,
>       execute_type: before | on | after,
>       value: number | string,
>       actions: (
>         {
>           type: string,
>           details: {
>             name?: string | null,
>             escalate_to?: {
>               type: user | role | group | team_user | profile,
>               id: string
>             }[]
>           }
>         } | {
>           type: circuits | whatsapp | sms,
>           details: {
>             name?: string | null,
>             id?: string
>           }
>         } | {
>           type: string,
>           details: {
>             name?: string | null,
>             id?: string
>           }
>         } | {
>           type: string,
>           details: {
>             name?: string | null,
>             id?: string
>           }
>         } | {
>           type: string,
>           details: {
>             name?: string | null,
>             id?: string
>           }
>         } | {
>           type: string,
>           details: {
>             name?: string | null,
>             id?: string
>           }
>         } | {
>           type: string,
>           details: {
>             name?: string | null,
>             id?: string
>           }
>         }
>       )[]
>     }[]
>   },
>   id?: string | null
> }[]
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   states?: {
>     code?: string | null,
>     details?: {
>       name?: string | null | null,
>       id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   states?: any & any | null
> }
> ```

***

### transitionRecord

`blueprints.transitionRecord`

Update a single Blueprint transition for a record. To update a single Blueprint transition for a record in your Zoho CRM organization.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.blueprints.transitionRecord({
	moduleApiName: 'Leads',
	recordId: '4876876000000333001',
	blueprint: [{ state: 'draft', transition_id: 'example' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `moduleApiName` | `string` | Yes | Specify the API name of the module that contains the record. Refer to the [Get Modules](modules.yaml#\$.paths./settings/modules.get) resource for valid values. |
| `recordId` | `string` | Yes | Specify the unique ID of the record for which you want to retrieve or execute Blueprint transitions. |
| `blueprint` | `object[]` | Yes | Contains the Blueprint transition object to be processed for the record. |

> [accordion] blueprint full type
>
> ```ts theme={null}
> {
>   state: draft | completed,
>   data?: {
>     CheckLists?: {
>     }[] | null
>   } | null,
>   transition_id: string,
>   id?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `code` | `string \| null` | No | Represents the status code of the Blueprint transition execution, such as **SUCCESS**. |
| `details` | `object \| null` | No | Contains additional details about the outcome of the Blueprint transition execution. |
| `message` | `string \| null` | No | Represents the response message describing the outcome of the Blueprint transition execution. |
| `status` | `string \| null` | No | Indicates the status of the Blueprint transition execution, such as **SUCCESS**. |

> [accordion] details full type
>
> ```ts theme={null}
> {
> } | null
> ```

***

### transitions.create

`blueprints.transitions.create`

Create Blueprint transitions. To create one or more Blueprint transitions for an existing Blueprint in your Zoho CRM organization.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.blueprints.transitions.create({
	transitions: [{
		module: { api_name: 'example', id: '4876876000000333001' },
		name: 'example',
		owners: [{ type: 'example' }],
		transition_type: 'standalone_transition',
		trigger_type: 'automatic',
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `transitions` | `object[]` | Yes | Contains the list of transitions to be created, where each object in the array represents a single transition. |

> [accordion] transitions full type
>
> ```ts theme={null}
> {
>   during_inputs?: {
>     validation_filter?: {
>       criteria?: {
>         comparator?: string | null,
>         field?: {
>           api_name?: string | null,
>           id?: string | null
>         },
>         value?: string | null,
>         group_operator?: string | null,
>         group?: {
>           comparator?: string | null,
>           field?: {
>             api_name?: string | null,
>             id?: string | null
>           },
>           value?: string | null,
>           group_operator?: string | null,
>           group?: {
>             comparator?: string | null,
>             field?: {
>               api_name?: string | null,
>               id?: string | null
>             },
>             value?: string | null,
>             group_operator?: string | null,
>             group?: (recursive)[]
>           }[]
>         }[] | null
>       },
>       validation_message?: string | null
>     } | null,
>     sequence?: number | string | null,
>     field?: {
>       api_name?: string | null,
>       id?: string | null
>     },
>     configured_fields?: {
>       optional?: boolean | null,
>       field?: {
>         api_name?: string | null,
>         id?: string | null
>       },
>       criteria?: {
>         comparator?: string | null,
>         field?: {
>           api_name?: string | null,
>           id?: string | null
>         },
>         value?: string | null,
>         group_operator?: string | null,
>         group?: {
>           comparator?: string | null,
>           field?: {
>             api_name?: string | null,
>             id?: string | null
>           },
>           value?: string | null,
>           group_operator?: string | null,
>           group?: {
>             comparator?: string | null,
>             field?: {
>               api_name?: string | null,
>               id?: string | null
>             },
>             value?: string | null,
>             group_operator?: string | null,
>             group?: (recursive)[]
>           }[]
>         }[] | null
>       },
>       validation_filter?: {
>         criteria?: {
>           comparator?: string | null,
>           field?: {
>             api_name?: string | null,
>             id?: string | null
>           },
>           value?: string | null,
>           group_operator?: string | null,
>           group?: {
>             comparator?: string | null,
>             field?: {
>               api_name?: string | null,
>               id?: string | null
>             },
>             value?: string | null,
>             group_operator?: string | null,
>             group?: {
>               comparator?: string | null,
>               field?: {
>                 api_name?: string | null,
>                 id?: string | null
>               },
>               value?: string | null,
>               group_operator?: string | null,
>               group?: (recursive)[]
>             }[]
>           }[] | null
>         },
>         validation_message?: string | null
>       } | null,
>       name?: string,
>       subform_fields?: {
>         optional?: boolean | null,
>         field?: {
>           api_name?: string | null,
>           id?: string | null
>         },
>         validation_filter?: {
>           criteria?: {
>             comparator?: string | null,
>             field?: {
>               api_name?: string | null,
>               id?: string | null
>             },
>             value?: string | null,
>             group_operator?: string | null,
>             group?: {
>               comparator?: string | null,
>               field?: {
>                 api_name?: string | null,
>                 id?: string | null
>               },
>               value?: string | null,
>               group_operator?: string | null,
>               group?: {
>                 comparator?: string | null,
>                 field?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 },
>                 value?: string | null,
>                 group_operator?: string | null,
>                 group?: (recursive)[]
>               }[]
>             }[] | null
>           },
>           validation_message?: string | null
>         } | null,
>         name?: string,
>         subform_fields?: {
>           optional?: boolean | null,
>           field?: {
>             api_name?: string | null,
>             id?: string | null
>           },
>           validation_filter?: {
>             criteria?: {
>               comparator?: string | null,
>               field?: {
>                 api_name?: string | null,
>                 id?: string | null
>               },
>               value?: string | null,
>               group_operator?: string | null,
>               group?: {
>                 comparator?: string | null,
>                 field?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 },
>                 value?: string | null,
>                 group_operator?: string | null,
>                 group?: {
>                   comparator?: string | null,
>                   field?: {
>                     api_name?: string | null,
>                     id?: string | null
>                   },
>                   value?: string | null,
>                   group_operator?: string | null,
>                   group?: (recursive)[]
>                 }[]
>               }[] | null
>             },
>             validation_message?: string | null
>           } | null,
>           name?: string,
>           subform_fields?: (recursive)[] | null
>         }[] | null
>       }[] | null
>     }[] | null,
>     optional?: boolean | null,
>     type?: string | null,
>     message?: string | null,
>     title?: string | null,
>     kiosk?: {
>       name?: string | null,
>       id?: string | null
>     },
>     related_list?: {
>       layout?: {
>         api_name?: string | null,
>         id?: string | null
>       },
>       name?: string | null,
>       id?: string | null,
>       module?: {
>         api_name?: string | null,
>         id?: string | null
>       }
>     },
>     items?: {
>       name?: string | null,
>       sequence?: number | string | null,
>       optional?: boolean | null
>     }[] | null
>   }[] | null,
>   criteria?: {
>     comparator?: string | null,
>     field?: {
>       api_name?: string | null,
>       id?: string | null
>     },
>     value?: string | null,
>     group_operator?: string | null,
>     group?: {
>       comparator?: string | null,
>       field?: {
>         api_name?: string | null,
>         id?: string | null
>       },
>       value?: string | null,
>       group_operator?: string | null,
>       group?: {
>         comparator?: string | null,
>         field?: {
>           api_name?: string | null,
>           id?: string | null
>         },
>         value?: string | null,
>         group_operator?: string | null,
>         group?: (recursive)[]
>       }[]
>     }[] | null
>   },
>   trigger_type: automatic | manual,
>   module: {
>     api_name: string,
>     id: string
>   },
>   name: string,
>   description?: string | null,
>   transition_type: standalone_transition | parallel_transition | child_transition,
>   owners: (
>     {
>       type: string,
>       resources?: {
>         id?: string | null
>       }[] | null
>     } | {
>       type: string,
>       resources?: {
>         id?: string | null
>       }[] | null
>     } | {
>       type: string,
>       resources?: {
>         id?: string | null
>       }[] | null
>     } | {
>       type: record_owner | team_user | portal_user_type,
>       resources?: {
>         id?: string | null
>       }[] | null
>     }
>   )[],
>   actions?: {
>     name?: string | null,
>     details?: {
>       overwrite?: boolean | null,
>       module?: {
>         api_name?: string | null,
>         id?: string | null
>       },
>       tags?: {
>         color?: string | null,
>         name?: string | null
>       }[] | null
>     },
>     id?: string | null,
>     type: field_updates | tasks | functions | email_notifications | webhooks | add_tags | remove_tags | sms | whatsapp | create_record | add_meeting | schedule_call | convert
>   }[] | null,
>   color_code?: string | null
> }[]
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   transitions?: {
>     code?: string | null,
>     details?: {
>       name?: string | null | null,
>       id?: string | null | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   transitions?: any & any | null
> }
> ```

***

### transitions.delete

`blueprints.transitions.delete`

Blueprint Transition. This is a new API to delete single transitions in a single API. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.blueprints.transitions.delete({ transitionId: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `transitionId` | `string` | Yes | The ID of the transition to delete |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `transitions` | `object[] \| null` | No | Contains the removal result of the blueprint transition targeted by the delete operation. |

> [accordion] transitions full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### transitions.deleteMany

`blueprints.transitions.deleteMany`

Blueprint Transitions. Delete multiple blueprint transitions by IDs in the request body. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.blueprints.transitions.deleteMany({
	ids: ['4876876000000333001'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `ids` | `string[]` | Yes | Represents a comma-separated list (CSV) of unique transition IDs used to retrieve specific blueprint transition configurations. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   transitions?: {
>     code?: string | null,
>     details?: {
>       id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   transitions?: any & any | null
> }
> ```

***

### transitions.get

`blueprints.transitions.get`

Get Blueprint transition. To retrieve the configuration details of a single Blueprint transition by its transition ID in your Zoho CRM organization. The response contains a transitions array with one Blueprint Transition Record, including its process ID, during inputs, owners, criteria, and actions.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.blueprints.transitions.get({ transitionId: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `transitionId` | `string` | Yes | Specify the ID of the Blueprint transition you want to retrieve. Refer to the [Get Blueprint Transitions](blueprint_transitions.yaml#\$.paths./settings/blueprints/transitions.get) resource for valid values. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   transitions?: {
>     process_id?: string | null,
>     during_inputs?: (
>       {
>         sequence_number?: number | null,
>         validation_filter?: null | null,
>         field?: {
>           api_name?: string | null,
>           id?: string | null
>         } | null,
>         module?: string | null,
>         optional?: boolean | null,
>         id?: string | null,
>         type?: string | null
>       } | {
>         sequence_number?: number | null,
>         checklist_info?: {
>           title?: string | null,
>           items?: string[] | null
>         } | null,
>         id?: string | null,
>         type?: string | null
>       }
>     )[] | null | null,
>     criteria?: null | null,
>     description?: string | null,
>     trigger_type?: string | null,
>     module?: {
>       api_name?: string | null,
>       id?: string | null
>     } | null,
>     name?: string | null,
>     transition_type?: string | null,
>     owners?: {
>       resources?: {
>         id?: string | null
>       }[] | null | null,
>       type?: string | null
>     }[] | null,
>     id?: string | null,
>     actions?: {
>       name?: string | null,
>       details?: null | null,
>       id?: string | null,
>       type?: string | null
>     }[] | null | null,
>     color_code?: string | null,
>     parallel_transition?: {
>       id?: string | null,
>       name?: string | null
>     } | null | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### transitions.list

`blueprints.transitions.list`

Retrieve Blueprint transitions by their IDs. To retrieve the details of the Blueprint transitions that match the specified transition IDs in your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.blueprints.transitions.list({
	ids: ['4876876000000333001'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `ids` | `string[]` | Yes | Represents a comma-separated list (CSV) of unique transition IDs used to retrieve specific blueprint transition configurations. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   transitions?: {
>     process_id?: string | null,
>     during_inputs?: (
>       {
>         sequence_number?: number | null,
>         validation_filter?: null | null,
>         field?: {
>           api_name?: string | null,
>           id?: string | null
>         } | null,
>         module?: string | null,
>         optional?: boolean | null,
>         id?: string | null,
>         type?: string | null
>       } | {
>         sequence_number?: number | null,
>         checklist_info?: {
>           title?: string | null,
>           items?: string[] | null
>         } | null,
>         id?: string | null,
>         type?: string | null
>       }
>     )[] | null | null,
>     criteria?: null | null,
>     trigger_type?: string | null,
>     module?: {
>       api_name?: string | null,
>       id?: string | null
>     } | null,
>     name?: string | null,
>     transition_type?: string | null,
>     owners?: {
>       resources?: {
>         id?: string | null
>       }[] | null | null,
>       type?: string | null
>     }[] | null,
>     id?: string | null,
>     actions?: {
>       name?: string | null,
>       details?: null | null,
>       id?: string | null,
>       type?: string | null
>     }[] | null | null,
>     color_code?: string | null,
>     parallel_transition?: {
>       id?: string | null,
>       name?: string | null
>     } | null | null,
>     description?: string | null
>   }[] | null,
>   info?: {
>     per_page?: number | null,
>     count?: number | null,
>     page?: number | null,
>     more_records?: boolean | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### transitions.update

`blueprints.transitions.update`

Update a Blueprint transition. To update a single Blueprint transition in Zoho CRM. Prerequisite: Call this API for every transition after Blueprint creation to set the modified\_time, which the UI requires to render transitions correctly.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.blueprints.transitions.update({
	transitionId: '4876876000000333001',
	transitions: [{
		layout: { id: '4876876000000333001', api_name: 'example' },
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `transitionId` | `string` | Yes | Specify the ID of the transition to update. |
| `transitions` | `object[]` | Yes | Contains the list of transitions to update, with each object in the array representing a single transition configuration. |

> [accordion] transitions full type
>
> ```ts theme={null}
> {
>   layout: {
>     id: string,
>     api_name: string,
>     name?: string
>   },
>   during_inputs?: {
>     validation_filter?: {
>       criteria?: {
>         comparator?: string | null,
>         field?: {
>           api_name?: string | null,
>           id?: string | null
>         },
>         value?: string | null,
>         group_operator?: string | null,
>         group?: {
>           comparator?: string | null,
>           field?: {
>             api_name?: string | null,
>             id?: string | null
>           },
>           value?: string | null,
>           group_operator?: string | null,
>           group?: {
>             comparator?: string | null,
>             field?: {
>               api_name?: string | null,
>               id?: string | null
>             },
>             value?: string | null,
>             group_operator?: string | null,
>             group?: (recursive)[]
>           }[]
>         }[] | null
>       },
>       validation_message?: string | null
>     } | null,
>     sequence?: number | string | null,
>     field?: {
>       api_name?: string | null,
>       id?: string | null
>     },
>     configured_fields?: {
>       optional?: boolean | null,
>       field?: {
>         api_name?: string | null,
>         id?: string | null
>       },
>       validation_filter?: {
>         criteria?: {
>           comparator?: string | null,
>           field?: {
>             api_name?: string | null,
>             id?: string | null
>           },
>           value?: string | null,
>           group_operator?: string | null,
>           group?: {
>             comparator?: string | null,
>             field?: {
>               api_name?: string | null,
>               id?: string | null
>             },
>             value?: string | null,
>             group_operator?: string | null,
>             group?: {
>               comparator?: string | null,
>               field?: {
>                 api_name?: string | null,
>                 id?: string | null
>               },
>               value?: string | null,
>               group_operator?: string | null,
>               group?: (recursive)[]
>             }[]
>           }[] | null
>         },
>         validation_message?: string | null
>       } | null,
>       name?: string,
>       subform_fields?: {
>         optional?: boolean | null,
>         field?: {
>           api_name?: string | null,
>           id?: string | null
>         },
>         validation_filter?: {
>           criteria?: {
>             comparator?: string | null,
>             field?: {
>               api_name?: string | null,
>               id?: string | null
>             },
>             value?: string | null,
>             group_operator?: string | null,
>             group?: {
>               comparator?: string | null,
>               field?: {
>                 api_name?: string | null,
>                 id?: string | null
>               },
>               value?: string | null,
>               group_operator?: string | null,
>               group?: {
>                 comparator?: string | null,
>                 field?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 },
>                 value?: string | null,
>                 group_operator?: string | null,
>                 group?: (recursive)[]
>               }[]
>             }[] | null
>           },
>           validation_message?: string | null
>         } | null,
>         name?: string,
>         subform_fields?: (recursive)[] | null
>       }[] | null
>     }[] | null,
>     optional?: boolean | null,
>     type?: string | null,
>     message?: string | null,
>     title?: string | null,
>     kiosk?: {
>       name?: string | null,
>       id?: string | null
>     },
>     related_list?: {
>       layout?: {
>         api_name?: string | null,
>         id?: string | null
>       },
>       name?: string | null,
>       id?: string | null,
>       module?: {
>         api_name?: string | null,
>         id?: string | null
>       }
>     },
>     items?: {
>       name?: string | null,
>       sequence?: number | string | null,
>       optional?: boolean | null
>     }[] | null
>   }[] | null,
>   criteria?: {
>     comparator?: string | null,
>     field?: {
>       api_name?: string | null,
>       id?: string | null
>     },
>     value?: string | null,
>     group_operator?: string | null,
>     group?: {
>       comparator?: string | null,
>       field?: {
>         api_name?: string | null,
>         id?: string | null
>       },
>       value?: string | null,
>       group_operator?: string | null,
>       group?: {
>         comparator?: string | null,
>         field?: {
>           api_name?: string | null,
>           id?: string | null
>         },
>         value?: string | null,
>         group_operator?: string | null,
>         group?: (recursive)[]
>       }[]
>     }[] | null
>   },
>   trigger_type?: automatic | manual | null,
>   module?: {
>     api_name?: string | null,
>     id?: string | null
>   },
>   name?: string | null,
>   description?: string | null,
>   transition_type?: standalone_transition | parallel_transition | child_transition | null,
>   owners?: (
>     {
>       type: string,
>       resources?: {
>         id?: string | null
>       }[] | null
>     } | {
>       type: string,
>       resources?: {
>         id?: string | null
>       }[] | null
>     } | {
>       type: string,
>       resources?: {
>         id?: string | null
>       }[] | null
>     } | {
>       type: record_owner | team_user | portal_user_type,
>       resources?: {
>         id?: string | null
>       }[] | null
>     }
>   )[] | null,
>   actions?: (
>     {
>       id?: string | null,
>       _delete?: null,
>       type: string
>     } | {
>       id?: string | null,
>       type: string,
>       _delete?: null
>     } | {
>       name?: string | null,
>       id?: string | null,
>       type: string
>     } | {
>       name?: string | null,
>       id?: string | null,
>       type: string
>     } | {
>       name?: string | null,
>       id?: string | null,
>       type: string
>     } | {
>       name?: string | null,
>       details?: {
>         overwrite?: boolean | null,
>         module?: {
>           api_name?: string | null,
>           id?: string | null
>         },
>         tags?: {
>           color?: string | null,
>           name?: string | null
>         }[] | null
>       },
>       id?: string | null,
>       type: add_tags | remove_tags | sms | whatsapp | create_record | add_meeting | schedule_call | convert
>     }
>   )[] | null,
>   color_code?: string | null
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `transitions` | `object[] \| null` | No | Contains the list of updated transitions returned in the response, with each object in the array representing a single transition configuration. |

> [accordion] transitions full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### transitions.updateMany

`blueprints.transitions.updateMany`

Blueprint Transitions. Update multiple blueprint transitions in bulk. CRITICAL BEHAVIORS: (1) 'layout' is REQUIRED in each transition entry whenever 'during\_inputs' are included. omitting it causes INVALID\_DATA: Invalid field details with a misleading reference to during\_inputs\[0]. (2) 'during\_inputs' are ADDITIVE.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.blueprints.transitions.updateMany({
	transitions: [{ id: '4876876000000333001' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `transitions` | `object[]` | Yes | Contains the array of transitions in the batch update request, where each object in the array represents a single transition. |

> [accordion] transitions full type
>
> ```ts theme={null}
> {
>   layout?: {
>     id: string,
>     api_name: string,
>     name?: string
>   },
>   during_inputs?: {
>     validation_filter?: {
>       criteria?: {
>         comparator?: string | null,
>         field?: {
>           api_name?: string | null,
>           id?: string | null
>         },
>         value?: string | null,
>         group_operator?: string | null,
>         group?: {
>           comparator?: string | null,
>           field?: {
>             api_name?: string | null,
>             id?: string | null
>           },
>           value?: string | null,
>           group_operator?: string | null,
>           group?: {
>             comparator?: string | null,
>             field?: {
>               api_name?: string | null,
>               id?: string | null
>             },
>             value?: string | null,
>             group_operator?: string | null,
>             group?: (recursive)[]
>           }[]
>         }[] | null
>       },
>       validation_message?: string | null
>     } | null,
>     sequence?: number | string | null,
>     field?: {
>       api_name?: string | null,
>       id?: string | null
>     },
>     configured_fields?: {
>       optional?: boolean | null,
>       field?: {
>         api_name?: string | null,
>         id?: string | null
>       },
>       validation_filter?: {
>         criteria?: {
>           comparator?: string | null,
>           field?: {
>             api_name?: string | null,
>             id?: string | null
>           },
>           value?: string | null,
>           group_operator?: string | null,
>           group?: {
>             comparator?: string | null,
>             field?: {
>               api_name?: string | null,
>               id?: string | null
>             },
>             value?: string | null,
>             group_operator?: string | null,
>             group?: {
>               comparator?: string | null,
>               field?: {
>                 api_name?: string | null,
>                 id?: string | null
>               },
>               value?: string | null,
>               group_operator?: string | null,
>               group?: (recursive)[]
>             }[]
>           }[] | null
>         },
>         validation_message?: string | null
>       } | null,
>       name?: string,
>       subform_fields?: {
>         optional?: boolean | null,
>         field?: {
>           api_name?: string | null,
>           id?: string | null
>         },
>         validation_filter?: {
>           criteria?: {
>             comparator?: string | null,
>             field?: {
>               api_name?: string | null,
>               id?: string | null
>             },
>             value?: string | null,
>             group_operator?: string | null,
>             group?: {
>               comparator?: string | null,
>               field?: {
>                 api_name?: string | null,
>                 id?: string | null
>               },
>               value?: string | null,
>               group_operator?: string | null,
>               group?: {
>                 comparator?: string | null,
>                 field?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 },
>                 value?: string | null,
>                 group_operator?: string | null,
>                 group?: (recursive)[]
>               }[]
>             }[] | null
>           },
>           validation_message?: string | null
>         } | null,
>         name?: string,
>         subform_fields?: {
>           optional?: boolean | null,
>           field?: {
>             api_name?: string | null,
>             id?: string | null
>           },
>           validation_filter?: {
>             criteria?: {
>               comparator?: string | null,
>               field?: {
>                 api_name?: string | null,
>                 id?: string | null
>               },
>               value?: string | null,
>               group_operator?: string | null,
>               group?: {
>                 comparator?: string | null,
>                 field?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 },
>                 value?: string | null,
>                 group_operator?: string | null,
>                 group?: {
>                   comparator?: string | null,
>                   field?: {
>                     api_name?: string | null,
>                     id?: string | null
>                   },
>                   value?: string | null,
>                   group_operator?: string | null,
>                   group?: (recursive)[]
>                 }[]
>               }[] | null
>             },
>             validation_message?: string | null
>           } | null,
>           name?: string,
>           subform_fields?: (recursive)[] | null
>         }[] | null
>       }[] | null
>     }[] | null,
>     optional?: boolean | null,
>     type?: string | null,
>     message?: string | null,
>     title?: string | null,
>     kiosk?: {
>       name?: string | null,
>       id?: string | null
>     },
>     related_list?: {
>       layout?: {
>         api_name?: string | null,
>         id?: string | null
>       },
>       name?: string | null,
>       id?: string | null,
>       module?: {
>         api_name?: string | null,
>         id?: string | null
>       }
>     },
>     items?: {
>       name?: string | null,
>       sequence?: number | string | null,
>       optional?: boolean | null
>     }[] | null
>   }[] | null,
>   criteria?: {
>     comparator?: string | null,
>     field?: {
>       api_name?: string | null,
>       id?: string | null
>     },
>     value?: string | null,
>     group_operator?: string | null,
>     group?: {
>       comparator?: string | null,
>       field?: {
>         api_name?: string | null,
>         id?: string | null
>       },
>       value?: string | null,
>       group_operator?: string | null,
>       group?: {
>         comparator?: string | null,
>         field?: {
>           api_name?: string | null,
>           id?: string | null
>         },
>         value?: string | null,
>         group_operator?: string | null,
>         group?: (recursive)[]
>       }[]
>     }[] | null
>   },
>   trigger_type?: automatic | manual | null,
>   module?: {
>     api_name?: string | null,
>     id?: string | null
>   },
>   name?: string | null,
>   description?: string | null,
>   transition_type?: standalone_transition | parallel_transition | child_transition | null,
>   owners?: (
>     {
>       type: string,
>       resources?: {
>         id?: string | null
>       }[] | null
>     } | {
>       type: string,
>       resources?: {
>         id?: string | null
>       }[] | null
>     } | {
>       type: string,
>       resources?: {
>         id?: string | null
>       }[] | null
>     } | {
>       type: record_owner | team_user | portal_user_type,
>       resources?: {
>         id?: string | null
>       }[] | null
>     }
>   )[] | null,
>   id: string,
>   actions?: (
>     {
>       id?: string | null,
>       _delete?: null,
>       type: string
>     } | {
>       id?: string | null,
>       type: string,
>       _delete?: null
>     } | {
>       name?: string | null,
>       id?: string | null,
>       type: string
>     } | {
>       name?: string | null,
>       id?: string | null,
>       type: string
>     } | {
>       name?: string | null,
>       id?: string | null,
>       type: string
>     } | {
>       name?: string | null,
>       details?: {
>         overwrite?: boolean | null,
>         module?: {
>           api_name?: string | null,
>           id?: string | null
>         },
>         tags?: {
>           color?: string | null,
>           name?: string | null
>         }[] | null
>       },
>       id?: string | null,
>       type: add_tags | remove_tags | sms | whatsapp | create_record | add_meeting | schedule_call | convert
>     }
>   )[] | null,
>   color_code?: string | null
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `transitions` | `object[] \| null` | No | Contains the update results for the blueprint transitions processed in the request. |

> [accordion] transitions full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### update

`blueprints.update`

Update a single Blueprint by ID. Updates a specific Blueprint configuration in your Zoho CRM organization by specifying its unique Blueprint ID in the request URL. This operation applies only to blueprints that have never been activated. If the Blueprint has been activated, the operation returns a NOT\_ALLOWED error.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.blueprints.update({
	blueprintId: '4876876000000333001',
	blueprints: [{ name: 'example' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `blueprintId` | `string` | Yes | Specify the unique ID of the Blueprint to update. Any Blueprint ID included in the request body is ignored. Use the [Get Blueprint by ID](blueprints.yaml#\$.paths./settings/blueprints.get) to retrieve the Blueprint ID. |
| `blueprints` | `object[]` | Yes | Represents the list of blueprints to be updated. |

> [accordion] blueprints full type
>
> ```ts theme={null}
> {
>   chart_data?: {
>     nodes?: {
>       position_x?: number | string,
>       position_y?: number | string,
>       state?: {
>         api_name?: string
>       }
>     }[],
>     connections?: {
>       api_name?: string,
>       from?: {
>         end_point?: {
>           position_x?: number,
>           position_y?: number | string,
>           direction_x?: number | string,
>           direction_y?: number | string
>         },
>         state?: {
>           api_name?: string
>         }
>       },
>       to?: {
>         end_point?: {
>           position_x?: 0.5,
>           position_y?: 1,
>           direction_x?: 0,
>           direction_y?: 1
>         } | {
>           position_x?: 0.5,
>           position_y?: 0,
>           direction_x?: 0,
>           direction_y?: -1
>         } | {
>           position_x?: 0,
>           position_y?: 0.5,
>           direction_x?: 0,
>           direction_y?: 0
>         } | {
>           position_x?: 1,
>           position_y?: 0.5,
>           direction_x?: 0,
>           direction_y?: 0
>         } | {
>           position_x?: 0.12,
>           position_y?: 0,
>           direction_x?: 0,
>           direction_y?: -1
>         } | {
>           position_x?: 0.88,
>           position_y?: 0,
>           direction_x?: 0,
>           direction_y?: -1
>         } | {
>           position_x?: 0.12,
>           position_y?: 1,
>           direction_x?: 0,
>           direction_y?: 1
>         } | {
>           position_x?: 0.88,
>           position_y?: 1,
>           direction_x?: 0,
>           direction_y?: 1
>         } | {
>           position_x?: 0.3,
>           position_y?: 0,
>           direction_x?: 0,
>           direction_y?: -1
>         } | {
>           position_x?: 0.7,
>           position_y?: 0,
>           direction_x?: 0,
>           direction_y?: -1
>         } | {
>           position_x?: 0.3,
>           position_y?: 1,
>           direction_x?: 0,
>           direction_y?: 1
>         } | {
>           position_x?: 0.7,
>           position_y?: 1,
>           direction_x?: 0,
>           direction_y?: 1
>         } | {
>           position_x?: 0.21,
>           position_y?: 0,
>           direction_x?: 0,
>           direction_y?: -1
>         } | {
>           position_x?: 0.79,
>           position_y?: 0,
>           direction_x?: 0,
>           direction_y?: -1
>         } | {
>           position_x?: 0.21,
>           position_y?: 1,
>           direction_x?: 0,
>           direction_y?: 1
>         } | {
>           position_x?: 0.79,
>           position_y?: 1,
>           direction_x?: 0,
>           direction_y?: 1
>         } | {
>           position_x?: 0.4,
>           position_y?: 0,
>           direction_x?: 0,
>           direction_y?: -1
>         } | {
>           position_x?: 0.6,
>           position_y?: 0,
>           direction_x?: 0,
>           direction_y?: -1
>         } | {
>           position_x?: 0.4,
>           position_y?: 1,
>           direction_x?: 0,
>           direction_y?: 1
>         } | {
>           position_x?: 0.6,
>           position_y?: 1,
>           direction_x?: 0,
>           direction_y?: 1
>         },
>         state?: {
>           api_name?: string
>         }
>       },
>       transition?: {
>         api_name?: string,
>         name?: string
>       }
>     }[]
>   },
>   criteria?: {
>     comparator?: string,
>     field?: {
>       api_name?: string,
>       id?: string
>     },
>     type?: string,
>     value?: string
>   },
>   continuous?: boolean,
>   name: string & string,
>   description?: string,
>   owners?: {
>     resources?: (
>       {
>         id?: string | null
>       } | {
>         id?: string | null
>       } | {
>         id?: string | null
>       } | {
>         id: string
>       }
>     )[] | null,
>     type?: string
>   }[],
>   id?: string,
>   connections?: {
>     from_state?: {
>       api_name?: string,
>       name?: string
>     },
>     api_name?: string,
>     id?: string,
>     _delete?: string | null,
>     transitions?: {
>       api_name?: string,
>       name?: string,
>       precedence?: number | string
>     },
>     to_state?: {
>       api_name?: string,
>       name?: string
>     }
>   }[]
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `blueprints` | `object[] \| null` | No | Represents the list containing the Blueprint returned in the response. |

> [accordion] blueprints full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     name?: string | null | null,
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### updateMany

`blueprints.updateMany`

Update Blueprints. To update bulk Blueprint configurations. Each Blueprint in the blueprints array is replaced with the submitted definition. Use the Get Blueprint by ID API to retrieve the Blueprint ID. If the ID is not included in the URL, then it is mandatory to specify the ID in the request body.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.blueprints.updateMany({
	blueprints: [{ name: 'example' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `blueprints` | `object[]` | Yes | Represents the list of blueprints to be updated. |

> [accordion] blueprints full type
>
> ```ts theme={null}
> {
>   chart_data?: {
>     nodes?: {
>       position_x?: number | string,
>       position_y?: number | string,
>       state?: {
>         api_name?: string
>       }
>     }[],
>     connections?: {
>       api_name?: string,
>       from?: {
>         end_point?: {
>           position_x?: number,
>           position_y?: number | string,
>           direction_x?: number | string,
>           direction_y?: number | string
>         },
>         state?: {
>           api_name?: string
>         }
>       },
>       to?: {
>         end_point?: {
>           position_x?: 0.5,
>           position_y?: 1,
>           direction_x?: 0,
>           direction_y?: 1
>         } | {
>           position_x?: 0.5,
>           position_y?: 0,
>           direction_x?: 0,
>           direction_y?: -1
>         } | {
>           position_x?: 0,
>           position_y?: 0.5,
>           direction_x?: 0,
>           direction_y?: 0
>         } | {
>           position_x?: 1,
>           position_y?: 0.5,
>           direction_x?: 0,
>           direction_y?: 0
>         } | {
>           position_x?: 0.12,
>           position_y?: 0,
>           direction_x?: 0,
>           direction_y?: -1
>         } | {
>           position_x?: 0.88,
>           position_y?: 0,
>           direction_x?: 0,
>           direction_y?: -1
>         } | {
>           position_x?: 0.12,
>           position_y?: 1,
>           direction_x?: 0,
>           direction_y?: 1
>         } | {
>           position_x?: 0.88,
>           position_y?: 1,
>           direction_x?: 0,
>           direction_y?: 1
>         } | {
>           position_x?: 0.3,
>           position_y?: 0,
>           direction_x?: 0,
>           direction_y?: -1
>         } | {
>           position_x?: 0.7,
>           position_y?: 0,
>           direction_x?: 0,
>           direction_y?: -1
>         } | {
>           position_x?: 0.3,
>           position_y?: 1,
>           direction_x?: 0,
>           direction_y?: 1
>         } | {
>           position_x?: 0.7,
>           position_y?: 1,
>           direction_x?: 0,
>           direction_y?: 1
>         } | {
>           position_x?: 0.21,
>           position_y?: 0,
>           direction_x?: 0,
>           direction_y?: -1
>         } | {
>           position_x?: 0.79,
>           position_y?: 0,
>           direction_x?: 0,
>           direction_y?: -1
>         } | {
>           position_x?: 0.21,
>           position_y?: 1,
>           direction_x?: 0,
>           direction_y?: 1
>         } | {
>           position_x?: 0.79,
>           position_y?: 1,
>           direction_x?: 0,
>           direction_y?: 1
>         } | {
>           position_x?: 0.4,
>           position_y?: 0,
>           direction_x?: 0,
>           direction_y?: -1
>         } | {
>           position_x?: 0.6,
>           position_y?: 0,
>           direction_x?: 0,
>           direction_y?: -1
>         } | {
>           position_x?: 0.4,
>           position_y?: 1,
>           direction_x?: 0,
>           direction_y?: 1
>         } | {
>           position_x?: 0.6,
>           position_y?: 1,
>           direction_x?: 0,
>           direction_y?: 1
>         },
>         state?: {
>           api_name?: string
>         }
>       },
>       transition?: {
>         api_name?: string,
>         name?: string
>       }
>     }[]
>   },
>   criteria?: {
>     comparator?: string,
>     field?: {
>       api_name?: string,
>       id?: string
>     },
>     type?: string,
>     value?: string
>   },
>   continuous?: boolean,
>   name: string & string,
>   description?: string,
>   owners?: {
>     resources?: (
>       {
>         id?: string | null
>       } | {
>         id?: string | null
>       } | {
>         id?: string | null
>       } | {
>         id: string
>       }
>     )[] | null,
>     type?: string
>   }[],
>   id?: string,
>   connections?: {
>     from_state?: {
>       api_name?: string,
>       name?: string
>     },
>     api_name?: string,
>     id?: string,
>     _delete?: string | null,
>     transitions?: {
>       api_name?: string,
>       name?: string,
>       precedence?: number | string
>     },
>     to_state?: {
>       api_name?: string,
>       name?: string
>     }
>   }[]
> }[]
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   blueprints?: (
>     {
>       code?: string | null,
>       details?: {
>         name?: string | null | null,
>         id?: string | null
>       } | null,
>       message?: string | null,
>       status?: string | null
>     } | {
>       blueprints?: {
>         code?: string | null,
>         details?: {
>           name?: string | null | null,
>           id?: string | null
>         } | null,
>         message?: string | null,
>         status?: string | null
>       }[] | null
>     }
>   )[] | null
> } | {
>   blueprints?: any | null
> }
> ```

***

## Bulk Read

### createJob

`bulkRead.createJob`

Create a bulk read job. To create a bulk read job in Zoho CRM. A bulk read job exports records from a specified CRM module to a CSV or ICS file.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.bulkRead.createJob({
	query: {
		module: { api_name: 'example' },
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `callback` | `object` | No | Specify the callback configuration to receive a POST notification when the bulk read job completes or fails. |
| `query` | `object` | Yes | Specify the query parameters for the bulk read job, including the target module, optional field selection, optional Custom View, and optional filter criteria. |
| `file_type` | `csv \| ics` | No | Specify the file format for the exported records. Possible values: **csv** - Exports records in CSV format. **ics** - Exports records in ICS format, applicable only when exporting from the **Events** module. |

> [accordion] callback full type
>
> ```ts theme={null}
> {
>   url: string,
>   method: string
> }
> ```

> [accordion] query full type
>
> ```ts theme={null}
> {
>   module: {
>     api_name: string
>   },
>   cvid?: string | null,
>   fields?: string[],
>   page?: number | string | null,
>   criteria?: {
>     group_operator: or | and,
>     group: {
>       field: {
>         api_name: string
>       },
>       value: string,
>       type?: string,
>       comparator: equal | contains | ends_with | not_contains | not_equal | starts_with
>     }[]
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | Represents the list of job creation result objects. |
| `info` | `object \| null` | No | Represents additional metadata about the bulk read job creation response. |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   status?: string | null,
>   code?: string | null,
>   message?: string | null,
>   details?: {
>     id?: string | null,
>     operation?: string | null,
>     state?: string | null,
>     created_by?: {
>       id?: string | null,
>       name?: string | null
>     } | null,
>     created_time?: string | null
>   } | null
> }[] | null
> ```

> [accordion] info full type
>
> ```ts theme={null}
> {
> } | null
> ```

***

### downloadResult

`bulkRead.downloadResult`

Download bulk read result. To download the exported records from a completed bulk read job in Zoho CRM. This API returns a ZIP archive containing the CSV or ICS file with the exported records. The bulk read job must have a COMPLETED state before you can download the result. Returns the job's zip of CSV files.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.bulkRead.downloadResult({ jobId: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `jobId` | `string` | Yes | Specify the unique identifier of the bulk read job. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `contentBase64` | `string` | No | The file, base64-encoded. Missing when the file came back as text or contentOmitted is set. |
| `text` | `string` | No | The file as text, in place of contentBase64, when it is a text file (CSV, JSON, Markdown, XML and the like) in UTF-8. |
| `contentType` | `string` | Yes | Media type of the file, for example application/pdf. |
| `byteLength` | `number` | Yes | Size of the file in bytes. |
| `filename` | `string` | No | The file name, when known. |
| `contentOmitted` | `not_requested \| over_limit` | No | Set when the content was left out: the caller did not ask for it, or the file was over the limit. |
| `fileId` | `string` | No | Where the host saved the file. Over the limit it comes in place of the content; a host that keeps every file sets it beside the content too. On Corsair it is a Files id (fil\_…): pass it to another app wherever that app takes a file URL, or read a text file or PDF with files.read\_text. |

***

### getJob

`bulkRead.getJob`

Get bulk read job details. To retrieve the details of a bulk read job in Zoho CRM. Use this API to check the current state of a bulk read job and obtain the download URL once the job is complete. Specify the unique job ID that Zoho CRM returned when you created the job.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.bulkRead.getJob({ jobId: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `jobId` | `string` | Yes | Specify the unique identifier of the bulk read job. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data?: {
>     id?: string | null,
>     operation?: string | null,
>     state?: string | null,
>     query?: {
>       module?: {
>         api_name?: string | null,
>         id?: string | null
>       } | null,
>       cvid?: string | null,
>       fields?: string[] | null,
>       page?: number | null,
>       criteria?: {
>         group_operator?: string | null,
>         group?: {
>           field?: {
>             api_name?: string | null,
>             id?: string | null | null
>           } | null,
>           id?: string | null | null,
>           value?: string | null,
>           type?: string | null,
>           comparator?: string | null
>         }[] | null
>       } | null
>     } | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     created_time?: string | null,
>     result?: {
>       page?: number | null,
>       count?: number | null,
>       download_url?: string | null,
>       per_page?: number | null,
>       more_records?: boolean | null,
>       next_page_token?: string | null
>     } | null,
>     file_type?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

## Bulk Write

### createJob

`bulkWrite.createJob`

Create a bulk write job. To create a bulk write job in your Zoho CRM organization that creates, updates, or upserts records in a target module from a previously uploaded file.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.bulkWrite.createJob({
	operation: 'insert',
	resource: [{
		type: 'example',
		file_names: ['example'],
		module: { api_name: 'example' },
		file_id: 'example',
		find_by: 'example',
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `character_encoding` | `string \| null` | No | Specify the character encoding of the uploaded file. Zoho CRM auto-detects the encoding when this value is omitted; supply a value to override auto-detection and force the file to be read with the specified charset. |
| `operation` | `insert \| update \| upsert` | Yes | Specify the type of bulk write operation to perform on the file. Possible values: insert - Creates the records from the file as new records in the target module. update - Updates existing records in the target module without creating new ones. upsert - Updates existing records and creates new records that do not exist already. |
| `callback` | `object` | No | Specify the callback configuration that Zoho CRM uses to notify your endpoint when the bulk write job completes or fails. |
| `resource` | `object[]` | Yes | Specify the list of resource configurations to process in the bulk write job. Each entry describes the target module, the uploaded file to read, and the field mappings to apply. |

> [accordion] callback full type
>
> ```ts theme={null}
> {
>   url: string,
>   method: string
> }
> ```

> [accordion] resource full type
>
> ```ts theme={null}
> {
>   type: string,
>   file_names: string[],
>   module: {
>     api_name: string
>   },
>   file_id: string,
>   ignore_empty?: boolean,
>   find_by: string,
>   field_mappings?: {
>     api_name: string,
>     index: number | string
>   }[]
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `status` | `string \| null` | No | Represents the overall status of the bulk write job creation request. Possible values: success - Indicates that Zoho CRM scheduled the bulk write job successfully. Example: "success". |
| `code` | `string \| null` | No | Represents the response code returned for the bulk write job creation. Possible values: **SUCCESS** - Indicates that the bulk write job was scheduled successfully. **FILE\_UPLOAD\_SUCCESS** - Indicates that the file associated with the job was uploaded successfully. |
| `message` | `string \| null` | No | Represents the response message for the bulk write job creation. Possible values: **success** - Confirms that Zoho CRM scheduled the bulk write job. **file uploaded** - Confirms that Zoho CRM accepted the uploaded file for the job. |
| `details` | `object \| null` | No | Represents the details of the newly scheduled bulk write job. |

> [accordion] details full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   created_by?: {
>     id?: string | null,
>     name?: string | null
>   } | null
> } | null
> ```

***

### getJob

`bulkWrite.getJob`

Get bulk write job details. To retrieve the details of a previously created bulk write job in your Zoho CRM organization, including its current status, per-resource and per-file processing counts, the creator, and the download URL of the result archive once the job completes.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.bulkWrite.getJob({ jobId: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `jobId` | `string` | Yes | Specify the unique identifier of the bulk write job whose details you want to retrieve. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   status?: string | null,
>   character_encoding?: string | null,
>   resource?: {
>     status?: string | null,
>     type?: string | null,
>     module?: {
>       api_name?: string | null,
>       id?: string | null
>     } | null,
>     ignore_empty?: boolean | null,
>     field_mappings?: {
>       api_name?: string | null,
>       index?: number | null,
>       format?: string | null | null,
>       find_by?: string | null | null,
>       default_value?: {
>         value?: string | null
>       } | null,
>       parent_column_index?: number | null | null,
>       module?: string | null | null
>     }[] | null,
>     file?: {
>       status?: string | null,
>       name?: string | null,
>       added_count?: number | null,
>       skipped_count?: number | null,
>       updated_count?: number | null,
>       total_count?: number | null
>     } | null,
>     code?: string | null
>   }[] | null,
>   id?: string | null,
>   result?: {
>     download_url?: string | null
>   } | null,
>   created_by?: {
>     name?: string | null,
>     id?: string | null
>   } | null,
>   operation?: string | null,
>   created_time?: string | null,
>   callback?: {
>     url?: string | null,
>     method?: string | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### uploadFile

`bulkWrite.uploadFile`

Upload a file to CRM. To upload a CSV file in ZIP format for bulk write API. The response contains the file\_id. Use this ID while making the bulk write request. Goes to Zoho's upload host (upload.zoho.\<dc>). Needs the org id (crmOrgId, from org.get: zgid) and feature "bulk-write". The file is a CSV, or a zip of one.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.bulkWrite.uploadFile({
	file: { base64: 'SGVsbG8gZnJvbSBDb3JzYWly', filename: 'notes.txt', contentType: 'text/plain' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `crmOrgId` | `number \| string` | No | Static CRM organization identifier. This value is fixed per account and shared during onboarding. |
| `feature` | `string` | No | Specify the feature for which the file upload is being performed. Possible values: **bulk-write** - Indicates a bulk write operation. |
| `file` | `string \| object \| custom` | Yes | Specify the file to upload. The file must be a ZIP archive containing one or more CSV files, with a maximum of **25,000 records** per file. The maximum file size is **25 MB.** If there are more records, make a separate API call by with a ZIP file containing the next 25,000 records in the module. Please note that the **Subform** and **multi-module lookup (MxN linking module)** fields are treated as separate modules in Zoho CRM. This is a parent-child modulecase, for example, the Contacts module is the parent module, and the subform within it is the child module. So, **prepare separate CSV files for parent and child modules**, then ZIP them together into a ZIP file and upload. For more details on preparing the input file for parent-child record imports, refer to [Kaizen #131 - Bulk Write for parent-child records using Scala SDK.](https://help.zoho.com/portal/en/community/topic/kaizen-131-bulk-write-for-parent-child-records-scala-sdk) |

> [accordion] file full type
>
> ```ts theme={null}
> string | {
>   url: string,
>   filename?: string,
>   contentType?: string
> } | {
>   base64: string,
>   filename?: string,
>   contentType?: string
> } | custom
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `status` | `string \| null` | No | Represents the status of the upload operation. Possible values: **success** - The file was uploaded successfully. Example: "success". |
| `code` | `string \| null` | No | Represents the result code for the upload operation. Possible values: **FILE\_UPLOAD\_SUCCESS** - The file was uploaded successfully. Example: "FILE\_UPLOAD\_SUCCESS". |
| `message` | `string \| null` | No | Represents the message confirming the outcome of the upload operation. Example: "file uploaded.". |
| `details` | `object \| null` | No | Represents the details of the uploaded file, including the file ID and creation time. |

> [accordion] details full type
>
> ```ts theme={null}
> {
>   file_id?: string | null,
>   created_time?: string | null
> } | null
> ```

***

## Business Hours

### create

`businessHours.create`

Business Hours Configuration. Creates a new business hours configuration for the organization, defining working days, operating hours, and timezone settings.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.businessHours.create({
	business_hours: { week_starts_on: 'Monday', type: '24_by_7' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `business_hours` | `object` | Yes | The business hours configuration object containing all settings for the organization's working schedule. |

> [accordion] business\_hours full type
>
> ```ts theme={null}
> {
>   week_starts_on: Monday | Tuesday | Wednesday | Thursday | Friday | Saturday | Sunday,
>   type: 24_by_7 | 24_by_5 | custom,
>   business_days?: (Monday | Tuesday | Wednesday | Thursday | Friday | Saturday | Sunday)[],
>   same_as_everyday?: boolean,
>   daily_timing?: string[],
>   custom_timing?: {
>     days: Monday | Tuesday | Wednesday | Thursday | Friday | Saturday | Sunday,
>     business_timing: string[]
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `business_hours` | `object \| null` | No | Business hours response object |

> [accordion] business\_hours full type
>
> ```ts theme={null}
> {
>   status?: string | null,
>   code?: string | null,
>   message?: string | null,
>   details?: {
>     id?: string | null
>   } | null
> } | null
> ```

***

### get

`businessHours.get`

Business Hours Configuration. Retrieves the current business hours configuration, including working days, operating hours, and timezone details.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.businessHours.get({});
```

**Input:** *empty object*

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   business_hours?: {
>     week_starts_on?: string | null,
>     type?: string | null,
>     id?: string | null,
>     timezone?: string | null,
>     business_days?: string[] | null,
>     same_as_everyday?: boolean | null,
>     daily_timing?: string[] | null | null,
>     custom_timing?: {
>       days?: string | null,
>       business_timing?: string[] | null
>     }[] | null | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### update

`businessHours.update`

Business Hours Configuration. Updates the existing business hours configuration with revised working days, operating hours, or timezone settings.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.businessHours.update({
	business_hours: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `business_hours` | `object` | Yes | The business hours configuration object containing all settings for the organization's working schedule. |

> [accordion] business\_hours full type
>
> ```ts theme={null}
> {
>   week_starts_on?: Monday | Tuesday | Wednesday | Thursday | Friday | Saturday | Sunday,
>   type?: 24_by_7 | 24_by_5 | custom,
>   business_days?: (Monday | Tuesday | Wednesday | Thursday | Friday | Saturday | Sunday)[],
>   same_as_everyday?: boolean,
>   daily_timing?: string[],
>   custom_timing?: {
>     days: Monday | Tuesday | Wednesday | Thursday | Friday | Saturday | Sunday,
>     business_timing: string[],
>     _delete?: boolean
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `business_hours` | `object \| null` | No | Business hours response object |

> [accordion] business\_hours full type
>
> ```ts theme={null}
> {
>   status?: string | null,
>   code?: string | null,
>   message?: string | null,
>   details?: {
>     id?: string | null
>   } | null
> } | null
> ```

***

## Cadences

### activate

`cadences.activate`

Activate Cadence. Activates a published cadence so it begins enrolling records. The cadence must currently be inactive; otherwise, the ALREADY\_ACTIVATED error is returned. Edition limits are enforced, including the maximum number of active cadences per module and the total number of active cadences.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.cadences.activate({ id: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Specify the unique identifier of the Cadence to activate. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `cadences` | `object[] \| null` | No | Represents the list of Cadences with their result status from the operation. |

> [accordion] cadences full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null,
>     follow_ups?: {
>       id?: string | null,
>       action?: {
>         id?: string | null,
>         type?: string | null
>       } | null
>     }[] | null | null,
>     draft_cadence?: {
>       id?: string | null
>     } | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### clone

`cadences.clone`

Clone a Cadence. Creates a new cadence with the same follow-up tree as the source cadence (identified by path id) but with the name / description / custom\_view supplied in the body. Every follow-up action is copied into a new action record - the clone has no shared rows with the source.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.cadences.clone({
	id: '4876876000000333001',
	cadences: [{
		module: {},
		name: 'example',
		type: 'custom_view',
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Specify the unique identifier of the Cadence to clone. |
| `cadences` | `object[]` | Yes | Represents the list of Cadences to clone. |

> [accordion] cadences full type
>
> ```ts theme={null}
> {
>   module: {
>     api_name?: string,
>     id?: string
>   },
>   name: string,
>   description?: string,
>   type: custom_view | manual_enrollment,
>   custom_view?: {
>     id: string
>   },
>   execution_details?: {
>     execute_every?: {
>       period: immediately | hours | days | weeks,
>       unit?: number | string
>     } | null
>   }
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `cadences` | `object[] \| null` | No | Represents the list of Cadences with their result status from the operation. |

> [accordion] cadences full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null,
>     follow_ups?: {
>       id?: string | null,
>       action?: {
>         id?: string | null,
>         type?: string | null
>       } | null
>     }[] | null | null,
>     draft_cadence?: {
>       id?: string | null
>     } | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### create

`cadences.create`

Create cadence. Creates a new cadence (initially in draft status) with its follow-up tree and optional un-enrollment rules in a single call. custom\_view cadences require a custom\_view\.id; manual\_enrollment cadences must omit custom\_view.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.cadences.create({
	cadences: [{
		module: {},
		name: 'example',
		type: 'custom_view',
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `cadences` | `object[]` | Yes | Represents the list of Cadences to create. |

> [accordion] cadences full type
>
> ```ts theme={null}
> {
>   module: {
>     api_name?: string,
>     id?: string
>   },
>   id?: string,
>   name: string,
>   description?: string,
>   type: custom_view | manual_enrollment,
>   custom_view?: {
>     id: string
>   },
>   execution_details?: {
>     execute_every?: {
>       period: immediately | hours | days | weeks,
>       unit?: number | string
>     } | null,
>     unenroll_properties?: {
>       details?: {
>       } | null,
>       type: automatic_unenroll | end_date | criteria | followup_criteria
>     }[]
>   },
>   follow_ups?: {
>     execute_after?: {
>       unit: number | string,
>       period: minutes | hours | business_hours | days | business_days | months
>     },
>     parent_follow_up?: {
>       reference_id?: string
>     },
>     reference_id?: string,
>     action: {
>       id?: string,
>       type: string
>     } | {
>       id?: string,
>       type: string
>     } | {
>       details?: {
>         module: {
>           api_name?: string,
>           id?: string
>         },
>         layout: {
>           id: string,
>           name?: string | null,
>           display_label?: string
>         },
>         field_mappings: (
>           {
>             display_value?: string,
>             field: {
>               api_name: string,
>               id: string
>             },
>             type: static,
>             value: string | string[] | {
>               id: string,
>               name?: string
>             }
>           } | {
>             display_value?: string,
>             field: {
>               api_name: string,
>               id: string
>             },
>             type: merge_field,
>             value: string,
>             allow_agent_user?: boolean
>           } | {
>             display_value?: string,
>             field: {
>               api_name: string,
>               id: string
>             },
>             type: execution_time,
>             value: {
>               period: days | business_days | hours | minutes,
>               unit: string,
>               sign?: plus | minus,
>               trigger_field: string,
>               time?: string,
>               notify_type?: popup | email | emailandpopup
>             }
>           } | {
>             display_value?: string,
>             field: {
>               api_name: string,
>               id: string
>             },
>             type: composite,
>             value: {
>             }
>           }
>         )[],
>         apply_restriction?: boolean | null,
>         id?: string
>       },
>       id?: string,
>       type: string
>     } | {
>       id?: string,
>       type: string
>     },
>     triggers?: string[]
>   }[]
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `cadences` | `object[] \| null` | No | Represents the list of Cadences with their result status from the operation. |

> [accordion] cadences full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null,
>     follow_ups?: {
>       id?: string | null,
>       action?: {
>         id?: string | null,
>         type?: string | null
>       } | null
>     }[] | null | null,
>     draft_cadence?: {
>       id?: string | null
>     } | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### deactivate

`cadences.deactivate`

Deactivate a Cadence. To deactivate a Cadence in your Zoho CRM organization. The Cadence must currently be active; attempting to deactivate an already inactive Cadence returns the ALREADY\_DEACTIVATED error.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.cadences.deactivate({ id: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Specify the unique identifier of the Cadence to deactivate. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `cadences` | `object[] \| null` | No | Represents the list of Cadences with their result status from the operation. |

> [accordion] cadences full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null,
>     follow_ups?: {
>       id?: string | null,
>       action?: {
>         id?: string | null,
>         type?: string | null
>       } | null
>     }[] | null | null,
>     draft_cadence?: {
>       id?: string | null
>     } | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### delete

`cadences.delete`

Delete a Cadence. To delete a Cadence and its associated records from your Zoho CRM organization. Deleting a Cadence removes all related action records, including workflow tasks, email notifications, and WhatsApp notifications, as well as process states and flow transitions. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.cadences.delete({ id: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Specify the unique identifier of the Cadence. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `cadences` | `object[] \| null` | No | Represents the list of Cadences with their result status from the operation. |

> [accordion] cadences full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null,
>     follow_ups?: {
>       id?: string | null,
>       action?: {
>         id?: string | null,
>         type?: string | null
>       } | null
>     }[] | null | null,
>     draft_cadence?: {
>       id?: string | null
>     } | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### enrollRecords

`cadences.enrollRecords`

Enroll Records to Cadences. Enrolls CRM records into one or more cadences. Notes - Only Manual Enrollment cadences can be enrolled through this API. - Available only in Enterprise edition and above. - Supports Leads, Contacts, Deals, Vendors, and custom modules. - A request may contain up to 5 cadence IDs. Enrolled records start receiving the cadence's follow-up emails and tasks.

**Risk:** `destructive`

```ts theme={null}
await corsair.zohocrm.api.cadences.enrollRecords({
	module: 'Leads',
	cadences_ids: ['example'],
	ids: ['4876876000000333001'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the API name of the module. Refer to the [Get Modules](modules.yaml#\$.paths./settings/modules.get) resource for valid values. |
| `cadences_ids` | `string[]` | Yes | A list of Cadence IDs to use for the enrollment or un-enrollment operation. |
| `ids` | `string[]` | Yes | Specify the list of record IDs to enroll in or un-enroll from the specified Cadences. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data?: {
>     code?: string | null,
>     details?: {
>       cadences?: {
>         name?: string | null,
>         id?: string | null
>       }[] | null,
>       id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   data?: {
>     code?: string | null,
>     details?: {
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   data?: (
>     {
>       code?: string | null,
>       details?: {
>         cadences?: {
>           name?: string | null,
>           id?: string | null
>         }[] | null,
>         id?: string | null
>       } | null,
>       message?: string | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       details?: {
>         api_name?: string | null,
>         json_path?: string | null
>       } | null,
>       message?: string | null,
>       status?: string | null
>     }
>   )[] | null
> }
> ```

***

### get

`cadences.get`

Get a Cadence. To retrieve the configuration and details of a specific Cadence from your Zoho CRM organization. The response includes the follow-up action tree with server-resolved parent follow-up IDs, unenroll properties, Custom View configuration, and the current Cadence status.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.cadences.get({ id: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Specify the unique identifier of the Cadence. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   cadences?: {
>     summary?: {
>       whatsapp_follow_up_count?: number | null,
>       task_follow_up_count?: number | null,
>       call_follow_up_count?: number | null,
>       email_follow_up_count?: number | null
>     } | null,
>     created_time?: string | null,
>     module?: {
>       api_name?: string | null,
>       id?: string | null
>     } | null,
>     description?: string | null,
>     execution_details?: {
>       unenroll_properties?: {
>         details?: {
>         } | null | null,
>         id?: string | null,
>         type?: string | null
>       }[] | null | null,
>       execute_every?: {
>         period?: string | null,
>         unit?: number | null
>       } | null | null
>     } | null | null,
>     type?: string | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     modified_time?: string | null | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     name?: string | null,
>     follow_ups?: {
>       parent_follow_up?: {
>         id?: string | null,
>         type?: string | null
>       } | null | null,
>       execute_after?: {
>         unit?: number | null,
>         period?: string | null,
>         id?: string | null
>       } | null,
>       action?: {
>       } | null,
>       id?: string | null,
>       triggers?: string[] | null | null
>     }[] | null,
>     id?: string | null,
>     draft_cadence?: {
>       id?: string | null,
>       name?: string | null
>     } | null,
>     parent_cadence?: {
>       id?: string | null,
>       name?: string | null
>     } | null,
>     custom_view?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     status?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### getAnalytics

`cadences.getAnalytics`

Get Cadence analytics. To retrieve per-follow-up execution statistics for the specified Cadence in your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.cadences.getAnalytics({ id: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Specify the unique identifier of the Cadence for which you want to retrieve analytics. |
| `filters` | `object` | No | Specifies the filter criteria to narrow the analytics results by follow-up action type and value. |
| `follow_ups_executed_from` | `string` | No | Specifies the start date from which to retrieve follow-up execution analytics, in ISO 8601 format. |
| `follow_ups_executed_till` | `string` | No | Specifies the end date until which to retrieve follow-up execution analytics, in ISO 8601 format. |

> [accordion] filters full type
>
> ```ts theme={null}
> {
>   field?: {
>     api_name?: string
>   },
>   comparator?: string,
>   value?: tasks | email_notifications | schedule_call | whatsapp_message_notification
> }
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   cadences?: {
>     module?: {
>       api_name?: string | null,
>       id?: string | null
>     } | null,
>     name?: string | null,
>     follow_ups?: {
>       analytics?: {
>         open_tasks_count?: number | null,
>         failed_tasks_count?: number | null,
>         subject?: string | null,
>         completed_tasks_count?: number | null,
>         tasks_count?: number | null
>       } | {
>         created_calls_count?: number | null,
>         cancelled_calls_count?: number | null,
>         failed_calls_count?: number | null,
>         completed_calls_count?: number | null,
>         scheduled_calls_count?: number | null,
>         subject?: string | null,
>         calls_count?: number | null,
>         overdue_calls_count?: number | null,
>         missed_calls_count?: number | null
>       } | {
>         email_count?: number | null,
>         bounced_email_count?: number | null,
>         clicked_email_count?: number | null,
>         replied_email_count?: number | null,
>         sent_email_count?: number | null,
>         unsent_email_count?: number | null,
>         opened_email_count?: number | null,
>         unsubscribed_email_count?: number | null
>       } | {
>         whatsapp_count?: number | null,
>         delivered_whatsapp_count?: number | null,
>         failed_whatsapp_count?: number | null
>       } | null,
>       parent_follow_up?: {
>       } | null | null,
>       action?: {
>         template?: {
>           name?: string | null,
>           id?: string | null
>         } | null,
>         message_template?: {
>           id?: string | null,
>           title?: string | null
>         } | null,
>         name?: string | null,
>         type?: string | null,
>         id?: string | null
>       } | null,
>       follow_up_number?: string | null,
>       id?: string | null
>     }[] | null,
>     id?: string | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### getModuleActionsCount

`cadences.getModuleActionsCount`

Get Cadence module actions count. To retrieve the total number of follow-up actions configured for the specified CRM module across all Cadences in your Zoho CRM organization. The count includes tasks, emails, calls, and WhatsApp messages, and is used to enforce the edition-level per-module action count limit.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.cadences.getModuleActionsCount({ module: 'Leads' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the CRM module API name to retrieve the Cadence action count for. Refer to the [Get Modules](modules.yaml#\$.paths./settings/modules.get) resource for valid values. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   count?: number | null
> } | {
>   success: true
> }
> ```

***

### getRecordsCount

`cadences.getRecordsCount`

Get Cadence records count. To retrieve the record counts for the specified Cadences from your Zoho CRM organization. For each Cadence ID supplied in the ids query parameter, the response returns the number of records currently associated with that Cadence. A maximum of 100 Cadence IDs can be supplied per request.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.cadences.getRecordsCount({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `ids` | `string` | No | Specify the unique identifiers of the Cadences to retrieve. Enter a comma-separated list of Cadence IDs. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   cadences_records_count?: {
>     count?: number | null,
>     cadences?: {
>       name?: string | null,
>       id?: string | null
>     } | null
>   }[] | null
> } | {
>   cadences_records_count?: (
>     {
>       count?: number | null,
>       cadences?: {
>         name?: string | null,
>         id?: string | null
>       } | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       status?: string | null,
>       details?: {
>         expected_fields?: {
>           api_name?: string | null,
>           json_path?: string | null
>         }[] | null
>       } | {
>         dependee?: {
>           api_name?: string | null,
>           json_path?: string | null
>         } | null,
>         expected_fields?: {
>           api_name?: string | null,
>           json_path?: string | null
>         }[] | null
>       } | {
>         api_name?: string | null,
>         json_path?: string | null,
>         id?: string | null
>       } | {
>         supported_values?: string[] | null,
>         api_name?: string | null,
>         json_path?: string | null,
>         param_name?: string | null
>       } | {
>         expected_data_type?: string | null,
>         api_name?: string | null,
>         json_path?: string | null,
>         param_name?: string | null
>       } | {
>         expected_data_type?: string | null,
>         supported_values?: string[] | null,
>         api_name?: string | null,
>         json_path?: string | null,
>         param_name?: string | null
>       } | {
>         api_name?: string | null,
>         json_path?: string | null,
>         param_name?: string | null
>       } | {
>         supported_values?: string[] | null
>       } | {
>         expected_data_type?: string | null
>       } | {
>         dependee?: {
>           api_name?: string | null,
>           json_path?: string | null,
>           param_name?: string | null
>         } | null,
>         api_name?: string | null,
>         json_path?: string | null,
>         param_name?: string | null
>       } | {
>         resource_path_index?: number | null
>       } | {
>         id?: string | null
>       } | {
>         param_name?: string | null
>       } | {
>         param_name?: string | null
>       } | {
>         api_name?: string | null,
>         limit?: number | null
>       } | {
>         permissions?: string[] | null
>       } | {
>       } | {
>         api_name?: string | null,
>         limit?: number | null,
>         json_path?: string | null
>       } | {
>         ambiguity_due_to?: {
>           api_name?: string | null,
>           json_path?: string | null
>         }[] | null
>       } | {
>         api_name?: string | null,
>         exists_in?: {
>           api_name?: string | null,
>           json_path?: string | null
>         } | null,
>         json_path?: string | null
>       } | {
>         maximum_length?: number | null,
>         api_name?: string | null,
>         json_path?: string | null
>       } | null
>     }
>   )[] | null
> } | {
>   success: true
> }
> ```

***

### list

`cadences.list`

List Cadences. To retrieve the list of Cadences in your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.cadences.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | No | Specify the API name of the CRM module to filter Cadences. Refer to the [Get Modules](modules.yaml#\$.paths./settings/modules.get) resource for valid values. |
| `name` | `string` | No | Specify the name of the Cadence to filter the results. Supported comparators: `equal`, `not_equal`, `contains`, `not_contains`, `starts_with`, `ends_with`. The filter value must be URL-encoded before being sent in the query parameter. Non-encoded example: \`\`\`json \{ "field": \{ "api\_name": "name" }, "comparator": "contains", "value": "qwerty" } |
| `active` | `boolean` | No | Specify whether to filter Cadences by their active status. Possible values: **true** - Retrieve only active Cadences. **false** - Retrieve only inactive Cadences. |
| `fields` | `string` | No | Specify the field to include in the Cadence response. Possible values: **name** - Include only the name field in the response. |
| `page` | `number \| string` | No | Specify the page number for paginated results. |
| `per_page` | `number \| string` | No | Specify the number of Cadence records to retrieve per page. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   cadences?: {
>     summary?: {
>       whatsapp_follow_up_count?: number | null,
>       task_follow_up_count?: number | null,
>       call_follow_up_count?: number | null,
>       email_follow_up_count?: number | null
>     } | null,
>     description?: string | null,
>     created_time?: string | null,
>     module?: {
>       api_name?: string | null,
>       id?: string | null
>     } | null,
>     active?: boolean | null,
>     execution_details?: {
>       unenroll_properties?: {
>         end_date?: string | null,
>         type?: string | null | null
>       } | null,
>       end_date?: string | null,
>       automatic_unenroll?: boolean | null,
>       type?: string | null | null,
>       execute_every?: {
>         period?: string | null,
>         unit?: number | null
>       } | null | null
>     } | null | null,
>     published?: boolean | null,
>     type?: string | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     modified_time?: string | null | null,
>     name?: string | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     id?: string | null,
>     custom_view?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     status?: string | null
>   }[] | null,
>   info?: {
>     per_page?: number | null,
>     count?: number | null,
>     page?: number | null,
>     more_records?: boolean | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### publish

`cadences.publish`

Publish a Cadence. Publishes a draft cadence by merging its follow-up tree, transitions, and triggers into the live cadence, and then clears the draft. If the cadence is being published for the first time, it is promoted from a draft to an inactive published cadence.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.cadences.publish({
	id: '4876876000000333001',
	cadences: [{}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Specify the unique identifier of the Cadence to publish. |
| `cadences` | `object[]` | Yes | Represents the list of Cadences to publish. |

> [accordion] cadences full type
>
> ```ts theme={null}
> (
>   {
>     process_existing_records?: boolean
>   } | null
> )[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `cadences` | `object[] \| null` | No | Represents the list of Cadences with their result status from the operation. |

> [accordion] cadences full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null,
>     follow_ups?: {
>       id?: string | null,
>       action?: {
>         id?: string | null,
>         type?: string | null
>       } | null
>     }[] | null | null,
>     draft_cadence?: {
>       id?: string | null
>     } | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### unenrollRecords

`cadences.unenrollRecords`

Un-enroll Records from Cadences. To manually unenroll records of a supported module from one or more Cadences in your Zoho CRM organization.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.cadences.unenrollRecords({
	module: 'Leads',
	cadences_ids: ['example'],
	ids: ['4876876000000333001'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the API name of the module. Refer to the [Get Modules](modules.yaml#\$.paths./settings/modules.get) resource for valid values. |
| `cadences_ids` | `string[]` | Yes | A list of Cadence IDs to use for the enrollment or un-enrollment operation. |
| `ids` | `string[]` | Yes | Specify the list of record IDs to enroll in or un-enroll from the specified Cadences. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data?: {
>     code?: string | null,
>     details?: {
>       cadences?: {
>         name?: string | null,
>         id?: string | null
>       }[] | null,
>       id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   data?: (
>     {
>       code?: string | null,
>       details?: {
>         cadences?: {
>           name?: string | null,
>           id?: string | null
>         }[] | null,
>         id?: string | null
>       } | null,
>       message?: string | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       details?: {
>         api_name?: string | null,
>         json_path?: string | null
>       } | null,
>       message?: string | null,
>       status?: string | null
>     }
>   )[] | null
> }
> ```

***

### update

`cadences.update`

Cadence. Partial-update form that takes the cadence id from the URL path. Same body shape and semantics as the bulk PUT variant (see PUT /settings/automation/cadences). module / type / custom\_view cannot be changed after creation.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.cadences.update({
	id: '4876876000000333001',
	cadences: [{}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Specify the unique identifier of the Cadence. |
| `cadences` | `object[]` | Yes | Represents the list of Cadences to update. |

> [accordion] cadences full type
>
> ```ts theme={null}
> {
>   id?: string,
>   name?: string,
>   description?: string,
>   execution_details?: {
>     unenroll_properties?: {
>       details?: {
>       } | null,
>       type: automatic_unenroll | end_date | criteria | followup_criteria
>     }[]
>   },
>   follow_ups?: {
>     execute_after?: {
>       unit: number | string,
>       period: minutes | hours | business_hours | days | business_days | months
>     },
>     parent_follow_up?: {
>       reference_id?: string,
>       id?: string
>     },
>     reference_id?: string,
>     id?: string,
>     action?: {
>       id?: string,
>       type: string
>     } | {
>       id?: string,
>       type: string
>     } | {
>       details?: {
>         module: {
>           api_name?: string,
>           id?: string
>         },
>         layout: {
>           id: string,
>           name?: string | null,
>           display_label?: string
>         },
>         field_mappings: (
>           {
>             display_value?: string,
>             field: {
>               api_name: string,
>               id: string
>             },
>             type: static,
>             value: string | string[] | {
>               id: string,
>               name?: string
>             }
>           } | {
>             display_value?: string,
>             field: {
>               api_name: string,
>               id: string
>             },
>             type: merge_field,
>             value: string,
>             allow_agent_user?: boolean
>           } | {
>             display_value?: string,
>             field: {
>               api_name: string,
>               id: string
>             },
>             type: execution_time,
>             value: {
>               period: days | business_days | hours | minutes,
>               unit: string,
>               sign?: plus | minus,
>               trigger_field: string,
>               time?: string,
>               notify_type?: popup | email | emailandpopup
>             }
>           } | {
>             display_value?: string,
>             field: {
>               api_name: string,
>               id: string
>             },
>             type: composite,
>             value: {
>             }
>           }
>         )[],
>         apply_restriction?: boolean | null,
>         id?: string
>       },
>       id?: string,
>       type: string
>     } | {
>       id?: string,
>       type: string
>     },
>     triggers?: string[]
>   }[]
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `cadences` | `object[] \| null` | No | Represents the list of Cadences with their result status from the operation. |

> [accordion] cadences full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null,
>     follow_ups?: {
>       id?: string | null,
>       action?: {
>         id?: string | null,
>         type?: string | null
>       } | null
>     }[] | null | null,
>     draft_cadence?: {
>       id?: string | null
>     } | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### updateMany

`cadences.updateMany`

Update multiple Cadences (bulk form). Partial-update form that takes the cadence id inside the request body (cadences\[0].id). Updates only the provided fields; module / type / custom\_view cannot be changed after creation. Editing a currently-published cadence creates a draft on the first save.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.cadences.updateMany({
	cadences: [{}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `cadences` | `object[]` | Yes | Represents the list of Cadences to update. |

> [accordion] cadences full type
>
> ```ts theme={null}
> {
>   id?: string,
>   name?: string,
>   description?: string,
>   execution_details?: {
>     unenroll_properties?: {
>       details?: {
>       } | null,
>       type: automatic_unenroll | end_date | criteria | followup_criteria
>     }[]
>   },
>   follow_ups?: {
>     execute_after?: {
>       unit: number | string,
>       period: minutes | hours | business_hours | days | business_days | months
>     },
>     parent_follow_up?: {
>       reference_id?: string,
>       id?: string
>     },
>     reference_id?: string,
>     id?: string,
>     action?: {
>       id?: string,
>       type: string
>     } | {
>       id?: string,
>       type: string
>     } | {
>       details?: {
>         module: {
>           api_name?: string,
>           id?: string
>         },
>         layout: {
>           id: string,
>           name?: string | null,
>           display_label?: string
>         },
>         field_mappings: (
>           {
>             display_value?: string,
>             field: {
>               api_name: string,
>               id: string
>             },
>             type: static,
>             value: string | string[] | {
>               id: string,
>               name?: string
>             }
>           } | {
>             display_value?: string,
>             field: {
>               api_name: string,
>               id: string
>             },
>             type: merge_field,
>             value: string,
>             allow_agent_user?: boolean
>           } | {
>             display_value?: string,
>             field: {
>               api_name: string,
>               id: string
>             },
>             type: execution_time,
>             value: {
>               period: days | business_days | hours | minutes,
>               unit: string,
>               sign?: plus | minus,
>               trigger_field: string,
>               time?: string,
>               notify_type?: popup | email | emailandpopup
>             }
>           } | {
>             display_value?: string,
>             field: {
>               api_name: string,
>               id: string
>             },
>             type: composite,
>             value: {
>             }
>           }
>         )[],
>         apply_restriction?: boolean | null,
>         id?: string
>       },
>       id?: string,
>       type: string
>     } | {
>       id?: string,
>       type: string
>     },
>     triggers?: string[]
>   }[]
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `cadences` | `object[] \| null` | No | Represents the list of Cadences with their result status from the operation. |

> [accordion] cadences full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null,
>     follow_ups?: {
>       id?: string | null,
>       action?: {
>         id?: string | null,
>         type?: string | null
>       } | null
>     }[] | null | null,
>     draft_cadence?: {
>       id?: string | null
>     } | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

## Call Preferences

### get

`callPreferences.get`

Call Preferences. To retrieve the current Call Preferences configuration for your Zoho CRM organization. The response reports whether the From Number and To Number fields are currently enabled on records in the Calls module.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.callPreferences.get({});
```

**Input:** *empty object*

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   call_preferences?: {
>     show_from_number?: boolean | null,
>     show_to_number?: boolean | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### update

`callPreferences.update`

Call Preferences. To update the Call Preferences configuration for your Zoho CRM organization by enabling or disabling the From Number and To Number fields on records in the Calls module.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.callPreferences.update({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `call_preferences` | `object` | No | Specify the new visibility setting for one or both Call Preferences. Omit a preference from the object to leave its current setting unchanged. |

> [accordion] call\_preferences full type
>
> ```ts theme={null}
> {
>   show_from_number?: boolean,
>   show_to_number?: boolean
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `call_preferences` | `object \| null` | No | Contains the update result for the Call Preferences configuration, including the result code, status, and message. |

> [accordion] call\_preferences full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   message?: string | null,
>   status?: string | null,
>   details?: {
>   } | null
> } | null
> ```

***

## Composite Requests

### execute

`compositeRequests.execute`

Process multiple API requests in a single call. To bundle multiple Zoho CRM API requests into a single HTTP call, reducing network round-trips and enabling request chaining. You can reference the output of one sub-request in another using the format @\{sub\_request\_id:JSONPath} to build dependent workflows. Runs up to five API calls in one request, writes and deletes included.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.compositeRequests.execute({
	__composite_requests: [{ method: 'GET', uri: '/crm/v8/Leads' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `rollback_on_fail` | `boolean` | No | Specify whether to rollback the composite API request if any of the sub-requests fail. The default value is false. Possible values: **true** - Rollback all operations if any sub-request fails. Workflow automation actions execute only after all sub-requests succeed. **false** - Process each sub-request independently without rollback. This key cannot be **true** when **parallel\_execution** is **true**. |
| `parallel_execution` | `boolean` | No | Specify whether to process all independent sub-requests (sub-requests with no dependencies/references) in parallel. The default value is true. If "rollback\_on\_fail" is true, then the default value of this key is false. Possible values: **true** - Execute independent sub-requests in parallel. **false** - Execute sub-requests sequentially. This key cannot be **true** when **rollback\_on\_fail** is **true**. |
| `__composite_requests` | `object[]` | Yes | Specify the API requests to execute as sub-requests within the composite call. |

> [accordion] \_\_composite\_requests full type
>
> ```ts theme={null}
> {
>   method: GET | POST | PUT | DELETE | PATCH,
>   uri: string,
>   sub_request_id?: string,
>   headers?: {
>   },
>   params?: {
>   },
>   body?: {
>   }
> }[]
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   __composite_requests?: {
>     code?: string | null,
>     message?: string | null,
>     status?: string | null,
>     details?: {
>       response?: {
>         headers?: {
>         } | null,
>         body?: {
>         } | null,
>         status_code?: number | null
>       } | null
>     } | null
>   }[] | null
> } | {
>   __composite_requests?: {
>   }[] | null
> }
> ```

***

## Contact Roles

### create

`contactRoles.create`

Create Contact Roles. Creates one or more contact roles in your Zoho CRM organization.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.contactRoles.create({
	contact_roles: [{ name: 'example', sequence_number: 1 }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `contact_roles` | `object[]` | Yes | Specify the list of contact roles to create. |

> [accordion] contact\_roles full type
>
> ```ts theme={null}
> {
>   name: string,
>   sequence_number: number
> }[]
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   contact_roles?: {
>     code?: string | null,
>     details?: {
>       id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   contact_roles?: any & any | null
> }
> ```

***

### delete

`contactRoles.delete`

Delete a Contact Role. Deletes a specific contact role by its unique identifier in your Zoho CRM organization. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.contactRoles.delete({ role: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `role` | `string` | Yes | Specify the unique identifier of the contact role. Use the [List Contact Roles](contact_roles.yaml#\$.paths./contacts/roles.get) resource to retrieve contact role IDs. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `contact_roles` | `object[] \| null` | No | Contains the deletion results for the contact role. |

> [accordion] contact\_roles full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### deleteMany

`contactRoles.deleteMany`

Delete Contact Roles. Deletes one or more contact roles by their unique identifiers in your Zoho CRM organization. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.contactRoles.deleteMany({ ids: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `ids` | `string` | Yes | Specify a comma-separated list of contact role IDs to delete. Use the [List Contact Roles](contact_roles.yaml#\$.paths./contacts/roles.get) resource to retrieve contact role IDs. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `contact_roles` | `object[] \| null` | No | Contains the deletion results for each contact role in the request. |

> [accordion] contact\_roles full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### get

`contactRoles.get`

Get a Contact Role. Retrieves the details of a specific contact role by its unique identifier in your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.contactRoles.get({ role: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `role` | `string` | Yes | Specify the unique identifier of the contact role. Use the [List Contact Roles](contact_roles.yaml#\$.paths./contacts/roles.get) resource to retrieve contact role IDs. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   contact_roles?: {
>     name?: string | null,
>     id?: string | null,
>     sequence_number?: number | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### list

`contactRoles.list`

List Contact Roles. Retrieves the list of contact roles available in your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.contactRoles.list({});
```

**Input:** *empty object*

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   contact_roles?: {
>     name?: string | null,
>     id?: string | null,
>     sequence_number?: number | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### update

`contactRoles.update`

Update a Contact Role. Updates a specific contact role by its unique identifier in your Zoho CRM organization.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.contactRoles.update({
	role: 'example',
	contact_roles: [{ name: 'example' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `role` | `string` | Yes | Specify the unique identifier of the contact role. Use the [List Contact Roles](contact_roles.yaml#\$.paths./contacts/roles.get) resource to retrieve contact role IDs. |
| `contact_roles` | `object[]` | Yes | Specify the list of contact roles to update. |

> [accordion] contact\_roles full type
>
> ```ts theme={null}
> {
>   name: string,
>   sequence_number?: number | string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `contact_roles` | `object[] \| null` | No | Contains the update result for the specified contact role. |

> [accordion] contact\_roles full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### updateMany

`contactRoles.updateMany`

Update Contact Roles. Updates the properties of one or more existing contact roles in your Zoho CRM organization.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.contactRoles.updateMany({
	contact_roles: [{ name: 'example', id: '4876876000000333001' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `contact_roles` | `object[]` | Yes | Specify the list of contact roles to update. |

> [accordion] contact\_roles full type
>
> ```ts theme={null}
> {
>   name: string,
>   id: string,
>   sequence_number?: number
> }[]
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   contact_roles?: {
>     code?: string | null,
>     details?: {
>       id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   contact_roles?: any & any | null
> }
> ```

***

## Coql

### query

`coql.query`

Retrieve records using a COQL query. To retrieve records from one or more Zoho CRM modules using a COQL SELECT query, with support for cross-module joins, aggregate functions, and flexible filtering. select\_query is a COQL statement such as "select Last\_Name from Leads where Last\_Name is not null limit 10". Every WHERE clause needs at least one condition.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.coql.query({ select_query: 'select Last_Name, Email from Leads where Last_Name is not null limit 10' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `select_query` | `string` | Yes | Specify the COQL SELECT query to retrieve records. The query must reference module and field API names. |
| `include_meta` | `string[]` | No | Specify the list of metadata types to include in the response. Possible values: **fields** - Includes field metadata for the SELECT columns in the response. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data?: {
>   }[] | null,
>   info?: {
>     count?: number | null,
>     more_records?: boolean | null
>   } | null,
>   fields?: Record<string, {
>     associated_module?: {
>       module?: string | null,
>       id?: string | null
>     } | null | null,
>     webhook?: boolean | null,
>     operation_type?: {
>       web_update?: boolean | null,
>       api_create?: boolean | null,
>       web_create?: boolean | null,
>       api_update?: boolean | null
>     } | null,
>     colour_code_enabled_by_system?: boolean | null,
>     field_label?: string | null,
>     tooltip?: {
>       name?: string | null,
>       value?: string | null
>     } | null | null,
>     display_format_properties?: {
>       split?: number | null,
>       radio_display_type?: string | null
>     } | null | null,
>     type?: string | null,
>     field_read_only?: boolean | null,
>     customizable_properties?: string[] | null | null,
>     display_label?: string | null,
>     read_only?: boolean | null,
>     association_details?: {
>       related_field?: {
>         api_name?: string | null,
>         id?: string | null
>       } | null,
>       lookup_field?: {
>         api_name?: string | null,
>         id?: string | null
>       } | null
>     } | null | null,
>     multi_module_lookup?: {
>       display_label?: string | null,
>       api_name?: string | null,
>       modules?: {
>         api_name?: string | null,
>         module_name?: string | null,
>         id?: string | null
>       }[] | null
>     } | null | null,
>     id?: string | null,
>     created_time?: string | null | null,
>     filterable?: boolean | null,
>     visible?: boolean | null,
>     view_type?: {
>       view?: boolean | null,
>       edit?: boolean | null,
>       quick_create?: boolean | null,
>       create?: boolean | null
>     } | null,
>     separator?: boolean | null,
>     searchable?: boolean | null,
>     history_tracking_enabled?: boolean | null,
>     external?: {
>       show?: boolean | null,
>       type?: string | null
>     } | null | null,
>     api_name?: string | null,
>     parent_field?: {
>       api_name?: string | null,
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     unique?: {
>       case_sensitive?: boolean | null
>     } | null,
>     enable_colour_code?: boolean | null,
>     child_fields?: {
>       sequence_number?: number | null,
>       field?: {
>         api_name?: string | null,
>         name?: string | null,
>         id?: string | null
>       } | null
>     }[] | null | null,
>     pick_list_values?: {
>       display_value?: string | null,
>       sequence_number?: number | null,
>       reference_value?: string | null,
>       colour_code?: string | null,
>       actual_value?: string | null,
>       id?: string | null,
>       type?: string | null
>     }[] | null | null,
>     system_mandatory?: boolean | null,
>     private?: {
>       restricted?: boolean | null,
>       type?: string | null,
>       export?: boolean | null
>     } | null | null,
>     virtual_field?: boolean | null,
>     json_type?: string | null,
>     crypt?: {
>       mode?: string | null,
>       encrypt_case?: string | null | null,
>       status?: number | null
>     } | null | null,
>     range?: {
>       from?: number | null,
>       to?: number | null
>     } | null | null,
>     created_source?: string | null,
>     display_type?: number | null,
>     ui_type?: number | null,
>     modified_time?: string | null | null,
>     public?: boolean | null,
>     email_parser?: {
>       fields_update_supported?: boolean | null,
>       record_operations_supported?: boolean | null
>     } | null,
>     currency?: {
>       rounding_option?: string | null,
>       precision?: number | null
>     } | null | null,
>     custom_field?: boolean | null,
>     lookup?: {
>       display_label?: string | null,
>       revalidate_filter_during_edit?: boolean | null,
>       api_name?: string | null,
>       module?: {
>         api_name?: string | null,
>         crypt?: boolean | null,
>         id?: string | null
>       } | null,
>       id?: string | null,
>       query_details?: {
>         system_query_id?: string | null | null,
>         query_id?: string | null
>       } | null
>     } | null | null,
>     hipaa_compliance?: {
>       restricted_in_export?: boolean | null,
>       restricted?: boolean | null
>     } | null | null,
>     convert_mapping?: {
>       Contacts?: string | null | null,
>       Deals?: string | null | null,
>       Accounts?: string | null | null
>     } | null,
>     address?: {
>       type?: string | null
>     } | null | null,
>     rollup_summary?: {
>       return_type?: string | null,
>       expression?: {
>         function_parameters?: {
>           api_name?: string | null
>         }[] | null,
>         criteria?: {
>           comparator?: string | null,
>           field?: {
>             api_name?: string | null,
>             id?: string | null
>           } | null,
>           type?: string | null,
>           value?: string | null
>         } | null | null,
>         function?: string | null
>       } | null,
>       based_on_module?: {
>         api_name?: string | null,
>         id?: string | null
>       } | null,
>       related_list?: {
>         api_name?: string | null,
>         id?: string | null
>       } | null,
>       rollup_based_on?: string | null
>     } | null | null,
>     length?: number | null,
>     column_name?: string | null,
>     display_field?: boolean | null,
>     pick_list_values_sorted_lexically?: boolean | null,
>     sortable?: boolean | null,
>     global_picklist?: {
>       api_name?: string | null,
>       id?: string | null
>     } | null | null,
>     display_format?: string | null | null,
>     history_tracking?: {
>       related_list_name?: string | null,
>       module?: {
>         api_name?: string | null,
>         id?: string | null
>       } | null,
>       duration_configured_field?: {
>         api_name?: string | null,
>         id?: string | null
>       } | null,
>       duration_configuration?: string | null,
>       followed_fields?: {
>         api_name?: string | null,
>         id?: string | null
>       }[] | null
>     } | null | null,
>     data_type?: string | null,
>     formula?: {
>       return_type?: string | null,
>       sub_return_type?: string | null,
>       dynamic?: boolean | null,
>       stop_compute_conditionally?: boolean | null,
>       assume_default?: boolean | null
>     } | null | null,
>     additional_column?: string | null | null,
>     decimal_place?: number | null | null,
>     multiselectlookup?: {
>       linking_details?: {
>         module?: {
>           visibility?: number | null,
>           plural_label?: string | null,
>           api_name?: string | null,
>           id?: string | null
>         } | null,
>         lookup_field?: {
>           api_name?: string | null,
>           field_label?: string | null,
>           id?: string | null
>         } | null,
>         connected_lookup_field?: {
>           api_name?: string | null,
>           field_label?: string | null,
>           id?: string | null
>         } | null
>       } | null,
>       connected_details?: {
>         field?: {
>           api_name?: string | null,
>           field_label?: string | null,
>           id?: string | null
>         } | null,
>         module?: {
>           plural_label?: string | null,
>           api_name?: string | null,
>           id?: string | null
>         } | null,
>         layouts?: {
>           api_name?: string | null,
>           id?: string | null
>         }[] | null
>       } | null,
>       related_list?: {
>         display_label?: string | null,
>         api_name?: string | null,
>         id?: string | null
>       } | null
>     } | null | null,
>     auto_number?: {
>       starting_number_length?: number | null,
>       prefix?: string | null,
>       start_number?: number | null,
>       suffix?: string | null
>     } | null | null,
>     layout_associations?: {
>       api_name?: string | null,
>       name?: string | null,
>       id?: string | null
>     }[] | null,
>     quick_sequence_number?: string | null,
>     blueprint_supported?: boolean | null,
>     textarea?: {
>       type?: string | null
>     } | null,
>     sharing_properties?: {
>       scheduler_status?: string | null,
>       share_permission?: string | null,
>       share_preference_enabled?: boolean | null
>     } | null,
>     multiuserlookup?: {
>       linking_details?: {
>         module?: {
>           plural_label?: string | null,
>           api_name?: string | null,
>           id?: string | null
>         } | null,
>         lookup_field?: {
>           api_name?: string | null,
>           field_label?: string | null,
>           id?: string | null
>         } | null,
>         connected_lookup_field?: {
>           api_name?: string | null,
>           field_label?: string | null,
>           id?: string | null
>         } | null
>       } | null,
>       record_access?: boolean | null
>     } | null,
>     table_name?: string | null,
>     required?: boolean | null,
>     refer_from_field?: {
>       api_name?: string | null,
>       id?: string | null
>     } | null | null,
>     default_value?: any | null,
>     lucene_colname?: string | null,
>     generated_type?: number | null
>   }> | null
> } | {
>   success: true
> }
> ```

***

## Currencies

### create

`currencies.create`

Create currencies. Creates one or more new currencies for the organization.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.currencies.create({
	currencies: [{ exchange_rate: '1.5', iso_code: 'exa' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `currencies` | `object[]` | Yes | List of currencies to add to the organization. Supports up to 180 currencies per request. |

> [accordion] currencies full type
>
> ```ts theme={null}
> {
>   format?: {
>     numeral_system?: Indian | International,
>     decimal_places?: 0 | 2 | 3 | 4 | 5 | 6,
>     decimal_separator?: Comma | Period,
>     thousand_separator?: Comma | Period | Space
>   },
>   exchange_rate: string,
>   is_active?: boolean,
>   exchange_rate_auto_update?: boolean,
>   iso_code: string,
>   symbol?: string,
>   name?: string
> }[]
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   currencies?: {
>     code?: string | null,
>     message?: string | null,
>     details?: {
>       id?: string | null
>     } | null,
>     status?: string | null
>   }[] | null
> } | {
>   currencies?: any & any | null
> }
> ```

***

### enableMultiCurrency

`currencies.enableMultiCurrency`

Enable multi-currency. for the organization and set the base currency. Turns multi-currency on for good and fixes the home currency; Zoho cannot turn it off again.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.currencies.enableMultiCurrency({
	base_currency: { iso_code: 'exa', exchange_rate: '1.5' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `base_currency` | `object` | Yes | Represents the base currency information required for initializing multi-currency settings in the CRM. |

> [accordion] base\_currency full type
>
> ```ts theme={null}
> {
>   prefix_symbol?: boolean,
>   iso_code: string,
>   symbol?: string,
>   exchange_rate: string,
>   format?: {
>     numeral_system?: Indian | International,
>     decimal_places?: 0 | 2 | 3 | 4 | 5 | 6,
>     decimal_separator?: Comma | Period,
>     thousand_separator?: Comma | Period | Space
>   },
>   name?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `base_currency` | `object \| null` | No | Success response object. |

> [accordion] base\_currency full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> } | null
> ```

***

### get

`currencies.get`

Specific Currency. Retrieves details of a specific currency via its unique currency ID.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.currencies.get({ currency: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `currency` | `string` | Yes | Path parameter identifying the currency ID. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   currencies?: {
>     prefix_symbol?: boolean | null,
>     format?: {
>       numeral_system?: string | null,
>       decimal_places?: string | null,
>       decimal_separator?: string | null,
>       thousand_separator?: string | null
>     } | null,
>     exchange_rate?: string | null,
>     is_active?: boolean | null,
>     exchange_rate_auto_update?: boolean | null,
>     iso_code?: string | null,
>     symbol?: string | null,
>     name?: string | null,
>     is_base?: boolean | null,
>     id?: string | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     modified_time?: string | null,
>     created_time?: string | null,
>     exchange_rate_updated_time?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### list

`currencies.list`

List currencies. Retrieves all added currencies in the organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.currencies.list({});
```

**Input:** *empty object*

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   currencies?: {
>     prefix_symbol?: boolean | null,
>     format?: {
>       numeral_system?: string | null,
>       decimal_places?: string | null,
>       decimal_separator?: string | null,
>       thousand_separator?: string | null
>     } | null,
>     exchange_rate?: string | null,
>     is_active?: boolean | null,
>     exchange_rate_auto_update?: boolean | null,
>     iso_code?: string | null,
>     symbol?: string | null,
>     name?: string | null,
>     is_base?: boolean | null,
>     id?: string | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     modified_time?: string | null,
>     created_time?: string | null,
>     exchange_rate_updated_time?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### update

`currencies.update`

Currency. Update a specific currency by its unique ID.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.currencies.update({
	currency: 'example',
	currencies: [{}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `currency` | `string` | Yes | Path parameter identifying the currency ID. |
| `currencies` | `object[]` | Yes | List of currencies to update (single-element array expected). |

> [accordion] currencies full type
>
> ```ts theme={null}
> {
>   format?: {
>     numeral_system?: Indian | International,
>     decimal_places?: 0 | 2 | 3 | 4 | 5 | 6,
>     decimal_separator?: Comma | Period,
>     thousand_separator?: Comma | Period | Space
>   },
>   exchange_rate?: string,
>   is_active?: boolean,
>   exchange_rate_auto_update?: boolean
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `currencies` | `object[] \| null` | No | List of updated currency responses. |

> [accordion] currencies full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   message?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   status?: string | null
> }[] | null
> ```

***

### updateBase

`currencies.updateBase`

Update base currency. Update existing base currency details.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.currencies.updateBase({
	base_currency: { id: '4876876000000333001' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `base_currency` | `object` | Yes | JSON object containing the updated base currency values. |

> [accordion] base\_currency full type
>
> ```ts theme={null}
> {
>   iso_code?: string,
>   symbol?: string,
>   exchange_rate?: string,
>   format?: {
>     numeral_system?: Indian | International,
>     decimal_places?: 0 | 2 | 3 | 4 | 5 | 6,
>     decimal_separator?: Comma | Period,
>     thousand_separator?: Comma | Period | Space
>   },
>   name?: string,
>   id: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `base_currency` | `object \| null` | No | Result of base currency update |

> [accordion] base\_currency full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   message?: string | null,
>   status?: string | null,
>   details?: {
>     id?: string | null
>   } | null
> } | null
> ```

***

### updateMany

`currencies.updateMany`

Update currencies. Updates one or more currencies other than the base currency.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.currencies.updateMany({
	currencies: [{ id: '4876876000000333001' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `currencies` | `object[]` | Yes | List of currencies to be updated. |

> [accordion] currencies full type
>
> ```ts theme={null}
> {
>   id: string,
>   format?: {
>     numeral_system?: Indian | International,
>     decimal_places?: 0 | 2 | 3 | 4 | 5 | 6,
>     decimal_separator?: Comma | Period,
>     thousand_separator?: Comma | Period | Space
>   },
>   exchange_rate?: string,
>   is_active?: boolean,
>   exchange_rate_auto_update?: boolean,
>   iso_code?: string,
>   symbol?: string,
>   name?: string
> }[]
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   currencies?: {
>     code?: string | null,
>     message?: string | null,
>     details?: {
>       id?: string | null
>     } | null,
>     status?: string | null
>   }[] | null
> } | {
>   currencies?: any & any | null
> }
> ```

***

## Custom Views

### changeSort

`customViews.changeSort`

Sort Order by ID. To change the sort field and sort order for a specific Custom View in the specified module of your Zoho CRM organization. Use the Get Custom Views Metadata API to retrieve the custom view IDs.".

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.customViews.changeSort({
	module: 'Leads',
	id: '4876876000000333001',
	custom_views: [{
		sort_by: {},
		sort_order: 'asc',
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the API name of the module for which to manage Custom Views. Refer to the Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve module IDs.resource for valid values. |
| `id` | `string` | Yes | Specify the unique ID of the Custom View. Use the [Get Custom View API](custom_views.yaml#\$.paths./settings/custom_views.get) to retrieve the custom view IDs. |
| `custom_views` | `object[]` | Yes | Specify the sort order configuration to apply to the Custom View. |

> [accordion] custom\_views full type
>
> ```ts theme={null}
> {
>   sort_by: {
>     api_name?: string | null,
>     id?: string | null
>   },
>   sort_order: asc | desc,
>   id?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `custom_views` | `object[] \| null` | No | Represents the list of Custom View update success items. |

> [accordion] custom\_views full type
>
> ```ts theme={null}
> {
>   status?: string | null,
>   code?: string | null,
>   message?: string | null,
>   details?: {
>     id?: string | null
>   } | null
> }[] | null
> ```

***

### changeSortMany

`customViews.changeSortMany`

Sort Order. To change the sort field and sort order for one or more Custom Views in the specified module of your Zoho CRM organization.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.customViews.changeSortMany({
	module: 'Leads',
	custom_views: [{
		id: '4876876000000333001',
		sort_by: {},
		sort_order: 'asc',
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the API name of the module for which to manage Custom Views. Refer to the Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve module IDs.resource for valid values. |
| `custom_views` | `object[]` | Yes | Specify the list of Custom Views for which to update the sort order. |

> [accordion] custom\_views full type
>
> ```ts theme={null}
> {
>   sort_by: {
>     api_name?: string | null,
>     id?: string | null
>   },
>   sort_order: asc | desc,
>   id: string
> }[]
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   custom_views?: {
>     status?: string | null,
>     code?: string | null,
>     message?: string | null,
>     details?: {
>       id?: string | null
>     } | null
>   }[] | null
> } | {
>   custom_views?: any & any | null
> }
> ```

***

### create

`customViews.create`

CustomView creation. To create one or more Custom Views for a specified module in your Zoho CRM organization.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.customViews.create({
	module: 'Leads',
	custom_views: [{
		name: 'example',
		access_type: 'shared',
		fields: [{}],
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the API name of the module for which to manage Custom Views. Refer to the Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve module IDs.resource for valid values. |
| `custom_views` | `object[]` | Yes | Specify the list of Custom Views to create. |

> [accordion] custom\_views full type
>
> ```ts theme={null}
> {
>   name: string,
>   access_type: shared | public | only_to_me,
>   category?: public_views | other_users_views | shared_with_me | created_by_me,
>   locked?: boolean,
>   favorite?: number | string | null,
>   criteria?: {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: string,
>     value: (string | number | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     })[] | string | number | boolean | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     } | ${
>       EMPTY
>     } | ${
>       NOTEMPTY
>     } | ${
>       TODAY
>     } | ${
>       TOMORROW
>     } | ${
>       TOMORROWPLUS
>     } | ${
>       YESTERDAY
>     } | ${
>       YESTERDAYMINUS
>     } | ${
>       LASTMONTH
>     } | ${
>       THISMONTH
>     } | ${
>       NEXTMONTH
>     } | ${
>       LASTWEEK
>     } | ${
>       THISWEEK
>     } | ${
>       NEXTWEEK
>     } | ${
>       THISYEAR
>     } | ${
>       THISFY
>     } | ${
>       THISFQ
>     } | ${
>       LASTYEAR
>     } | ${
>       PREVFY
>     } | ${
>       PREVFQ
>     } | ${
>       NEXTYEAR
>     } | ${
>       NEXTFY
>     } | ${
>       NEXTFQ
>     } | ${
>       EMPTY
>     } | ${
>       NOTEMPTY
>     } | string | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: string,
>     value: (string | number | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     })[] | string | number | boolean | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     } | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>     value: string[] | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: less_than | less_equal | greater_than | greater_equal,
>     value: string | number | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: between | not_between,
>     value: (string | number)[],
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: in | not_in,
>     value: (string | number)[],
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: include_all | include_any | exclude_all | exclude_any,
>     value: {
>       id: string & any,
>       name?: string
>     }[],
>     type?: merge_field | pre_defined | value | field
>   } | {
>     group: (
>       {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: string,
>         value: (string | number | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         })[] | string | number | boolean | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         } | ${
>           EMPTY
>         } | ${
>           NOTEMPTY
>         } | ${
>           TODAY
>         } | ${
>           TOMORROW
>         } | ${
>           TOMORROWPLUS
>         } | ${
>           YESTERDAY
>         } | ${
>           YESTERDAYMINUS
>         } | ${
>           LASTMONTH
>         } | ${
>           THISMONTH
>         } | ${
>           NEXTMONTH
>         } | ${
>           LASTWEEK
>         } | ${
>           THISWEEK
>         } | ${
>           NEXTWEEK
>         } | ${
>           THISYEAR
>         } | ${
>           THISFY
>         } | ${
>           THISFQ
>         } | ${
>           LASTYEAR
>         } | ${
>           PREVFY
>         } | ${
>           PREVFQ
>         } | ${
>           NEXTYEAR
>         } | ${
>           NEXTFY
>         } | ${
>           NEXTFQ
>         } | ${
>           EMPTY
>         } | ${
>           NOTEMPTY
>         } | string | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: string,
>         value: (string | number | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         })[] | string | number | boolean | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         } | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>         value: string[] | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: less_than | less_equal | greater_than | greater_equal,
>         value: string | number | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: between | not_between,
>         value: (string | number)[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: in | not_in,
>         value: (string | number)[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: include_all | include_any | exclude_all | exclude_any,
>         value: {
>           id: string & any,
>           name?: string
>         }[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         group: (
>           {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: string,
>             value: (string | number | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             })[] | string | number | boolean | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             } | ${
>               EMPTY
>             } | ${
>               NOTEMPTY
>             } | ${
>               TODAY
>             } | ${
>               TOMORROW
>             } | ${
>               TOMORROWPLUS
>             } | ${
>               YESTERDAY
>             } | ${
>               YESTERDAYMINUS
>             } | ${
>               LASTMONTH
>             } | ${
>               THISMONTH
>             } | ${
>               NEXTMONTH
>             } | ${
>               LASTWEEK
>             } | ${
>               THISWEEK
>             } | ${
>               NEXTWEEK
>             } | ${
>               THISYEAR
>             } | ${
>               THISFY
>             } | ${
>               THISFQ
>             } | ${
>               LASTYEAR
>             } | ${
>               PREVFY
>             } | ${
>               PREVFQ
>             } | ${
>               NEXTYEAR
>             } | ${
>               NEXTFY
>             } | ${
>               NEXTFQ
>             } | ${
>               EMPTY
>             } | ${
>               NOTEMPTY
>             } | string | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: string,
>             value: (string | number | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             })[] | string | number | boolean | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             } | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>             value: string[] | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: less_than | less_equal | greater_than | greater_equal,
>             value: string | number | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: between | not_between,
>             value: (string | number)[],
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: in | not_in,
>             value: (string | number)[],
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: include_all | include_any | exclude_all | exclude_any,
>             value: {
>               id: string & any,
>               name?: string
>             }[],
>             type?: merge_field | pre_defined | value | field
>           } | (recursive)
>         )[],
>         group_operator: AND | OR | and | or
>       }
>     )[],
>     group_operator: AND | OR | and | or
>   } | null,
>   cross_filters?: {
>     include_objects: boolean,
>     relation: {
>       api_name: string,
>       id?: string,
>       $disrupted?: boolean
>     },
>     criteria: {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: string,
>       value: (string | number | {
>         id: string & any,
>         name?: string
>       } | {
>         name: string
>       } | {
>         id: string,
>         name?: string
>       })[] | string | number | boolean | {
>         id: string & any,
>         name?: string
>       } | {
>         name: string
>       } | {
>         id: string,
>         name?: string
>       } | ${
>         EMPTY
>       } | ${
>         NOTEMPTY
>       } | ${
>         TODAY
>       } | ${
>         TOMORROW
>       } | ${
>         TOMORROWPLUS
>       } | ${
>         YESTERDAY
>       } | ${
>         YESTERDAYMINUS
>       } | ${
>         LASTMONTH
>       } | ${
>         THISMONTH
>       } | ${
>         NEXTMONTH
>       } | ${
>         LASTWEEK
>       } | ${
>         THISWEEK
>       } | ${
>         NEXTWEEK
>       } | ${
>         THISYEAR
>       } | ${
>         THISFY
>       } | ${
>         THISFQ
>       } | ${
>         LASTYEAR
>       } | ${
>         PREVFY
>       } | ${
>         PREVFQ
>       } | ${
>         NEXTYEAR
>       } | ${
>         NEXTFY
>       } | ${
>         NEXTFQ
>       } | ${
>         EMPTY
>       } | ${
>         NOTEMPTY
>       } | string | string,
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: string,
>       value: (string | number | {
>         id: string & any,
>         name?: string
>       } | {
>         name: string
>       } | {
>         id: string,
>         name?: string
>       })[] | string | number | boolean | {
>         id: string & any,
>         name?: string
>       } | {
>         name: string
>       } | {
>         id: string,
>         name?: string
>       } | string,
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>       value: string[] | string,
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: less_than | less_equal | greater_than | greater_equal,
>       value: string | number | string,
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: between | not_between,
>       value: (string | number)[],
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: in | not_in,
>       value: (string | number)[],
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: include_all | include_any | exclude_all | exclude_any,
>       value: {
>         id: string & any,
>         name?: string
>       }[],
>       type?: merge_field | pre_defined | value | field
>     } | {
>       group: (
>         {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: string,
>           value: (string | number | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           })[] | string | number | boolean | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           } | ${
>             EMPTY
>           } | ${
>             NOTEMPTY
>           } | ${
>             TODAY
>           } | ${
>             TOMORROW
>           } | ${
>             TOMORROWPLUS
>           } | ${
>             YESTERDAY
>           } | ${
>             YESTERDAYMINUS
>           } | ${
>             LASTMONTH
>           } | ${
>             THISMONTH
>           } | ${
>             NEXTMONTH
>           } | ${
>             LASTWEEK
>           } | ${
>             THISWEEK
>           } | ${
>             NEXTWEEK
>           } | ${
>             THISYEAR
>           } | ${
>             THISFY
>           } | ${
>             THISFQ
>           } | ${
>             LASTYEAR
>           } | ${
>             PREVFY
>           } | ${
>             PREVFQ
>           } | ${
>             NEXTYEAR
>           } | ${
>             NEXTFY
>           } | ${
>             NEXTFQ
>           } | ${
>             EMPTY
>           } | ${
>             NOTEMPTY
>           } | string | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: string,
>           value: (string | number | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           })[] | string | number | boolean | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           } | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>           value: string[] | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: less_than | less_equal | greater_than | greater_equal,
>           value: string | number | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: between | not_between,
>           value: (string | number)[],
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: in | not_in,
>           value: (string | number)[],
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: include_all | include_any | exclude_all | exclude_any,
>           value: {
>             id: string & any,
>             name?: string
>           }[],
>           type?: merge_field | pre_defined | value | field
>         } | {
>           group: (
>             {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: string,
>               value: (string | number | {
>                 id: string & any,
>                 name?: string
>               } | {
>                 name: string
>               } | {
>                 id: string,
>                 name?: string
>               })[] | string | number | boolean | {
>                 id: string & any,
>                 name?: string
>               } | {
>                 name: string
>               } | {
>                 id: string,
>                 name?: string
>               } | ${
>                 EMPTY
>               } | ${
>                 NOTEMPTY
>               } | ${
>                 TODAY
>               } | ${
>                 TOMORROW
>               } | ${
>                 TOMORROWPLUS
>               } | ${
>                 YESTERDAY
>               } | ${
>                 YESTERDAYMINUS
>               } | ${
>                 LASTMONTH
>               } | ${
>                 THISMONTH
>               } | ${
>                 NEXTMONTH
>               } | ${
>                 LASTWEEK
>               } | ${
>                 THISWEEK
>               } | ${
>                 NEXTWEEK
>               } | ${
>                 THISYEAR
>               } | ${
>                 THISFY
>               } | ${
>                 THISFQ
>               } | ${
>                 LASTYEAR
>               } | ${
>                 PREVFY
>               } | ${
>                 PREVFQ
>               } | ${
>                 NEXTYEAR
>               } | ${
>                 NEXTFY
>               } | ${
>                 NEXTFQ
>               } | ${
>                 EMPTY
>               } | ${
>                 NOTEMPTY
>               } | string | string,
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: string,
>               value: (string | number | {
>                 id: string & any,
>                 name?: string
>               } | {
>                 name: string
>               } | {
>                 id: string,
>                 name?: string
>               })[] | string | number | boolean | {
>                 id: string & any,
>                 name?: string
>               } | {
>                 name: string
>               } | {
>                 id: string,
>                 name?: string
>               } | string,
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>               value: string[] | string,
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: less_than | less_equal | greater_than | greater_equal,
>               value: string | number | string,
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: between | not_between,
>               value: (string | number)[],
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: in | not_in,
>               value: (string | number)[],
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: include_all | include_any | exclude_all | exclude_any,
>               value: {
>                 id: string & any,
>                 name?: string
>               }[],
>               type?: merge_field | pre_defined | value | field
>             } | (recursive)
>           )[],
>           group_operator: AND | OR | and | or
>         }
>       )[],
>       group_operator: AND | OR | and | or
>     }
>   }[] | null,
>   shared_to?: {
>     name?: string,
>     id: string,
>     type: territories | roles | groups | users,
>     subordinates?: boolean | null
>   }[] | null,
>   sort_by?: {
>     api_name?: string | null,
>     id?: string | null
>   } | null,
>   sort_order?: asc | desc | null,
>   wrap_text?: boolean,
>   fields: {
>     api_name?: string | null,
>     id?: string | null,
>     _pin?: boolean,
>     _width?: number | string,
>     _pin_order?: number | string
>   }[]
> }[]
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   custom_views?: {
>     status?: string | null,
>     code?: string | null,
>     details?: {
>       id?: string | null
>     } | null,
>     message?: string | null
>   }[] | null
> } | {
>   custom_views?: any & any | null
> }
> ```

***

### deleteMany

`customViews.deleteMany`

Delete Custom Views. To delete one or more Custom Views from a specified module in your Zoho CRM organization. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.customViews.deleteMany({
	ids: ['4876876000000333001'],
	module: 'Leads',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `ids` | `string[]` | Yes | Specify the comma-separated list of unique IDs of the Custom Views to delete. Accepts up to 100 IDs. Use the [Get Custom Views API](custom_views.yaml#\$.paths./settings/custom_views.get) to retrieve the custom view IDs. |
| `module` | `string` | Yes | Specify the API name of the module for which to manage Custom Views. Refer to the Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve module IDs.resource for valid values. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   custom_views?: {
>     status?: string | null,
>     code?: string | null,
>     details?: {
>       id?: string | null
>     } | null,
>     message?: string | null
>   }[] | null
> } | {
>   custom_views?: any & any | null
> }
> ```

***

### get

`customViews.get`

Get Custom View By Id. To retrieve the details of a specific Custom View for a module in your Zoho CRM organization, using the Custom View ID.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.customViews.get({ id: '4876876000000333001', module: 'Leads' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Specify the unique ID of the Custom View. Use the [Get Custom View API](custom_views.yaml#\$.paths./settings/custom_views.get) to retrieve the custom view IDs. |
| `module` | `string` | Yes | Specify the API name of the module for which to manage Custom Views. Refer to the Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve module IDs.resource for valid values. |
| `include_inner_details` | `string` | No | Specify whether to include the inner details of criteria and cross filters in the response. Possible values: **inner\_details** - Includes the full criteria and cross filter details in the response. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   custom_views?: (
>     {
>       name?: string | null,
>       display_value?: string | null,
>       $modified_criteria?: boolean | null,
>       access_type?: string | null,
>       created_time?: string | null | null,
>       modified_time?: string | null | null,
>       last_accessed_time?: string | null | null,
>       system_name?: string | null | null,
>       category?: string | null,
>       default?: boolean | null,
>       system_defined?: boolean | null,
>       locked?: boolean | null,
>       favorite?: number | null | null,
>       offline?: boolean | null,
>       criteria?: {
>         field?: {
>           id?: string | null,
>           api_name?: string | null
>         } | null,
>         comparator?: string | null,
>         value?: (string | number | {
>           id?: string & any | null,
>           name?: string & any | null
>         } | {
>           name?: string | null
>         } | {
>           id?: string | null,
>           name?: string | null
>         })[] | string | number | boolean | {
>           id?: string & any | null,
>           name?: string & any | null
>         } | {
>           name?: string | null
>         } | {
>           id?: string | null,
>           name?: string | null
>         } | string | string | string | string | null,
>         type?: string | null,
>         $disrupted?: boolean | null
>       } | {
>         field?: {
>           id?: string | null,
>           api_name?: string | null
>         } | null,
>         comparator?: string | null,
>         value?: (string | number | {
>           id?: string & any | null,
>           name?: string & any | null
>         } | {
>           name?: string | null
>         } | {
>           id?: string | null,
>           name?: string | null
>         })[] | string | number | boolean | {
>           id?: string & any | null,
>           name?: string & any | null
>         } | {
>           name?: string | null
>         } | {
>           id?: string | null,
>           name?: string | null
>         } | string | null,
>         type?: string | null,
>         $disrupted?: boolean | null
>       } | {
>         field?: {
>           id?: string | null,
>           api_name?: string | null
>         } | null,
>         comparator?: string | null,
>         value?: string[] | string | null,
>         type?: string | null,
>         $disrupted?: boolean | null
>       } | {
>         field?: {
>           id?: string | null,
>           api_name?: string | null
>         } | null,
>         comparator?: string | null,
>         value?: string | number | string | null,
>         type?: string | null,
>         $disrupted?: boolean | null
>       } | {
>         field?: {
>           id?: string | null,
>           api_name?: string | null
>         } | null,
>         comparator?: string | null,
>         value?: (string | number)[] | null,
>         type?: string | null,
>         $disrupted?: boolean | null
>       } | {
>         field?: {
>           id?: string | null,
>           api_name?: string | null
>         } | null,
>         comparator?: string | null,
>         value?: (string | number)[] | null,
>         type?: string | null,
>         $disrupted?: boolean | null
>       } | {
>         field?: {
>           id?: string | null,
>           api_name?: string | null
>         } | null,
>         comparator?: string | null,
>         value?: {
>           id?: string & any | null,
>           name?: string & any | null
>         }[] | null,
>         type?: string | null,
>         $disrupted?: boolean | null
>       } | {
>         group?: (
>           {
>             field?: {
>               id?: string | null,
>               api_name?: string | null
>             } | null,
>             comparator?: string | null,
>             value?: (string | number | {
>               id?: string & any | null,
>               name?: string & any | null
>             } | {
>               name?: string | null
>             } | {
>               id?: string | null,
>               name?: string | null
>             })[] | string | number | boolean | {
>               id?: string & any | null,
>               name?: string & any | null
>             } | {
>               name?: string | null
>             } | {
>               id?: string | null,
>               name?: string | null
>             } | string | string | string | string | null,
>             type?: string | null,
>             $disrupted?: boolean | null
>           } | {
>             field?: {
>               id?: string | null,
>               api_name?: string | null
>             } | null,
>             comparator?: string | null,
>             value?: (string | number | {
>               id?: string & any | null,
>               name?: string & any | null
>             } | {
>               name?: string | null
>             } | {
>               id?: string | null,
>               name?: string | null
>             })[] | string | number | boolean | {
>               id?: string & any | null,
>               name?: string & any | null
>             } | {
>               name?: string | null
>             } | {
>               id?: string | null,
>               name?: string | null
>             } | string | null,
>             type?: string | null,
>             $disrupted?: boolean | null
>           } | {
>             field?: {
>               id?: string | null,
>               api_name?: string | null
>             } | null,
>             comparator?: string | null,
>             value?: string[] | string | null,
>             type?: string | null,
>             $disrupted?: boolean | null
>           } | {
>             field?: {
>               id?: string | null,
>               api_name?: string | null
>             } | null,
>             comparator?: string | null,
>             value?: string | number | string | null,
>             type?: string | null,
>             $disrupted?: boolean | null
>           } | {
>             field?: {
>               id?: string | null,
>               api_name?: string | null
>             } | null,
>             comparator?: string | null,
>             value?: (string | number)[] | null,
>             type?: string | null,
>             $disrupted?: boolean | null
>           } | {
>             field?: {
>               id?: string | null,
>               api_name?: string | null
>             } | null,
>             comparator?: string | null,
>             value?: (string | number)[] | null,
>             type?: string | null,
>             $disrupted?: boolean | null
>           } | {
>             field?: {
>               id?: string | null,
>               api_name?: string | null
>             } | null,
>             comparator?: string | null,
>             value?: {
>               id?: string & any | null,
>               name?: string & any | null
>             }[] | null,
>             type?: string | null,
>             $disrupted?: boolean | null
>           } | {
>             group?: (
>               {
>                 field?: {
>                   id?: string | null,
>                   api_name?: string | null
>                 } | null,
>                 comparator?: string | null,
>                 value?: (string | number | {
>                   id?: string & any | null,
>                   name?: string & any | null
>                 } | {
>                   name?: string | null
>                 } | {
>                   id?: string | null,
>                   name?: string | null
>                 })[] | string | number | boolean | {
>                   id?: string & any | null,
>                   name?: string & any | null
>                 } | {
>                   name?: string | null
>                 } | {
>                   id?: string | null,
>                   name?: string | null
>                 } | string | string | string | string | null,
>                 type?: string | null,
>                 $disrupted?: boolean | null
>               } | {
>                 field?: {
>                   id?: string | null,
>                   api_name?: string | null
>                 } | null,
>                 comparator?: string | null,
>                 value?: (string | number | {
>                   id?: string & any | null,
>                   name?: string & any | null
>                 } | {
>                   name?: string | null
>                 } | {
>                   id?: string | null,
>                   name?: string | null
>                 })[] | string | number | boolean | {
>                   id?: string & any | null,
>                   name?: string & any | null
>                 } | {
>                   name?: string | null
>                 } | {
>                   id?: string | null,
>                   name?: string | null
>                 } | string | null,
>                 type?: string | null,
>                 $disrupted?: boolean | null
>               } | {
>                 field?: {
>                   id?: string | null,
>                   api_name?: string | null
>                 } | null,
>                 comparator?: string | null,
>                 value?: string[] | string | null,
>                 type?: string | null,
>                 $disrupted?: boolean | null
>               } | {
>                 field?: {
>                   id?: string | null,
>                   api_name?: string | null
>                 } | null,
>                 comparator?: string | null,
>                 value?: string | number | string | null,
>                 type?: string | null,
>                 $disrupted?: boolean | null
>               } | {
>                 field?: {
>                   id?: string | null,
>                   api_name?: string | null
>                 } | null,
>                 comparator?: string | null,
>                 value?: (string | number)[] | null,
>                 type?: string | null,
>                 $disrupted?: boolean | null
>               } | {
>                 field?: {
>                   id?: string | null,
>                   api_name?: string | null
>                 } | null,
>                 comparator?: string | null,
>                 value?: (string | number)[] | null,
>                 type?: string | null,
>                 $disrupted?: boolean | null
>               } | {
>                 field?: {
>                   id?: string | null,
>                   api_name?: string | null
>                 } | null,
>                 comparator?: string | null,
>                 value?: {
>                   id?: string & any | null,
>                   name?: string & any | null
>                 }[] | null,
>                 type?: string | null,
>                 $disrupted?: boolean | null
>               } | (recursive)
>             )[] | null,
>             group_operator?: string | null,
>             $disrupted?: boolean | null
>           }
>         )[] | null,
>         group_operator?: string | null,
>         $disrupted?: boolean | null
>       } | null | null,
>       cross_filters?: {
>         include_objects?: boolean | null,
>         relation?: {
>           api_name?: string | null,
>           id?: string | null,
>           $disrupted?: boolean | null
>         }& any | null,
>         criteria?: {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           })[] | string | number | boolean | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           } | string | string | string | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           })[] | string | number | boolean | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           } | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: string[] | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: string | number | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number)[] | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number)[] | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: {
>             id?: string & any | null,
>             name?: string & any | null
>           }[] | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           group?: (
>             {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               })[] | string | number | boolean | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               } | string | string | string | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               })[] | string | number | boolean | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               } | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: string[] | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: string | number | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number)[] | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number)[] | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: {
>                 id?: string & any | null,
>                 name?: string & any | null
>               }[] | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               group?: (
>                 {
>                   field?: {
>                     id?: string | null,
>                     api_name?: string | null
>                   } | null,
>                   comparator?: string | null,
>                   value?: (string | number | {
>                     id?: string & any | null,
>                     name?: string & any | null
>                   } | {
>                     name?: string | null
>                   } | {
>                     id?: string | null,
>                     name?: string | null
>                   })[] | string | number | boolean | {
>                     id?: string & any | null,
>                     name?: string & any | null
>                   } | {
>                     name?: string | null
>                   } | {
>                     id?: string | null,
>                     name?: string | null
>                   } | string | string | string | string | null,
>                   type?: string | null,
>                   $disrupted?: boolean | null
>                 } | {
>                   field?: {
>                     id?: string | null,
>                     api_name?: string | null
>                   } | null,
>                   comparator?: string | null,
>                   value?: (string | number | {
>                     id?: string & any | null,
>                     name?: string & any | null
>                   } | {
>                     name?: string | null
>                   } | {
>                     id?: string | null,
>                     name?: string | null
>                   })[] | string | number | boolean | {
>                     id?: string & any | null,
>                     name?: string & any | null
>                   } | {
>                     name?: string | null
>                   } | {
>                     id?: string | null,
>                     name?: string | null
>                   } | string | null,
>                   type?: string | null,
>                   $disrupted?: boolean | null
>                 } | {
>                   field?: {
>                     id?: string | null,
>                     api_name?: string | null
>                   } | null,
>                   comparator?: string | null,
>                   value?: string[] | string | null,
>                   type?: string | null,
>                   $disrupted?: boolean | null
>                 } | {
>                   field?: {
>                     id?: string | null,
>                     api_name?: string | null
>                   } | null,
>                   comparator?: string | null,
>                   value?: string | number | string | null,
>                   type?: string | null,
>                   $disrupted?: boolean | null
>                 } | {
>                   field?: {
>                     id?: string | null,
>                     api_name?: string | null
>                   } | null,
>                   comparator?: string | null,
>                   value?: (string | number)[] | null,
>                   type?: string | null,
>                   $disrupted?: boolean | null
>                 } | {
>                   field?: {
>                     id?: string | null,
>                     api_name?: string | null
>                   } | null,
>                   comparator?: string | null,
>                   value?: (string | number)[] | null,
>                   type?: string | null,
>                   $disrupted?: boolean | null
>                 } | {
>                   field?: {
>                     id?: string | null,
>                     api_name?: string | null
>                   } | null,
>                   comparator?: string | null,
>                   value?: {
>                     id?: string & any | null,
>                     name?: string & any | null
>                   }[] | null,
>                   type?: string | null,
>                   $disrupted?: boolean | null
>                 } | (recursive)
>               )[] | null,
>               group_operator?: string | null,
>               $disrupted?: boolean | null
>             }
>           )[] | null,
>           group_operator?: string | null,
>           $disrupted?: boolean | null
>         } | null
>       }[] | null | null,
>       shared_to?: {
>         name?: string | null,
>         id?: string | null,
>         type?: string | null,
>         subordinates?: boolean | null | null
>       }[] | null | null,
>       modified_by?: {
>         id?: string | null,
>         name?: string | null
>       } | null | null,
>       created_by?: {
>         id?: string | null,
>         name?: string | null
>       } | null | null,
>       fields?: {
>         api_name?: string | null | null,
>         id?: string | null | null,
>         _pin?: boolean | null,
>         _width?: number | null,
>         _pin_order?: number | null
>       }[] | null,
>       sort_by?: {
>         api_name?: string | null | null,
>         id?: string | null | null
>       } | null | null,
>       sort_order?: string | null | null,
>       id?: string | null
>     }& any
>   )[] | null,
>   info?: {
>     per_page?: number | null,
>     count?: number | null,
>     page?: number | null,
>     more_records?: boolean | null,
>     default?: string | null,
>     translation?: {
>       public_views?: string | null,
>       other_users_views?: string | null,
>       shared_with_me?: string | null,
>       created_by_me?: string | null
>     } | null
>   }& any | null
> } | {
>   success: true
> }
> ```

***

### list

`customViews.list`

Get All Custom Views. To retrieve the list of all Custom Views configured for a specified module in your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.customViews.list({ module: 'Leads' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the API name of the module for which to manage Custom Views. Refer to the Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve module IDs.resource for valid values. |
| `filters` | `object` | No | Represents the top-level filter criterion for data selection, supporting both simple field-based filters and complex grouped filters with logical operators. |
| `page` | `number \| string` | No | Specify the page number for pagination. |
| `per_page` | `number \| string` | No | Specify the number of Custom Views to return per page. |
| `ids` | `string[]` | No | Specify the comma-separated list of unique IDs of the Custom Views to delete. Accepts up to 100 IDs. Use the [Get Custom Views API](custom_views.yaml#\$.paths./settings/custom_views.get) to retrieve the custom view IDs. |
| `scope` | `created_by_me \| shared_with_me \| public_views \| other_users_views` | No | Represents the category of custom views to fetch. Allowed values are 'created\_by\_me', 'shared\_with\_me', 'public\_views', 'other\_users\_views'. |
| `favourite` | `boolean` | No | Filter custom views by favourite status. Set to true to fetch only favourite custom views. |

> [accordion] filters full type
>
> ```ts theme={null}
> {
>   field: {
>     id?: string,
>     api_name: string
>   },
>   comparator: string,
>   value: (string | number | {
>     id: string & any,
>     name?: string
>   } | {
>     name: string
>   } | {
>     id: string,
>     name?: string
>   })[] | string | number | boolean | {
>     id: string & any,
>     name?: string
>   } | {
>     name: string
>   } | {
>     id: string,
>     name?: string
>   } | ${
>     EMPTY
>   } | ${
>     NOTEMPTY
>   } | ${
>     TODAY
>   } | ${
>     TOMORROW
>   } | ${
>     TOMORROWPLUS
>   } | ${
>     YESTERDAY
>   } | ${
>     YESTERDAYMINUS
>   } | ${
>     LASTMONTH
>   } | ${
>     THISMONTH
>   } | ${
>     NEXTMONTH
>   } | ${
>     LASTWEEK
>   } | ${
>     THISWEEK
>   } | ${
>     NEXTWEEK
>   } | ${
>     THISYEAR
>   } | ${
>     THISFY
>   } | ${
>     THISFQ
>   } | ${
>     LASTYEAR
>   } | ${
>     PREVFY
>   } | ${
>     PREVFQ
>   } | ${
>     NEXTYEAR
>   } | ${
>     NEXTFY
>   } | ${
>     NEXTFQ
>   } | ${
>     EMPTY
>   } | ${
>     NOTEMPTY
>   } | string | string,
>   type?: merge_field | pre_defined | value | field
> } | {
>   field: {
>     id?: string,
>     api_name: string
>   },
>   comparator: string,
>   value: (string | number | {
>     id: string & any,
>     name?: string
>   } | {
>     name: string
>   } | {
>     id: string,
>     name?: string
>   })[] | string | number | boolean | {
>     id: string & any,
>     name?: string
>   } | {
>     name: string
>   } | {
>     id: string,
>     name?: string
>   } | string,
>   type?: merge_field | pre_defined | value | field
> } | {
>   field: {
>     id?: string,
>     api_name: string
>   },
>   comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>   value: string[] | string,
>   type?: merge_field | pre_defined | value | field
> } | {
>   field: {
>     id?: string,
>     api_name: string
>   },
>   comparator: less_than | less_equal | greater_than | greater_equal,
>   value: string | number | string,
>   type?: merge_field | pre_defined | value | field
> } | {
>   field: {
>     id?: string,
>     api_name: string
>   },
>   comparator: between | not_between,
>   value: (string | number)[],
>   type?: merge_field | pre_defined | value | field
> } | {
>   field: {
>     id?: string,
>     api_name: string
>   },
>   comparator: in | not_in,
>   value: (string | number)[],
>   type?: merge_field | pre_defined | value | field
> } | {
>   field: {
>     id?: string,
>     api_name: string
>   },
>   comparator: include_all | include_any | exclude_all | exclude_any,
>   value: {
>     id: string & any,
>     name?: string
>   }[],
>   type?: merge_field | pre_defined | value | field
> } | {
>   group: (
>     {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: string,
>       value: (string | number | {
>         id: string & any,
>         name?: string
>       } | {
>         name: string
>       } | {
>         id: string,
>         name?: string
>       })[] | string | number | boolean | {
>         id: string & any,
>         name?: string
>       } | {
>         name: string
>       } | {
>         id: string,
>         name?: string
>       } | ${
>         EMPTY
>       } | ${
>         NOTEMPTY
>       } | ${
>         TODAY
>       } | ${
>         TOMORROW
>       } | ${
>         TOMORROWPLUS
>       } | ${
>         YESTERDAY
>       } | ${
>         YESTERDAYMINUS
>       } | ${
>         LASTMONTH
>       } | ${
>         THISMONTH
>       } | ${
>         NEXTMONTH
>       } | ${
>         LASTWEEK
>       } | ${
>         THISWEEK
>       } | ${
>         NEXTWEEK
>       } | ${
>         THISYEAR
>       } | ${
>         THISFY
>       } | ${
>         THISFQ
>       } | ${
>         LASTYEAR
>       } | ${
>         PREVFY
>       } | ${
>         PREVFQ
>       } | ${
>         NEXTYEAR
>       } | ${
>         NEXTFY
>       } | ${
>         NEXTFQ
>       } | ${
>         EMPTY
>       } | ${
>         NOTEMPTY
>       } | string | string,
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: string,
>       value: (string | number | {
>         id: string & any,
>         name?: string
>       } | {
>         name: string
>       } | {
>         id: string,
>         name?: string
>       })[] | string | number | boolean | {
>         id: string & any,
>         name?: string
>       } | {
>         name: string
>       } | {
>         id: string,
>         name?: string
>       } | string,
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>       value: string[] | string,
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: less_than | less_equal | greater_than | greater_equal,
>       value: string | number | string,
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: between | not_between,
>       value: (string | number)[],
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: in | not_in,
>       value: (string | number)[],
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: include_all | include_any | exclude_all | exclude_any,
>       value: {
>         id: string & any,
>         name?: string
>       }[],
>       type?: merge_field | pre_defined | value | field
>     } | {
>       group: (
>         {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: string,
>           value: (string | number | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           })[] | string | number | boolean | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           } | ${
>             EMPTY
>           } | ${
>             NOTEMPTY
>           } | ${
>             TODAY
>           } | ${
>             TOMORROW
>           } | ${
>             TOMORROWPLUS
>           } | ${
>             YESTERDAY
>           } | ${
>             YESTERDAYMINUS
>           } | ${
>             LASTMONTH
>           } | ${
>             THISMONTH
>           } | ${
>             NEXTMONTH
>           } | ${
>             LASTWEEK
>           } | ${
>             THISWEEK
>           } | ${
>             NEXTWEEK
>           } | ${
>             THISYEAR
>           } | ${
>             THISFY
>           } | ${
>             THISFQ
>           } | ${
>             LASTYEAR
>           } | ${
>             PREVFY
>           } | ${
>             PREVFQ
>           } | ${
>             NEXTYEAR
>           } | ${
>             NEXTFY
>           } | ${
>             NEXTFQ
>           } | ${
>             EMPTY
>           } | ${
>             NOTEMPTY
>           } | string | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: string,
>           value: (string | number | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           })[] | string | number | boolean | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           } | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>           value: string[] | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: less_than | less_equal | greater_than | greater_equal,
>           value: string | number | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: between | not_between,
>           value: (string | number)[],
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: in | not_in,
>           value: (string | number)[],
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: include_all | include_any | exclude_all | exclude_any,
>           value: {
>             id: string & any,
>             name?: string
>           }[],
>           type?: merge_field | pre_defined | value | field
>         } | (recursive)
>       )[],
>       group_operator: AND | OR | and | or
>     }
>   )[],
>   group_operator: AND | OR | and | or
> }
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   custom_views?: (
>     {
>       name?: string | null,
>       display_value?: string | null,
>       $modified_criteria?: boolean | null,
>       access_type?: string | null,
>       created_time?: string | null | null,
>       modified_time?: string | null | null,
>       last_accessed_time?: string | null | null,
>       system_name?: string | null | null,
>       category?: string | null,
>       default?: boolean | null,
>       system_defined?: boolean | null,
>       locked?: boolean | null,
>       favorite?: number | null | null,
>       offline?: boolean | null,
>       criteria?: {
>         field?: {
>           id?: string | null,
>           api_name?: string | null
>         } | null,
>         comparator?: string | null,
>         value?: (string | number | {
>           id?: string & any | null,
>           name?: string & any | null
>         } | {
>           name?: string | null
>         } | {
>           id?: string | null,
>           name?: string | null
>         })[] | string | number | boolean | {
>           id?: string & any | null,
>           name?: string & any | null
>         } | {
>           name?: string | null
>         } | {
>           id?: string | null,
>           name?: string | null
>         } | string | string | string | string | null,
>         type?: string | null,
>         $disrupted?: boolean | null
>       } | {
>         field?: {
>           id?: string | null,
>           api_name?: string | null
>         } | null,
>         comparator?: string | null,
>         value?: (string | number | {
>           id?: string & any | null,
>           name?: string & any | null
>         } | {
>           name?: string | null
>         } | {
>           id?: string | null,
>           name?: string | null
>         })[] | string | number | boolean | {
>           id?: string & any | null,
>           name?: string & any | null
>         } | {
>           name?: string | null
>         } | {
>           id?: string | null,
>           name?: string | null
>         } | string | null,
>         type?: string | null,
>         $disrupted?: boolean | null
>       } | {
>         field?: {
>           id?: string | null,
>           api_name?: string | null
>         } | null,
>         comparator?: string | null,
>         value?: string[] | string | null,
>         type?: string | null,
>         $disrupted?: boolean | null
>       } | {
>         field?: {
>           id?: string | null,
>           api_name?: string | null
>         } | null,
>         comparator?: string | null,
>         value?: string | number | string | null,
>         type?: string | null,
>         $disrupted?: boolean | null
>       } | {
>         field?: {
>           id?: string | null,
>           api_name?: string | null
>         } | null,
>         comparator?: string | null,
>         value?: (string | number)[] | null,
>         type?: string | null,
>         $disrupted?: boolean | null
>       } | {
>         field?: {
>           id?: string | null,
>           api_name?: string | null
>         } | null,
>         comparator?: string | null,
>         value?: (string | number)[] | null,
>         type?: string | null,
>         $disrupted?: boolean | null
>       } | {
>         field?: {
>           id?: string | null,
>           api_name?: string | null
>         } | null,
>         comparator?: string | null,
>         value?: {
>           id?: string & any | null,
>           name?: string & any | null
>         }[] | null,
>         type?: string | null,
>         $disrupted?: boolean | null
>       } | {
>         group?: (
>           {
>             field?: {
>               id?: string | null,
>               api_name?: string | null
>             } | null,
>             comparator?: string | null,
>             value?: (string | number | {
>               id?: string & any | null,
>               name?: string & any | null
>             } | {
>               name?: string | null
>             } | {
>               id?: string | null,
>               name?: string | null
>             })[] | string | number | boolean | {
>               id?: string & any | null,
>               name?: string & any | null
>             } | {
>               name?: string | null
>             } | {
>               id?: string | null,
>               name?: string | null
>             } | string | string | string | string | null,
>             type?: string | null,
>             $disrupted?: boolean | null
>           } | {
>             field?: {
>               id?: string | null,
>               api_name?: string | null
>             } | null,
>             comparator?: string | null,
>             value?: (string | number | {
>               id?: string & any | null,
>               name?: string & any | null
>             } | {
>               name?: string | null
>             } | {
>               id?: string | null,
>               name?: string | null
>             })[] | string | number | boolean | {
>               id?: string & any | null,
>               name?: string & any | null
>             } | {
>               name?: string | null
>             } | {
>               id?: string | null,
>               name?: string | null
>             } | string | null,
>             type?: string | null,
>             $disrupted?: boolean | null
>           } | {
>             field?: {
>               id?: string | null,
>               api_name?: string | null
>             } | null,
>             comparator?: string | null,
>             value?: string[] | string | null,
>             type?: string | null,
>             $disrupted?: boolean | null
>           } | {
>             field?: {
>               id?: string | null,
>               api_name?: string | null
>             } | null,
>             comparator?: string | null,
>             value?: string | number | string | null,
>             type?: string | null,
>             $disrupted?: boolean | null
>           } | {
>             field?: {
>               id?: string | null,
>               api_name?: string | null
>             } | null,
>             comparator?: string | null,
>             value?: (string | number)[] | null,
>             type?: string | null,
>             $disrupted?: boolean | null
>           } | {
>             field?: {
>               id?: string | null,
>               api_name?: string | null
>             } | null,
>             comparator?: string | null,
>             value?: (string | number)[] | null,
>             type?: string | null,
>             $disrupted?: boolean | null
>           } | {
>             field?: {
>               id?: string | null,
>               api_name?: string | null
>             } | null,
>             comparator?: string | null,
>             value?: {
>               id?: string & any | null,
>               name?: string & any | null
>             }[] | null,
>             type?: string | null,
>             $disrupted?: boolean | null
>           } | {
>             group?: (
>               {
>                 field?: {
>                   id?: string | null,
>                   api_name?: string | null
>                 } | null,
>                 comparator?: string | null,
>                 value?: (string | number | {
>                   id?: string & any | null,
>                   name?: string & any | null
>                 } | {
>                   name?: string | null
>                 } | {
>                   id?: string | null,
>                   name?: string | null
>                 })[] | string | number | boolean | {
>                   id?: string & any | null,
>                   name?: string & any | null
>                 } | {
>                   name?: string | null
>                 } | {
>                   id?: string | null,
>                   name?: string | null
>                 } | string | string | string | string | null,
>                 type?: string | null,
>                 $disrupted?: boolean | null
>               } | {
>                 field?: {
>                   id?: string | null,
>                   api_name?: string | null
>                 } | null,
>                 comparator?: string | null,
>                 value?: (string | number | {
>                   id?: string & any | null,
>                   name?: string & any | null
>                 } | {
>                   name?: string | null
>                 } | {
>                   id?: string | null,
>                   name?: string | null
>                 })[] | string | number | boolean | {
>                   id?: string & any | null,
>                   name?: string & any | null
>                 } | {
>                   name?: string | null
>                 } | {
>                   id?: string | null,
>                   name?: string | null
>                 } | string | null,
>                 type?: string | null,
>                 $disrupted?: boolean | null
>               } | {
>                 field?: {
>                   id?: string | null,
>                   api_name?: string | null
>                 } | null,
>                 comparator?: string | null,
>                 value?: string[] | string | null,
>                 type?: string | null,
>                 $disrupted?: boolean | null
>               } | {
>                 field?: {
>                   id?: string | null,
>                   api_name?: string | null
>                 } | null,
>                 comparator?: string | null,
>                 value?: string | number | string | null,
>                 type?: string | null,
>                 $disrupted?: boolean | null
>               } | {
>                 field?: {
>                   id?: string | null,
>                   api_name?: string | null
>                 } | null,
>                 comparator?: string | null,
>                 value?: (string | number)[] | null,
>                 type?: string | null,
>                 $disrupted?: boolean | null
>               } | {
>                 field?: {
>                   id?: string | null,
>                   api_name?: string | null
>                 } | null,
>                 comparator?: string | null,
>                 value?: (string | number)[] | null,
>                 type?: string | null,
>                 $disrupted?: boolean | null
>               } | {
>                 field?: {
>                   id?: string | null,
>                   api_name?: string | null
>                 } | null,
>                 comparator?: string | null,
>                 value?: {
>                   id?: string & any | null,
>                   name?: string & any | null
>                 }[] | null,
>                 type?: string | null,
>                 $disrupted?: boolean | null
>               } | (recursive)
>             )[] | null,
>             group_operator?: string | null,
>             $disrupted?: boolean | null
>           }
>         )[] | null,
>         group_operator?: string | null,
>         $disrupted?: boolean | null
>       } | null | null,
>       cross_filters?: {
>         include_objects?: boolean | null,
>         relation?: {
>           api_name?: string | null,
>           id?: string | null,
>           $disrupted?: boolean | null
>         }& any | null,
>         criteria?: {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           })[] | string | number | boolean | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           } | string | string | string | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           })[] | string | number | boolean | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           } | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: string[] | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: string | number | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number)[] | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number)[] | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: {
>             id?: string & any | null,
>             name?: string & any | null
>           }[] | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           group?: (
>             {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               })[] | string | number | boolean | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               } | string | string | string | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               })[] | string | number | boolean | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               } | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: string[] | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: string | number | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number)[] | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number)[] | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: {
>                 id?: string & any | null,
>                 name?: string & any | null
>               }[] | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               group?: (
>                 {
>                   field?: {
>                     id?: string | null,
>                     api_name?: string | null
>                   } | null,
>                   comparator?: string | null,
>                   value?: (string | number | {
>                     id?: string & any | null,
>                     name?: string & any | null
>                   } | {
>                     name?: string | null
>                   } | {
>                     id?: string | null,
>                     name?: string | null
>                   })[] | string | number | boolean | {
>                     id?: string & any | null,
>                     name?: string & any | null
>                   } | {
>                     name?: string | null
>                   } | {
>                     id?: string | null,
>                     name?: string | null
>                   } | string | string | string | string | null,
>                   type?: string | null,
>                   $disrupted?: boolean | null
>                 } | {
>                   field?: {
>                     id?: string | null,
>                     api_name?: string | null
>                   } | null,
>                   comparator?: string | null,
>                   value?: (string | number | {
>                     id?: string & any | null,
>                     name?: string & any | null
>                   } | {
>                     name?: string | null
>                   } | {
>                     id?: string | null,
>                     name?: string | null
>                   })[] | string | number | boolean | {
>                     id?: string & any | null,
>                     name?: string & any | null
>                   } | {
>                     name?: string | null
>                   } | {
>                     id?: string | null,
>                     name?: string | null
>                   } | string | null,
>                   type?: string | null,
>                   $disrupted?: boolean | null
>                 } | {
>                   field?: {
>                     id?: string | null,
>                     api_name?: string | null
>                   } | null,
>                   comparator?: string | null,
>                   value?: string[] | string | null,
>                   type?: string | null,
>                   $disrupted?: boolean | null
>                 } | {
>                   field?: {
>                     id?: string | null,
>                     api_name?: string | null
>                   } | null,
>                   comparator?: string | null,
>                   value?: string | number | string | null,
>                   type?: string | null,
>                   $disrupted?: boolean | null
>                 } | {
>                   field?: {
>                     id?: string | null,
>                     api_name?: string | null
>                   } | null,
>                   comparator?: string | null,
>                   value?: (string | number)[] | null,
>                   type?: string | null,
>                   $disrupted?: boolean | null
>                 } | {
>                   field?: {
>                     id?: string | null,
>                     api_name?: string | null
>                   } | null,
>                   comparator?: string | null,
>                   value?: (string | number)[] | null,
>                   type?: string | null,
>                   $disrupted?: boolean | null
>                 } | {
>                   field?: {
>                     id?: string | null,
>                     api_name?: string | null
>                   } | null,
>                   comparator?: string | null,
>                   value?: {
>                     id?: string & any | null,
>                     name?: string & any | null
>                   }[] | null,
>                   type?: string | null,
>                   $disrupted?: boolean | null
>                 } | (recursive)
>               )[] | null,
>               group_operator?: string | null,
>               $disrupted?: boolean | null
>             }
>           )[] | null,
>           group_operator?: string | null,
>           $disrupted?: boolean | null
>         } | null
>       }[] | null | null,
>       shared_to?: {
>         name?: string | null,
>         id?: string | null,
>         type?: string | null,
>         subordinates?: boolean | null | null
>       }[] | null | null,
>       modified_by?: {
>         id?: string | null,
>         name?: string | null
>       } | null | null,
>       created_by?: {
>         id?: string | null,
>         name?: string | null
>       } | null | null,
>       fields?: {
>         api_name?: string | null | null,
>         id?: string | null | null,
>         _pin?: boolean | null,
>         _width?: number | null,
>         _pin_order?: number | null
>       }[] | null,
>       sort_by?: {
>         api_name?: string | null | null,
>         id?: string | null | null
>       } | null | null,
>       sort_order?: string | null | null,
>       id?: string | null
>     }& any
>   )[] | null,
>   info?: {
>     per_page?: number | null,
>     count?: number | null,
>     page?: number | null,
>     more_records?: boolean | null,
>     default?: string | null,
>     translation?: {
>       public_views?: string | null,
>       other_users_views?: string | null,
>       shared_with_me?: string | null,
>       created_by_me?: string | null
>     } | null
>   }& any | null
> } | {
>   success: true
> }
> ```

***

### update

`customViews.update`

CustomView update. To update the configuration of a specific Custom View in a module of your Zoho CRM organization, using the Custom View ID. Use the Get Custom Views API to retrieve the custom view IDs.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.customViews.update({
	module: 'Leads',
	id: '4876876000000333001',
	custom_views: [{}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the API name of the module for which to manage Custom Views. Refer to the Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve module IDs.resource for valid values. |
| `id` | `string` | Yes | Specify the unique ID of the Custom View. Use the [Get Custom View API](custom_views.yaml#\$.paths./settings/custom_views.get) to retrieve the custom view IDs. |
| `custom_views` | `object[]` | Yes | Specify the list of Custom View configurations to update. |

> [accordion] custom\_views full type
>
> ```ts theme={null}
> {
>   name?: string,
>   access_type?: shared | public | only_to_me,
>   category?: public_views | other_users_views | shared_with_me | created_by_me,
>   sort_by?: {
>     api_name?: string | null,
>     id?: string | null
>   } | null,
>   sort_order?: asc | desc | null,
>   locked?: boolean,
>   favorite?: number | string | null,
>   criteria?: {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: string,
>     value: (string | number | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     })[] | string | number | boolean | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     } | ${
>       EMPTY
>     } | ${
>       NOTEMPTY
>     } | ${
>       TODAY
>     } | ${
>       TOMORROW
>     } | ${
>       TOMORROWPLUS
>     } | ${
>       YESTERDAY
>     } | ${
>       YESTERDAYMINUS
>     } | ${
>       LASTMONTH
>     } | ${
>       THISMONTH
>     } | ${
>       NEXTMONTH
>     } | ${
>       LASTWEEK
>     } | ${
>       THISWEEK
>     } | ${
>       NEXTWEEK
>     } | ${
>       THISYEAR
>     } | ${
>       THISFY
>     } | ${
>       THISFQ
>     } | ${
>       LASTYEAR
>     } | ${
>       PREVFY
>     } | ${
>       PREVFQ
>     } | ${
>       NEXTYEAR
>     } | ${
>       NEXTFY
>     } | ${
>       NEXTFQ
>     } | ${
>       EMPTY
>     } | ${
>       NOTEMPTY
>     } | string | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: string,
>     value: (string | number | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     })[] | string | number | boolean | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     } | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>     value: string[] | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: less_than | less_equal | greater_than | greater_equal,
>     value: string | number | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: between | not_between,
>     value: (string | number)[],
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: in | not_in,
>     value: (string | number)[],
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: include_all | include_any | exclude_all | exclude_any,
>     value: {
>       id: string & any,
>       name?: string
>     }[],
>     type?: merge_field | pre_defined | value | field
>   } | {
>     group: (
>       {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: string,
>         value: (string | number | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         })[] | string | number | boolean | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         } | ${
>           EMPTY
>         } | ${
>           NOTEMPTY
>         } | ${
>           TODAY
>         } | ${
>           TOMORROW
>         } | ${
>           TOMORROWPLUS
>         } | ${
>           YESTERDAY
>         } | ${
>           YESTERDAYMINUS
>         } | ${
>           LASTMONTH
>         } | ${
>           THISMONTH
>         } | ${
>           NEXTMONTH
>         } | ${
>           LASTWEEK
>         } | ${
>           THISWEEK
>         } | ${
>           NEXTWEEK
>         } | ${
>           THISYEAR
>         } | ${
>           THISFY
>         } | ${
>           THISFQ
>         } | ${
>           LASTYEAR
>         } | ${
>           PREVFY
>         } | ${
>           PREVFQ
>         } | ${
>           NEXTYEAR
>         } | ${
>           NEXTFY
>         } | ${
>           NEXTFQ
>         } | ${
>           EMPTY
>         } | ${
>           NOTEMPTY
>         } | string | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: string,
>         value: (string | number | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         })[] | string | number | boolean | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         } | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>         value: string[] | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: less_than | less_equal | greater_than | greater_equal,
>         value: string | number | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: between | not_between,
>         value: (string | number)[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: in | not_in,
>         value: (string | number)[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: include_all | include_any | exclude_all | exclude_any,
>         value: {
>           id: string & any,
>           name?: string
>         }[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         group: (
>           {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: string,
>             value: (string | number | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             })[] | string | number | boolean | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             } | ${
>               EMPTY
>             } | ${
>               NOTEMPTY
>             } | ${
>               TODAY
>             } | ${
>               TOMORROW
>             } | ${
>               TOMORROWPLUS
>             } | ${
>               YESTERDAY
>             } | ${
>               YESTERDAYMINUS
>             } | ${
>               LASTMONTH
>             } | ${
>               THISMONTH
>             } | ${
>               NEXTMONTH
>             } | ${
>               LASTWEEK
>             } | ${
>               THISWEEK
>             } | ${
>               NEXTWEEK
>             } | ${
>               THISYEAR
>             } | ${
>               THISFY
>             } | ${
>               THISFQ
>             } | ${
>               LASTYEAR
>             } | ${
>               PREVFY
>             } | ${
>               PREVFQ
>             } | ${
>               NEXTYEAR
>             } | ${
>               NEXTFY
>             } | ${
>               NEXTFQ
>             } | ${
>               EMPTY
>             } | ${
>               NOTEMPTY
>             } | string | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: string,
>             value: (string | number | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             })[] | string | number | boolean | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             } | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>             value: string[] | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: less_than | less_equal | greater_than | greater_equal,
>             value: string | number | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: between | not_between,
>             value: (string | number)[],
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: in | not_in,
>             value: (string | number)[],
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: include_all | include_any | exclude_all | exclude_any,
>             value: {
>               id: string & any,
>               name?: string
>             }[],
>             type?: merge_field | pre_defined | value | field
>           } | (recursive)
>         )[],
>         group_operator: AND | OR | and | or
>       }
>     )[],
>     group_operator: AND | OR | and | or
>   } | null,
>   cross_filters?: {
>     include_objects: boolean,
>     relation: {
>       api_name: string,
>       id?: string,
>       $disrupted?: boolean
>     },
>     criteria: {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: string,
>       value: (string | number | {
>         id: string & any,
>         name?: string
>       } | {
>         name: string
>       } | {
>         id: string,
>         name?: string
>       })[] | string | number | boolean | {
>         id: string & any,
>         name?: string
>       } | {
>         name: string
>       } | {
>         id: string,
>         name?: string
>       } | ${
>         EMPTY
>       } | ${
>         NOTEMPTY
>       } | ${
>         TODAY
>       } | ${
>         TOMORROW
>       } | ${
>         TOMORROWPLUS
>       } | ${
>         YESTERDAY
>       } | ${
>         YESTERDAYMINUS
>       } | ${
>         LASTMONTH
>       } | ${
>         THISMONTH
>       } | ${
>         NEXTMONTH
>       } | ${
>         LASTWEEK
>       } | ${
>         THISWEEK
>       } | ${
>         NEXTWEEK
>       } | ${
>         THISYEAR
>       } | ${
>         THISFY
>       } | ${
>         THISFQ
>       } | ${
>         LASTYEAR
>       } | ${
>         PREVFY
>       } | ${
>         PREVFQ
>       } | ${
>         NEXTYEAR
>       } | ${
>         NEXTFY
>       } | ${
>         NEXTFQ
>       } | ${
>         EMPTY
>       } | ${
>         NOTEMPTY
>       } | string | string,
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: string,
>       value: (string | number | {
>         id: string & any,
>         name?: string
>       } | {
>         name: string
>       } | {
>         id: string,
>         name?: string
>       })[] | string | number | boolean | {
>         id: string & any,
>         name?: string
>       } | {
>         name: string
>       } | {
>         id: string,
>         name?: string
>       } | string,
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>       value: string[] | string,
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: less_than | less_equal | greater_than | greater_equal,
>       value: string | number | string,
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: between | not_between,
>       value: (string | number)[],
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: in | not_in,
>       value: (string | number)[],
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: include_all | include_any | exclude_all | exclude_any,
>       value: {
>         id: string & any,
>         name?: string
>       }[],
>       type?: merge_field | pre_defined | value | field
>     } | {
>       group: (
>         {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: string,
>           value: (string | number | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           })[] | string | number | boolean | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           } | ${
>             EMPTY
>           } | ${
>             NOTEMPTY
>           } | ${
>             TODAY
>           } | ${
>             TOMORROW
>           } | ${
>             TOMORROWPLUS
>           } | ${
>             YESTERDAY
>           } | ${
>             YESTERDAYMINUS
>           } | ${
>             LASTMONTH
>           } | ${
>             THISMONTH
>           } | ${
>             NEXTMONTH
>           } | ${
>             LASTWEEK
>           } | ${
>             THISWEEK
>           } | ${
>             NEXTWEEK
>           } | ${
>             THISYEAR
>           } | ${
>             THISFY
>           } | ${
>             THISFQ
>           } | ${
>             LASTYEAR
>           } | ${
>             PREVFY
>           } | ${
>             PREVFQ
>           } | ${
>             NEXTYEAR
>           } | ${
>             NEXTFY
>           } | ${
>             NEXTFQ
>           } | ${
>             EMPTY
>           } | ${
>             NOTEMPTY
>           } | string | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: string,
>           value: (string | number | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           })[] | string | number | boolean | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           } | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>           value: string[] | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: less_than | less_equal | greater_than | greater_equal,
>           value: string | number | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: between | not_between,
>           value: (string | number)[],
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: in | not_in,
>           value: (string | number)[],
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: include_all | include_any | exclude_all | exclude_any,
>           value: {
>             id: string & any,
>             name?: string
>           }[],
>           type?: merge_field | pre_defined | value | field
>         } | {
>           group: (
>             {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: string,
>               value: (string | number | {
>                 id: string & any,
>                 name?: string
>               } | {
>                 name: string
>               } | {
>                 id: string,
>                 name?: string
>               })[] | string | number | boolean | {
>                 id: string & any,
>                 name?: string
>               } | {
>                 name: string
>               } | {
>                 id: string,
>                 name?: string
>               } | ${
>                 EMPTY
>               } | ${
>                 NOTEMPTY
>               } | ${
>                 TODAY
>               } | ${
>                 TOMORROW
>               } | ${
>                 TOMORROWPLUS
>               } | ${
>                 YESTERDAY
>               } | ${
>                 YESTERDAYMINUS
>               } | ${
>                 LASTMONTH
>               } | ${
>                 THISMONTH
>               } | ${
>                 NEXTMONTH
>               } | ${
>                 LASTWEEK
>               } | ${
>                 THISWEEK
>               } | ${
>                 NEXTWEEK
>               } | ${
>                 THISYEAR
>               } | ${
>                 THISFY
>               } | ${
>                 THISFQ
>               } | ${
>                 LASTYEAR
>               } | ${
>                 PREVFY
>               } | ${
>                 PREVFQ
>               } | ${
>                 NEXTYEAR
>               } | ${
>                 NEXTFY
>               } | ${
>                 NEXTFQ
>               } | ${
>                 EMPTY
>               } | ${
>                 NOTEMPTY
>               } | string | string,
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: string,
>               value: (string | number | {
>                 id: string & any,
>                 name?: string
>               } | {
>                 name: string
>               } | {
>                 id: string,
>                 name?: string
>               })[] | string | number | boolean | {
>                 id: string & any,
>                 name?: string
>               } | {
>                 name: string
>               } | {
>                 id: string,
>                 name?: string
>               } | string,
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>               value: string[] | string,
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: less_than | less_equal | greater_than | greater_equal,
>               value: string | number | string,
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: between | not_between,
>               value: (string | number)[],
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: in | not_in,
>               value: (string | number)[],
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: include_all | include_any | exclude_all | exclude_any,
>               value: {
>                 id: string & any,
>                 name?: string
>               }[],
>               type?: merge_field | pre_defined | value | field
>             } | (recursive)
>           )[],
>           group_operator: AND | OR | and | or
>         }
>       )[],
>       group_operator: AND | OR | and | or
>     }
>   }[] | null,
>   shared_to?: {
>     name?: string,
>     id: string,
>     type: territories | roles | groups | users,
>     subordinates?: boolean | null
>   }[] | null,
>   fields?: {
>     api_name?: string | null,
>     id?: string | null,
>     _pin?: boolean,
>     _width?: number | string,
>     _pin_order?: number | string
>   }[]
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `custom_views` | `object[] \| null` | No | Represents the list of Custom View update success items. |

> [accordion] custom\_views full type
>
> ```ts theme={null}
> {
>   status?: string | null,
>   code?: string | null,
>   message?: string | null,
>   details?: {
>     id?: string | null
>   } | null
> }[] | null
> ```

***

### updateMany

`customViews.updateMany`

Custom Views. To update the configuration of one or more Custom Views in bulk for a specified module in your Zoho CRM organization.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.customViews.updateMany({ module: 'Leads' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the API name of the module for which to manage Custom Views. Refer to the Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve module IDs.resource for valid values. |
| `custom_views` | `object[]` | No | Specify the list of Custom Views to update in bulk. Each object must include the Custom View ID and the fields to update. |

> [accordion] custom\_views full type
>
> ```ts theme={null}
> {
>   id: string,
>   name?: string,
>   access_type?: shared | public | only_to_me,
>   category?: public_views | other_users_views | shared_with_me | created_by_me,
>   sort_by?: {
>     api_name?: string | null,
>     id?: string | null
>   } | null,
>   sort_order?: asc | desc | null,
>   locked?: boolean,
>   favorite?: number | string | null,
>   criteria?: {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: string,
>     value: (string | number | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     })[] | string | number | boolean | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     } | ${
>       EMPTY
>     } | ${
>       NOTEMPTY
>     } | ${
>       TODAY
>     } | ${
>       TOMORROW
>     } | ${
>       TOMORROWPLUS
>     } | ${
>       YESTERDAY
>     } | ${
>       YESTERDAYMINUS
>     } | ${
>       LASTMONTH
>     } | ${
>       THISMONTH
>     } | ${
>       NEXTMONTH
>     } | ${
>       LASTWEEK
>     } | ${
>       THISWEEK
>     } | ${
>       NEXTWEEK
>     } | ${
>       THISYEAR
>     } | ${
>       THISFY
>     } | ${
>       THISFQ
>     } | ${
>       LASTYEAR
>     } | ${
>       PREVFY
>     } | ${
>       PREVFQ
>     } | ${
>       NEXTYEAR
>     } | ${
>       NEXTFY
>     } | ${
>       NEXTFQ
>     } | ${
>       EMPTY
>     } | ${
>       NOTEMPTY
>     } | string | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: string,
>     value: (string | number | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     })[] | string | number | boolean | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     } | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>     value: string[] | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: less_than | less_equal | greater_than | greater_equal,
>     value: string | number | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: between | not_between,
>     value: (string | number)[],
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: in | not_in,
>     value: (string | number)[],
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: include_all | include_any | exclude_all | exclude_any,
>     value: {
>       id: string & any,
>       name?: string
>     }[],
>     type?: merge_field | pre_defined | value | field
>   } | {
>     group: (
>       {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: string,
>         value: (string | number | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         })[] | string | number | boolean | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         } | ${
>           EMPTY
>         } | ${
>           NOTEMPTY
>         } | ${
>           TODAY
>         } | ${
>           TOMORROW
>         } | ${
>           TOMORROWPLUS
>         } | ${
>           YESTERDAY
>         } | ${
>           YESTERDAYMINUS
>         } | ${
>           LASTMONTH
>         } | ${
>           THISMONTH
>         } | ${
>           NEXTMONTH
>         } | ${
>           LASTWEEK
>         } | ${
>           THISWEEK
>         } | ${
>           NEXTWEEK
>         } | ${
>           THISYEAR
>         } | ${
>           THISFY
>         } | ${
>           THISFQ
>         } | ${
>           LASTYEAR
>         } | ${
>           PREVFY
>         } | ${
>           PREVFQ
>         } | ${
>           NEXTYEAR
>         } | ${
>           NEXTFY
>         } | ${
>           NEXTFQ
>         } | ${
>           EMPTY
>         } | ${
>           NOTEMPTY
>         } | string | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: string,
>         value: (string | number | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         })[] | string | number | boolean | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         } | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>         value: string[] | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: less_than | less_equal | greater_than | greater_equal,
>         value: string | number | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: between | not_between,
>         value: (string | number)[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: in | not_in,
>         value: (string | number)[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: include_all | include_any | exclude_all | exclude_any,
>         value: {
>           id: string & any,
>           name?: string
>         }[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         group: (
>           {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: string,
>             value: (string | number | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             })[] | string | number | boolean | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             } | ${
>               EMPTY
>             } | ${
>               NOTEMPTY
>             } | ${
>               TODAY
>             } | ${
>               TOMORROW
>             } | ${
>               TOMORROWPLUS
>             } | ${
>               YESTERDAY
>             } | ${
>               YESTERDAYMINUS
>             } | ${
>               LASTMONTH
>             } | ${
>               THISMONTH
>             } | ${
>               NEXTMONTH
>             } | ${
>               LASTWEEK
>             } | ${
>               THISWEEK
>             } | ${
>               NEXTWEEK
>             } | ${
>               THISYEAR
>             } | ${
>               THISFY
>             } | ${
>               THISFQ
>             } | ${
>               LASTYEAR
>             } | ${
>               PREVFY
>             } | ${
>               PREVFQ
>             } | ${
>               NEXTYEAR
>             } | ${
>               NEXTFY
>             } | ${
>               NEXTFQ
>             } | ${
>               EMPTY
>             } | ${
>               NOTEMPTY
>             } | string | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: string,
>             value: (string | number | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             })[] | string | number | boolean | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             } | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>             value: string[] | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: less_than | less_equal | greater_than | greater_equal,
>             value: string | number | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: between | not_between,
>             value: (string | number)[],
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: in | not_in,
>             value: (string | number)[],
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: include_all | include_any | exclude_all | exclude_any,
>             value: {
>               id: string & any,
>               name?: string
>             }[],
>             type?: merge_field | pre_defined | value | field
>           } | (recursive)
>         )[],
>         group_operator: AND | OR | and | or
>       }
>     )[],
>     group_operator: AND | OR | and | or
>   } | null,
>   cross_filters?: {
>     include_objects: boolean,
>     relation: {
>       api_name: string,
>       id?: string,
>       $disrupted?: boolean
>     },
>     criteria: {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: string,
>       value: (string | number | {
>         id: string & any,
>         name?: string
>       } | {
>         name: string
>       } | {
>         id: string,
>         name?: string
>       })[] | string | number | boolean | {
>         id: string & any,
>         name?: string
>       } | {
>         name: string
>       } | {
>         id: string,
>         name?: string
>       } | ${
>         EMPTY
>       } | ${
>         NOTEMPTY
>       } | ${
>         TODAY
>       } | ${
>         TOMORROW
>       } | ${
>         TOMORROWPLUS
>       } | ${
>         YESTERDAY
>       } | ${
>         YESTERDAYMINUS
>       } | ${
>         LASTMONTH
>       } | ${
>         THISMONTH
>       } | ${
>         NEXTMONTH
>       } | ${
>         LASTWEEK
>       } | ${
>         THISWEEK
>       } | ${
>         NEXTWEEK
>       } | ${
>         THISYEAR
>       } | ${
>         THISFY
>       } | ${
>         THISFQ
>       } | ${
>         LASTYEAR
>       } | ${
>         PREVFY
>       } | ${
>         PREVFQ
>       } | ${
>         NEXTYEAR
>       } | ${
>         NEXTFY
>       } | ${
>         NEXTFQ
>       } | ${
>         EMPTY
>       } | ${
>         NOTEMPTY
>       } | string | string,
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: string,
>       value: (string | number | {
>         id: string & any,
>         name?: string
>       } | {
>         name: string
>       } | {
>         id: string,
>         name?: string
>       })[] | string | number | boolean | {
>         id: string & any,
>         name?: string
>       } | {
>         name: string
>       } | {
>         id: string,
>         name?: string
>       } | string,
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>       value: string[] | string,
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: less_than | less_equal | greater_than | greater_equal,
>       value: string | number | string,
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: between | not_between,
>       value: (string | number)[],
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: in | not_in,
>       value: (string | number)[],
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: include_all | include_any | exclude_all | exclude_any,
>       value: {
>         id: string & any,
>         name?: string
>       }[],
>       type?: merge_field | pre_defined | value | field
>     } | {
>       group: (
>         {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: string,
>           value: (string | number | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           })[] | string | number | boolean | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           } | ${
>             EMPTY
>           } | ${
>             NOTEMPTY
>           } | ${
>             TODAY
>           } | ${
>             TOMORROW
>           } | ${
>             TOMORROWPLUS
>           } | ${
>             YESTERDAY
>           } | ${
>             YESTERDAYMINUS
>           } | ${
>             LASTMONTH
>           } | ${
>             THISMONTH
>           } | ${
>             NEXTMONTH
>           } | ${
>             LASTWEEK
>           } | ${
>             THISWEEK
>           } | ${
>             NEXTWEEK
>           } | ${
>             THISYEAR
>           } | ${
>             THISFY
>           } | ${
>             THISFQ
>           } | ${
>             LASTYEAR
>           } | ${
>             PREVFY
>           } | ${
>             PREVFQ
>           } | ${
>             NEXTYEAR
>           } | ${
>             NEXTFY
>           } | ${
>             NEXTFQ
>           } | ${
>             EMPTY
>           } | ${
>             NOTEMPTY
>           } | string | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: string,
>           value: (string | number | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           })[] | string | number | boolean | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           } | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>           value: string[] | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: less_than | less_equal | greater_than | greater_equal,
>           value: string | number | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: between | not_between,
>           value: (string | number)[],
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: in | not_in,
>           value: (string | number)[],
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: include_all | include_any | exclude_all | exclude_any,
>           value: {
>             id: string & any,
>             name?: string
>           }[],
>           type?: merge_field | pre_defined | value | field
>         } | {
>           group: (
>             {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: string,
>               value: (string | number | {
>                 id: string & any,
>                 name?: string
>               } | {
>                 name: string
>               } | {
>                 id: string,
>                 name?: string
>               })[] | string | number | boolean | {
>                 id: string & any,
>                 name?: string
>               } | {
>                 name: string
>               } | {
>                 id: string,
>                 name?: string
>               } | ${
>                 EMPTY
>               } | ${
>                 NOTEMPTY
>               } | ${
>                 TODAY
>               } | ${
>                 TOMORROW
>               } | ${
>                 TOMORROWPLUS
>               } | ${
>                 YESTERDAY
>               } | ${
>                 YESTERDAYMINUS
>               } | ${
>                 LASTMONTH
>               } | ${
>                 THISMONTH
>               } | ${
>                 NEXTMONTH
>               } | ${
>                 LASTWEEK
>               } | ${
>                 THISWEEK
>               } | ${
>                 NEXTWEEK
>               } | ${
>                 THISYEAR
>               } | ${
>                 THISFY
>               } | ${
>                 THISFQ
>               } | ${
>                 LASTYEAR
>               } | ${
>                 PREVFY
>               } | ${
>                 PREVFQ
>               } | ${
>                 NEXTYEAR
>               } | ${
>                 NEXTFY
>               } | ${
>                 NEXTFQ
>               } | ${
>                 EMPTY
>               } | ${
>                 NOTEMPTY
>               } | string | string,
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: string,
>               value: (string | number | {
>                 id: string & any,
>                 name?: string
>               } | {
>                 name: string
>               } | {
>                 id: string,
>                 name?: string
>               })[] | string | number | boolean | {
>                 id: string & any,
>                 name?: string
>               } | {
>                 name: string
>               } | {
>                 id: string,
>                 name?: string
>               } | string,
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>               value: string[] | string,
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: less_than | less_equal | greater_than | greater_equal,
>               value: string | number | string,
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: between | not_between,
>               value: (string | number)[],
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: in | not_in,
>               value: (string | number)[],
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: include_all | include_any | exclude_all | exclude_any,
>               value: {
>                 id: string & any,
>                 name?: string
>               }[],
>               type?: merge_field | pre_defined | value | field
>             } | (recursive)
>           )[],
>           group_operator: AND | OR | and | or
>         }
>       )[],
>       group_operator: AND | OR | and | or
>     }
>   }[] | null,
>   shared_to?: {
>     name?: string,
>     id: string,
>     type: territories | roles | groups | users,
>     subordinates?: boolean | null
>   }[] | null,
>   fields?: {
>     api_name?: string | null,
>     id?: string | null,
>     _pin?: boolean,
>     _width?: number | string,
>     _pin_order?: number | string
>   }[]
> }[]
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   custom_views?: {
>     status?: string | null,
>     code?: string | null,
>     message?: string | null,
>     details?: {
>       id?: string | null
>     } | null
>   }[] | null
> } | {
>   custom_views?: any & any | null
> }
> ```

***

## Data Sharing

### get

`dataSharing.get`

Data Sharing Settings. To retrieve your organization's default data-sharing permissions for modules.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.dataSharing.get({});
```

**Input:** *empty object*

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data_sharing?: {
>     share_type?: string | null,
>     public_in_portals?: boolean | null,
>     module?: {
>       api_name?: string | null,
>       id?: string | null
>     } | null,
>     rule_computation_running?: boolean | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### update

`dataSharing.update`

Data Sharing Settings. To update your organization's default data-sharing permissions for modules. You can modify data-sharing access for both system-defined and custom modules.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.dataSharing.update({
	data_sharing: [{
		share_type: 'private',
		module: { id: '4876876000000333001' },
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `data_sharing` | `object[]` | Yes | Contains the details of your organization's default data-sharing permissions for modules. |

> [accordion] data\_sharing full type
>
> ```ts theme={null}
> {
>   share_type: private | public_read_write | public | public_read_only,
>   module: {
>     api_name?: string,
>     id: string
>   },
>   id?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data_sharing` | `object[] \| null` | No | Array containing the update status for each module's data sharing setting. |

> [accordion] data\_sharing full type
>
> ```ts theme={null}
> {
>   status?: string | null,
>   code?: string | null,
>   message?: string | null,
>   details?: {
>     module?: string | null
>   } | null
> }[] | null
> ```

***

## Deal Contact Roles

### delete

`dealContactRoles.delete`

Deal Contact Roles. Remove a specific contact-deal relation using the contact identifier in the path. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.dealContactRoles.delete({ module: 'Leads', dealId: 'example', contactId: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Represents the module name for the deal record. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to get the required module API name. |
| `dealId` | `string` | Yes | Represents the unique identifier of the deal record. Use the [Get Records API](record.yaml#\$.paths./\{module}.get) and get the unique ID of the Deal. |
| `contactId` | `string` | Yes | Represents the unique identifier of the contact record. Use the [Get Records API](record.yaml#\$./\{module}.get) to get the valid Contact IDs. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | Status entries for each deleted relation |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### deleteMany

`dealContactRoles.deleteMany`

Deal Contact Roles. Remove one or more contact role associations from a deal using their relation IDs. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.dealContactRoles.deleteMany({ module: 'Leads', dealId: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Represents the module name for the deal record. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to get the required module API name. |
| `dealId` | `string` | Yes | Represents the unique identifier of the deal record. Use the [Get Records API](record.yaml#\$.paths./\{module}.get) and get the unique ID of the Deal. |
| `ids` | `string` | No | Represents the comma-separated list of contact role relation IDs to delete. Use the [Get Contact Roles API](deal_contact_roles.yaml#\$.paths./\{module}/\{dealId}/Contact_Roles.get) to get the valide IDs. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | Status entries for each deleted relation |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### get

`dealContactRoles.get`

Deal Contact Roles. Retrieves the contact role relation for a specific contact associated with a deal.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.dealContactRoles.get({
	module: 'Leads',
	dealId: 'example',
	contactId: 'example',
	fields: 'Last_Name,Email',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Represents the module name for the deal record. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to get the required module API name. |
| `dealId` | `string` | Yes | Represents the unique identifier of the deal record. Use the [Get Records API](record.yaml#\$.paths./\{module}.get) and get the unique ID of the Deal. |
| `contactId` | `string` | Yes | Represents the unique identifier of the contact record. Use the [Get Records API](record.yaml#\$./\{module}.get) to get the valid Contact IDs. |
| `fields` | `string` | Yes | Comma-separated list of field names to include in the response. Field names must follow API naming conventions. Use the [Get Fields API](fields.yaml#\$.paths./settings/fields.get) to get the valide field API names. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data?: {
>     Owner?: {
>       name?: string | null,
>       id?: string | null,
>       email?: string | null
>     } | null,
>     Department?: string | null | null,
>     Contact_Role?: {
>       name?: string | null,
>       id?: string | null
>     } | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### list

`dealContactRoles.list`

Deal Contact Roles. Retrieve contact roles associated with a deal.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.dealContactRoles.list({ module: 'Leads', dealId: 'example', fields: 'Last_Name,Email' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Represents the module name for the deal record. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to get the required module API name. |
| `dealId` | `string` | Yes | Represents the unique identifier of the deal record. Use the [Get Records API](record.yaml#\$.paths./\{module}.get) and get the unique ID of the Deal. |
| `fields` | `string` | Yes | Comma-separated list of field names to include in the response. Field names must follow API naming conventions. Use the [Get Fields API](fields.yaml#\$.paths./settings/fields.get) to get the valide field API names. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data?: {
>     Owner?: {
>       name?: string | null,
>       id?: string | null,
>       email?: string | null
>     } | null,
>     Department?: string | null | null,
>     Contact_Role?: {
>       name?: string | null,
>       id?: string | null
>     } | null
>   }[] | null,
>   info?: {
>     per_page?: number | null,
>     next_page_token?: string | null | null,
>     count?: number | null,
>     page?: number | null,
>     previous_page_token?: string | null | null,
>     page_token_expiry?: string | null | null,
>     more_records?: boolean | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### upsert

`dealContactRoles.upsert`

Deal Contact Roles. Assign or update a contact role for a specific contact on a deal.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.dealContactRoles.upsert({
	module: 'Leads',
	dealId: 'example',
	contactId: 'example',
	data: [{
		Contact_Role: {},
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Represents the module name for the deal record. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to get the required module API name. |
| `dealId` | `string` | Yes | Represents the unique identifier of the deal record. Use the [Get Records API](record.yaml#\$.paths./\{module}.get) and get the unique ID of the Deal. |
| `contactId` | `string` | Yes | Represents the unique identifier of the contact record. Use the [Get Records API](record.yaml#\$./\{module}.get) to get the valid Contact IDs. |
| `data` | `object[]` | Yes | Single contact role relation definition |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   Contact_Role: {
>     name?: string,
>     id?: string
>   }
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | Status entries for the processed contact relation |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### upsertMany

`dealContactRoles.upsertMany`

Deal Contact Roles. Add contact roles to a deal or update existing contact role relations in bulk.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.dealContactRoles.upsertMany({
	module: 'Leads',
	dealId: 'example',
	data: [{
		Contact_Role: { id: '4876876000000333001' },
		id: '4876876000000333001',
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Represents the module name for the deal record. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to get the required module API name. |
| `dealId` | `string` | Yes | Represents the unique identifier of the deal record. Use the [Get Records API](record.yaml#\$.paths./\{module}.get) and get the unique ID of the Deal. |
| `data` | `object[]` | Yes | List of contact role relations to upsert |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   Contact_Role: {
>     name?: string,
>     id: string
>   },
>   id: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | Status entries for each processed relation |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

## Duplicate Check Preferences

### create

`duplicateCheckPreferences.create`

Create Duplicate Check Preference. To enable duplicate check preference for the Leads module in your Zoho CRM organization.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.duplicateCheckPreferences.create({
	module: 'Leads',
	duplicate_check_preference: { type: 'converted_records' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Represents the module whose Duplicate Check Preference details you want to retrieve. Supported module: Leads. |
| `duplicate_check_preference` | `object` | Yes | Duplicate check preference details. |

> [accordion] duplicate\_check\_preference full type
>
> ```ts theme={null}
> {
>   type: converted_records | mapped_module_records,
>   type_configurations?: {
>     field_mappings: {
>       current_field: {
>         id: string,
>         api_name?: string,
>         name?: string
>       },
>       mapped_field: {
>         id: string,
>         api_name?: string,
>         name?: string,
>         selected?: string
>       }
>     }[],
>     mapped_module: {
>       id: string,
>       api_name?: string,
>       name?: string
>     }
>   }[] | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `duplicate_check_preference` | `object \| null` | No | Details of the duplicate check preference configuration. |

> [accordion] duplicate\_check\_preference full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   status?: string | null,
>   message?: string | null,
>   details?: {
>   } | null
> } | null
> ```

***

### delete

`duplicateCheckPreferences.delete`

Delete Duplicate Check Preference. To delete the duplicate check preference configured for the Leads module in your Zoho CRM organization. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.duplicateCheckPreferences.delete({ module: 'Leads' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Represents the module whose Duplicate Check Preference details you want to retrieve. Supported module: Leads. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `duplicate_check_preference` | `object \| null` | No | Details of the deleted duplicate check preference |

> [accordion] duplicate\_check\_preference full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   status?: string | null,
>   message?: string | null,
>   details?: {
>   } | null
> } | null
> ```

***

### get

`duplicateCheckPreferences.get`

Get Duplicate Check Preference. To retrieve the duplicate check preference configured for the Leads module in your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.duplicateCheckPreferences.get({ module: 'Leads' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Represents the module whose Duplicate Check Preference details you want to retrieve. Supported module: Leads. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   duplicate_check_preference?: {
>     type?: string | null,
>     type_configurations?: {
>       field_mappings?: {
>         current_field?: {
>           id?: string | null,
>           api_name?: string | null,
>           name?: string | null
>         } | null,
>         mapped_field?: {
>           id?: string | null,
>           api_name?: string | null,
>           name?: string | null
>         } | null
>       }[] | null,
>       mapped_module?: {
>         id?: string | null,
>         api_name?: string | null,
>         name?: string | null
>       } | null
>     }[] | null | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### update

`duplicateCheckPreferences.update`

Update Duplicate Check Preference. API is used to update duplicate check settings for a specific module in the CRM system. It allows users to define how duplicate records are identified and managed based on field mappings between the current module and a mapped module, such as Contacts.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.duplicateCheckPreferences.update({
	module: 'Leads',
	duplicate_check_preference: {
		type: 'mapped_module_records',
		type_configurations: [{
			field_mappings: [{
				current_field: { id: '4876876000000333001' },
				mapped_field: { id: '4876876000000333001' },
			}],
			mapped_module: { id: '4876876000000333001' },
		}],
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Represents the module whose Duplicate Check Preference details you want to retrieve. Supported module: Leads. |
| `duplicate_check_preference` | `object` | Yes | Duplicate Check Preference details |

> [accordion] duplicate\_check\_preference full type
>
> ```ts theme={null}
> {
>   type: mapped_module_records | converted_records,
>   type_configurations: {
>     field_mappings: {
>       current_field: {
>         id: string,
>         api_name?: string,
>         name?: string
>       },
>       mapped_field: {
>         id: string,
>         api_name?: string,
>         name?: string,
>         selected?: string
>       }
>     }[],
>     mapped_module: {
>       id: string,
>       name?: string,
>       api_name?: string
>     }
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `duplicate_check_preference` | `object \| null` | No | Duplicate Check Preference update response |

> [accordion] duplicate\_check\_preference full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   status?: string | null,
>   message?: string | null,
>   details?: {
>   } | null
> } | null
> ```

***

## Email Drafts

### create

`emailDrafts.create`

Create Email Drafts for a Record. Creates one or more email drafts associated with the specified record in the given module.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.emailDrafts.create({
	module: 'Leads',
	record: '4876876000000333001',
	__email_drafts: [{ from: 'ada@example.com', rich_text: true }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specifies the module of the record. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve the API names of modules. |
| `record` | `string` | Yes | Specifies the unique identifier of the record. Use the [Get Records API](record.yaml#\$.paths./module.get) to retrieve record IDs. |
| `__email_drafts` | `object[]` | Yes | List of email drafts to create. |

> [accordion] \_\_email\_drafts full type
>
> ```ts theme={null}
> {
>   from: string,
>   to?: {
>     user_name?: string | null,
>     email: string
>   }[],
>   reply_to?: string | null,
>   cc?: {
>     user_name?: string | null,
>     email: string
>   }[],
>   bcc?: {
>     user_name?: string | null,
>     email: string
>   }[],
>   inventory_details?: {
>     inventory_template: {
>       id: string
>     },
>     paper_type: A4 | USLetter,
>     view_type: portrait | landscape
>   } | null,
>   schedule_details?: {
>     time: string,
>     timezone?: string | null,
>     source?: ecOneHourAhead | upTime | ecSchduleBestTime | ecUpComing | ecSchduleTime
>   } | null,
>   rich_text: boolean,
>   subject?: string | null,
>   content?: string | null,
>   plainTextContent?: string | null,
>   source?: string,
>   linked_record?: {
>     id: string,
>     module: {
>       api_name?: string,
>       id?: string
>     }
>   } | null,
>   attachments?: {
>     id: string,
>     file_name?: string,
>     file_size?: string,
>     service_name: string
>   }[]
> }[]
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   __email_drafts?: {
>     code?: string | null,
>     message?: string | null,
>     status?: string | null,
>     details?: {
>       id?: string | null
>     } | null
>   }[] | null
> } | {
>   __email_drafts?: (
>     {
>       code?: string | null,
>       details?: {
>         id?: string | null
>       } | null,
>       message?: string | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       details?: {
>         api_name?: string | null,
>         json_path?: string | null
>       } | null,
>       message?: string | null,
>       status?: string | null
>     }
>   )[] | null
> }
> ```

***

### delete

`emailDrafts.delete`

Delete an Email Draft. Deletes the specified email draft for the given record. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.emailDrafts.delete({ module: 'Leads', record: '4876876000000333001', draft: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specifies the module of the record. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve the API names of modules. |
| `record` | `string` | Yes | Specifies the unique identifier of the record. Use the [Get Records API](record.yaml#\$.paths./module.get) to retrieve record IDs. |
| `draft` | `string` | Yes | Specifies the unique encrypted draft identifier. Use the [Get Email Drafts](email_drafts.yaml#\$.paths./\{module}/\{record}/__email_drafts.get) resource to retrieve draft IDs. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `__email_drafts` | `object[] \| null` | No | List of deleted email draft results. |

> [accordion] \_\_email\_drafts full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   message?: string | null,
>   status?: string | null,
>   details?: {
>     id?: string | null
>   } | null
> }[] | null
> ```

***

### get

`emailDrafts.get`

Get an Email Draft. Retrieves the specified email draft for the given record in the module.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.emailDrafts.get({ module: 'Leads', record: '4876876000000333001', draft: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specifies the module of the record. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve the API names of modules. |
| `record` | `string` | Yes | Specifies the unique identifier of the record. Use the [Get Records API](record.yaml#\$.paths./module.get) to retrieve record IDs. |
| `draft` | `string` | Yes | Specifies the unique encrypted draft identifier. Use the [Get Email Drafts](email_drafts.yaml#\$.paths./\{module}/\{record}/__email_drafts.get) resource to retrieve draft IDs. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   __email_drafts?: {
>     id?: string | null,
>     modified_time?: string | null,
>     created_time?: string | null,
>     from?: string | null,
>     to?: {
>       user_name?: string | null | null,
>       email?: string | null
>     }[] | null | null,
>     reply_to?: string | null | null,
>     cc?: {
>       user_name?: string | null | null,
>       email?: string | null
>     }[] | null | null,
>     bcc?: {
>       user_name?: string | null | null,
>       email?: string | null
>     }[] | null | null,
>     $sharing_permission?: string | null,
>     inventory_details?: {
>       inventory_template?: {
>         name?: string | null,
>         id?: string | null
>       } | null,
>       paper_type?: string | null,
>       view_type?: string | null,
>       record?: {
>         id?: string | null,
>         name?: string | null
>       } | null
>     } | null | null,
>     attachments?: {
>       id?: string | null,
>       file_name?: string | null,
>       file_size?: string | null,
>       service_name?: string | null
>     }[] | null | null,
>     schedule_details?: {
>       time?: string | null,
>       timezone?: string | null | null,
>       source?: string | null
>     } | null | null,
>     rich_text?: boolean | null,
>     subject?: string | null | null,
>     content?: string | null | null,
>     summary?: string | null | null,
>     owner?: {
>       id?: string | null,
>       name?: string | null
>     } | null,
>     source?: string | null,
>     linked_record?: {
>       id?: string | null,
>       module?: {
>         api_name?: string | null,
>         id?: string | null
>       } | null
>     } | null | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### list

`emailDrafts.list`

List Email Drafts for a Record. Retrieves the list of email drafts associated with the specified record in the given module.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.emailDrafts.list({ module: 'Leads', record: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specifies the module of the record. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve the API names of modules. |
| `record` | `string` | Yes | Specifies the unique identifier of the record. Use the [Get Records API](record.yaml#\$.paths./module.get) to retrieve record IDs. |
| `page` | `number \| string` | No | Specifies the page number for pagination. Default:1. |
| `per_page` | `number \| string` | No | Specifies the number of records per page. Default:200. |
| `sort_by` | `created_time \| modified_time` | No | Field to sort the email drafts by. Default:created\_time. |
| `sort_order` | `asc \| desc` | No | Sort direction. Default:asc. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   __email_drafts?: {
>     id?: string | null,
>     modified_time?: string | null,
>     created_time?: string | null,
>     from?: string | null,
>     to?: {
>       user_name?: string | null | null,
>       email?: string | null
>     }[] | null | null,
>     reply_to?: string | null | null,
>     cc?: {
>       user_name?: string | null | null,
>       email?: string | null
>     }[] | null | null,
>     bcc?: {
>       user_name?: string | null | null,
>       email?: string | null
>     }[] | null | null,
>     schedule_details?: {
>       time?: string | null,
>       timezone?: string | null | null,
>       source?: string | null
>     } | null | null,
>     subject?: string | null | null,
>     summary?: string | null | null,
>     $sharing_permission?: string | null,
>     rich_text?: boolean | null,
>     source?: string | null,
>     inventory_details?: {
>       inventory_template?: {
>         name?: string | null,
>         id?: string | null
>       } | null,
>       paper_type?: string | null,
>       view_type?: string | null,
>       record?: {
>         id?: string | null,
>         name?: string | null
>       } | null
>     } | null | null,
>     attachments?: {
>       id?: string | null,
>       file_name?: string | null,
>       file_size?: string | null,
>       service_name?: string | null
>     }[] | null | null,
>     content?: string | null | null,
>     linked_record?: {
>       id?: string | null,
>       module?: {
>         api_name?: string | null,
>         id?: string | null
>       } | null
>     } | null | null,
>     owner?: {
>       id?: string | null,
>       name?: string | null
>     } | null
>   }[] | null,
>   info?: {
>     page?: number | null,
>     per_page?: number | null,
>     count?: number | null,
>     more_records?: boolean | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### update

`emailDrafts.update`

Update an Email Draft. Updates the specified email draft for the given record in the module.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.emailDrafts.update({
	module: 'Leads',
	record: '4876876000000333001',
	draft: 'example',
	__email_drafts: [{ from: 'ada@example.com', rich_text: true }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specifies the module of the record. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve the API names of modules. |
| `record` | `string` | Yes | Specifies the unique identifier of the record. Use the [Get Records API](record.yaml#\$.paths./module.get) to retrieve record IDs. |
| `draft` | `string` | Yes | Specifies the unique encrypted draft identifier. Use the [Get Email Drafts](email_drafts.yaml#\$.paths./\{module}/\{record}/__email_drafts.get) resource to retrieve draft IDs. |
| `__email_drafts` | `object[]` | Yes | List containing the single draft to update. |

> [accordion] \_\_email\_drafts full type
>
> ```ts theme={null}
> {
>   from: string,
>   to?: {
>     user_name?: string | null,
>     email: string
>   }[],
>   reply_to?: string | null,
>   cc?: {
>     user_name?: string | null,
>     email: string
>   }[],
>   bcc?: {
>     user_name?: string | null,
>     email: string
>   }[],
>   inventory_details?: {
>     inventory_template: {
>       id: string
>     },
>     paper_type: A4 | USLetter,
>     view_type: portrait | landscape
>   } | null,
>   schedule_details?: {
>     time: string,
>     timezone?: string | null,
>     source?: ecOneHourAhead | upTime | ecSchduleBestTime | ecUpComing | ecSchduleTime
>   } | null,
>   rich_text: boolean,
>   subject?: string | null,
>   content?: string | null,
>   plainTextContent?: string | null,
>   source?: string,
>   linked_record?: {
>     id: string,
>     module: {
>       api_name?: string,
>       id?: string
>     }
>   } | null,
>   attachments?: {
>     id: string,
>     file_name?: string,
>     file_size?: string,
>     service_name: string,
>     _delete?: boolean
>   }[]
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `__email_drafts` | `object[] \| null` | No | List of updated email draft results. |

> [accordion] \_\_email\_drafts full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   message?: string | null,
>   status?: string | null,
>   details?: {
>     id?: string | null
>   } | null
> }[] | null
> ```

***

### updateMany

`emailDrafts.updateMany`

Update Email Drafts for a Record. Updates one or more email drafts associated with the specified record in the given module.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.emailDrafts.updateMany({
	module: 'Leads',
	record: '4876876000000333001',
	__email_drafts: [{ id: '4876876000000333001', from: 'ada@example.com', rich_text: true }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specifies the module of the record. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve the API names of modules. |
| `record` | `string` | Yes | Specifies the unique identifier of the record. Use the [Get Records API](record.yaml#\$.paths./module.get) to retrieve record IDs. |
| `__email_drafts` | `object[]` | Yes | List of email drafts to update. |

> [accordion] \_\_email\_drafts full type
>
> ```ts theme={null}
> {
>   id: string,
>   from: string,
>   to?: {
>     user_name?: string | null,
>     email: string
>   }[],
>   reply_to?: string | null,
>   cc?: {
>     user_name?: string | null,
>     email: string
>   }[],
>   bcc?: {
>     user_name?: string | null,
>     email: string
>   }[],
>   inventory_details?: {
>     inventory_template: {
>       id: string
>     },
>     paper_type: A4 | USLetter,
>     view_type: portrait | landscape
>   } | null,
>   schedule_details?: {
>     time: string,
>     timezone?: string | null,
>     source?: ecOneHourAhead | upTime | ecSchduleBestTime | ecUpComing | ecSchduleTime
>   } | null,
>   rich_text: boolean,
>   subject?: string | null,
>   content?: string | null,
>   plainTextContent?: string | null,
>   source?: string,
>   linked_record?: {
>     id: string,
>     module: {
>       api_name?: string,
>       id?: string
>     }
>   } | null,
>   attachments?: {
>     id: string,
>     file_name?: string,
>     file_size?: string,
>     service_name: string,
>     _delete?: boolean
>   }[]
> }[]
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   __email_drafts?: {
>     code?: string | null,
>     message?: string | null,
>     status?: string | null,
>     details?: {
>       id?: string | null
>     } | null
>   }[] | null
> } | {
>   __email_drafts?: (
>     {
>       code?: string | null,
>       details?: {
>         id?: string | null
>       } | null,
>       message?: string | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       details?: {
>         api_name?: string | null,
>         json_path?: string | null
>       } | null,
>       message?: string | null,
>       status?: string | null
>     }
>   )[] | null
> }
> ```

***

## Email Notifications

### create

`emailNotifications.create`

Create Email Notifications. Creates an email notification action in your Zoho CRM organization by defining its name, associated module, email template, sender details, and recipients. The email notification can be linked to automation rules so that emails are automatically triggered when the specified conditions are met.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.emailNotifications.create({
	email_notifications: [{
		module: { api_name: 'example', id: '4876876000000333001' },
		name: 'example',
		recipients: {
			to: [{
				type: 'example',
				details: { api_name: 'example' },
			}],
		},
		template: { name: 'example', id: '4876876000000333001' },
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `email_notifications` | `object[]` | Yes | Specify the email notification objects to create. The array must contain exactly one object. |

> [accordion] email\_notifications full type
>
> ```ts theme={null}
> {
>   name: string,
>   module: {
>     api_name: string,
>     id: string
>   },
>   related_module?: {
>     api_name?: string,
>     id?: string
>   } | null,
>   template: {
>     name: string,
>     id: string
>   },
>   recipients: {
>     to: (
>       {
>         type: string,
>         details: {
>           api_name: string,
>           id?: string
>         },
>         resource?: null,
>         associated_to?: null
>       } | {
>         type: string,
>         details: {
>           emails: string[]
>         },
>         resource?: null,
>         associated_to?: null
>       } | {
>         type: string,
>         resource: {
>           name?: string,
>           id: string
>         },
>         details?: null,
>         associated_to?: string | null
>       } | {
>         type: string,
>         resource: {
>           name?: string,
>           id: string
>         },
>         details?: null,
>         associated_to?: string | null
>       } | {
>         type: string,
>         resource: {
>           name?: string,
>           id: string
>         },
>         details?: null,
>         associated_to?: null
>       } | {
>         type: string,
>         resource: {
>           name?: string,
>           id: string
>         },
>         details?: null,
>         associated_to?: null
>       } | {
>         type: string,
>         resource: {
>           name?: string,
>           id: string
>         },
>         details?: null,
>         associated_to?: null
>       } | {
>         type: string,
>         resource: {
>           name?: string,
>           id: string
>         },
>         details?: null,
>         associated_to?: null
>       } | {
>         type: string,
>         resource: {
>           name?: string,
>           id: string
>         },
>         details?: null,
>         associated_to?: null
>       }
>     )[],
>     cc?: (
>       {
>         type: string,
>         details: {
>           api_name: string,
>           id?: string
>         },
>         resource?: null,
>         associated_to?: null
>       } | {
>         type: string,
>         details: {
>           emails: string[]
>         },
>         resource?: null,
>         associated_to?: null
>       } | {
>         type: string,
>         resource: {
>           name?: string,
>           id: string
>         },
>         details?: null,
>         associated_to?: string | null
>       } | {
>         type: string,
>         resource: {
>           name?: string,
>           id: string
>         },
>         details?: null,
>         associated_to?: string | null
>       } | {
>         type: string,
>         resource: {
>           name?: string,
>           id: string
>         },
>         details?: null,
>         associated_to?: null
>       } | {
>         type: string,
>         resource: {
>           name?: string,
>           id: string
>         },
>         details?: null,
>         associated_to?: null
>       } | {
>         type: string,
>         resource: {
>           name?: string,
>           id: string
>         },
>         details?: null,
>         associated_to?: null
>       } | {
>         type: string,
>         resource: {
>           name?: string,
>           id: string
>         },
>         details?: null,
>         associated_to?: null
>       } | {
>         type: string,
>         resource: {
>           name?: string,
>           id: string
>         },
>         details?: null,
>         associated_to?: null
>       }
>     )[],
>     bcc?: (
>       {
>         type: string,
>         details: {
>           api_name: string,
>           id?: string
>         },
>         resource?: null,
>         associated_to?: null
>       } | {
>         type: string,
>         details: {
>           emails: string[]
>         },
>         resource?: null,
>         associated_to?: null
>       } | {
>         type: string,
>         resource: {
>           name?: string,
>           id: string
>         },
>         details?: null,
>         associated_to?: string | null
>       } | {
>         type: string,
>         resource: {
>           name?: string,
>           id: string
>         },
>         details?: null,
>         associated_to?: string | null
>       } | {
>         type: string,
>         resource: {
>           name?: string,
>           id: string
>         },
>         details?: null,
>         associated_to?: null
>       } | {
>         type: string,
>         resource: {
>           name?: string,
>           id: string
>         },
>         details?: null,
>         associated_to?: null
>       } | {
>         type: string,
>         resource: {
>           name?: string,
>           id: string
>         },
>         details?: null,
>         associated_to?: null
>       } | {
>         type: string,
>         resource: {
>           name?: string,
>           id: string
>         },
>         details?: null,
>         associated_to?: null
>       } | {
>         type: string,
>         resource: {
>           name?: string,
>           id: string
>         },
>         details?: null,
>         associated_to?: null
>       }
>     )[]
>   },
>   from_address?: {
>     type: string,
>     details: {
>       api_name: string,
>       id?: string
>     },
>     resource?: null
>   } | {
>     type: string,
>     resource: {
>       name?: string,
>       id: string
>     },
>     details?: null
>   } | {
>     type: string,
>     resource: {
>       name?: string,
>       id: string
>     },
>     details?: null
>   } | {
>     type: string,
>     details: {
>       email: string
>     },
>     resource?: null
>   },
>   reply_to_address?: {
>     type: string,
>     details: {
>       api_name: string,
>       id?: string
>     },
>     resource?: null
>   } | {
>     type: string,
>     resource: {
>       name?: string,
>       id: string
>     },
>     details?: null
>   } | {
>     type: string,
>     resource: {
>       name?: string,
>       id: string
>     },
>     details?: null
>   } | null,
>   bulk_email?: boolean,
>   feature_type?: workflow | approval_process | blueprint | blueprint_transition | blueprint_state | review_process | orchestration | assignment_rules | kiosk | pathfinder | connected_workflows | commandcenter_service | cadences
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `email_notifications` | `object[] \| null` | No | Represents the list of email notification objects created in the request. Contains one item representing the successfully created email notification. |

> [accordion] email\_notifications full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### delete

`emailNotifications.delete`

Delete an Email Notification by ID. Deletes a single email notification configured in your Zoho CRM organization. Email notifications associated with an Approval Process, Workflow Rules, or Blueprint cannot be deleted until they are disassociated from the corresponding automation. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.emailNotifications.delete({ id: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Specify the unique ID of the email notification to delete. Notifications associated with active automation cannot be deleted - returns NOT\_ALLOWED |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `email_notifications` | `object[] \| null` | No | Represents the result of the delete operation for the specified email notification. |

> [accordion] email\_notifications full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### deleteMany

`emailNotifications.deleteMany`

Delete Email Notifications. To delete one or more email notifications configured in your Zoho CRM organization. Email notifications associated with an Approval Process, Workflow Rule, Blueprint, or CommandCenter automation cannot be deleted until they are disassociated from the corresponding automation. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.emailNotifications.deleteMany({ ids: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `ids` | `string` | Yes | Specify the unique IDs of the email notifications to delete. Accepts comma-separated values. Maximum: 10. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   email_notifications?: {
>     code?: string | null,
>     details?: {
>       id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   email_notifications?: (
>     {
>       code?: string | null,
>       details?: {
>         id?: string | null
>       } | null,
>       message?: string | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       details?: {
>         id?: string | null
>       } | null,
>       message?: string | null,
>       status?: string | null
>     }
>   )[] | null
> }
> ```

***

### get

`emailNotifications.get`

Get an Email Notification by ID. Retrieves the details of a specific email notification configured in your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.emailNotifications.get({ id: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Specify the unique ID of the email notification definition to retrieve. |
| `include_inner_details` | `module.plural_label \| related_module.plural_label \| from_address.field_label` | No | Specify the additional detail fields to include in the response. Accepts comma-separated values to request more than one. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   email_notifications?: {
>     id?: string | null,
>     name?: string | null,
>     module?: {
>       api_name?: string | null,
>       id?: string | null
>     } | null,
>     related_module?: {
>       api_name?: string | null,
>       id?: string | null
>     } | null | null,
>     template?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     recipients?: {
>       to?: (
>         {
>           type?: string | null,
>           details?: {
>             api_name?: string | null,
>             id?: string | null
>           } | null,
>           resource?: null | null,
>           associated_to?: null | null
>         } | {
>           type?: string | null,
>           details?: {
>             emails?: string[] | null
>           } | null,
>           resource?: null | null,
>           associated_to?: null | null
>         } | {
>           type?: string | null,
>           resource?: {
>             name?: string | null,
>             id?: string | null
>           } | null,
>           details?: null | null,
>           associated_to?: string | null | null
>         } | {
>           type?: string | null,
>           resource?: {
>             name?: string | null,
>             id?: string | null
>           } | null,
>           details?: null | null,
>           associated_to?: string | null | null
>         } | {
>           type?: string | null,
>           resource?: {
>             name?: string | null,
>             id?: string | null
>           } | null,
>           details?: null | null,
>           associated_to?: null | null
>         } | {
>           type?: string | null,
>           resource?: {
>             name?: string | null,
>             id?: string | null
>           } | null,
>           details?: null | null,
>           associated_to?: null | null
>         } | {
>           type?: string | null,
>           resource?: {
>             name?: string | null,
>             id?: string | null
>           } | null,
>           details?: null | null,
>           associated_to?: null | null
>         } | {
>           type?: string | null,
>           resource?: {
>             name?: string | null,
>             id?: string | null
>           } | null,
>           details?: null | null,
>           associated_to?: null | null
>         } | {
>           type?: string | null,
>           resource?: {
>             name?: string | null,
>             id?: string | null
>           } | null,
>           details?: null | null,
>           associated_to?: null | null
>         }
>       )[] | null,
>       cc?: (
>         {
>           type?: string | null,
>           details?: {
>             api_name?: string | null,
>             id?: string | null
>           } | null,
>           resource?: null | null,
>           associated_to?: null | null
>         } | {
>           type?: string | null,
>           details?: {
>             emails?: string[] | null
>           } | null,
>           resource?: null | null,
>           associated_to?: null | null
>         } | {
>           type?: string | null,
>           resource?: {
>             name?: string | null,
>             id?: string | null
>           } | null,
>           details?: null | null,
>           associated_to?: string | null | null
>         } | {
>           type?: string | null,
>           resource?: {
>             name?: string | null,
>             id?: string | null
>           } | null,
>           details?: null | null,
>           associated_to?: string | null | null
>         } | {
>           type?: string | null,
>           resource?: {
>             name?: string | null,
>             id?: string | null
>           } | null,
>           details?: null | null,
>           associated_to?: null | null
>         } | {
>           type?: string | null,
>           resource?: {
>             name?: string | null,
>             id?: string | null
>           } | null,
>           details?: null | null,
>           associated_to?: null | null
>         } | {
>           type?: string | null,
>           resource?: {
>             name?: string | null,
>             id?: string | null
>           } | null,
>           details?: null | null,
>           associated_to?: null | null
>         } | {
>           type?: string | null,
>           resource?: {
>             name?: string | null,
>             id?: string | null
>           } | null,
>           details?: null | null,
>           associated_to?: null | null
>         } | {
>           type?: string | null,
>           resource?: {
>             name?: string | null,
>             id?: string | null
>           } | null,
>           details?: null | null,
>           associated_to?: null | null
>         }
>       )[] | null,
>       bcc?: (
>         {
>           type?: string | null,
>           details?: {
>             api_name?: string | null,
>             id?: string | null
>           } | null,
>           resource?: null | null,
>           associated_to?: null | null
>         } | {
>           type?: string | null,
>           details?: {
>             emails?: string[] | null
>           } | null,
>           resource?: null | null,
>           associated_to?: null | null
>         } | {
>           type?: string | null,
>           resource?: {
>             name?: string | null,
>             id?: string | null
>           } | null,
>           details?: null | null,
>           associated_to?: string | null | null
>         } | {
>           type?: string | null,
>           resource?: {
>             name?: string | null,
>             id?: string | null
>           } | null,
>           details?: null | null,
>           associated_to?: string | null | null
>         } | {
>           type?: string | null,
>           resource?: {
>             name?: string | null,
>             id?: string | null
>           } | null,
>           details?: null | null,
>           associated_to?: null | null
>         } | {
>           type?: string | null,
>           resource?: {
>             name?: string | null,
>             id?: string | null
>           } | null,
>           details?: null | null,
>           associated_to?: null | null
>         } | {
>           type?: string | null,
>           resource?: {
>             name?: string | null,
>             id?: string | null
>           } | null,
>           details?: null | null,
>           associated_to?: null | null
>         } | {
>           type?: string | null,
>           resource?: {
>             name?: string | null,
>             id?: string | null
>           } | null,
>           details?: null | null,
>           associated_to?: null | null
>         } | {
>           type?: string | null,
>           resource?: {
>             name?: string | null,
>             id?: string | null
>           } | null,
>           details?: null | null,
>           associated_to?: null | null
>         }
>       )[] | null
>     } | null,
>     from_address?: {
>       type?: string | null,
>       details?: {
>         api_name?: string | null,
>         id?: string | null
>       } | null,
>       resource?: null | null
>     } | {
>       type?: string | null,
>       resource?: {
>         name?: string | null,
>         id?: string | null
>       } | null,
>       details?: null | null
>     } | {
>       type?: string | null,
>       resource?: {
>         name?: string | null,
>         id?: string | null
>       } | null,
>       details?: null | null
>     } | {
>       type?: string | null,
>       details?: {
>         email?: string | null
>       } | null,
>       resource?: null | null
>     } | null,
>     reply_to_address?: {
>       type?: string | null,
>       details?: {
>         api_name?: string | null,
>         id?: string | null
>       } | null,
>       resource?: null | null
>     } | {
>       type?: string | null,
>       resource?: {
>         name?: string | null,
>         id?: string | null
>       } | null,
>       details?: null | null
>     } | {
>       type?: string | null,
>       resource?: {
>         name?: string | null,
>         id?: string | null
>       } | null,
>       details?: null | null
>     } | null | null,
>     bulk_email?: boolean | null,
>     feature_type?: string | null,
>     associated?: boolean | null,
>     source?: string | null,
>     recipient_count?: string | null,
>     editable?: boolean | null,
>     deletable?: boolean | null,
>     lock_status?: {
>       locked?: boolean | null
>     } | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     created_time?: string | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     modified_time?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### getUsageReports

`emailNotifications.getUsageReports`

Get Email Notification Action Usage Reports. Retrieves usage statistics for email notification actions executed in your Zoho CRM organization over a specified date range, grouped by date, resource, or type according to the group\_by parameter.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.emailNotifications.getUsageReports({ group_by: 'date' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `group_by` | `date \| date,resource \| date,resource,type` | Yes | Specify the grouping criteria for usage report data. The value must include `date`. Two combinations are accepted: `date` - Returns daily totals; the response omits the resource object, and the count represents the total number of alerts sent that day. `date,resource` - Returns per-action rows with the resource identifier and name populated; type is an optional addition. |
| `type` | `workflow_rules \| approval_process \| blueprint \| orchestrations \| wizards \| modules \| email_notifications \| email_templates \| kiosks \| cadences \| connected_workflows` | No | Specify the automation feature type to filter usage data. When omitted, returns usage across all supported feature types. Possible values: workflow\_rules - Filters usage data for Workflow Rules. approval\_process - Filters usage data for Approval Processes. blueprint - Filters usage data for Blueprint Processes. orchestrations - Filters usage data for Orchestrations. wizards - Filters usage data for Wizards. modules - Filters usage data for module-level limits. email\_notifications - Filters usage data for email notification actions. email\_templates - Filters usage data for Email Templates. kiosks - Filters usage data for Kiosks. cadences - Filters usage data for Cadences. connected\_workflows - Filters usage data for connected workflows. |
| `from` | `string` | No | Specify the start date (inclusive) for the date range filter, in YYYY-MM-DD format. The date is evaluated in the organization's time zone. When omitted, defaults to 30 days before the value set for the end date parameter. Future dates return an INVALID\_DATA error. |
| `to` | `string` | No | Specify the end date (inclusive) for the query range in YYYY-MM-DD format. Evaluated in the organization's time zone. Defaults to the current date at 23:59:59 when omitted. Future dates return a 400 error with the code INVALID\_DATA and the message 'provided\_time\_is\_ahead'. |
| `page` | `number \| string` | No | Specify the page number to retrieve results from. The first page is page one. |
| `per_page` | `number \| string` | No | Specify the number of records to return per page. The maximum value is 200. |
| `sort_order` | `desc \| asc` | No | Specify the sort order for the results. Possible values: desc - Sorts the results in descending order. asc - Sorts the results in ascending order. |
| `include_inner_details` | `string` | No | Specify the additional nested fields to include in usage report resource objects. Currently, only `resource.layout_id` is supported, which adds the layout ID inside the resource object when available, primarily for wizard usage rows. Other values are silently ignored. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data_usage?: {
>     date?: string | null,
>     resource?: {
>       id?: string | null,
>       name?: string | null,
>       layout_id?: string | null
>     } | null,
>     count?: number | null,
>     type?: string | null
>   }[] | null,
>   info?: {
>     per_page?: number | null,
>     count?: number | null,
>     page?: number | null,
>     more_records?: boolean | null,
>     max_limit?: number | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### list

`emailNotifications.list`

List Email Notifications. Retrieves the list of email notifications configured in your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.emailNotifications.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `filters` | `string` | No | Specify the filter criteria as a JSON-encoded string to narrow the list of email notifications returned. Supported filter field: `field.api_name='name'` with `comparator='contains'`. The value field is dynamic and varies based on the filter input. |
| `module` | `string` | No | Specify the API name of the CRM module to filter the results. Refer to the [Get Modules](modules.yaml#\$.paths./settings/modules.get) resource for valid values. |
| `related_module` | `string` | No | Specify the API name of the related module to filter the results. Refer to the [Get Modules](modules.yaml#\$.paths./settings/modules.get) resource for valid values. |
| `feature_type` | `workflow \| approval_process \| blueprint \| blueprint_transition \| blueprint_state \| review_process \| orchestration \| assignment_rules \| kiosk \| pathfinder \| connected_workflows \| commandcenter_service \| cadences` | No | Specify the automation feature type to filter the results. When omitted, returns email notifications across all feature types. |
| `page` | `number \| string` | No | Specify the page number to retrieve results from. The first page is page one. |
| `per_page` | `number \| string` | No | Specify the number of records to return per page. The maximum value is 200. |
| `sort_by` | `string` | No | Specify the field by which to sort the results. Currently, only `modified_time` is supported. |
| `sort_order` | `desc \| asc` | No | Specify the sort order for the results. Possible values: desc - Sorts the results in descending order. asc - Sorts the results in ascending order. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   email_notifications?: {
>     template?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     reply_to_address?: {
>       type?: string | null,
>       details?: {
>         api_name?: string | null,
>         id?: string | null
>       } | null,
>       resource?: null | null
>     } | {
>       type?: string | null,
>       resource?: {
>         name?: string | null,
>         id?: string | null
>       } | null,
>       details?: null | null
>     } | {
>       type?: string | null,
>       resource?: {
>         name?: string | null,
>         id?: string | null
>       } | null,
>       details?: null | null
>     } | null | null,
>     created_time?: string | null,
>     lock_status?: {
>       locked?: boolean | null
>     } | null,
>     editable?: boolean | null,
>     module?: {
>       api_name?: string | null,
>       id?: string | null
>     } | null,
>     related_module?: {
>       api_name?: string | null,
>       id?: string | null
>     } | null | null,
>     deletable?: boolean | null,
>     recipient_count?: string | null,
>     source?: string | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     feature_type?: string | null,
>     modified_time?: string | null,
>     bulk_email?: boolean | null,
>     recipients?: {
>       to?: (
>         {
>           type?: string | null,
>           details?: {
>             api_name?: string | null,
>             id?: string | null
>           } | null,
>           resource?: null | null,
>           associated_to?: null | null
>         } | {
>           type?: string | null,
>           details?: {
>             emails?: string[] | null
>           } | null,
>           resource?: null | null,
>           associated_to?: null | null
>         } | {
>           type?: string | null,
>           resource?: {
>             name?: string | null,
>             id?: string | null
>           } | null,
>           details?: null | null,
>           associated_to?: string | null | null
>         } | {
>           type?: string | null,
>           resource?: {
>             name?: string | null,
>             id?: string | null
>           } | null,
>           details?: null | null,
>           associated_to?: string | null | null
>         } | {
>           type?: string | null,
>           resource?: {
>             name?: string | null,
>             id?: string | null
>           } | null,
>           details?: null | null,
>           associated_to?: null | null
>         } | {
>           type?: string | null,
>           resource?: {
>             name?: string | null,
>             id?: string | null
>           } | null,
>           details?: null | null,
>           associated_to?: null | null
>         } | {
>           type?: string | null,
>           resource?: {
>             name?: string | null,
>             id?: string | null
>           } | null,
>           details?: null | null,
>           associated_to?: null | null
>         } | {
>           type?: string | null,
>           resource?: {
>             name?: string | null,
>             id?: string | null
>           } | null,
>           details?: null | null,
>           associated_to?: null | null
>         } | {
>           type?: string | null,
>           resource?: {
>             name?: string | null,
>             id?: string | null
>           } | null,
>           details?: null | null,
>           associated_to?: null | null
>         }
>       )[] | null,
>       cc?: (
>         {
>           type?: string | null,
>           details?: {
>             api_name?: string | null,
>             id?: string | null
>           } | null,
>           resource?: null | null,
>           associated_to?: null | null
>         } | {
>           type?: string | null,
>           details?: {
>             emails?: string[] | null
>           } | null,
>           resource?: null | null,
>           associated_to?: null | null
>         } | {
>           type?: string | null,
>           resource?: {
>             name?: string | null,
>             id?: string | null
>           } | null,
>           details?: null | null,
>           associated_to?: string | null | null
>         } | {
>           type?: string | null,
>           resource?: {
>             name?: string | null,
>             id?: string | null
>           } | null,
>           details?: null | null,
>           associated_to?: string | null | null
>         } | {
>           type?: string | null,
>           resource?: {
>             name?: string | null,
>             id?: string | null
>           } | null,
>           details?: null | null,
>           associated_to?: null | null
>         } | {
>           type?: string | null,
>           resource?: {
>             name?: string | null,
>             id?: string | null
>           } | null,
>           details?: null | null,
>           associated_to?: null | null
>         } | {
>           type?: string | null,
>           resource?: {
>             name?: string | null,
>             id?: string | null
>           } | null,
>           details?: null | null,
>           associated_to?: null | null
>         } | {
>           type?: string | null,
>           resource?: {
>             name?: string | null,
>             id?: string | null
>           } | null,
>           details?: null | null,
>           associated_to?: null | null
>         } | {
>           type?: string | null,
>           resource?: {
>             name?: string | null,
>             id?: string | null
>           } | null,
>           details?: null | null,
>           associated_to?: null | null
>         }
>       )[] | null,
>       bcc?: (
>         {
>           type?: string | null,
>           details?: {
>             api_name?: string | null,
>             id?: string | null
>           } | null,
>           resource?: null | null,
>           associated_to?: null | null
>         } | {
>           type?: string | null,
>           details?: {
>             emails?: string[] | null
>           } | null,
>           resource?: null | null,
>           associated_to?: null | null
>         } | {
>           type?: string | null,
>           resource?: {
>             name?: string | null,
>             id?: string | null
>           } | null,
>           details?: null | null,
>           associated_to?: string | null | null
>         } | {
>           type?: string | null,
>           resource?: {
>             name?: string | null,
>             id?: string | null
>           } | null,
>           details?: null | null,
>           associated_to?: string | null | null
>         } | {
>           type?: string | null,
>           resource?: {
>             name?: string | null,
>             id?: string | null
>           } | null,
>           details?: null | null,
>           associated_to?: null | null
>         } | {
>           type?: string | null,
>           resource?: {
>             name?: string | null,
>             id?: string | null
>           } | null,
>           details?: null | null,
>           associated_to?: null | null
>         } | {
>           type?: string | null,
>           resource?: {
>             name?: string | null,
>             id?: string | null
>           } | null,
>           details?: null | null,
>           associated_to?: null | null
>         } | {
>           type?: string | null,
>           resource?: {
>             name?: string | null,
>             id?: string | null
>           } | null,
>           details?: null | null,
>           associated_to?: null | null
>         } | {
>           type?: string | null,
>           resource?: {
>             name?: string | null,
>             id?: string | null
>           } | null,
>           details?: null | null,
>           associated_to?: null | null
>         }
>       )[] | null
>     } | null,
>     associated?: boolean | null,
>     name?: string | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     id?: string | null,
>     from_address?: {
>       type?: string | null,
>       details?: {
>         api_name?: string | null,
>         id?: string | null
>       } | null,
>       resource?: null | null
>     } | {
>       type?: string | null,
>       resource?: {
>         name?: string | null,
>         id?: string | null
>       } | null,
>       details?: null | null
>     } | {
>       type?: string | null,
>       resource?: {
>         name?: string | null,
>         id?: string | null
>       } | null,
>       details?: null | null
>     } | {
>       type?: string | null,
>       details?: {
>         email?: string | null
>       } | null,
>       resource?: null | null
>     } | null
>   }[] | null,
>   info?: {
>     max_limit?: number | null,
>     per_page?: number | null,
>     count?: number | null,
>     page?: number | null,
>     more_records?: boolean | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### update

`emailNotifications.update`

Update an Email Notification by ID. Updates an existing email notification in your Zoho CRM organization.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.emailNotifications.update({
	id: '4876876000000333001',
	email_notifications: [{
		name: 'example',
		template: { name: 'example', id: '4876876000000333001' },
		recipients: {
			to: [{
				type: 'example',
				details: { api_name: 'example' },
			}],
		},
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Specify the unique ID of the email notification to update. |
| `email_notifications` | `object[]` | Yes | Specify the email notification object to update. The array must contain exactly one object with the fields to modify. |

> [accordion] email\_notifications full type
>
> ```ts theme={null}
> {
>   name: string,
>   template: {
>     name: string,
>     id: string
>   },
>   recipients: {
>     to: (
>       {
>         type: string,
>         details: {
>           api_name: string,
>           id?: string
>         },
>         resource?: null,
>         associated_to?: null
>       } | {
>         type: string,
>         details: {
>           emails: string[]
>         },
>         resource?: null,
>         associated_to?: null
>       } | {
>         type: string,
>         resource: {
>           name?: string,
>           id: string
>         },
>         details?: null,
>         associated_to?: string | null
>       } | {
>         type: string,
>         resource: {
>           name?: string,
>           id: string
>         },
>         details?: null,
>         associated_to?: string | null
>       } | {
>         type: string,
>         resource: {
>           name?: string,
>           id: string
>         },
>         details?: null,
>         associated_to?: null
>       } | {
>         type: string,
>         resource: {
>           name?: string,
>           id: string
>         },
>         details?: null,
>         associated_to?: null
>       } | {
>         type: string,
>         resource: {
>           name?: string,
>           id: string
>         },
>         details?: null,
>         associated_to?: null
>       } | {
>         type: string,
>         resource: {
>           name?: string,
>           id: string
>         },
>         details?: null,
>         associated_to?: null
>       } | {
>         type: string,
>         resource: {
>           name?: string,
>           id: string
>         },
>         details?: null,
>         associated_to?: null
>       }
>     )[],
>     cc?: (
>       {
>         type: string,
>         details: {
>           api_name: string,
>           id?: string
>         },
>         resource?: null,
>         associated_to?: null
>       } | {
>         type: string,
>         details: {
>           emails: string[]
>         },
>         resource?: null,
>         associated_to?: null
>       } | {
>         type: string,
>         resource: {
>           name?: string,
>           id: string
>         },
>         details?: null,
>         associated_to?: string | null
>       } | {
>         type: string,
>         resource: {
>           name?: string,
>           id: string
>         },
>         details?: null,
>         associated_to?: string | null
>       } | {
>         type: string,
>         resource: {
>           name?: string,
>           id: string
>         },
>         details?: null,
>         associated_to?: null
>       } | {
>         type: string,
>         resource: {
>           name?: string,
>           id: string
>         },
>         details?: null,
>         associated_to?: null
>       } | {
>         type: string,
>         resource: {
>           name?: string,
>           id: string
>         },
>         details?: null,
>         associated_to?: null
>       } | {
>         type: string,
>         resource: {
>           name?: string,
>           id: string
>         },
>         details?: null,
>         associated_to?: null
>       } | {
>         type: string,
>         resource: {
>           name?: string,
>           id: string
>         },
>         details?: null,
>         associated_to?: null
>       }
>     )[],
>     bcc?: (
>       {
>         type: string,
>         details: {
>           api_name: string,
>           id?: string
>         },
>         resource?: null,
>         associated_to?: null
>       } | {
>         type: string,
>         details: {
>           emails: string[]
>         },
>         resource?: null,
>         associated_to?: null
>       } | {
>         type: string,
>         resource: {
>           name?: string,
>           id: string
>         },
>         details?: null,
>         associated_to?: string | null
>       } | {
>         type: string,
>         resource: {
>           name?: string,
>           id: string
>         },
>         details?: null,
>         associated_to?: string | null
>       } | {
>         type: string,
>         resource: {
>           name?: string,
>           id: string
>         },
>         details?: null,
>         associated_to?: null
>       } | {
>         type: string,
>         resource: {
>           name?: string,
>           id: string
>         },
>         details?: null,
>         associated_to?: null
>       } | {
>         type: string,
>         resource: {
>           name?: string,
>           id: string
>         },
>         details?: null,
>         associated_to?: null
>       } | {
>         type: string,
>         resource: {
>           name?: string,
>           id: string
>         },
>         details?: null,
>         associated_to?: null
>       } | {
>         type: string,
>         resource: {
>           name?: string,
>           id: string
>         },
>         details?: null,
>         associated_to?: null
>       }
>     )[]
>   },
>   from_address?: {
>     type: string,
>     details: {
>       api_name: string,
>       id?: string
>     },
>     resource?: null
>   } | {
>     type: string,
>     resource: {
>       name?: string,
>       id: string
>     },
>     details?: null
>   } | {
>     type: string,
>     resource: {
>       name?: string,
>       id: string
>     },
>     details?: null
>   } | {
>     type: string,
>     details: {
>       email: string
>     },
>     resource?: null
>   },
>   reply_to_address?: {
>     type: string,
>     details: {
>       api_name: string,
>       id?: string
>     },
>     resource?: null
>   } | {
>     type: string,
>     resource: {
>       name?: string,
>       id: string
>     },
>     details?: null
>   } | {
>     type: string,
>     resource: {
>       name?: string,
>       id: string
>     },
>     details?: null
>   } | null
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `email_notifications` | `object[] \| null` | No | Represents the list of updated email notification definitions. Contains one object with the details of the email notification that was updated. |

> [accordion] email\_notifications full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null,
>     email?: string | null,
>     api_name?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

## Emails

### associate

`emails.associate`

Associate Email. Associates an email with a specific record in a module, creating a link between the email and the CRM record.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.emails.associate({
	module: 'Leads',
	recordId: '4876876000000333001',
	data: [{
		from: { email: 'ada@example.com' },
		to: [{ email: 'ada@example.com' }],
		subject: 'example',
		content: 'example',
		original_message_id: 'example',
		sent: true,
		date_time: 'example',
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | The API name of the module containing the record. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve the module API names. |
| `recordId` | `string` | Yes | The unique ID of the record to associate the email with. Use the [Get Records API](record.yaml#\$.paths./module.get) to retrieve record IDs. |
| `data` | `object[]` | Yes | List of email objects to associate with the record. |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   from: {
>     user_name?: string,
>     email: string
>   },
>   to: {
>     user_name?: string,
>     email: string
>   }[],
>   cc?: {
>     user_name?: string,
>     email: string
>   }[],
>   bcc?: {
>     user_name?: string,
>     email: string
>   }[],
>   subject: string,
>   content: string,
>   mail_format?: text | html,
>   original_message_id: string,
>   sent: boolean,
>   date_time: string,
>   attachments?: {
>     id: string
>   }[]
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `Emails` | `object[] \| null` | No | Array of result statuses for each email association operation. |

> [accordion] Emails full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     message_id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### downloadAttachments

`emails.downloadAttachments`

Download an email attachment. To download the binary content of an attachment that belongs to an email associated with a record in your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.emails.downloadAttachments({
	module: 'Leads',
	recordId: '4876876000000333001',
	user_id: 1,
	message_id: 'example',
	id: '4876876000000333001',
	name: 'example',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the API name of the CRM module that contains the record associated with the email. Refer to the [Get Modules](modules.yaml#\$.paths./settings/modules.get) resource for module details. |
| `recordId` | `string` | Yes | Specify the unique ID of the record that the email is associated with. |
| `user_id` | `number \| string` | Yes | Specify the unique ID of the user who sent the email. Refer to the [Get Users](users.yaml#\$.paths./users.get) resource for valid values. |
| `message_id` | `string` | Yes | The message ID you get in the response when you send an email. Refer to the "message\_id" key in the response of [Send Mail API](send_mail.yaml#\$.paths.//\{moduleName}/\{id}/actions/send_mail.post) or [Get Emails](emails.yaml#\$.paths./\{moduleApiName}/\{id}/Emails.get) of a Record API to get the message ID. |
| `id` | `string` | Yes | Specify the unique ID of the attachment to download. |
| `name` | `string` | Yes | Specify the file name of the attachment to download. You can get this from the response of [Get Emails API](emails.yaml#\$.paths./\{moduleApiName}/\{id}/Emails.get). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `contentBase64` | `string` | No | The file, base64-encoded. Missing when the file came back as text or contentOmitted is set. |
| `text` | `string` | No | The file as text, in place of contentBase64, when it is a text file (CSV, JSON, Markdown, XML and the like) in UTF-8. |
| `contentType` | `string` | Yes | Media type of the file, for example application/pdf. |
| `byteLength` | `number` | Yes | Size of the file in bytes. |
| `filename` | `string` | No | The file name, when known. |
| `contentOmitted` | `not_requested \| over_limit` | No | Set when the content was left out: the caller did not ask for it, or the file was over the limit. |
| `fileId` | `string` | No | Where the host saved the file. Over the limit it comes in place of the content; a host that keeps every file sets it beside the content too. On Corsair it is a Files id (fil\_…): pass it to another app wherever that app takes a file URL, or read a text file or PDF with files.read\_text. |

***

### downloadInlineImages

`emails.downloadInlineImages`

Download an inline image from an email. To download an inline image embedded in an email associated with a record in your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.emails.downloadInlineImages({
	module: 'Leads',
	recordId: '4876876000000333001',
	user_id: 1,
	message_id: 'example',
	id: '4876876000000333001',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the API name of the module to which the record belongs. Supported modules include Leads, Accounts, Contacts, Deals, Quotes, Invoices, Sales Orders, Purchase Orders, and custom modules. |
| `recordId` | `string` | Yes | Specify the unique ID of the record associated with the email containing the inline image. |
| `user_id` | `number \| string` | Yes | The unique ID of the record owner whose email you want to retrieve. Use the [Get Users API](users.yaml#\$.paths./users.get) to get the user's ID. |
| `message_id` | `string` | Yes | Specify the message ID of the email containing the inline image. Refer to the **message\_id** key in the response of [Send Mail API](send_mail.yaml#\$.paths./\{moduleName}/\{id}/actions/send_mail.post) or [Get Emails API](emails.yaml#\$.paths./\{moduleApiName}/\{id}/Emails.get) to obtain this ID. |
| `id` | `string` | Yes | Specify the unique ID of the inline image to download. Refer to the **img\_id** property in the **content** key of the [Get Emails API](emails.yaml#\$.paths./\{moduleApiName}/\{id}/Emails.get) response to obtain this ID. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `contentBase64` | `string` | No | The file, base64-encoded. Missing when the file came back as text or contentOmitted is set. |
| `text` | `string` | No | The file as text, in place of contentBase64, when it is a text file (CSV, JSON, Markdown, XML and the like) in UTF-8. |
| `contentType` | `string` | Yes | Media type of the file, for example application/pdf. |
| `byteLength` | `number` | Yes | Size of the file in bytes. |
| `filename` | `string` | No | The file name, when known. |
| `contentOmitted` | `not_requested \| over_limit` | No | Set when the content was left out: the caller did not ask for it, or the file was over the limit. |
| `fileId` | `string` | No | Where the host saved the file. Over the limit it comes in place of the content; a host that keeps every file sets it beside the content too. On Corsair it is a Files id (fil\_…): pass it to another app wherever that app takes a file URL, or read a text file or PDF with files.read\_text. |

***

### getSharingDetails

`emails.getSharingDetails`

Get email sharing details for a record. To retrieve the email sharing details for a specific record in your Zoho CRM organization, including the users whose email accounts are accessible and the available email filter options for the record's email view.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.emails.getSharingDetails({ moduleApiName: 'Leads', id: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `moduleApiName` | `Leads \| Contacts \| Accounts \| Deals \| CustomModule1` | Yes | Specifies the **API name** of the module for which you want to retrieve the email sharing details. Possible values: **Leads**, **Contacts**, **Accounts**, **Deals**, **CustomModule1**. Refer to the [Retrieve CRM module metadata](modules.json#\$.paths./settings/modules.get) resource for valid values. |
| `id` | `string` | Yes | Specify the **ID** of the **record** for which you want to retrieve the email sharing details. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   __emails_sharing_details?: {
>     shared_from_users?: {
>       name?: string | null,
>       _type?: string | null,
>       id?: string | null
>     }[] | null | null,
>     available_types?: string[] | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### link

`emails.link`

Link Deal Email. Links an email to a specified record in CRM.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.emails.link({ contactId: '4876876000000333001', messageId: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `contactId` | `string` | Yes | The ID of the contact to which the email is to be linked or unlinked |
| `messageId` | `string` | Yes | The ID of the email message to be linked or unlinked |
| `Emails` | `object[]` | No | List of emails to be linked to records |

> [accordion] Emails full type
>
> ```ts theme={null}
> {
>   owner: {
>     id?: string
>   },
>   linked_record: {
>     module: {
>       api_name?: string,
>       id: string
>     },
>     name?: string,
>     id: string
>   }
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `Emails` | `object[] \| null` | No | List of email link operation results |

> [accordion] Emails full type
>
> ```ts theme={null}
> {
>   status?: string | null,
>   code?: string | null,
>   message?: string | null,
>   details?: {
>     message_id?: string | null
>   } | null
> }[] | null
> ```

***

### linkMany

`emails.linkMany`

Link Emails to Deals. To link a deal with one or more of a contact's emails. An email can only be linked to a single deal at a time. Zoho CRM automatically links a contact's incoming emails to the deals using the Deal Prediction Mechanism.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.emails.linkMany({ contactId: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `contactId` | `string` | Yes | The ID of the contact to which the email is to be linked or unlinked |
| `Emails` | `object[]` | No | Array containing the details of the emails to link to deals. Mandatory. |

> [accordion] Emails full type
>
> ```ts theme={null}
> {
>   message_id: string,
>   owner: {
>     id?: string
>   },
>   linked_record: {
>     module: {
>       api_name?: string,
>       id: string
>     },
>     name?: string,
>     id: string
>   }
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `Emails` | `object[] \| null` | No | List of email link operation results |

> [accordion] Emails full type
>
> ```ts theme={null}
> {
>   status?: string | null,
>   code?: string | null,
>   message?: string | null,
>   details?: {
>     message_id?: string | null
>   } | null
> }[] | null
> ```

***

### send

`emails.send`

Send an email to a record. To send an email to a specific record in your Zoho CRM organization using a template or custom email content. Sends the email from Zoho CRM to the recipients.

**Risk:** `destructive`

```ts theme={null}
await corsair.zohocrm.api.emails.send({
	moduleName: 'Leads',
	id: '4876876000000333001',
	data: [{
		from: { email: 'ada@example.com' },
		to: [{ email: 'ada@example.com' }],
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `moduleName` | `string` | Yes | Specify the API name of the Zoho CRM module for which the record exists. Refer to the [Get Modules](modules.yaml#\$.paths./settings/modules.get) resource for valid values. Supported modules: Leads, Contacts, Deals, Accounts, Sales Orders, Purchase Orders, Invoices, Quotes, Cases, Vendors, and Custom Modules. |
| `id` | `string` | Yes | Specify the unique ID of the record to send the email to. |
| `data` | `object[]` | Yes | Contains the list of email configuration objects to send. |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   from: {
>     user_name?: string,
>     email: string
>   },
>   to: {
>     user_name?: string,
>     email: string
>   }[],
>   cc?: {
>     user_name?: string,
>     email: string
>   }[],
>   bcc?: {
>     user_name?: string,
>     email: string
>   }[],
>   reply_to?: {
>     user_name?: string,
>     email: string
>   },
>   subject?: string,
>   content?: string,
>   mail_format?: html | text,
>   org_email?: boolean,
>   scheduled_time?: string,
>   consent_email?: boolean,
>   template?: {
>     id?: string
>   },
>   inventory_details?: {
>     inventory_template?: {
>       id?: string,
>       name?: string
>     },
>     paper_type?: default | A4 | us_letter,
>     view_type?: portrait | landscape
>   },
>   data_subject_request?: {
>     id?: string,
>     type?: access | rectify | export
>   },
>   attachments?: {
>     id?: string
>   }[]
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | Represents the list of mail-send results, one item per email request. |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   status?: string | null,
>   message?: string | null,
>   details?: {
>     message_id?: string | null
>   } | null
> }[] | null
> ```

***

### share

`emails.share`

Share Record Emails. To share email threads linked to a specific CRM record with colleagues in the same organization. Requires custom email sharing to be enabled in the organization and a valid email configuration for the user.

**Risk:** `destructive`

```ts theme={null}
await corsair.zohocrm.api.emails.share({ moduleApiName: 'Leads', id: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `moduleApiName` | `Leads \| Contacts \| Accounts \| Deals \| CustomModule1` | Yes | Specify the API name of the module that contains the record whose emails you want to share. Refer to [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve available module API names. |
| `id` | `string` | Yes | Specify the unique identifier of the record whose emails you want to manage. The ID must belong to a record in the specified module. Use the [Get Records API](record.yaml#\$.paths./module.get) to retrieve the record IDs. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | Represents the list of per-record email sharing results. Always present in the response. |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### shareMany

`emails.shareMany`

Share Record Emails. To share email threads linked to multiple CRM records with colleagues in the same organization. Accepts up to 100 record IDs per request. Supports partial success - each record in the response is processed independently, and individual results indicate success or failure.

**Risk:** `destructive`

```ts theme={null}
await corsair.zohocrm.api.emails.shareMany({
	moduleApiName: 'Leads',
	ids: ['4876876000000333001'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `moduleApiName` | `Leads \| Contacts \| Accounts \| Deals \| CustomModule1` | Yes | Specify the API name of the module that contains the records whose emails you want to share. Refer to [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve available module API names. |
| `ids` | `string[]` | Yes | Specify the list of record IDs whose emails you want to share. Accepts up to 100 record IDs per request. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data?: {
>     code?: string | null,
>     details?: {
>       id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   data?: (
>     {
>       code?: string | null,
>       details?: {
>         id?: string | null
>       } | null,
>       message?: string | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       details?: {
>         id?: string | null
>       } | null,
>       message?: string | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       details?: {
>         id?: string | null
>       } | null,
>       message?: string | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       details?: {
>         resource_path_index?: number | null
>       } | null,
>       message?: string | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       details?: {
>         id?: string | null
>       } | null,
>       message?: string | null,
>       status?: string | null
>     }
>   )[] | null
> }
> ```

***

### unblock

`emails.unblock`

Unblock email for a single record. To unblock a soft-bounced email address for a single record in your Zoho CRM organization. When an email sent from CRM bounces temporarily, the Email field on the affected record is blocked. This operation removes that block so email communication with the record can resume.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.emails.unblock({
	module: 'Leads',
	id: '4876876000000333001',
	unblock_fields: ['example'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Represents the module API name. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to get valid values. |
| `id` | `string` | Yes | Represents the unique ID of the record. Use the [Get Records API](record.yaml#\$.paths./\{module}.get) to get valid values. |
| `unblock_fields` | `string[]` | Yes | To unblock emails, specify one or both of the system-defined fields : **Email** and **Secondary\_Email**. > **Note** > - The permanently blocked emails cannot be unblocked. > - A temporarily blocked email can be unblocked up to **5 times**. > - A **custom email field** cannot be unblocked. > - You cannot merge records that are **locked** or in an **Approval Process/Review Process**. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `code` | `string \| null` | No | Represents the status code of the unblock operation. Example: "SUCCESS". |
| `details` | `object \| null` | No | Contains the details of the record for which the email was unblocked. |
| `message` | `string \| null` | No | Represents the descriptive message returned by the server for the unblock operation. |
| `status` | `string \| null` | No | Represents the overall status of the unblock operation for the record. |

> [accordion] details full type
>
> ```ts theme={null}
> {
>   id?: string | null
> } | null
> ```

***

### unblockMany

`emails.unblockMany`

Unblock emails for multiple records in a module. To unblock soft-bounced email addresses for multiple records in your Zoho CRM organization. When emails sent from CRM bounce temporarily, the Email field on the affected records is blocked. This operation removes those blocks in bulk so email communication with the records can resume.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.emails.unblockMany({
	module: 'Leads',
	ids: ['4876876000000333001'],
	unblock_fields: ['example'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Represents the module API name. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to get valid values. |
| `ids` | `string[]` | Yes | Specify the record IDs for which you want to unblock the email fields. Use the [Get Records API](record.yaml#\$.paths./\{module}.get) to get valid values. You can specify up to 500 record IDs. |
| `unblock_fields` | `string[]` | Yes | To unblock emails, specify one or both of the system-defined fields : **Email** and **Secondary\_Email**. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | Contains the list of per-record results for the bulk email unblock operation. |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### unlink

`emails.unlink`

Unlink Deal Email. Unlinks an email from a specified record in CRM. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.emails.unlink({ contactId: '4876876000000333001', messageId: 'example', owner_id: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `contactId` | `string` | Yes | The ID of the contact to which the email is to be linked or unlinked |
| `messageId` | `string` | Yes | The ID of the email message to be linked or unlinked |
| `owner_id` | `string` | Yes | The ID of the owner of the contact. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `Emails` | `object[] \| null` | No | List of email unlink operation results |

> [accordion] Emails full type
>
> ```ts theme={null}
> {
>   status?: string | null,
>   code?: string | null,
>   message?: string | null,
>   details?: {
>     message_id?: string | null
>   } | null
> }[] | null
> ```

***

### unlinkMany

`emails.unlinkMany`

Unlink Emails from Deals. To unlink deals from one or more of a contact's emails. An email will only be linked to a single deal at a time. When you call this API, the specified email(s) will be unlinked from them. The user's profile requires "View" permission for Deals and Contacts modules to use this API. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.emails.unlinkMany({ contactId: '4876876000000333001', message_ids: 'example', owner_id: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `contactId` | `string` | Yes | The ID of the contact to which the email is to be linked or unlinked |
| `message_ids` | `string` | Yes | The IDs of the email messages to be linked |
| `owner_id` | `string` | Yes | The ID of the owner of the contact. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `Emails` | `object[] \| null` | No | List of email unlink operation results |

> [accordion] Emails full type
>
> ```ts theme={null}
> {
>   status?: string | null,
>   code?: string | null,
>   message?: string | null,
>   details?: {
>     message_id?: string | null
>   } | null
> }[] | null
> ```

***

### unshare

`emails.unshare`

Unshare Record Emails. To revoke email sharing for a specific CRM record, making the linked email threads no longer visible to colleagues. Requires custom email sharing to be enabled in the organization and a valid email configuration for the user.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.emails.unshare({ moduleApiName: 'Leads', id: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `moduleApiName` | `Leads \| Contacts \| Accounts \| Deals \| CustomModule1` | Yes | Specify the API name of the module that contains the record whose email sharing you want to revoke. Refer to [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve available module API names. |
| `id` | `string` | Yes | Specify the unique identifier of the record whose emails you want to manage. The ID must belong to a record in the specified module. Use the [Get Records API](record.yaml#\$.paths./module.get) to retrieve the record IDs. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | Represents the list of per-record email unsharing results. Always present in the response. |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### unshareMany

`emails.unshareMany`

Unshare emails in bulk. To revoke email sharing for multiple CRM records in a single request. Accepts up to 100 record IDs per request. The data array in the 207 response contains an item for each record, indicating success or failure.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.emails.unshareMany({
	moduleApiName: 'Leads',
	ids: ['4876876000000333001'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `moduleApiName` | `Leads \| Contacts \| Accounts \| Deals \| CustomModule1` | Yes | Specify the API name of the module that contains the records whose email sharing you want to revoke. Refer to [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve available module API names. |
| `ids` | `string[]` | Yes | Specify the list of record IDs whose email sharing you want to revoke. Accepts up to 100 record IDs per request. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | Represents the list of per-record results for the bulk email unsharing operation. Always present in the response. |

> [accordion] data full type
>
> ```ts theme={null}
> (
>   {
>     code?: string | null,
>     details?: {
>       id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   } | {
>     code?: string | null,
>     details?: {
>       id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   } | {
>     code?: string | null,
>     details?: {
>       id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   } | {
>     code?: string | null,
>     details?: {
>       resource_path_index?: number | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   } | {
>     code?: string | null,
>     details?: {
>       id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }
> )[] | null
> ```

***

## Email Templates

### list

`emailTemplates.list`

Email Templates. To retrieve a paginated list of email templates accessible to the authenticated user in your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.emailTemplates.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | No | Provide the API name of the CRM module to filter Email Templates by. Refer to the [Get Modules](modules.yaml#\$.paths./settings/modules.get) resource for module API name. |
| `per_page` | `number \| string` | No | Provide the maximum number of Email Template records to return per page. Default value is **200** and the maximum value is **200.** |
| `page` | `number \| string` | No | Specify the page number to retrieve in a paginated response. The default value is \<b>1\</b>. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   email_templates?: {
>     created_time?: string | null,
>     modified_time?: string | null,
>     last_usage_time?: string | null | null,
>     category?: string | null,
>     folder?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     module?: {
>       api_name?: string | null,
>       id?: string | null
>     } | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     name?: string | null,
>     id?: string | null,
>     editor_mode?: string | null,
>     favorite?: boolean | null,
>     attachments?: {
>       size?: string | null,
>       file_name?: string | null,
>       file_id?: string | null,
>       id?: string | null
>     }[] | null | null,
>     subject?: string | null,
>     associated?: boolean | null,
>     active?: boolean | null,
>     consent_linked?: boolean | null,
>     last_version_statistics?: {
>       tracked?: number | null,
>       delivered?: number | null,
>       opened?: number | null,
>       bounced?: number | null,
>       sent?: number | null,
>       clicked?: number | null
>     } | null
>   }[] | null,
>   info?: {
>     per_page?: number | null,
>     page?: number | null,
>     count?: number | null,
>     more_records?: boolean | null
>   } | null
> } | {
>   success: true
> }
> ```

***

## Features

### get

`features.get`

Specific Feature. To retrieve the detailed information for a specific feature in your Zoho CRM organization, including its usage limits, consumption details, and sub-feature components.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.features.get({ feature: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `feature` | `string` | Yes | Specify the API name of the feature for which you want to retrieve detailed information. |
| `module` | `string` | No | Specify the API name of the CRM module to filter features that are specific to that module. Refer to the [Get Modules](modules.json#\$.paths./settings/modules.get) resource for valid values. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   __features?: {
>     api_name?: string | null,
>     parent_feature?: {
>       api_name?: string | null
>     } | null | null,
>     details?: {
>       available_count?: {
>         total?: number | null
>       } | null,
>       limits?: {
>         total?: number | null,
>         edition_limit?: number | null
>       } | null,
>       used_count?: {
>         total?: number | null
>       } | null
>     } | null | null,
>     components?: {
>       api_name?: string | null,
>       module_supported?: boolean | null,
>       details?: {
>         limits?: {
>           total?: number | null,
>           edition_limit?: number | null
>         } | null,
>         used_count?: {
>           total?: number | null
>         } | number | null
>       } | null | null,
>       feature_label?: string | null
>     }[] | null | null,
>     module_supported?: boolean | null,
>     feature_label?: string | null | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### getUserLicenses

`features.getUserLicenses`

User Licenses Feature. To get the user licenses feature details for the current edition.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.features.getUserLicenses({});
```

**Input:** *empty object*

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   __features?: {
>     api_name?: string | null,
>     parent_feature?: {
>     } | null | null,
>     details?: {
>       available_count?: {
>         total?: number | null
>       } | null,
>       used_count?: {
>         total?: number | null
>       } | number | null,
>       limits?: {
>         total?: number | null
>       } | null
>     } | null | null,
>     components?: null | null,
>     module_supported?: boolean | null,
>     feature_label?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### list

`features.list`

Features. To retrieve the list of all features available in your Zoho CRM organization for the current subscription edition, along with their usage limits and component details.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.features.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | No | Specify the API name of the CRM module to filter features that are specific to that module. Refer to the [Get Modules](modules.json#\$.paths./settings/modules.get) resource for valid values. |
| `api_names` | `custom_field \| custom_field,encrypt_field,unique_field,private_fields,external_field,personal_health_fields \| personal_health_fields \| encrypt_field \| external_field \| unique_field \| private_fields` | No | Specify the feature API names to filter the response. To retrieve details of more than one feature, provide the names in comma-separated format. Possible values: custom\_field - Feature API name for the custom field feature. custom\_field,encrypt\_field,unique\_field,private\_fields,external\_field,personal\_health\_fields - Feature API names for multiple features specified together. encrypt\_field - Feature API name for the encrypt field feature. external\_field - Feature API name for the external field feature. personal\_health\_fields - Feature API name for the personal health fields feature. private\_fields - Feature API name for the private fields feature. unique\_field - Feature API name for the unique field feature. |
| `per_page` | `string` | No | Specify the number of features to return per page. Possible values: 10 - Returns ten features per page. |
| `page` | `1 \| 2` | No | Specify the page number to retrieve features from the corresponding results page. Possible values: 1 - Retrieves features from page one. 2 - Retrieves features from page two. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   __features?: {
>     api_name?: string | null | null,
>     parent_feature?: {
>       api_name?: string | null
>     } | null | null,
>     details?: {
>       available_count?: {
>         total?: number | null
>       } | null,
>       limits?: {
>         total?: number | null,
>         edition_limit?: number | null
>       } | null,
>       used_count?: {
>         total?: number | null
>       } | number | null
>     } | null | null,
>     components?: {
>       api_name?: string | null,
>       module_supported?: boolean | null,
>       details?: {
>         limits?: {
>           total?: number | null,
>           edition_limit?: number | null
>         } | null,
>         used_count?: {
>           total?: number | null
>         } | number | null
>       } | null | null,
>       feature_label?: string | null
>     }[] | null | null,
>     module_supported?: boolean | null,
>     feature_label?: string | null | null
>   }[] | null,
>   info?: {
>     per_page?: number | null,
>     count?: number | null,
>     page?: number | null,
>     more_records?: boolean | null
>   } | null
> } | {
>   success: true
> }
> ```

***

## Fields

### create

`fields.create`

Create custom fields in a module. To create custom fields in a module in your Zoho CRM organization, where supported modules include Leads, Contacts, Accounts, Campaigns, Cases, Invoices, Deals, Price Books, Products, Purchase Orders, Quotes, Sales Orders, Solutions, Vendors, Calls, Tasks, Events, Users, and Custom modules.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.fields.create({ module: 'Leads' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the API name of the module for which you want to retrieve field data. Refer to the [Get Modules](modules.yaml#\$.paths./settings/modules.get) resource for valid values. |
| `fields` | `((((((((((((((((((((((((any & any) & any) & any) & any) & any) & any) & any) & any) & any) & any) & any) & any) & any) & any) & any) & any) & any) & any) & any) & any) & any) & any) & any) & any)[]` | No | Specify the list of fields to create. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   fields?: {
>     code?: string | null,
>     details?: {
>       id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   fields?: (
>     {
>       code?: string | null,
>       details?: {
>         id?: string | null
>       } | null,
>       message?: string | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         api_name?: string | null,
>         json_path?: string | null
>       } | {
>         api_name?: string | null,
>         json_path?: string | null,
>         expected_data_type?: string | null
>       } | {
>         api_name?: string | null,
>         json_path?: string | null,
>         range?: {
>           from?: number | null,
>           to?: number | null
>         } | null
>       } | {
>         resource_path_index?: number | null
>       } | {
>         api_name?: string | null,
>         json_path?: string | null,
>         supported_values?: (string | boolean)[] | null
>       } | {
>         api_name?: string | null,
>         json_path?: string | null,
>         allowed_values?: string[] | null
>       } | {
>         api_name?: string | null,
>         json_path?: string | null,
>         maximum_length?: number | null
>       } | {
>         api_name?: string | null,
>         json_path?: string | null,
>         minimum_length?: number | null
>       } | {
>         api_name?: string | null,
>         json_path?: string | null,
>         supported_values?: string[] | null,
>         expected_data_type?: string | null
>       } | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       details?: {
>       } | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         api_name?: string | null,
>         json_path?: string | null,
>         dependee?: {
>           api_name?: string | null,
>           json_path?: string | null
>         } | null
>       } | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         api_name?: string | null,
>         json_path?: string | null
>       } | {
>         api_name?: string | null,
>         json_path?: string | null,
>         id?: string | null
>       } | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         exists_in?: {
>           api_name?: string | null,
>           json_path?: string | null
>         } | null,
>         api_name?: string | null,
>         json_path?: string | null
>       } | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         api_name?: string | null,
>         json_path?: string | null
>       } | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         api_name?: string | null,
>         json_path?: string | null
>       } | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         api_name?: string | null,
>         json_path?: string | null
>       } | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         api_name?: string | null,
>         json_path?: string | null
>       } | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         api_name?: string | null,
>         json_path?: string | null
>       } | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         dependee?: {
>           api_name?: string | null,
>           json_path?: string | null
>         } | null,
>         api_name?: string | null,
>         json_path?: string | null
>       } | {
>         dependee?: {
>           api_name?: string | null,
>           json_path?: string | null
>         } | null,
>         api_name?: string | null,
>         json_path?: string | null,
>         range?: {
>           from?: number | null,
>           to?: number | null
>         } | null
>       } | {
>         api_name?: string | null,
>         json_path?: string | null,
>         supported_values?: (string | number)[] | null
>       } | {
>         dependee?: {
>           api_name?: string | null,
>           json_path?: string | null
>         } | null,
>         api_name?: string | null,
>         json_path?: string | null,
>         supported_values?: string[] | null
>       } | {
>         dependee?: {
>           api_name?: string | null,
>           json_path?: string | null
>         } | null,
>         api_name?: string | null,
>         json_path?: string | null,
>         maximum_length?: number | null
>       } | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         limit?: number | null,
>         limit_due_to?: {
>           api_name?: string | null,
>           json_path?: string | null
>         }[] | null
>       } | {
>         limit?: number | null
>       } | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         dependee?: {
>           api_name?: string | null,
>           json_path?: string | null
>         } | null,
>         api_name?: string | null,
>         json_path?: string | null
>       } | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         expected_fields?: {
>           api_name?: string | null,
>           json_path?: string | null
>         }[] | null,
>         api_name?: string | null,
>         json_path?: string | null
>       } | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         ambiguity_due_to?: {
>           api_name?: string | null,
>           json_path?: string | null
>         }[] | null
>       } | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         expected_fields?: {
>           api_name?: string | null,
>           json_path?: string | null
>         }[] | null,
>         dependee?: {
>           api_name?: string | null,
>           json_path?: string | null
>         } | null
>       } | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         api_name?: string | null,
>         json_path?: string | null
>       } | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         api_name?: string | null,
>         json_path?: string | null
>       } | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         api_name?: string | null,
>         json_path?: string | null
>       } | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         api_name?: string | null,
>         json_path?: string | null
>       } | {
>         api_name?: string | null,
>         json_path?: string | null,
>         limit?: number | null
>       } | {
>         api_name?: string | null,
>         json_path?: string | null,
>         limit?: number | null,
>         id?: string | null
>       } | {
>         resource_path_index?: number | null
>       } | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         param_name?: string | null
>       } | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         api_name?: string | null,
>         json_path?: string | null
>       } | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         api_name?: string | null,
>         json_path?: string | null,
>         other_details?: {
>           savedCVFilters?: {
>             cvid?: string | null,
>             cvmodule?: string | null,
>             cvname?: string | null
>           }[] | null
>         } | null
>       } | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         permissions?: string[] | null
>       } | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       details?: {
>       } | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         api_name?: string | null,
>         json_path?: string | null
>       } | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         api_name?: string | null,
>         json_path?: string | null,
>         id?: string | null
>       } | null,
>       status?: string | null
>     }
>   )[] | null
> }
> ```

***

### delete

`fields.delete`

Delete a custom field. To delete a custom field from a module in your Zoho CRM account. The field must not be used in workflows, approvals, scoring rules, or other configurations before deletion. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.fields.delete({ fieldId: 'example', module: 'Leads' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `fieldId` | `string` | Yes | Id of the resource. |
| `module` | `string` | Yes | Specify the API name of the module for which you want to retrieve field data. Refer to the [Get Modules](modules.yaml#\$.paths./settings/modules.get) resource for valid values. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `fields` | `object[] \| null` | No | Represents the list of field deletion results, containing one entry with the unique ID of the deleted field. |

> [accordion] fields full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### get

`fields.get`

Get field metadata by ID. To retrieve the metadata of a specific custom field in a module in your Zoho CRM account by its field ID.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.fields.get({ module: 'Leads', fieldId: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the API name of the module for which you want to retrieve field data. Refer to the [Get Modules](modules.yaml#\$.paths./settings/modules.get) resource for valid values. |
| `fieldId` | `string` | Yes | Id of the resource. |
| `include` | `string` | No | Specify whether to include the **allowed\_permissions** JSON object in the response. Possible values: allowed\_permissions\_to\_update - Includes the allowed\_permissions JSON object with details about the default permissions for each field. |
| `type` | `all \| unused \| used` | No | Specify the usage type of the fields to retrieve. Possible values: all - Retrieves both used and unused fields in the module. unused - Retrieves only fields that are not in use. used - Retrieves only fields that are currently in use. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   fields?: {
>     mask_details?: {
>     } | null | null,
>     associated_module?: {
>       module?: string | null,
>       id?: string | null
>     } | null | null,
>     webhook?: boolean | null,
>     operation_type?: {
>       web_update?: boolean | null,
>       api_create?: boolean | null,
>       web_create?: boolean | null,
>       api_update?: boolean | null
>     } | null,
>     colour_code_enabled_by_system?: boolean | null,
>     field_label?: string | null,
>     tooltip?: {
>       name?: string | null,
>       value?: string | null
>     } | null | null,
>     display_format_properties?: {
>       split?: number | null,
>       radio_display_type?: string | null
>     } | null | null,
>     type?: string | null,
>     field_read_only?: boolean | null,
>     customizable_properties?: string[] | null | null,
>     display_label?: string | null,
>     read_only?: boolean | null,
>     association_details?: {
>       related_field?: {
>         api_name?: string | null,
>         id?: string | null
>       } | null,
>       lookup_field?: {
>         api_name?: string | null,
>         id?: string | null
>       } | null
>     } | null | null,
>     businesscard_supported?: boolean | null,
>     multi_module_lookup?: {
>       display_label?: string | null,
>       api_name?: string | null,
>       modules?: {
>         api_name?: string | null,
>         module_name?: string | null,
>         id?: string | null
>       }[] | null
>     } | null | null,
>     id?: string | null,
>     created_time?: string | null | null,
>     filterable?: boolean | null,
>     visible?: boolean | null,
>     profiles?: {
>       permission_type?: string | null,
>       name?: string | null,
>       id?: string | null
>     }[] | null,
>     view_type?: {
>       view?: boolean | null,
>       edit?: boolean | null,
>       quick_create?: boolean | null,
>       create?: boolean | null
>     } | null,
>     separator?: boolean | null,
>     searchable?: boolean | null,
>     history_tracking_enabled?: boolean | null,
>     external?: {
>       show?: boolean | null,
>       type?: string | null
>     } | null | null,
>     api_name?: string | null,
>     parent_field?: {
>       api_name?: string | null,
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     unique?: {
>       case_sensitive?: boolean | null
>     } | null,
>     enable_colour_code?: boolean | null,
>     child_fields?: {
>       sequence_number?: number | null,
>       field?: {
>         api_name?: string | null,
>         name?: string | null,
>         id?: string | null
>       } | null
>     }[] | null | null,
>     reference_id?: string | null,
>     pick_list_values?: {
>       display_value?: string | null,
>       sequence_number?: number | null,
>       reference_value?: string | null,
>       colour_code?: string | null,
>       actual_value?: string | null,
>       id?: string | null,
>       type?: string | null,
>       record_category_value?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null
>     }[] | null | null,
>     enable_record_category?: boolean | null,
>     record_category_tracking_field?: {
>       api_name?: string | null,
>       id?: string | null
>     } | null | null,
>     enable_transition_for_record_category?: boolean | null,
>     record_category_values?: {
>       id?: string | null,
>       api_name?: string | null,
>       value?: string | null,
>       nature_of_category?: string | null
>     }[] | null,
>     system_mandatory?: boolean | null,
>     private?: {
>       restricted?: boolean | null,
>       type?: string | null,
>       export?: boolean | null
>     } | null | null,
>     virtual_field?: boolean | null,
>     json_type?: string | null,
>     crypt?: {
>       mode?: string | null,
>       encrypt_case?: string | null | null,
>       status?: number | null
>     } | null | null,
>     range?: {
>       from?: number | null,
>       to?: number | null
>     } | null | null,
>     created_source?: string | null,
>     display_type?: number | null,
>     ui_type?: number | null,
>     modified_time?: string | null | null,
>     public?: boolean | null,
>     email_parser?: {
>       fields_update_supported?: boolean | null,
>       record_operations_supported?: boolean | null
>     } | null,
>     currency?: {
>       rounding_option?: string | null,
>       precision?: number | null
>     } | null | null,
>     custom_field?: boolean | null,
>     lookup?: {
>       display_label?: string | null | null,
>       revalidate_filter_during_edit?: boolean | null,
>       api_name?: string | null | null,
>       module?: {
>         api_name?: string | null,
>         crypt?: boolean | null,
>         id?: string | null
>       } | null,
>       id?: string | null | null,
>       query_details?: {
>         system_query_id?: string | null | null,
>         query_id?: string | null
>       } | null
>     } | null | null,
>     hipaa_compliance?: {
>       restricted_in_export?: boolean | null,
>       restricted?: boolean | null
>     } | null | null,
>     convert_mapping?: {
>       Contacts?: string | null | null,
>       Deals?: string | null | null,
>       Accounts?: string | null | null,
>       Invoices?: string | null | null,
>       Sales_Orders?: string | null | null
>     } | null,
>     address?: {
>       type?: string | null
>     } | null | null,
>     rollup_summary?: {
>       return_type?: string | null,
>       expression?: {
>         function_parameters?: {
>           api_name?: string | null
>         }[] | null,
>         criteria?: {
>           comparator?: string | null,
>           field?: {
>             api_name?: string | null,
>             id?: string | null
>           } | null,
>           type?: string | null,
>           value?: string | null
>         } | null | null,
>         function?: string | null
>       } | null,
>       based_on_module?: {
>         api_name?: string | null,
>         id?: string | null
>       } | null,
>       related_list?: {
>         api_name?: string | null,
>         id?: string | null
>       } | null,
>       rollup_based_on?: string | null
>     } | null | null,
>     length?: number | null,
>     column_name?: string | null,
>     display_field?: boolean | null,
>     pick_list_values_sorted_lexically?: boolean | null,
>     sortable?: boolean | null,
>     global_picklist?: {
>       api_name?: string | null,
>       id?: string | null
>     } | null | null,
>     display_format?: string | null | null,
>     history_tracking?: {
>       related_list_name?: string | null,
>       module?: {
>         api_name?: string | null,
>         id?: string | null
>       } | null,
>       duration_configured_field?: {
>         api_name?: string | null,
>         id?: string | null
>       } | null,
>       duration_configuration?: string | null,
>       followed_fields?: {
>         api_name?: string | null,
>         id?: string | null
>       }[] | null
>     } | null | null,
>     data_type?: string | null,
>     formula?: {
>       return_type?: string | null,
>       sub_return_type?: string | null,
>       dynamic?: boolean | null,
>       stop_compute_conditionally?: boolean | null,
>       assume_default?: boolean | null
>     } | null | null,
>     additional_column?: string | null | null,
>     hipaa_compliance_enabled?: boolean | null,
>     decimal_place?: number | null | null,
>     mass_update?: boolean | null,
>     multiselectlookup?: {
>       linking_details?: {
>         module?: {
>           visibility?: number | null,
>           plural_label?: string | null,
>           api_name?: string | null,
>           id?: string | null
>         } | null,
>         lookup_field?: {
>           api_name?: string | null,
>           field_label?: string | null,
>           id?: string | null
>         } | null,
>         connected_lookup_field?: {
>           api_name?: string | null,
>           field_label?: string | null,
>           id?: string | null
>         } | null
>       } | null,
>       connected_details?: {
>         field?: {
>           api_name?: string | null,
>           field_label?: string | null,
>           id?: string | null
>         } | null,
>         module?: {
>           plural_label?: string | null,
>           api_name?: string | null,
>           id?: string | null
>         } | null,
>         layouts?: {
>           api_name?: string | null,
>           id?: string | null
>         }[] | null
>       } | null,
>       related_list?: {
>         display_label?: string | null,
>         api_name?: string | null,
>         id?: string | null
>       } | null
>     } | null | null,
>     auto_number?: {
>       starting_number_length?: number | null,
>       prefix?: string | null | null,
>       start_number?: number | null,
>       suffix?: string | null | null
>     } | null | null,
>     layout_associations?: {
>       api_name?: string | null,
>       name?: string | null,
>       id?: string | null
>     }[] | null,
>     quick_sequence_number?: string | null,
>     blueprint_supported?: boolean | null,
>     textarea?: {
>       type?: string | null
>     } | null,
>     sharing_properties?: {
>       scheduler_status?: string | null,
>       share_permission?: string | null,
>       share_preference_enabled?: boolean | null
>     } | null,
>     multiuserlookup?: {
>       linking_details?: {
>         module?: {
>           plural_label?: string | null,
>           api_name?: string | null,
>           id?: string | null
>         } | null,
>         lookup_field?: {
>           api_name?: string | null,
>           field_label?: string | null,
>           id?: string | null
>         } | null,
>         connected_lookup_field?: {
>           api_name?: string | null,
>           field_label?: string | null,
>           id?: string | null
>         } | null
>       } | null,
>       record_access?: boolean | null
>     } | null,
>     static_field?: boolean | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### getScheduledJobs

`fields.getScheduledJobs`

Get scheduled jobs for a field. To retrieve the status of scheduled jobs for picklist field operations in your Zoho CRM account, such as replace or delete picklist option jobs.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.fields.getScheduledJobs({ module: 'Leads', fieldId: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `job_id` | `string` | No | Specify the job ID of the scheduled field or picklist action to filter the results. |
| `module` | `string` | Yes | Specify the API name of the module for which you want to retrieve field data. Refer to the [Get Modules](modules.yaml#\$.paths./settings/modules.get) resource for valid values. |
| `page` | `number \| string` | No | Specify the page number for paginating the scheduled jobs list. |
| `per_page` | `number \| string` | No | Specify the number of scheduled jobs to return per page. |
| `fieldId` | `string` | Yes | Specify the unique ID of the custom field. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   scheduled_jobs?: (((((((((((any & any)& any)& any)& any)& any)& any)& any)& any)& any)& any)& any)[] | null,
>   info?: {
>     per_page?: number | null,
>     count?: number | null,
>     page?: number | null,
>     more_records?: boolean | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### list

`fields.list`

List fields metadata. To retrieve the field metadata for the specified module in your Zoho CRM account, including standard, custom, subform, and linking module fields. The response includes fields from all layouts but does not contain layout-specific configurations such as mandatory flags or picklist values.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.fields.list({ module: 'Leads' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the API name of the module for which you want to retrieve field data. Refer to the [Get Modules](modules.yaml#\$.paths./settings/modules.get) resource for valid values. |
| `include` | `string` | No | Specify whether to include the **allowed\_permissions** JSON object in the response. Possible values: allowed\_permissions\_to\_update - Includes the allowed\_permissions JSON object with details about the default permissions for each field. |
| `type` | `all \| unused \| used` | No | Specify the usage type of the fields to retrieve. Possible values: all - Retrieves both used and unused fields in the module. unused - Retrieves only fields that are not in use. used - Retrieves only fields that are currently in use. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   fields?: {
>     mask_details?: {
>     } | null | null,
>     associated_module?: {
>       module?: string | null,
>       id?: string | null
>     } | null | null,
>     webhook?: boolean | null,
>     operation_type?: {
>       web_update?: boolean | null,
>       api_create?: boolean | null,
>       web_create?: boolean | null,
>       api_update?: boolean | null
>     } | null,
>     colour_code_enabled_by_system?: boolean | null,
>     field_label?: string | null,
>     tooltip?: {
>       name?: string | null,
>       value?: string | null
>     } | null | null,
>     display_format_properties?: {
>       split?: number | null,
>       radio_display_type?: string | null
>     } | null | null,
>     type?: string | null,
>     field_read_only?: boolean | null,
>     customizable_properties?: string[] | null | null,
>     display_label?: string | null,
>     read_only?: boolean | null,
>     association_details?: {
>       related_field?: {
>         api_name?: string | null,
>         id?: string | null
>       } | null,
>       lookup_field?: {
>         api_name?: string | null,
>         id?: string | null
>       } | null
>     } | null | null,
>     businesscard_supported?: boolean | null,
>     multi_module_lookup?: {
>       display_label?: string | null,
>       api_name?: string | null,
>       modules?: {
>         api_name?: string | null,
>         module_name?: string | null,
>         id?: string | null
>       }[] | null
>     } | null | null,
>     id?: string | null,
>     created_time?: string | null | null,
>     filterable?: boolean | null,
>     visible?: boolean | null,
>     profiles?: {
>       permission_type?: string | null,
>       name?: string | null,
>       id?: string | null
>     }[] | null,
>     view_type?: {
>       view?: boolean | null,
>       edit?: boolean | null,
>       quick_create?: boolean | null,
>       create?: boolean | null
>     } | null,
>     separator?: boolean | null,
>     searchable?: boolean | null,
>     history_tracking_enabled?: boolean | null,
>     external?: {
>       show?: boolean | null,
>       type?: string | null
>     } | null | null,
>     api_name?: string | null,
>     parent_field?: {
>       api_name?: string | null,
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     unique?: {
>       case_sensitive?: boolean | null
>     } | null,
>     enable_colour_code?: boolean | null,
>     child_fields?: {
>       sequence_number?: number | null,
>       field?: {
>         api_name?: string | null,
>         name?: string | null,
>         id?: string | null
>       } | null
>     }[] | null | null,
>     reference_id?: string | null,
>     pick_list_values?: {
>       display_value?: string | null,
>       sequence_number?: number | null,
>       reference_value?: string | null,
>       colour_code?: string | null,
>       actual_value?: string | null,
>       id?: string | null,
>       type?: string | null,
>       record_category_value?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null
>     }[] | null | null,
>     enable_record_category?: boolean | null,
>     record_category_tracking_field?: {
>       api_name?: string | null,
>       id?: string | null
>     } | null | null,
>     enable_transition_for_record_category?: boolean | null,
>     record_category_values?: {
>       id?: string | null,
>       api_name?: string | null,
>       value?: string | null,
>       nature_of_category?: string | null
>     }[] | null,
>     system_mandatory?: boolean | null,
>     private?: {
>       restricted?: boolean | null,
>       type?: string | null,
>       export?: boolean | null
>     } | null | null,
>     virtual_field?: boolean | null,
>     json_type?: string | null,
>     crypt?: {
>       mode?: string | null,
>       encrypt_case?: string | null | null,
>       status?: number | null
>     } | null | null,
>     range?: {
>       from?: number | null,
>       to?: number | null
>     } | null | null,
>     created_source?: string | null,
>     display_type?: number | null,
>     ui_type?: number | null,
>     modified_time?: string | null | null,
>     public?: boolean | null,
>     email_parser?: {
>       fields_update_supported?: boolean | null,
>       record_operations_supported?: boolean | null
>     } | null,
>     currency?: {
>       rounding_option?: string | null,
>       precision?: number | null
>     } | null | null,
>     custom_field?: boolean | null,
>     lookup?: {
>       display_label?: string | null | null,
>       revalidate_filter_during_edit?: boolean | null,
>       api_name?: string | null | null,
>       module?: {
>         api_name?: string | null,
>         crypt?: boolean | null,
>         id?: string | null
>       } | null,
>       id?: string | null | null,
>       query_details?: {
>         system_query_id?: string | null | null,
>         query_id?: string | null
>       } | null
>     } | null | null,
>     hipaa_compliance?: {
>       restricted_in_export?: boolean | null,
>       restricted?: boolean | null
>     } | null | null,
>     convert_mapping?: {
>       Contacts?: string | null | null,
>       Deals?: string | null | null,
>       Accounts?: string | null | null,
>       Invoices?: string | null | null,
>       Sales_Orders?: string | null | null
>     } | null,
>     address?: {
>       type?: string | null
>     } | null | null,
>     rollup_summary?: {
>       return_type?: string | null,
>       expression?: {
>         function_parameters?: {
>           api_name?: string | null
>         }[] | null,
>         criteria?: {
>           comparator?: string | null,
>           field?: {
>             api_name?: string | null,
>             id?: string | null
>           } | null,
>           type?: string | null,
>           value?: string | null
>         } | null | null,
>         function?: string | null
>       } | null,
>       based_on_module?: {
>         api_name?: string | null,
>         id?: string | null
>       } | null,
>       related_list?: {
>         api_name?: string | null,
>         id?: string | null
>       } | null,
>       rollup_based_on?: string | null
>     } | null | null,
>     length?: number | null,
>     column_name?: string | null,
>     display_field?: boolean | null,
>     pick_list_values_sorted_lexically?: boolean | null,
>     sortable?: boolean | null,
>     global_picklist?: {
>       api_name?: string | null,
>       id?: string | null
>     } | null | null,
>     display_format?: string | null | null,
>     history_tracking?: {
>       related_list_name?: string | null,
>       module?: {
>         api_name?: string | null,
>         id?: string | null
>       } | null,
>       duration_configured_field?: {
>         api_name?: string | null,
>         id?: string | null
>       } | null,
>       duration_configuration?: string | null,
>       followed_fields?: {
>         api_name?: string | null,
>         id?: string | null
>       }[] | null
>     } | null | null,
>     data_type?: string | null,
>     formula?: {
>       return_type?: string | null,
>       sub_return_type?: string | null,
>       dynamic?: boolean | null,
>       stop_compute_conditionally?: boolean | null,
>       assume_default?: boolean | null
>     } | null | null,
>     additional_column?: string | null | null,
>     hipaa_compliance_enabled?: boolean | null,
>     decimal_place?: number | null | null,
>     mass_update?: boolean | null,
>     multiselectlookup?: {
>       linking_details?: {
>         module?: {
>           visibility?: number | null,
>           plural_label?: string | null,
>           api_name?: string | null,
>           id?: string | null
>         } | null,
>         lookup_field?: {
>           api_name?: string | null,
>           field_label?: string | null,
>           id?: string | null
>         } | null,
>         connected_lookup_field?: {
>           api_name?: string | null,
>           field_label?: string | null,
>           id?: string | null
>         } | null
>       } | null,
>       connected_details?: {
>         field?: {
>           api_name?: string | null,
>           field_label?: string | null,
>           id?: string | null
>         } | null,
>         module?: {
>           plural_label?: string | null,
>           api_name?: string | null,
>           id?: string | null
>         } | null,
>         layouts?: {
>           api_name?: string | null,
>           id?: string | null
>         }[] | null
>       } | null,
>       related_list?: {
>         display_label?: string | null,
>         api_name?: string | null,
>         id?: string | null
>       } | null
>     } | null | null,
>     auto_number?: {
>       starting_number_length?: number | null,
>       prefix?: string | null | null,
>       start_number?: number | null,
>       suffix?: string | null | null
>     } | null | null,
>     layout_associations?: {
>       api_name?: string | null,
>       name?: string | null,
>       id?: string | null
>     }[] | null,
>     quick_sequence_number?: string | null,
>     blueprint_supported?: boolean | null,
>     textarea?: {
>       type?: string | null
>     } | null,
>     sharing_properties?: {
>       scheduler_status?: string | null,
>       share_permission?: string | null,
>       share_preference_enabled?: boolean | null
>     } | null,
>     multiuserlookup?: {
>       linking_details?: {
>         module?: {
>           plural_label?: string | null,
>           api_name?: string | null,
>           id?: string | null
>         } | null,
>         lookup_field?: {
>           api_name?: string | null,
>           field_label?: string | null,
>           id?: string | null
>         } | null,
>         connected_lookup_field?: {
>           api_name?: string | null,
>           field_label?: string | null,
>           id?: string | null
>         } | null
>       } | null,
>       record_access?: boolean | null
>     } | null,
>     static_field?: boolean | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### update

`fields.update`

Update a custom field. To update a specific custom field in a module in your Zoho CRM account by its unique field ID.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.fields.update({ module: 'Leads', fieldId: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the API name of the module for which you want to retrieve field data. Refer to the [Get Modules](modules.yaml#\$.paths./settings/modules.get) resource for valid values. |
| `fieldId` | `string` | Yes | Id of the resource. |
| `fields` | `object[]` | No | Specify the list of fields to update. |

> [accordion] fields full type
>
> ```ts theme={null}
> {
>   field_label?: string,
>   id?: string,
>   length?: number | string,
>   profiles?: {
>     id: string,
>     permission_type: read_write | read_only | hidden
>   }[],
>   unique?: {
>     case_sensitive: boolean,
>     _disable?: boolean | null
>   } | boolean,
>   lookup?: {
>     query_details?: {
>       criteria?: {
>         group_operator?: AND | OR,
>         group: {
>           field: {
>             api_name: string,
>             id?: string
>           },
>           comparator: equal | not_equal | like | not_like | greater_equal | greater_than | less_equal | less_than | in | not_in | starts_with | ends_with | contains | not_contains | between | not_between | include_all | include_any | exclude_all | exclude_any,
>           value: string | string[]
>         }[]
>       }
>     }
>   },
>   pick_list_values?: {
>     display_value?: string,
>     actual_value?: string,
>     reference_value?: string,
>     colour_code?: string,
>     id?: string,
>     _global_picklist_value?: {
>       id: string
>     }
>   }[],
>   global_picklist?: {
>     id: string,
>     api_name?: string
>   } | null,
>   sharing_properties?: {
>     share_preference_enabled?: boolean,
>     share_permission?: full-access | read-write | read-only
>   },
>   history_tracking_enabled?: boolean,
>   history_tracking?: {
>     related_list_name?: string,
>     duration_configuration?: days | time,
>     followed_fields?: {
>       api_name?: string,
>       id?: string,
>       _delete?: null
>     }[]
>   },
>   formula?: {
>     expression: string,
>     return_type: double | currency | text | date | datetime | boolean,
>     sub_return_type?: small | medium | large,
>     dynamic?: boolean,
>     stop_compute_conditionally?: boolean,
>     stop_compute_expression?: string
>   },
>   decimal_place?: number,
>   currency?: {
>     rounding_option: normal | round_off | round_up | round_down,
>     precision: string
>   },
>   rollup_summary?: {
>     return_type: currency | double | integer,
>     expression: {
>       function_parameters: {
>         api_name: string
>       }[],
>       criteria?: {
>         group_operator?: AND | OR,
>         group: {
>           field: {
>             api_name: string,
>             id?: string
>           },
>           comparator: equal | not_equal | like | not_like | greater_equal | greater_than | less_equal | less_than | in | not_in | starts_with | ends_with | contains | not_contains | between | not_between | include_all | include_any | exclude_all | exclude_any,
>           value: string | string[]
>         }[]
>       },
>       function: SUM | COUNT | AVG | MIN | MAX
>     },
>     based_on_module: {
>       api_name: string
>     },
>     related_list: {
>       api_name: string
>     }
>   },
>   association_details?: {
>     related_field: {
>       api_name?: string,
>       id?: string
>     },
>     lookup_field: {
>       api_name?: string,
>       id?: string
>     }
>   } | null
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `fields` | `object[] \| null` | No | Represents the list of field update results for the single-field update operation, containing one entry. |

> [accordion] fields full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### updateMany

`fields.updateMany`

Update custom fields. To update one or more custom fields in a module in your Zoho CRM account.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.fields.updateMany({ module: 'Leads' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the API name of the module for which you want to retrieve field data. Refer to the [Get Modules](modules.yaml#\$.paths./settings/modules.get) resource for valid values. |
| `fields` | `object[]` | No | Specify the list of fields to update. |

> [accordion] fields full type
>
> ```ts theme={null}
> {
>   field_label?: string,
>   id?: string,
>   length?: number | string,
>   profiles?: {
>     id: string,
>     permission_type: read_write | read_only | hidden
>   }[],
>   unique?: {
>     case_sensitive: boolean,
>     _disable?: boolean | null
>   } | boolean,
>   lookup?: {
>     query_details?: {
>       criteria?: {
>         group_operator?: AND | OR,
>         group: {
>           field: {
>             api_name: string,
>             id?: string
>           },
>           comparator: equal | not_equal | like | not_like | greater_equal | greater_than | less_equal | less_than | in | not_in | starts_with | ends_with | contains | not_contains | between | not_between | include_all | include_any | exclude_all | exclude_any,
>           value: string | string[]
>         }[]
>       }
>     }
>   },
>   pick_list_values?: {
>     display_value?: string,
>     actual_value?: string,
>     reference_value?: string,
>     colour_code?: string,
>     id?: string,
>     _global_picklist_value?: {
>       id: string
>     }
>   }[],
>   global_picklist?: {
>     id: string,
>     api_name?: string
>   } | null,
>   sharing_properties?: {
>     share_preference_enabled?: boolean,
>     share_permission?: full-access | read-write | read-only
>   },
>   history_tracking_enabled?: boolean,
>   history_tracking?: {
>     related_list_name?: string,
>     duration_configuration?: days | time,
>     followed_fields?: {
>       api_name?: string,
>       id?: string,
>       _delete?: null
>     }[]
>   },
>   formula?: {
>     expression: string,
>     return_type: double | currency | text | date | datetime | boolean,
>     sub_return_type?: small | medium | large,
>     dynamic?: boolean,
>     stop_compute_conditionally?: boolean,
>     stop_compute_expression?: string
>   },
>   decimal_place?: number,
>   currency?: {
>     rounding_option: normal | round_off | round_up | round_down,
>     precision: string
>   },
>   rollup_summary?: {
>     return_type: currency | double | integer,
>     expression: {
>       function_parameters: {
>         api_name: string
>       }[],
>       criteria?: {
>         group_operator?: AND | OR,
>         group: {
>           field: {
>             api_name: string,
>             id?: string
>           },
>           comparator: equal | not_equal | like | not_like | greater_equal | greater_than | less_equal | less_than | in | not_in | starts_with | ends_with | contains | not_contains | between | not_between | include_all | include_any | exclude_all | exclude_any,
>           value: string | string[]
>         }[]
>       },
>       function: SUM | COUNT | AVG | MIN | MAX
>     },
>     based_on_module: {
>       api_name: string
>     },
>     related_list: {
>       api_name: string
>     }
>   },
>   association_details?: {
>     related_field: {
>       api_name?: string,
>       id?: string
>     },
>     lookup_field: {
>       api_name?: string,
>       id?: string
>     }
>   } | null
> }[]
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   fields?: {
>     code?: string | null,
>     details?: {
>       id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   fields?: (
>     {
>       code?: string | null,
>       details?: {
>         id?: string | null
>       } | null,
>       message?: string | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         api_name?: string | null,
>         json_path?: string | null
>       } | {
>         api_name?: string | null,
>         json_path?: string | null,
>         expected_data_type?: string | null
>       } | {
>         api_name?: string | null,
>         json_path?: string | null,
>         range?: {
>           from?: number | null,
>           to?: number | null
>         } | null
>       } | {
>         resource_path_index?: number | null
>       } | {
>         api_name?: string | null,
>         json_path?: string | null,
>         supported_values?: (string | boolean)[] | null
>       } | {
>         api_name?: string | null,
>         json_path?: string | null,
>         allowed_values?: string[] | null
>       } | {
>         api_name?: string | null,
>         json_path?: string | null,
>         maximum_length?: number | null
>       } | {
>         api_name?: string | null,
>         json_path?: string | null,
>         minimum_length?: number | null
>       } | {
>         api_name?: string | null,
>         json_path?: string | null,
>         supported_values?: string[] | null,
>         expected_data_type?: string | null
>       } | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       details?: {
>       } | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         api_name?: string | null,
>         json_path?: string | null,
>         dependee?: {
>           api_name?: string | null,
>           json_path?: string | null
>         } | null
>       } | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         api_name?: string | null,
>         json_path?: string | null
>       } | {
>         api_name?: string | null,
>         json_path?: string | null,
>         id?: string | null
>       } | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         exists_in?: {
>           api_name?: string | null,
>           json_path?: string | null
>         } | null,
>         api_name?: string | null,
>         json_path?: string | null
>       } | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         api_name?: string | null,
>         json_path?: string | null
>       } | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         api_name?: string | null,
>         json_path?: string | null
>       } | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         api_name?: string | null,
>         json_path?: string | null
>       } | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         api_name?: string | null,
>         json_path?: string | null
>       } | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         api_name?: string | null,
>         json_path?: string | null
>       } | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         dependee?: {
>           api_name?: string | null,
>           json_path?: string | null
>         } | null,
>         api_name?: string | null,
>         json_path?: string | null
>       } | {
>         dependee?: {
>           api_name?: string | null,
>           json_path?: string | null
>         } | null,
>         api_name?: string | null,
>         json_path?: string | null,
>         range?: {
>           from?: number | null,
>           to?: number | null
>         } | null
>       } | {
>         api_name?: string | null,
>         json_path?: string | null,
>         supported_values?: (string | number)[] | null
>       } | {
>         dependee?: {
>           api_name?: string | null,
>           json_path?: string | null
>         } | null,
>         api_name?: string | null,
>         json_path?: string | null,
>         supported_values?: string[] | null
>       } | {
>         dependee?: {
>           api_name?: string | null,
>           json_path?: string | null
>         } | null,
>         api_name?: string | null,
>         json_path?: string | null,
>         maximum_length?: number | null
>       } | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         limit?: number | null,
>         limit_due_to?: {
>           api_name?: string | null,
>           json_path?: string | null
>         }[] | null
>       } | {
>         limit?: number | null
>       } | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         dependee?: {
>           api_name?: string | null,
>           json_path?: string | null
>         } | null,
>         api_name?: string | null,
>         json_path?: string | null
>       } | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         expected_fields?: {
>           api_name?: string | null,
>           json_path?: string | null
>         }[] | null,
>         api_name?: string | null,
>         json_path?: string | null
>       } | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         ambiguity_due_to?: {
>           api_name?: string | null,
>           json_path?: string | null
>         }[] | null
>       } | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         expected_fields?: {
>           api_name?: string | null,
>           json_path?: string | null
>         }[] | null,
>         dependee?: {
>           api_name?: string | null,
>           json_path?: string | null
>         } | null
>       } | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         api_name?: string | null,
>         json_path?: string | null
>       } | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         api_name?: string | null,
>         json_path?: string | null
>       } | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         api_name?: string | null,
>         json_path?: string | null
>       } | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         api_name?: string | null,
>         json_path?: string | null
>       } | {
>         api_name?: string | null,
>         json_path?: string | null,
>         limit?: number | null
>       } | {
>         api_name?: string | null,
>         json_path?: string | null,
>         limit?: number | null,
>         id?: string | null
>       } | {
>         resource_path_index?: number | null
>       } | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         param_name?: string | null
>       } | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         api_name?: string | null,
>         json_path?: string | null
>       } | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         api_name?: string | null,
>         json_path?: string | null,
>         other_details?: {
>           savedCVFilters?: {
>             cvid?: string | null,
>             cvmodule?: string | null,
>             cvname?: string | null
>           }[] | null
>         } | null
>       } | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         permissions?: string[] | null
>       } | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       details?: {
>       } | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         api_name?: string | null,
>         json_path?: string | null
>       } | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         api_name?: string | null,
>         json_path?: string | null,
>         id?: string | null
>       } | null,
>       status?: string | null
>     }
>   )[] | null
> }
> ```

***

## Field Updates

### create

`fieldUpdates.create`

Create Field Update. Creates a field update action that assigns a static value to a field, triggered by a workflow rule. For single-value fields, use a string for value. For multi-select and multi-user field types, use an array for value (for example, \['Call', 'Advertisement']).

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.fieldUpdates.create({
	field_updates: [{
		name: 'example',
		module: { api_name: 'example' },
		field: { id: '4876876000000333001', api_name: 'example' },
		value: 'example',
		type: 'example',
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `field_updates` | `object[]` | Yes | Array containing one field update configuration object. Exactly one item is allowed per request. |

> [accordion] field\_updates full type
>
> ```ts theme={null}
> {
>   name: string,
>   module: {
>     singular_label?: string,
>     moduleName?: string,
>     id?: string,
>     plural_label?: string,
>     api_name: string
>   },
>   field: {
>     ui_type?: number | string,
>     id: string,
>     api_name: string,
>     field_label?: string,
>     data_type?: string
>   },
>   value: string | string[] | {
>     id: string,
>     name?: string
>   } | boolean | number | null,
>   type: string,
>   feature_type?: workflow | approval_process | blueprint_transition | blueprint_state | assignment_rules | kiosk | commandcenter_service | connected_workflows,
>   notify?: boolean,
>   update_type?: overwrite | append | null,
>   apply_assignment_threshold?: boolean,
>   dependent_fields?: {
>     field: {
>       ui_type?: number | string,
>       id: string,
>       api_name: string,
>       field_label?: string,
>       data_type?: string
>     },
>     dependent_fields?: {
>       field: {
>         ui_type?: number | string,
>         id: string,
>         api_name: string,
>         field_label?: string,
>         data_type?: string
>       },
>       dependent_fields?: {
>         field: {
>           ui_type?: number | string,
>           id: string,
>           api_name: string,
>           field_label?: string,
>           data_type?: string
>         },
>         value: string
>       }[],
>       value: string
>     }[],
>     value: string
>   }[] | null,
>   related_records?: {
>     api_name: Events | Calls | Tasks | Contacts | Deals,
>     id?: string
>   }[] | null,
>   related_module?: {
>     api_name?: string,
>     id?: string
>   } | null
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `field_updates` | `object[] \| null` | No | Array containing the result of the create operation. Always contains exactly one item since only one field update can be created per request. |

> [accordion] field\_updates full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### delete

`fieldUpdates.delete`

Delete Field Update. Deletes a single field update action identified by the path ID. Use the Get Field Updates API to retrieve the field update ID. Actions associated with active automation rules return a NOT\_ALLOWED error, and read-only actions cannot be deleted. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.fieldUpdates.delete({ id: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Unique identifier of the field update action. Use the [Get Field Updates API](field_updates.yaml#\$.paths./settings/automation/field_updates.get) to retrieve the field update IDs. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `field_updates` | `object[] \| null` | No | Array containing the deleted field update action. Contains exactly one item. |

> [accordion] field\_updates full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### deleteMany

`fieldUpdates.deleteMany`

To delete multiple field update actions. Deletes multiple Field Update actions specified by their IDs. Specify the action IDs as a comma-separated list using the ids query parameter. You can delete a maximum of 10 actions in a single request. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.fieldUpdates.deleteMany({ ids: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `ids` | `string` | Yes | The unique field update IDs you want to delete. Use the [Get Field Updates API](field_updates.yaml#\$.paths./settings/automation/field_updates.get) to retrieve the IDs. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   field_updates?: {
>     code?: string | null,
>     details?: {
>       id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   field_updates?: (
>     {
>       code?: string | null,
>       details?: {
>         id?: string | null
>       } | null,
>       message?: string | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       details?: {
>         id?: string | null
>       } | null,
>       message?: string | null,
>       status?: string | null
>     }
>   )[] | null
> }
> ```

***

### get

`fieldUpdates.get`

Get Field Update By Id. Retrieves the details of the specified Field Update action, including its field configuration, module details, configured value, dependent fields, and audit information. Specify the Field Update ID in the path parameter.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.fieldUpdates.get({ id: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Unique identifier of the field update action. Use the [Get Field Updates API](field_updates.yaml#\$.paths./settings/automation/field_updates.get) to retrieve the field update IDs. |
| `include_inner_details` | `field_label \| enable_colour_code \| pick_list_values.colour_code \| data_type \| display_value` | No | Include optional field metadata in the response. `field_label`: UI label, `enable_colour_code`: picklist color-coding flag, `pick_list_values.colour_code`: HEX color per picklist option, `data_type`: field data type, `display_value`: UI-friendly rendered value. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   field_updates?: {
>     created_time?: string | null,
>     update_type?: string | null | null,
>     lock_status?: {
>       locked?: boolean | null
>     } | null,
>     apply_assignment_threshold?: boolean | null,
>     editable?: boolean | null,
>     module?: {
>       singular_label?: string | null,
>       moduleName?: string | null,
>       id?: string | null,
>       plural_label?: string | null,
>       api_name?: string | null
>     } | null,
>     related_module?: {
>       api_name?: string | null,
>       id?: string | null
>     } | null | null,
>     deletable?: boolean | null,
>     source?: string | null,
>     type?: string | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     notify?: boolean | null,
>     feature_type?: string | null,
>     modified_time?: string | null,
>     field?: {
>       ui_type?: number | null,
>       id?: string | null,
>       api_name?: string | null,
>       field_label?: string | null,
>       data_type?: string | null
>     } | null,
>     dependent_fields?: {
>       field?: {
>         ui_type?: number | null,
>         id?: string | null,
>         api_name?: string | null,
>         field_label?: string | null,
>         data_type?: string | null
>       } | null,
>       dependent_fields?: {
>         field?: {
>           ui_type?: number | null,
>           id?: string | null,
>           api_name?: string | null,
>           field_label?: string | null,
>           data_type?: string | null
>         } | null,
>         dependent_fields?: {
>           field?: {
>             ui_type?: number | null,
>             id?: string | null,
>             api_name?: string | null,
>             field_label?: string | null,
>             data_type?: string | null
>           } | null,
>           value?: string | null
>         }[] | null,
>         value?: string | null
>       }[] | null,
>       value?: string | null
>     }[] | null | null,
>     associated?: boolean | null,
>     related_records?: {
>       api_name?: string | null,
>       id?: string | null
>     }[] | null | null,
>     name?: string | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     id?: string | null,
>     value?: string | string[] | {
>     } | boolean | number | null | null,
>     parent_module?: {
>       api_name?: string | null,
>       id?: string | null
>     } | null | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### list

`fieldUpdates.list`

Get Field Updates. Retrieves a paginated list of field update actions. OPTIONAL FILTERS: module (string — filter by module API name), related\_module (string — filter by related module API name), feature\_type ('workflow'), sort\_by, sort\_order, page, per\_page.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.fieldUpdates.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `filter` | `string` | No | Advanced filter criteria (JSON-encoded string). Supported only: **field.api\_name='name'** and **comparator='contains'**. The value field is dynamic. |
| `module` | `string` | No | Filter by CRM module API name. Use module API names from the Zoho CRM Modules API (for example: Leads, Contacts, Deals). Use the [Modules metadata API](modules.yaml#\$.paths./settings/modules/.get) to get module API names and IDs. |
| `related_module` | `string` | No | Filter by related module API name. Use related module API names from the Zoho CRM Modules API (for example: Notes). Use the [Modules metadata API](modules.yaml#\$.paths./settings/modules.get) to get module API names. |
| `feature_type` | `workflow \| approval_process \| blueprint \| blueprint_transition \| blueprint_state \| review_process \| orchestration \| assignment_rules \| kiosk \| pathfinder \| connected_workflows \| commandcenter_service` | No | Filter field updates by automation feature type. |
| `sort_order` | `desc \| asc` | No | Sort order for the results based on sort\_by. Allowed values: desc, asc. |
| `sort_by` | `string` | No | Sort field for list response. Default sorting is by created\_time; currently supported explicit value is modified\_time. |
| `include_inner_details` | `field_label \| enable_colour_code \| pick_list_values.colour_code \| data_type \| display_value` | No | Include optional field metadata in the response. `field_label`: UI label, `enable_colour_code`: picklist color-coding flag, `pick_list_values.colour_code`: HEX color per picklist option, `data_type`: field data type, `display_value`: UI-friendly rendered value. |
| `page` | `number \| string` | No | Page number (1-based). |
| `per_page` | `number \| string` | No | Indicates records per page. Maximum 200. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   field_updates?: {
>     created_time?: string | null,
>     update_type?: string | null | null,
>     lock_status?: {
>       locked?: boolean | null
>     } | null,
>     apply_assignment_threshold?: boolean | null,
>     editable?: boolean | null,
>     module?: {
>       singular_label?: string | null,
>       moduleName?: string | null,
>       id?: string | null,
>       plural_label?: string | null,
>       api_name?: string | null
>     } | null,
>     related_module?: {
>       api_name?: string | null,
>       id?: string | null
>     } | null | null,
>     deletable?: boolean | null,
>     source?: string | null,
>     type?: string | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     notify?: boolean | null,
>     feature_type?: string | null,
>     modified_time?: string | null,
>     field?: {
>       ui_type?: number | null,
>       id?: string | null,
>       api_name?: string | null,
>       field_label?: string | null,
>       data_type?: string | null
>     } | null,
>     dependent_fields?: {
>       field?: {
>         ui_type?: number | null,
>         id?: string | null,
>         api_name?: string | null,
>         field_label?: string | null,
>         data_type?: string | null
>       } | null,
>       dependent_fields?: {
>         field?: {
>           ui_type?: number | null,
>           id?: string | null,
>           api_name?: string | null,
>           field_label?: string | null,
>           data_type?: string | null
>         } | null,
>         dependent_fields?: {
>           field?: {
>             ui_type?: number | null,
>             id?: string | null,
>             api_name?: string | null,
>             field_label?: string | null,
>             data_type?: string | null
>           } | null,
>           value?: string | null
>         }[] | null,
>         value?: string | null
>       }[] | null,
>       value?: string | null
>     }[] | null | null,
>     associated?: boolean | null,
>     related_records?: {
>       api_name?: string | null,
>       id?: string | null
>     }[] | null | null,
>     name?: string | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     id?: string | null,
>     value?: string | string[] | {
>     } | boolean | number | null | null,
>     parent_module?: {
>       api_name?: string | null,
>       id?: string | null
>     } | null | null
>   }[] | null,
>   info?: {
>     per_page?: number | null,
>     count?: number | null,
>     page?: number | null,
>     more_records?: boolean | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### update

`fieldUpdates.update`

Update Field Update. Updates an existing field update action identified by the path ID. Use the Get Field Updates API to find the field update ID. Locked actions require the appropriate privilege, and read-only actions cannot be modified. For single-value fields, use a string for value.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.fieldUpdates.update({
	id: '4876876000000333001',
	field_updates: [{
		name: 'example',
		module: { api_name: 'example' },
		field: { id: '4876876000000333001', api_name: 'example' },
		value: 'example',
		type: 'example',
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Unique identifier of the field update action. Use the [Get Field Updates API](field_updates.yaml#\$.paths./settings/automation/field_updates.get) to retrieve the field update IDs. |
| `field_updates` | `object[]` | Yes | Array containing one field update configuration object. Exactly one item is allowed per request. |

> [accordion] field\_updates full type
>
> ```ts theme={null}
> {
>   name: string,
>   module: {
>     singular_label?: string,
>     moduleName?: string,
>     id?: string,
>     plural_label?: string,
>     api_name: string
>   },
>   field: {
>     ui_type?: number | string,
>     id: string,
>     api_name: string,
>     field_label?: string,
>     data_type?: string
>   },
>   value: string | string[] | {
>     id: string,
>     name?: string
>   } | boolean | number | null,
>   type: string,
>   feature_type?: workflow | approval_process | blueprint_transition | blueprint_state | assignment_rules | kiosk | commandcenter_service | connected_workflows,
>   notify?: boolean,
>   update_type?: overwrite | append | null,
>   apply_assignment_threshold?: boolean,
>   dependent_fields?: {
>     field: {
>       ui_type?: number | string,
>       id: string,
>       api_name: string,
>       field_label?: string,
>       data_type?: string
>     },
>     dependent_fields?: {
>       field: {
>         ui_type?: number | string,
>         id: string,
>         api_name: string,
>         field_label?: string,
>         data_type?: string
>       },
>       dependent_fields?: {
>         field: {
>           ui_type?: number | string,
>           id: string,
>           api_name: string,
>           field_label?: string,
>           data_type?: string
>         },
>         value: string
>       }[],
>       value: string
>     }[],
>     value: string
>   }[] | null,
>   related_records?: {
>     api_name: Events | Calls | Tasks | Contacts | Deals,
>     id?: string
>   }[] | null,
>   related_module?: {
>     api_name?: string,
>     id?: string
>   } | null
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `field_updates` | `object[] \| null` | No | Array containing the updated field update action. Contains exactly one item. |

> [accordion] field\_updates full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

## Files

### download

`files.download`

Retrieve a file from ZFS. To retrieve the binary content of a file stored in Zoho File System (ZFS) using its unique file ID. The file ID is provided as a required query parameter 'id'.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.files.download({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | No | Specify the encrypted file ID received in the response when uploading files to the Zoho File System. Use the [ZFC API](files.yaml#\$.paths./files.get) to retrieve the File IDs. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `contentBase64` | `string` | No | The file, base64-encoded. Missing when the file came back as text or contentOmitted is set. |
| `text` | `string` | No | The file as text, in place of contentBase64, when it is a text file (CSV, JSON, Markdown, XML and the like) in UTF-8. |
| `contentType` | `string` | Yes | Media type of the file, for example application/pdf. |
| `byteLength` | `number` | Yes | Size of the file in bytes. |
| `filename` | `string` | No | The file name, when known. |
| `contentOmitted` | `not_requested \| over_limit` | No | Set when the content was left out: the caller did not ask for it, or the file was over the limit. |
| `fileId` | `string` | No | Where the host saved the file. Over the limit it comes in place of the content; a host that keeps every file sets it beside the content too. On Corsair it is a Files id (fil\_…): pass it to another app wherever that app takes a file URL, or read a text file or PDF with files.read\_text. |

***

### upload

`files.upload`

Upload files to ZFS. To upload one or more files to the Zoho File System (ZFS) in your Zoho CRM account. The API returns an encrypted file ID for each uploaded file, which you can use to attach the file to a file upload field, image upload field, or record image field through the Create or Update Records API.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.files.upload({
	file: [{ base64: 'SGVsbG8gZnJvbSBDb3JzYWly', filename: 'notes.txt', contentType: 'text/plain' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `inline` | `string` | No | Specify the upload type for inline images. Possible values: **inline** - Upload the file as an inline image for use in email templates or rich-text fields. |
| `file` | `object[]` | Yes | Upload one or more files using repeated **file** keys in the multipart form data. |

> [accordion] file full type
>
> ```ts theme={null}
> (string | {
>   url: string,
>   filename?: string,
>   contentType?: string
> } | {
>   base64: string,
>   filename?: string,
>   contentType?: string
> } | custom)[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | Contains the array of upload results, one object per file submitted in the request. The order corresponds to the order of files in the multipart request. |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   status?: string | null,
>   code?: string | null,
>   message?: string | null,
>   details?: {
>     name?: string | null,
>     id?: string | null
>   } | null
> }[] | null
> ```

***

## Fiscal Year

### get

`fiscalYear.get`

Get Fiscal Year Settings. To retrieve the fiscal year settings configured for your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.fiscalYear.get({});
```

**Input:** *empty object*

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   fiscal_year?: {
>     calendar_type?: string | null,
>     display_based_on?: string | null,
>     surplus_week?: {
>       period?: number | null,
>       year?: number | null,
>       quarter?: number | null
>     } | null | null,
>     start_month?: string | null,
>     interval_display_option?: string | null | null,
>     id?: string | null,
>     structure?: string | null | null,
>     past_surplus_weeks?: null | null,
>     start_date?: string | null | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### update

`fiscalYear.update`

Update Fiscal Year Settings. Updates the fiscal year configuration for the organization. Only administrators can update fiscal year settings.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.fiscalYear.update({
	fiscal_year: { display_based_on: 'start_month' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `fiscal_year` | `object` | Yes | Represents the fiscal year settings to update. Use one of the supported request structures based on the type of fiscal year update being performed. |

> [accordion] fiscal\_year full type
>
> ```ts theme={null}
> {
>   display_based_on: start_month | end_month
> } | {
>   start_month: JANUARY | FEBRUARY | MARCH | APRIL | MAY | JUNE | JULY | AUGUST | SEPTEMBER | OCTOBER | NOVEMBER | DECEMBER,
>   display_based_on?: start_month | end_month
> } | {
>   calendar_type: string,
>   start_month?: JANUARY | FEBRUARY | MARCH | APRIL | MAY | JUNE | JULY | AUGUST | SEPTEMBER | OCTOBER | NOVEMBER | DECEMBER,
>   display_based_on?: start_month | end_month
> } | {
>   calendar_type: string,
>   display_based_on?: start_month | end_month,
>   surplus_week?: {
>     period: number | string,
>     year: number | string,
>     quarter: number | string
>   } | null,
>   interval_display_option: year | quarter,
>   structure: 4-4-5 | 4-5-4 | 5-4-4 | 3-3-3-4 | 3-3-4-3 | 3-4-3-3 | 4-3-3-3,
>   start_date: string,
>   start_month?: JANUARY | FEBRUARY | MARCH | APRIL | MAY | JUNE | JULY | AUGUST | SEPTEMBER | OCTOBER | NOVEMBER | DECEMBER
> } | {
>   display_based_on?: start_month | end_month,
>   surplus_week?: {
>     period: number | string,
>     year: number | string,
>     quarter: number | string
>   } | null,
>   interval_display_option?: year | quarter,
>   structure?: 4-4-5 | 4-5-4 | 5-4-4 | 3-3-3-4 | 3-3-4-3 | 3-4-3-3 | 4-3-3-3,
>   start_date?: string,
>   start_month?: JANUARY | FEBRUARY | MARCH | APRIL | MAY | JUNE | JULY | AUGUST | SEPTEMBER | OCTOBER | NOVEMBER | DECEMBER
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `fiscal_year` | `object \| null` | No | Represents the response body for a successful fiscal year settings update, including the status code, message, and updated record details. |

> [accordion] fiscal\_year full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> } | null
> ```

***

## From Addresses

### list

`fromAddresses.list`

Get from addresses. To retrieve the list of email addresses configured as sender addresses for a user in your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.fromAddresses.list({});
```

**Input:** *empty object*

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   from_addresses?: {
>     email?: string | null,
>     type?: string | null,
>     user_name?: string | null,
>     id?: string | null | null,
>     default?: boolean | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

## Functions

### create

`functions.create`

Function. Use this API to create a function in your Zoho CRM account. Create Deluge, Java, Node.js, or Python functions with metadata and code. Deluge code can be JSON-embedded (\_code) or uploaded as a .ds file; others require a ZIP package. Note: - Up to 20,000 functions per organization.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.functions.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `code` | `string \| object \| custom` | No | Upload the function implementation. This parameter is optional for Deluge functions; if omitted, the function is created without an implementation. For Java, Node.js, and Python functions, upload the function package as a ZIP file. |
| `metadata` | `object` | No | The request body for creating or updating functions, containing function metadata and publish configuration. |

> [accordion] code full type
>
> ```ts theme={null}
> string | {
>   url: string,
>   filename?: string,
>   contentType?: string
> } | {
>   base64: string,
>   filename?: string,
>   contentType?: string
> } | custom
> ```

> [accordion] metadata full type
>
> ```ts theme={null}
> {
>   functions?: {
>     _code?: string | null,
>     api_name?: string | null,
>     name?: string | null,
>     description?: string | null,
>     runtime?: Deluge 1.0 | Java 8 | Java 17 | NodeJS 8 | NodeJS 22 | Python 3.12 | null,
>     category?: Button | Automation | Schedule | Related List | Standalone | Signals | Validation Rule | Dynamic | null
>   }[] | null,
>   publish?: {
>     changelog?: string | null
>   }
> }
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   functions?: {
>     code?: string | null,
>     details?: {
>       id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   functions?: {
>     code?: string | null,
>     details?: {
>       id?: string | null,
>       errors?: {
>         code?: string | null,
>         details?: {
>           errors?: {
>             file?: string | null,
>             line?: number | null,
>             message?: string | null
>           }[] | null
>         } | null,
>         message?: string | null,
>         status?: string | null
>       } | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> }
> ```

***

### delete

`functions.delete`

Function. To delete a function identified by its unique ID or API name from your Zoho CRM organization. The function can't be deleted if it has active references or associations, such as workflow rules, buttons, or schedules, references from other functions, or REST API exposure. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.functions.delete({ fxIdentifier: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `fxIdentifier` | `string \| string` | Yes | Specify the unique ID or API name of the function. You can obtain the function ID or API name using the [Functions API](functions.yaml#\$.paths./settings/functions.get). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `functions` | `object[] \| null` | No | The list of function deletion result items returned in the response. |

> [accordion] functions full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### get

`functions.get`

Function. Use this API to retrieve the details of a specific function in your Zoho CRM account by specifying its unique ID or API name. The response contains information such as the function's runtime, category, state, arguments, tags, REST API mode, and creation and modification details.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.functions.get({ fxIdentifier: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `fxIdentifier` | `string \| string` | Yes | Specify the unique ID or API name of the function. You can obtain the function ID or API name using the [Functions API](functions.yaml#\$.paths./settings/functions.get). |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   functions?: {
>     return_type?: string | null | null,
>     created_time?: string | null,
>     has_draft?: boolean | null,
>     description?: string | null | null,
>     runtime?: string | null,
>     language?: string | null,
>     source?: string | null,
>     rest_api_mode?: string[] | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     modified_time?: string | null,
>     api_name?: string | null,
>     name?: string | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     arguments?: {
>       name?: string | null,
>       type?: string | null
>     }[] | null | null,
>     state?: string | null,
>     id?: string | null,
>     Tag?: {
>       name?: string | null,
>       id?: string | null,
>       color_code?: string | null
>     }[] | null,
>     category?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### getCategories

`functions.getCategories`

Function Categories. To retrieve all the Function categories supported by the current Zoho CRM account and indicate whether each category is available for use. Different Zoho CRM editions and enabled features support different Function categories.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.functions.getCategories({});
```

**Input:** *empty object*

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   categories?: {
>     allowed?: boolean | null,
>     category?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### getCode

`functions.getCode`

Download Function Code. This API downloads the source code of the specified function. - Deluge Functions: A Deluge function consists of a single source file containing the function logic. When downloaded, the API returns the function as a .ds file with a maximum file size of 2 MB.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.functions.getCode({ fxIdentifier: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `version` | `string` | No | Specify which version of the function code to retrieve. Possible values: **draft** - Retrieves the draft version of the function code. When omitted, the published version is returned. |
| `fxIdentifier` | `string \| string` | Yes | Specify the unique ID or API name of the function. You can obtain the function ID or API name using the [Functions API](functions.yaml#\$.paths./settings/functions.get). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `contentBase64` | `string` | No | The file, base64-encoded. Missing when the file came back as text or contentOmitted is set. |
| `text` | `string` | No | The file as text, in place of contentBase64, when it is a text file (CSV, JSON, Markdown, XML and the like) in UTF-8. |
| `contentType` | `string` | Yes | Media type of the file, for example application/pdf. |
| `byteLength` | `number` | Yes | Size of the file in bytes. |
| `filename` | `string` | No | The file name, when known. |
| `contentOmitted` | `not_requested \| over_limit` | No | Set when the content was left out: the caller did not ask for it, or the file was over the limit. |
| `fileId` | `string` | No | Where the host saved the file. Over the limit it comes in place of the content; a host that keeps every file sets it beside the content too. On Corsair it is a Files id (fil\_…): pass it to another app wherever that app takes a file URL, or read a text file or PDF with files.read\_text. |

***

### getRuntimes

`functions.getRuntimes`

List Function Runtime. To retrieve the list of all supported function runtimes available in your Zoho CRM organization, including the programming language, runtime version identifier, and deprecation status for each entry.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.functions.getRuntimes({});
```

**Input:** *empty object*

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   runtimes?: {
>     deprecated?: boolean | null,
>     runtime?: string | null,
>     language?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### list

`functions.list`

Functions. To retrieve a paginated list of all functions in your Zoho CRM account. The response contains metadata about each function, including its name, API name, runtime, category, state, arguments, tags, and timestamps.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.functions.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `page` | `number \| string` | No | Specify the page number to retrieve records. The **page** parameter, together with the **per\_page** parameter, supports retrieving the first 2,000 records. To retrieve records beyond the first 2,000, use the **page\_token** parameter. Do not use this parameter with the page\_token parameter. **Possible Values:** Positive integers **Default Value:** 1 |
| `per_page` | `number \| string` | No | Specify the maximum number of functions to retrieve per page. This value also determines the number of functions returned when the corresponding **page\_token** is used. You cannot use this parameter with the **page\_token** parameter. **Possible Values:** 1 to 200. **Default Value:** 200. |
| `page_token` | `string` | No | The token to retrieve functions beyond the first 2000 records. Use the **next\_page\_token** or **previous\_page\_token** value from the previous response to retrieve the next or previous set of functions, respectively. The API returns the same number of functions as the **per\_page** value used in the request that generated the token. If **page\_token** is specified along with **page** or **per\_page**, the **page\_token** value takes precedence. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   functions?: {
>     return_type?: string | null | null,
>     created_time?: string | null,
>     has_draft?: boolean | null,
>     description?: string | null | null,
>     runtime?: string | null,
>     language?: string | null,
>     source?: string | null,
>     rest_api_mode?: string[] | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     modified_time?: string | null,
>     api_name?: string | null,
>     name?: string | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     arguments?: {
>       name?: string | null,
>       type?: string | null
>     }[] | null | null,
>     state?: string | null,
>     id?: string | null,
>     Tag?: {
>       name?: string | null,
>       id?: string | null,
>       color_code?: string | null
>     }[] | null,
>     category?: string | null
>   }[] | null,
>   info?: {
>     per_page?: number | null,
>     next_page_token?: string | null | null,
>     count?: number | null,
>     sort_by?: string | null,
>     page?: number | null,
>     previous_page_token?: string | null | null,
>     page_token_expiry?: string | null | null,
>     sort_order?: string | null,
>     more_records?: boolean | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### publish

`functions.publish`

Publish a function. This API is applicable only to Java, Node.js, and Python functions. The function must have an unpublished draft version before it can be published. Deluge functions are automatically published when they are created or updated and cannot be published using this API.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.functions.publish({ fxIdentifier: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `fxIdentifier` | `string \| string` | Yes | Specify the unique ID or API name of the function. You can obtain the function ID or API name using the [Functions API](functions.yaml#\$.paths./settings/functions.get). |
| `publish` | `object` | No | Specify the publish configuration for the function. For **Deluge** functions, specifying this object records the changelog for the published revision. Deluge functions are published automatically regardless of whether this object is specified or not. For **Java, Node.js**, and **Python** functions, specifying this object attempts to publish the function after it is created. If this object is omitted, the function is created in the unpublished state. In that case, use the [Publish Function API](functions.yaml#\$.paths./settings/functions/\{fxIdentifier}/actions/publish.post) to publish the function later. |

> [accordion] publish full type
>
> ```ts theme={null}
> {
>   changelog?: string | null
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `publish` | `object[] \| null` | No | Represents the list of results returned for the publish operation. |

> [accordion] publish full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### update

`functions.update`

Update a function by identifier. Use this API to update an existing function in your Zoho CRM account. You can update the function name, description, code, and publish configuration. For Deluge functions, you can also update arguments by modifying the script's function declaration.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.functions.update({ fxIdentifier: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `fxIdentifier` | `string \| string` | Yes | Specify the unique ID or API name of the function. You can obtain the function ID or API name using the [Functions API](functions.yaml#\$.paths./settings/functions.get). |
| `code` | `string \| object \| custom` | No | Specify the binary file content of the function code package to upload. |
| `metadata` | `object` | No | The request body for updating functions, including function details and publish configuration. |

> [accordion] code full type
>
> ```ts theme={null}
> string | {
>   url: string,
>   filename?: string,
>   contentType?: string
> } | {
>   base64: string,
>   filename?: string,
>   contentType?: string
> } | custom
> ```

> [accordion] metadata full type
>
> ```ts theme={null}
> {
>   functions?: {
>     _code?: string | null,
>     api_name?: string | null,
>     name?: string | null,
>     description?: string | null,
>     runtime?: Deluge 1.0 | Java 8 | Java 17 | NodeJS 8 | NodeJS 22 | Python 3.12 | null,
>     category?: Button | Automation | Schedule | Related List | Standalone | Signals | Validation Rule | Dynamic | null
>   }[] | null,
>   publish?: {
>     changelog?: string | null
>   }
> }
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   functions?: {
>     code?: string | null,
>     details?: {
>       id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   functions?: {
>     code?: string | null,
>     details?: {
>       id?: string | null,
>       errors?: {
>         code?: string | null,
>         details?: {
>           errors?: {
>             file?: string | null,
>             line?: number | null,
>             message?: string | null
>           }[] | null
>         } | null,
>         message?: string | null,
>         status?: string | null
>       } | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> }
> ```

***

## Global Picklists

### create

`globalPicklists.create`

Create a Global Picklist. Creates a new global picklist with the specified display label, API name, description, and picklist values. The actual\_label, customizable, modified\_by, created\_by, and presence properties are generated by the backend. In pick\_list\_values, only display\_value and type are considered.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.globalPicklists.create({
	global_picklists: [{
		display_label: 'example',
		pick_list_values: [{ display_value: 'example', type: 'unused' }],
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `global_picklists` | `object[]` | Yes | Array containing the global picklist to create. |

> [accordion] global\_picklists full type
>
> ```ts theme={null}
> {
>   display_label: string,
>   api_name?: string,
>   description?: string | null,
>   pick_list_values_sorted_lexically?: boolean,
>   pick_list_values: {
>     display_value: string,
>     type: unused | used
>   }[]
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `global_picklists` | `object[] \| null` | No | Array containing the created global picklist response. |

> [accordion] global\_picklists full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### delete

`globalPicklists.delete`

Delete a Global Picklist by ID. Deletes a single global picklist identified by the path parameter \&#123;id\&#125;. This request is asynchronous: a 202 Accepted indicates deletion has been scheduled and the response contains a job\_id in details. There is no status-check endpoint. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.globalPicklists.delete({ id: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Numeric id of the global picklist. Use the [Get All Global Picklists](global_picklists.yaml#\$.paths./settings/global_picklists.get) resource to retrieve global picklist IDs. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `global_picklists` | `object[] \| null` | No | Array containing the scheduled deletion response. |

> [accordion] global\_picklists full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   message?: string | null,
>   details?: {
>     job_id?: string | null
>   } | null,
>   status?: string | null
> }[] | null
> ```

***

### deleteMany

`globalPicklists.deleteMany`

Delete a Global Picklist. Deletes a single global picklist by numeric id. This request is asynchronous: a 202 Accepted indicates deletion has been scheduled and the response includes a job\_id in details. There is no status-check endpoint currently. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.globalPicklists.deleteMany({ ids: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `ids` | `string` | Yes | Numeric id of the global picklist to delete. Accepts a single numeric id (e.g. 12345). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `global_picklists` | `object[] \| null` | No | Array containing the scheduled deletion response. |

> [accordion] global\_picklists full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   message?: string | null,
>   details?: {
>     job_id?: string | null
>   } | null,
>   status?: string | null
> }[] | null
> ```

***

### get

`globalPicklists.get`

Get a Single Global Picklist by ID. Fetches the global picklist for given id along with their pick\_list\_values. used\_in\_modules, and associated\_fields\_count can be included in the response based on the 'include' query parameter.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.globalPicklists.get({ id: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Numeric id of the global picklist. Use the [Get All Global Picklists](global_picklists.yaml#\$.paths./settings/global_picklists.get) resource to retrieve global picklist IDs. |
| `include` | `(used_in_modules \| pick_list_values \| associated_fields_count)[]` | No | Comma-separated list of related resources to include. Allowed values: "used\_in\_modules", "pick\_list\_values", "associated\_fields\_count". Use CSV encoding (style=form, explode=false) for multiple values, e.g. include=used\_in\_modules,pick\_list\_values. |
| `include_inner_details` | `string` | No | Optional detailed expansion keys. Currently only allowed when `used_in_modules` is present in `include`. Allowed value: used\_in\_modules.plural\_label. |
| `fields` | `string[]` | No | Comma-separated list of the api\_names of the global picklist keys to be returned in the response, which lets you filter the response by key. Only the requested keys along with `id` are returned. Keys need not be unique — a key repeated in the list is processed once and the duplicates are ignored. Use CSV encoding (style=form, explode=false) for multiple values, e.g. fields=display\_label,api\_name,customizable. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   global_picklists?: {
>     display_label?: string | null,
>     api_name?: string | null,
>     source?: string | null,
>     created_time?: string | null | null,
>     modified_time?: string | null | null,
>     id?: string | null,
>     actual_label?: string | null,
>     description?: string | null | null,
>     associated_fields_count?: number | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     used_in_modules?: {
>       plural_label?: string | null,
>       api_name?: string | null,
>       id?: string | null
>     }[] | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     presence?: boolean | null,
>     customizable?: boolean | null,
>     pick_list_values_sorted_lexically?: boolean | null,
>     pick_list_values?: {
>       type?: string | null,
>       id?: string | null,
>       sequence_number?: number | null,
>       display_value?: string | null,
>       reference_value?: string | null,
>       actual_value?: string | null
>     }[] | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### getFieldAssociations

`globalPicklists.getFieldAssociations`

Get Field Associations. Retrieves associations of picklist values with modules, fields, and layouts for a given global picklist ID.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.globalPicklists.getFieldAssociations({ id: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Numeric id of the global picklist. Use the [Get All Global Picklists](global_picklists.yaml#\$.paths./settings/global_picklists.get) resource to retrieve global picklist IDs. |
| `page` | `number \| string` | No | Page number (positive integer). Default: 1. |
| `per_page` | `number \| string` | No | Number of records per page. Default and maximum: 200. |
| `include_inner_details` | `(module.plural_label \| module.module_name \| layouts.status)[]` | No | Comma-separated list of nested details to include (e.g., `module.plural_label,module.module_name,layouts.status`). Allowed values: module.plural\_label, module.module\_name, layouts.status. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   associations?: {
>     field?: {
>       api_name?: string | null,
>       id?: string | null,
>       field_label?: string | null
>     } | null,
>     module?: {
>       plural_label?: string | null,
>       api_name?: string | null,
>       module_name?: string | null,
>       id?: string | null
>     } | null,
>     layouts?: {
>       name?: string | null,
>       id?: string | null,
>       status?: string | null
>     }[] | null
>   }[] | null,
>   info?: {
>     per_page?: number | null,
>     count?: number | null,
>     page?: number | null,
>     more_records?: boolean | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### getReplacedValues

`globalPicklists.getReplacedValues`

Get Replaced Picklist Values. Retrieves picklist values that are currently being replaced through a replace scheduler for the given global picklist ID.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.globalPicklists.getReplacedValues({ id: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Numeric id of the global picklist. Use the [Get All Global Picklists](global_picklists.yaml#\$.paths./settings/global_picklists.get) resource to retrieve global picklist IDs. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   replaced_values?: {
>     display_value?: string | null,
>     reference_value?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### getValueAssociations

`globalPicklists.getValueAssociations`

Get Picklist Value Associations. To the list of features like blueprints, workflows create, workflow convert, workflow task, ABM, etc in which a particular picklist value is used.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.globalPicklists.getValueAssociations({ id: '4876876000000333001', picklist_value_id: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Numeric id of the global picklist. Use the [Get All Global Picklists](global_picklists.yaml#\$.paths./settings/global_picklists.get) resource to retrieve global picklist IDs. |
| `picklist_value_id` | `string` | Yes | The ID of the picklist value to retrieve associations for. Use the [Get All Global Picklists](global_picklists.yaml#\$.paths./settings/global_picklists.get) resource to retrieve picklist value IDs. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   pick_list_values_associations?: {
>     resources?: {
>       name?: string | null,
>       details?: {
>         module?: {
>           api_name?: string | null,
>           id?: string | null,
>           plural_label?: string | null
>         } | null
>       } | null | {
>         actions?: {
>           module?: {
>             api_name?: string | null,
>             id?: string | null
>           } | null,
>           transition?: {
>             name?: string | null,
>             id?: string | null
>           } | null,
>           id?: string | null,
>           type?: string | null
>         }[] | null
>       } | {
>         name?: string | null,
>         id?: string | null,
>         type?: string | null,
>         transition?: {
>           name?: string | null,
>           id?: string | null
>         } | null
>       }[] | null,
>       id?: string | null
>     }[] | null,
>     type?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### list

`globalPicklists.list`

Get All Global Picklists. Fetches the list of global picklists available in the organization along with their details. pick\_list\_values, used\_in\_modules, and associated\_fields\_count can be included in the response based on the "include" query parameter.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.globalPicklists.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `include` | `(used_in_modules \| pick_list_values \| associated_fields_count)[]` | No | Comma-separated list of related resources to include. Allowed values: "used\_in\_modules", "pick\_list\_values", "associated\_fields\_count". Use CSV encoding (style=form, explode=false) for multiple values, e.g. include=used\_in\_modules,pick\_list\_values. |
| `include_inner_details` | `string` | No | Optional detailed expansion keys. Currently only allowed when `used_in_modules` is present in `include`. Allowed value: used\_in\_modules.plural\_label. |
| `fields` | `string[]` | No | Comma-separated list of the api\_names of the global picklist keys to be returned in the response, which lets you filter the response by key. Only the requested keys along with `id` are returned. Keys need not be unique — a key repeated in the list is processed once and the duplicates are ignored. Use CSV encoding (style=form, explode=false) for multiple values, e.g. fields=display\_label,api\_name,customizable. |
| `inner_details_filters` | `any` | No | JSON array used to filter the inner details returned for each global picklist in the list response. Each entry gives the inner resource in "api\_name" and the criteria to apply in "filters", both of which are mandatory. Only "pick\_list\_values" is supported in "api\_name", and within it only the "type" key can be filtered on, using the "equal" and "not\_equal" comparators with the value "used" or "unused". "filters" takes either a single criteria using "field", "comparator" and "value", or a set of criteria in "group" combined using "group\_operator", and a group may be nested inside another group. Use the "filters" query parameter instead to filter the global picklists themselves. |
| `filters` | `any` | No | JSON object used to filter the global picklists by the value of a key. Give either a single criteria using "field", "comparator" and "value", or a set of criteria in "group" combined using "group\_operator". "group" and "group\_operator" are mandatory to each other, and within a criteria "comparator" and "value" are dependent on "field". Only the "api\_name", "source" and "customizable" keys can be filtered on; any other key returns a 400 with the code NOT\_SUPPORTED. The string keys "api\_name" and "source" support the "equal" and "not\_equal" comparators with a string value, and the boolean key "customizable" supports only the "equal" comparator with a boolean value. Criteria cannot be nested inside another "group". |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   global_picklists?: {
>     display_label?: string | null,
>     source?: string | null,
>     api_name?: string | null,
>     created_time?: string | null | null,
>     modified_time?: string | null | null,
>     id?: string | null,
>     actual_label?: string | null,
>     description?: string | null | null,
>     associated_fields_count?: number | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     used_in_modules?: {
>       plural_label?: string | null,
>       api_name?: string | null,
>       id?: string | null
>     }[] | null | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     presence?: boolean | null,
>     customizable?: boolean | null,
>     pick_list_values_sorted_lexically?: boolean | null,
>     pick_list_values?: {
>       type?: string | null,
>       id?: string | null,
>       sequence_number?: number | null,
>       display_value?: string | null,
>       reference_value?: string | null,
>       actual_value?: string | null
>     }[] | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### replaceValues

`globalPicklists.replaceValues`

Replace Picklist Values. Schedules or executes replacement of picklist values for the specified global picklist. You can specify either id, display\_value, or both for old\_value and new\_value. If both are provided, the system validates them for consistency.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.globalPicklists.replaceValues({
	id: '4876876000000333001',
	replace_picklist_values: [{
		old_value: {},
		new_value: {},
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Numeric id of the global picklist. Use the [Get All Global Picklists](global_picklists.yaml#\$.paths./settings/global_picklists.get) resource to retrieve global picklist IDs. |
| `replace_picklist_values` | `object[]` | Yes | Array of picklist value replacement pairs. |

> [accordion] replace\_picklist\_values full type
>
> ```ts theme={null}
> {
>   old_value: {
>     id?: string,
>     display_value?: string
>   },
>   new_value: {
>     id?: string,
>     display_value?: string
>   }
> }[]
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   replace_picklist_values?: {
>     code?: string | null,
>     details?: {
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   replace_picklist_values?: {
>     code?: string | null,
>     details?: {
>       job_id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> }
> ```

***

### update

`globalPicklists.update`

Update a Global Picklist by ID. Updates an existing global picklist identified by the path parameter \&#123;id\&#125;. You can update display\_label, api\_name, description, pick\_list\_values\_sorted\_lexically, and pick\_list\_values. Backend-generated properties (actual\_label, customizable, modified\_by, created\_by, presence) cannot be updated.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.globalPicklists.update({
	id: '4876876000000333001',
	global_picklists: [{}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Numeric id of the global picklist. Use the [Get All Global Picklists](global_picklists.yaml#\$.paths./settings/global_picklists.get) resource to retrieve global picklist IDs. |
| `global_picklists` | `object[]` | Yes | Array containing the global picklist to update. |

> [accordion] global\_picklists full type
>
> ```ts theme={null}
> {
>   display_label?: string,
>   api_name?: string,
>   description?: string | null,
>   pick_list_values_sorted_lexically?: boolean,
>   pick_list_values?: {
>     id?: string,
>     display_value?: string,
>     reference_value?: string,
>     type?: unused | used,
>     _delete?: boolean
>   }[]
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `global_picklists` | `object[] \| null` | No | Array containing the updated global picklist response. |

> [accordion] global\_picklists full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### updateMany

`globalPicklists.updateMany`

Update a Global Picklist. Updates an existing global picklist. You can update display\_label, api\_name, description, pick\_list\_values\_sorted\_lexically, and pick\_list\_values. Backend-generated properties (actual\_label, customizable, modified\_by, created\_by, presence) cannot be updated.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.globalPicklists.updateMany({
	global_picklists: [{ id: '4876876000000333001' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `global_picklists` | `object[]` | Yes | Array containing the global picklist to update. |

> [accordion] global\_picklists full type
>
> ```ts theme={null}
> {
>   id: string,
>   display_label?: string,
>   api_name?: string,
>   description?: string | null,
>   pick_list_values_sorted_lexically?: boolean,
>   pick_list_values?: {
>     id?: string,
>     display_value?: string,
>     reference_value?: string,
>     type?: unused | used,
>     _delete?: boolean
>   }[]
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `global_picklists` | `object[] \| null` | No | Array containing the updated global picklist response. |

> [accordion] global\_picklists full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

## Holidays

### create

`holidays.create`

Holidays. To create one or more business or shift holidays in Zoho CRM. Business holidays apply to all users, while shift holidays must specify a valid shift\_hour identifier.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.holidays.create({
	holidays: [{ name: 'example', date: 'example', type: 'business_holiday' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `holidays` | `object[]` | Yes | Specify the list of holidays to create. At least **one** holiday object is required. |
| `info` | `object` | No | Contains optional pagination context included in the request schema. |

> [accordion] holidays full type
>
> ```ts theme={null}
> {
>   name: string,
>   date: string,
>   type: business_holiday | shift_holiday,
>   shift_hour?: {
>     name: string,
>     id: string
>   }
> }[]
> ```

> [accordion] info full type
>
> ```ts theme={null}
> {
>   per_page?: number | string,
>   page?: number | string,
>   count?: number | string,
>   more_records?: boolean
> }
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   holidays?: {
>     code?: string | null,
>     details?: {
>       id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   holidays?: {
>     code?: string | null,
>     details?: {
>       id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> }
> ```

***

### delete

`holidays.delete`

Holiday. To permanently delete a holiday from Zoho CRM using its unique identifier. The deletion cannot be undone. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.holidays.delete({ holidayId: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `holidayId` | `string` | Yes | Specify the unique identifier of the holiday. |
| `year` | `number \| string` | No | Specify the year for which to filter holidays. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `holidays` | `object[] \| null` | No | Contains the result for each holiday included in the create request. |

> [accordion] holidays full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### get

`holidays.get`

A specific holiday. To retrieve the complete details of a specific holiday record from Zoho CRM using its unique identifier.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.holidays.get({ holidayId: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `holidayId` | `string` | Yes | Specify the unique identifier of the holiday. |
| `year` | `number \| string` | No | Specify the year for which to filter holidays. |
| `type` | `business_holiday \| shift_holiday` | No | Specify the type of holidays to retrieve. Possible values: business\_holiday, shift\_holiday. |
| `shift_id` | `string` | No | Specify the unique identifier of the shift hour whose holidays to retrieve. Required when the type parameter is set to shift\_holiday. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   holidays?: {
>     name?: string | null,
>     date?: string | null,
>     type?: string | null,
>     shift_hour?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     id?: string | null,
>     year?: number | null
>   }[] | null,
>   info?: {
>     per_page?: number | null,
>     page?: number | null,
>     count?: number | null,
>     more_records?: boolean | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### list

`holidays.list`

Holidays. To retrieve the list of holidays configured in Zoho CRM. Business holidays apply to all users, while shift holidays are specific to configured shift schedules. Returns paginated results.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.holidays.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `year` | `number \| string` | No | Specify the year for which to filter holidays. |
| `type` | `business_holiday \| shift_holiday` | No | Specify the type of holidays to retrieve. Possible values: business\_holiday, shift\_holiday. |
| `shift_id` | `string` | No | Specify the unique identifier of the shift hour whose holidays to retrieve. Required when the type parameter is set to shift\_holiday. |
| `page` | `number \| string` | No | Specify the page number for paginated results. Defaults to 1. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   holidays?: {
>     name?: string | null,
>     date?: string | null,
>     type?: string | null,
>     shift_hour?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     id?: string | null,
>     year?: number | null
>   }[] | null,
>   info?: {
>     per_page?: number | null,
>     page?: number | null,
>     count?: number | null,
>     more_records?: boolean | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### update

`holidays.update`

A specific holiday. To update the name or date of a specific holiday record in Zoho CRM using its unique identifier.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.holidays.update({ holidayId: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `holidayId` | `string` | Yes | Specify the unique identifier of the holiday. |
| `holidays` | `object[]` | No | Specify the updated details for the holiday. |

> [accordion] holidays full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   date?: string | null
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `holidays` | `object[] \| null` | No | Contains the result for the updated holiday. |

> [accordion] holidays full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### updateMany

`holidays.updateMany`

Multiple Holidays. To update one or more existing holiday records in Zoho CRM by providing each holiday ID with the updated field values.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.holidays.updateMany({
	holidays: [{ id: '4876876000000333001' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `holidays` | `object[]` | Yes | Specify the list of holidays to update. Each entry must include the holiday **ID**. |
| `info` | `object` | No | Contains optional pagination context included in the request schema. |

> [accordion] holidays full type
>
> ```ts theme={null}
> {
>   name?: string,
>   date?: string,
>   type?: business_holiday | shift_holiday,
>   shift_hour?: {
>     name: string,
>     id: string
>   },
>   id: string
> }[]
> ```

> [accordion] info full type
>
> ```ts theme={null}
> {
>   per_page?: number | string,
>   page?: number | string,
>   count?: number | string,
>   more_records?: boolean
> }
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   holidays?: {
>     code?: string | null,
>     details?: {
>       id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   holidays?: {
>     code?: string | null,
>     details?: {
>       id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> }
> ```

***

## Inventory

### convert

`inventory.convert`

Convert Inventory Record. To convert an inventory record in your Zoho CRM organization from one module to another. Supported conversion paths are: Quotes to Sales Orders or Invoices, and Sales Orders to Invoices.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.inventory.convert({ moduleApiName: 'Quotes', id: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `moduleApiName` | `Quotes \| Sales_Orders` | Yes | Specify the API name of the source inventory module. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve the module's API name. |
| `id` | `string` | Yes | Specify the unique ID of the source inventory record to convert. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve the module's ID. **Possible values:** Quotes, Sales\_Orders. |
| `data` | `object[]` | No | Specify the inventory record conversion details. |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   convert_to: {
>     module: {
>       api_name: string,
>       id: string
>     },
>     carry_over_tags?: boolean
>   }[]
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | Represents the list of conversion results returned by the operation. |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   message?: string | null,
>   status?: string | null,
>   details?: {
>     Sales_Orders?: {
>       id?: string | null,
>       name?: string | null
>     } | null,
>     Invoices?: {
>       id?: string | null,
>       name?: string | null
>     } | null
>   } | null
> }[] | null
> ```

***

## Inventory Templates

### get

`inventoryTemplates.get`

Inventory Template. Retrieves a single inventory template by its ID with complete details including content and all metadata.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.inventoryTemplates.get({ templateId: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `templateId` | `string` | Yes | Inventory template ID. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   inventory_templates?: {
>     id?: string | null,
>     name?: string | null,
>     created_time?: string | null,
>     modified_time?: string | null,
>     last_usage_time?: string | null | null,
>     category?: string | null,
>     folder?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     module?: {
>       api_name?: string | null,
>       id?: string | null
>     } | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     editor_mode?: string | null,
>     favorite?: boolean | null,
>     content?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### list

`inventoryTemplates.list`

Inventory templates. To retrieve a paginated list of inventory templates configured in your Zoho CRM organization, with optional filtering by module, category, and field criteria, and sorting by name or usage and modification timestamps.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.inventoryTemplates.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | No | Specifies the API name of the CRM module used to filter the returned inventory templates. |
| `per_page` | `number \| string` | No | Specify the number of inventory templates to return per page. |
| `page` | `number \| string` | No | Specify the page number to retrieve in the paginated results. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   inventory_templates?: {
>     created_time?: string | null,
>     modified_time?: string | null,
>     last_usage_time?: string | null | null,
>     category?: string | null,
>     folder?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     module?: {
>       api_name?: string | null,
>       id?: string | null
>     } | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     name?: string | null,
>     id?: string | null,
>     editor_mode?: string | null,
>     favorite?: boolean | null
>   }[] | null,
>   info?: {
>     per_page?: number | null,
>     page?: number | null,
>     count?: number | null,
>     more_records?: boolean | null
>   } | null
> } | {
>   success: true
> }
> ```

***

## Kiosks

### activate

`kiosks.activate`

Activate Kiosk. To activate a Kiosk that is in draft or inactive state in Zoho CRM. The Kiosk must contain at least one screen before it can be activated. Once activated, the Kiosk becomes active and can be used for data collection.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.kiosks.activate({ kioskId: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `kioskId` | `string` | Yes | Specify the unique identifier of the kiosk. Use the [Get Kiosks API](kiosks.yaml#\$.paths./settings/kiosks.get) to retrieve Kiosk ID. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kiosks` | `object \| null` | No | Represents the status of a kiosk activation operation, including the status code, message, and details of the activated kiosk. |

> [accordion] kiosks full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> } | null
> ```

***

### clone

`kiosks.clone`

Clone a Kiosk. To clone an existing kiosk in Zoho CRM and create a new one from it. Cloning lets you reuse the full structure and configuration of a kiosk — including all its states, transitions, screens, actions, and decisions — without rebuilding it from scratch.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.kiosks.clone({
	kioskId: 'example',
	kiosks: [{ type: 'dependent' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `kioskId` | `string` | Yes | Specify the unique identifier of the kiosk. Use the [Get Kiosks API](kiosks.yaml#\$.paths./settings/kiosks.get) to retrieve Kiosk ID. |
| `delete_kiosk_id` | `string` | No | ID of the kiosk to delete after cloning (for replace-clone operations). |
| `kiosk_clone` | `string` | No | Indicates the clone mode for the kiosk clone operation. |
| `kiosks` | `object[]` | Yes | Contains the details for the kiosk to be cloned. |

> [accordion] kiosks full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   description?: string | null,
>   type: dependent | standalone,
>   group_api_name?: string | null
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kiosks` | `object \| null` | No | Represents the status of a kiosk clone operation, including the status code, message, and item details. |

> [accordion] kiosks full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> } | null
> ```

***

### create

`kiosks.create`

Create a Kiosk. To create a new Kiosk in the draft state in your Zoho CRM organization. After creating the Kiosk, use the Create a Kiosk State API to configure screens and then use the Activate Kiosk API to publish it. Available in the Standard, Professional, Enterprise, and Ultimate editions.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.kiosks.create({
	kiosks: [{ name: 'example', status: 'examp' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `kiosks` | `object[]` | Yes | Contains the details of the kiosk to be created. Although the field is an array, only one kiosk can be created per request. |

> [accordion] kiosks full type
>
> ```ts theme={null}
> {
>   current_record_module?: {
>     api_name?: string | null,
>     id?: string | null
>   },
>   name: string,
>   description?: string | null,
>   group_api_name?: string | null,
>   status: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kiosks` | `object[] \| null` | No | Contains the list of kiosk objects created. |

> [accordion] kiosks full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### deactivate

`kiosks.deactivate`

Deactivate a Kiosk. To deactivate an active Kiosk in your Zoho CRM account. Once deactivated, the Kiosk will no longer be accessible for users. Use the Get All Kiosks API to retrieve the Kiosk ID. Note - A Kiosk must be in the Active (Published) state before it can be deactivated. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.kiosks.deactivate({ kioskId: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `kioskId` | `string` | Yes | Specify the unique identifier of the kiosk. Use the [Get Kiosks API](kiosks.yaml#\$.paths./settings/kiosks.get) to retrieve Kiosk ID. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kiosks` | `object \| null` | No | Represents the status of a kiosk deactivation operation, including the status code, message, and details of the deactivated kiosk. |

> [accordion] kiosks full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> } | null
> ```

***

### delete

`kiosks.delete`

Delete a kiosk. To delete an existing Kiosk from your Zoho CRM organization. The deletion removes the entire Kiosk entry, including all states created within it, along with any related data. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.kiosks.delete({ kioskId: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `kioskId` | `string` | Yes | Specify the unique identifier of the kiosk. Use the [Get Kiosks API](kiosks.yaml#\$.paths./settings/kiosks.get) to retrieve Kiosk ID. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kiosks` | `object[] \| null` | No | Contains the list of kiosk result objects from the delete operation. |

> [accordion] kiosks full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### deleteMany

`kiosks.deleteMany`

Kiosk Deletion. To delete one or more Kiosks from your Zoho CRM account. Use the Get Kiosks API to retrieve Kiosk IDs. Note: You can delete: - Draft Kiosks. - Deactivated Kiosks. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.kiosks.deleteMany({ ids: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `ids` | `string` | Yes | Comma-separated list of kiosk IDs to delete in bulk. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kiosks` | `object[] \| null` | No | Contains the list of kiosk result objects. |

> [accordion] kiosks full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### execute

`kiosks.execute`

Execute a Kiosk. The execute Kiosk API is used to trigger the execution of a published Kiosk in Zoho CRM. This API returns only the first executable state of the Kiosk. To continue the execution through the remaining states, call the Update a Kiosk Execution API until the execution is complete.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.kiosks.execute({
	kioskId: 'example',
	kiosk_execute: [{}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `kioskId` | `string` | Yes | Specify the unique identifier of the kiosk for which you want to perform the operation. |
| `kiosk_execute` | `object[]` | Yes | The request body must be a JSON object containing the kiosk\_execute array. The array contains the data required to execute the Kiosk. |

> [accordion] kiosk\_execute full type
>
> ```ts theme={null}
> {
>   data?: {
>     Current_Record?: {
>       id?: string | null
>     },
>     id?: string | null
>   }
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kiosk_execute` | `object[] \| null` | No | Contains the result of the execute action, including the status, message, and details of the next executable state. |

> [accordion] kiosk\_execute full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     next_executable_state?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     executed_dependent_states?: {
>       name?: string | null,
>       id?: string | null,
>       rid?: string | null,
>       type?: string | null,
>       transition?: {
>         name?: string | null,
>         id?: string | null,
>         rid?: string | null
>       } | null,
>       details?: {
>       } | null
>     }[] | null | null,
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### executeState

`kiosks.executeState`

Update a Kiosk Execution. Submits the transition and runtime data for the current step of an ongoing kiosk execution and moves it to the next step. Zoho documents a published kiosk as required here (it answers "Kiosk not published" otherwise), although its test-run page sends test runs on to this operation. The actions run on live records (emails, record changes) and are not undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.kiosks.executeState({
	kioskId: 'example',
	executionId: 'example',
	kiosk_executions: [{
		transition: { id: '4876876000000333001' },
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `kioskId` | `string` | Yes | Specify the unique identifier of the kiosk for which you want to perform the operation. |
| `executionId` | `string` | Yes | Specify the unique ID of the execution. |
| `kiosk_executions` | `object[]` | Yes | Contains one or more execution action entries, each specifying the transition and data context for advancing the kiosk execution to the next state. |

> [accordion] kiosk\_executions full type
>
> ```ts theme={null}
> {
>   data?: {
>     Current_Record?: {
>       id?: string | null
>     },
>     id?: string | null
>   },
>   transition: {
>     name?: string | null,
>     id: string
>   },
>   id?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kiosk_executions` | `object[] \| null` | No | Contains the result of the execution action, including the status, message, and details of the next executable state. |

> [accordion] kiosk\_executions full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     next_executable_state?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     executed_dependent_states?: {
>       name?: string | null,
>       id?: string | null,
>       rid?: string | null,
>       type?: string | null,
>       transition?: {
>         name?: string | null,
>         id?: string | null,
>         rid?: string | null
>       } | null,
>       details?: {
>       } | null
>     }[] | null | null,
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### get

`kiosks.get`

Get a Specific Kiosk. To retrieve the details of a specific kiosk in your Zoho CRM organization, identified by its unique kiosk ID. Use the Get Kiosks API to retrieve Kiosk ID.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.kiosks.get({ kioskId: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `kioskId` | `string` | Yes | Specify the unique identifier of the kiosk. Use the [Get Kiosks API](kiosks.yaml#\$.paths./settings/kiosks.get) to retrieve Kiosk ID. |
| `include_inner_details` | `string` | No | Controls additional inner details to include in the response. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   kiosks?: {
>     created_time?: string | null,
>     version_details?: {
>       parent_id?: null | null,
>       version_number?: number | null
>     } | null,
>     module?: {
>       api_name?: string | null,
>       id?: string | null
>     } | null,
>     description?: string | null | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     sequence_number?: number | null,
>     modified_time?: string | null,
>     group_id?: string | null,
>     current_record_module?: {
>       plural_label?: string | null,
>       api_name?: string | null,
>       id?: string | null
>     } | null | null | null,
>     associated?: boolean | null,
>     name?: string | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     id?: string | null,
>     status?: string | null,
>     group_api_name?: string | null,
>     chart_data?: {
>     } | null,
>     transitions?: {
>     }[] | null,
>     states?: {
>     }[] | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### getAssociations

`kiosks.getAssociations`

Get Kiosk Associations. Retrieves all associations configured for a specific Kiosk in Zoho CRM, including the associated resources and, their additional details. Use the Get All Kiosks API to retrieve the Kiosk ID. Note: - The structure of each resource object is mostly consistent, but \_details can vary.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.kiosks.getAssociations({ kioskId: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `kioskId` | `string` | Yes | Unique identifier of the kiosk. Use the [Get Kiosks API](kiosks.yaml#\$.paths./settings/kiosks.get) to retrieve the Kiosk ID. |
| `include_inner_details` | `string` | No | Controls additional inner details to include in the response. |
| `include` | `string` | No | Specifies additional properties to include in the response. |
| `module` | `string` | No | Filters associations by the specified module API name. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   kiosks?: {
>     _associations?: {
>       resources?: null | null,
>       type?: string | null,
>       detail_view_page?: {
>         sequence_number?: number | null,
>         name?: string | null,
>         id?: string | null
>       }[] | null
>     }[] | null,
>     id?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### getCurrentRecordAssociations

`kiosks.getCurrentRecordAssociations`

Kiosk CurrentRecords Associations. To retrieve all associations configured for the current record of the specified kiosk in your Zoho CRM organization. Use this API to retrieve all the associations configured for the CurrentRecord lookup field in a specific Kiosk.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.kiosks.getCurrentRecordAssociations({ kioskId: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `kioskId` | `string` | Yes | Unique identifier of the kiosk. Use the [Get Kiosks API](kiosks.yaml#\$.paths./settings/kiosks.get) to retrieve the Kiosk ID. |
| `include_inner_details` | `string` | No | Controls additional inner details to include in the response. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   current_record?: {
>     _associations?: {
>       resources?: {
>         name?: string | null,
>         id?: string | null,
>         _details?: {
>           type?: string | null
>         } | null
>       }[] | null,
>       type?: string | null
>     }[] | null,
>     id?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### getExecution

`kiosks.getExecution`

Retrieve a kiosk execution record. To retrieve the details of a specific kiosk execution in your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.kiosks.getExecution({ kioskId: 'example', executionId: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `kioskId` | `string` | Yes | Specify the unique identifier of the kiosk for which you want to perform the operation. |
| `executionId` | `string` | Yes | Specify the unique ID of the execution. |
| `include_inner_details` | `string` | No | Specify additional inner details to include in the response. Accepts a comma-separated list of dot-notation paths indicating which nested properties should return extended information. |
| `navigated_from_back` | `boolean` | No | Indicates whether the execution was navigated from a back action. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   kiosk_executions?: {
>     executable_info?: {
>       state?: {
>         name?: string | null,
>         id?: string | null
>       } | null,
>       transitions?: {
>         prop_name?: string | null,
>         is_connected_end?: boolean | null,
>         name?: string | null,
>         id?: string | null
>       }[] | null
>     } | null,
>     data?: {
>       Kiosk_End_Time?: string | null,
>       Owner?: {
>         name?: string | null,
>         id?: string | null,
>         email?: string | null
>       } | null,
>       id?: string | null,
>       Kiosk_Start_Time?: string | null
>     } | null,
>     elements?: {
>       type?: string | null,
>       value?: string | null
>     }[] | null,
>     width?: string | null | null,
>     id?: string | null,
>     kiosk?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     title?: string | null,
>     button_align?: string | null | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### getRecordSteps.create

`kiosks.getRecordSteps.create`

Kiosk GetRecord. To create a GetRecords configuration associated with a Kiosk. It defines how records should be fetched from a module, including criteria, selection behavior, and sorting. Use the Get All Kiosks API to retrieve the Kiosk ID. Note: - You can configure GetRecords only for Kiosks in the draft state.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.kiosks.getRecordSteps.create({
	kioskId: 'example',
	get_records: [{
		criteria: {
			field: { api_name: 'example' },
			comparator: 'example',
			value: 'example',
		},
		module: { id: '4876876000000333001' },
		name: 'example',
		sort_order: {},
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `kioskId` | `string` | Yes | Unique identifier of the kiosk. Use the [Get Kiosks API](kiosks.yaml#\$.paths./settings/kiosks.get) to retrieve the Kiosk ID. |
| `get_records` | `object[]` | Yes | Array containing the get\_record configuration to create. |

> [accordion] get\_records full type
>
> ```ts theme={null}
> {
>   name: string,
>   module: {
>     name?: string | null,
>     id: string,
>     api_name?: string | null
>   },
>   criteria: {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: string,
>     value: (string | number | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     })[] | string | number | boolean | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     } | ${
>       EMPTY
>     } | ${
>       NOTEMPTY
>     } | ${
>       TODAY
>     } | ${
>       TOMORROW
>     } | ${
>       TOMORROWPLUS
>     } | ${
>       YESTERDAY
>     } | ${
>       YESTERDAYMINUS
>     } | ${
>       LASTMONTH
>     } | ${
>       THISMONTH
>     } | ${
>       NEXTMONTH
>     } | ${
>       LASTWEEK
>     } | ${
>       THISWEEK
>     } | ${
>       NEXTWEEK
>     } | ${
>       THISYEAR
>     } | ${
>       THISFY
>     } | ${
>       THISFQ
>     } | ${
>       LASTYEAR
>     } | ${
>       PREVFY
>     } | ${
>       PREVFQ
>     } | ${
>       NEXTYEAR
>     } | ${
>       NEXTFY
>     } | ${
>       NEXTFQ
>     } | ${
>       EMPTY
>     } | ${
>       NOTEMPTY
>     } | string | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: string,
>     value: (string | number | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     })[] | string | number | boolean | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     } | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>     value: string[] | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: less_than | less_equal | greater_than | greater_equal,
>     value: string | number | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: between | not_between,
>     value: (string | number)[],
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: in | not_in,
>     value: (string | number)[],
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: include_all | include_any | exclude_all | exclude_any,
>     value: {
>       id: string & any,
>       name?: string
>     }[],
>     type?: merge_field | pre_defined | value | field
>   } | {
>     group: (
>       {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: string,
>         value: (string | number | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         })[] | string | number | boolean | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         } | ${
>           EMPTY
>         } | ${
>           NOTEMPTY
>         } | ${
>           TODAY
>         } | ${
>           TOMORROW
>         } | ${
>           TOMORROWPLUS
>         } | ${
>           YESTERDAY
>         } | ${
>           YESTERDAYMINUS
>         } | ${
>           LASTMONTH
>         } | ${
>           THISMONTH
>         } | ${
>           NEXTMONTH
>         } | ${
>           LASTWEEK
>         } | ${
>           THISWEEK
>         } | ${
>           NEXTWEEK
>         } | ${
>           THISYEAR
>         } | ${
>           THISFY
>         } | ${
>           THISFQ
>         } | ${
>           LASTYEAR
>         } | ${
>           PREVFY
>         } | ${
>           PREVFQ
>         } | ${
>           NEXTYEAR
>         } | ${
>           NEXTFY
>         } | ${
>           NEXTFQ
>         } | ${
>           EMPTY
>         } | ${
>           NOTEMPTY
>         } | string | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: string,
>         value: (string | number | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         })[] | string | number | boolean | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         } | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>         value: string[] | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: less_than | less_equal | greater_than | greater_equal,
>         value: string | number | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: between | not_between,
>         value: (string | number)[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: in | not_in,
>         value: (string | number)[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: include_all | include_any | exclude_all | exclude_any,
>         value: {
>           id: string & any,
>           name?: string
>         }[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         group: (
>           {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: string,
>             value: (string | number | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             })[] | string | number | boolean | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             } | ${
>               EMPTY
>             } | ${
>               NOTEMPTY
>             } | ${
>               TODAY
>             } | ${
>               TOMORROW
>             } | ${
>               TOMORROWPLUS
>             } | ${
>               YESTERDAY
>             } | ${
>               YESTERDAYMINUS
>             } | ${
>               LASTMONTH
>             } | ${
>               THISMONTH
>             } | ${
>               NEXTMONTH
>             } | ${
>               LASTWEEK
>             } | ${
>               THISWEEK
>             } | ${
>               NEXTWEEK
>             } | ${
>               THISYEAR
>             } | ${
>               THISFY
>             } | ${
>               THISFQ
>             } | ${
>               LASTYEAR
>             } | ${
>               PREVFY
>             } | ${
>               PREVFQ
>             } | ${
>               NEXTYEAR
>             } | ${
>               NEXTFY
>             } | ${
>               NEXTFQ
>             } | ${
>               EMPTY
>             } | ${
>               NOTEMPTY
>             } | string | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: string,
>             value: (string | number | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             })[] | string | number | boolean | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             } | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>             value: string[] | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: less_than | less_equal | greater_than | greater_equal,
>             value: string | number | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: between | not_between,
>             value: (string | number)[],
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: in | not_in,
>             value: (string | number)[],
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: include_all | include_any | exclude_all | exclude_any,
>             value: {
>               id: string & any,
>               name?: string
>             }[],
>             type?: merge_field | pre_defined | value | field
>           } | (recursive)
>         )[],
>         group_operator: AND | OR | and | or
>       }
>     )[],
>     group_operator: AND | OR | and | or
>   },
>   sort_order: any,
>   selection_details?: (any & any)& any,
>   selected_fields?: string[] | null,
>   type?: parent | child | null,
>   parent_record_field?: {
>     id: string
>   },
>   child_relationship?: {
>     display_label?: string | null,
>     id: string
>   }
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `get_records` | `object[] \| null` | No | Array of operation results. |

> [accordion] get\_records full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### getRecordSteps.delete

`kiosks.getRecordSteps.delete`

Kiosk GetRecord. To delete a specific GetRecords configuration associated with a Kiosk. Use the GetRecords Associations API to identify all associations of the GetRecords configuration. Remove the associations from the respective Kiosk components, and then delete the GetRecords configuration. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.kiosks.getRecordSteps.delete({ kioskId: 'example', getRecordId: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `kioskId` | `string` | Yes | Unique identifier of the kiosk. Use the [Get Kiosks API](kiosks.yaml#\$.paths./settings/kiosks.get) to retrieve the Kiosk ID. |
| `getRecordId` | `string` | Yes | Unique identifier of the [GetRecord](kiosks_get_records.yaml#\$.paths./settings/kiosks/\{kioskId}/get_records/\{getRecordId}.get) component. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `get_records` | `object[] \| null` | No | Array of operation results. |

> [accordion] get\_records full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### getRecordSteps.get

`kiosks.getRecordSteps.get`

Retrieve a specific get\_record component from a Kiosk. To retrieve the details of a specific GetRecords configuration associated with a Kiosk using its GetRecords ID. Use the Get All Kiosks API to retrieve the Kiosk ID and the Kiosk GetRecords API to retrieve the GetRecords ID.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.kiosks.getRecordSteps.get({ kioskId: 'example', getRecordId: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `kioskId` | `string` | Yes | Unique identifier of the kiosk. Use the [Get Kiosks API](kiosks.yaml#\$.paths./settings/kiosks.get) to retrieve the Kiosk ID. |
| `getRecordId` | `string` | Yes | Unique identifier of the [GetRecord](kiosks_get_records.yaml#\$.paths./settings/kiosks/\{kioskId}/get_records/\{getRecordId}.get) component. |
| `include_inner_details` | `string` | No | Controls additional inner details to include in the response. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   get_records?: {
>     selection_details?: {
>       selection_type?: string | null | null,
>       result_type?: string | null,
>       limit?: number | null,
>       range?: number | null
>     } | null,
>     criteria?: {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: (string | number | {
>         id?: string & any | null,
>         name?: string & any | null
>       } | {
>         name?: string | null
>       } | {
>         id?: string | null,
>         name?: string | null
>       })[] | string | number | boolean | {
>         id?: string & any | null,
>         name?: string & any | null
>       } | {
>         name?: string | null
>       } | {
>         id?: string | null,
>         name?: string | null
>       } | string | string | string | string | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: (string | number | {
>         id?: string & any | null,
>         name?: string & any | null
>       } | {
>         name?: string | null
>       } | {
>         id?: string | null,
>         name?: string | null
>       })[] | string | number | boolean | {
>         id?: string & any | null,
>         name?: string & any | null
>       } | {
>         name?: string | null
>       } | {
>         id?: string | null,
>         name?: string | null
>       } | string | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: string[] | string | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: string | number | string | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: (string | number)[] | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: (string | number)[] | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: {
>         id?: string & any | null,
>         name?: string & any | null
>       }[] | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       group?: (
>         {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           })[] | string | number | boolean | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           } | string | string | string | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           })[] | string | number | boolean | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           } | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: string[] | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: string | number | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number)[] | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number)[] | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: {
>             id?: string & any | null,
>             name?: string & any | null
>           }[] | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           group?: (
>             {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               })[] | string | number | boolean | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               } | string | string | string | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               })[] | string | number | boolean | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               } | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: string[] | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: string | number | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number)[] | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number)[] | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: {
>                 id?: string & any | null,
>                 name?: string & any | null
>               }[] | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | (recursive)
>           )[] | null,
>           group_operator?: string | null,
>           $disrupted?: boolean | null
>         }
>       )[] | null,
>       group_operator?: string | null,
>       $disrupted?: boolean | null
>     } | null,
>     module?: {
>       api_name?: string | null,
>       id?: string | null
>     } | null,
>     name?: string | null,
>     id?: string | null,
>     type?: string | null,
>     selected_fields?: string[] | null | null,
>     sort_order?: any | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### getRecordSteps.getAssociations

`kiosks.getRecordSteps.getAssociations`

GetRecords Associations. This API returns all the associations of a specific GetRecords configuration.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.kiosks.getRecordSteps.getAssociations({ kioskId: 'example', getRecordId: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `kioskId` | `string` | Yes | Unique identifier of the kiosk. Use the [Get Kiosks API](kiosks.yaml#\$.paths./settings/kiosks.get) to retrieve the Kiosk ID. |
| `getRecordId` | `string` | Yes | Unique identifier of the [GetRecord](kiosks_get_records.yaml#\$.paths./settings/kiosks/\{kioskId}/get_records/\{getRecordId}.get) component. |
| `include_inner_details` | `string` | No | Controls additional inner details to include in the response. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   get_records?: {
>     _associations?: {
>       resources?: {
>         name?: string | null,
>         id?: string | null,
>         _details?: {
>           type?: string | null
>         } | null
>       }[] | null,
>       type?: string | null
>     }[] | null,
>     id?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### getRecordSteps.list

`kiosks.getRecordSteps.list`

Kiosk GetRecords. To retrieve all GetRecords configurations associated with a Kiosk. The response includes details such as criteria, selection configuration, selected fields, module information, and sorting preferences. Use the Get All Kiosks API to retrieve the Kiosk ID.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.kiosks.getRecordSteps.list({ kioskId: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `kioskId` | `string` | Yes | Unique identifier of the kiosk. Use the [Get Kiosks API](kiosks.yaml#\$.paths./settings/kiosks.get) to retrieve the Kiosk ID. |
| `include_inner_details` | `string` | No | Controls additional inner details to include in the response. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   get_records?: {
>     selection_details?: {
>       selection_type?: string | null | null,
>       result_type?: string | null,
>       limit?: number | null,
>       range?: number | null
>     } | null,
>     criteria?: {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: (string | number | {
>         id?: string & any | null,
>         name?: string & any | null
>       } | {
>         name?: string | null
>       } | {
>         id?: string | null,
>         name?: string | null
>       })[] | string | number | boolean | {
>         id?: string & any | null,
>         name?: string & any | null
>       } | {
>         name?: string | null
>       } | {
>         id?: string | null,
>         name?: string | null
>       } | string | string | string | string | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: (string | number | {
>         id?: string & any | null,
>         name?: string & any | null
>       } | {
>         name?: string | null
>       } | {
>         id?: string | null,
>         name?: string | null
>       })[] | string | number | boolean | {
>         id?: string & any | null,
>         name?: string & any | null
>       } | {
>         name?: string | null
>       } | {
>         id?: string | null,
>         name?: string | null
>       } | string | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: string[] | string | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: string | number | string | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: (string | number)[] | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: (string | number)[] | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: {
>         id?: string & any | null,
>         name?: string & any | null
>       }[] | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       group?: (
>         {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           })[] | string | number | boolean | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           } | string | string | string | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           })[] | string | number | boolean | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           } | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: string[] | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: string | number | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number)[] | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number)[] | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: {
>             id?: string & any | null,
>             name?: string & any | null
>           }[] | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           group?: (
>             {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               })[] | string | number | boolean | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               } | string | string | string | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               })[] | string | number | boolean | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               } | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: string[] | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: string | number | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number)[] | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number)[] | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: {
>                 id?: string & any | null,
>                 name?: string & any | null
>               }[] | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | (recursive)
>           )[] | null,
>           group_operator?: string | null,
>           $disrupted?: boolean | null
>         }
>       )[] | null,
>       group_operator?: string | null,
>       $disrupted?: boolean | null
>     } | null,
>     module?: {
>       api_name?: string | null,
>       id?: string | null
>     } | null,
>     name?: string | null,
>     id?: string | null,
>     type?: string | null,
>     selected_fields?: string[] | null | null,
>     sort_order?: any | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### getRecordSteps.update

`kiosks.getRecordSteps.update`

Kiosk GetRecord. To update an existing GetRecords configuration associated with a Kiosk. This API supports only draft Kiosks.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.kiosks.getRecordSteps.update({
	kioskId: 'example',
	getRecordId: 'example',
	get_records: [{}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `kioskId` | `string` | Yes | Unique identifier of the kiosk. Use the [Get Kiosks API](kiosks.yaml#\$.paths./settings/kiosks.get) to retrieve the Kiosk ID. |
| `getRecordId` | `string` | Yes | Unique identifier of the [GetRecord](kiosks_get_records.yaml#\$.paths./settings/kiosks/\{kioskId}/get_records/\{getRecordId}.get) component. |
| `get_records` | `object[]` | Yes | Array containing the get\_record update payload. |

> [accordion] get\_records full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   module?: {
>     name?: string | null,
>     id?: string | null,
>     api_name?: string | null
>   },
>   criteria?: {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: string,
>     value: (string | number | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     })[] | string | number | boolean | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     } | ${
>       EMPTY
>     } | ${
>       NOTEMPTY
>     } | ${
>       TODAY
>     } | ${
>       TOMORROW
>     } | ${
>       TOMORROWPLUS
>     } | ${
>       YESTERDAY
>     } | ${
>       YESTERDAYMINUS
>     } | ${
>       LASTMONTH
>     } | ${
>       THISMONTH
>     } | ${
>       NEXTMONTH
>     } | ${
>       LASTWEEK
>     } | ${
>       THISWEEK
>     } | ${
>       NEXTWEEK
>     } | ${
>       THISYEAR
>     } | ${
>       THISFY
>     } | ${
>       THISFQ
>     } | ${
>       LASTYEAR
>     } | ${
>       PREVFY
>     } | ${
>       PREVFQ
>     } | ${
>       NEXTYEAR
>     } | ${
>       NEXTFY
>     } | ${
>       NEXTFQ
>     } | ${
>       EMPTY
>     } | ${
>       NOTEMPTY
>     } | string | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: string,
>     value: (string | number | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     })[] | string | number | boolean | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     } | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>     value: string[] | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: less_than | less_equal | greater_than | greater_equal,
>     value: string | number | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: between | not_between,
>     value: (string | number)[],
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: in | not_in,
>     value: (string | number)[],
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: include_all | include_any | exclude_all | exclude_any,
>     value: {
>       id: string & any,
>       name?: string
>     }[],
>     type?: merge_field | pre_defined | value | field
>   } | {
>     group: (
>       {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: string,
>         value: (string | number | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         })[] | string | number | boolean | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         } | ${
>           EMPTY
>         } | ${
>           NOTEMPTY
>         } | ${
>           TODAY
>         } | ${
>           TOMORROW
>         } | ${
>           TOMORROWPLUS
>         } | ${
>           YESTERDAY
>         } | ${
>           YESTERDAYMINUS
>         } | ${
>           LASTMONTH
>         } | ${
>           THISMONTH
>         } | ${
>           NEXTMONTH
>         } | ${
>           LASTWEEK
>         } | ${
>           THISWEEK
>         } | ${
>           NEXTWEEK
>         } | ${
>           THISYEAR
>         } | ${
>           THISFY
>         } | ${
>           THISFQ
>         } | ${
>           LASTYEAR
>         } | ${
>           PREVFY
>         } | ${
>           PREVFQ
>         } | ${
>           NEXTYEAR
>         } | ${
>           NEXTFY
>         } | ${
>           NEXTFQ
>         } | ${
>           EMPTY
>         } | ${
>           NOTEMPTY
>         } | string | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: string,
>         value: (string | number | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         })[] | string | number | boolean | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         } | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>         value: string[] | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: less_than | less_equal | greater_than | greater_equal,
>         value: string | number | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: between | not_between,
>         value: (string | number)[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: in | not_in,
>         value: (string | number)[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: include_all | include_any | exclude_all | exclude_any,
>         value: {
>           id: string & any,
>           name?: string
>         }[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         group: (
>           {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: string,
>             value: (string | number | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             })[] | string | number | boolean | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             } | ${
>               EMPTY
>             } | ${
>               NOTEMPTY
>             } | ${
>               TODAY
>             } | ${
>               TOMORROW
>             } | ${
>               TOMORROWPLUS
>             } | ${
>               YESTERDAY
>             } | ${
>               YESTERDAYMINUS
>             } | ${
>               LASTMONTH
>             } | ${
>               THISMONTH
>             } | ${
>               NEXTMONTH
>             } | ${
>               LASTWEEK
>             } | ${
>               THISWEEK
>             } | ${
>               NEXTWEEK
>             } | ${
>               THISYEAR
>             } | ${
>               THISFY
>             } | ${
>               THISFQ
>             } | ${
>               LASTYEAR
>             } | ${
>               PREVFY
>             } | ${
>               PREVFQ
>             } | ${
>               NEXTYEAR
>             } | ${
>               NEXTFY
>             } | ${
>               NEXTFQ
>             } | ${
>               EMPTY
>             } | ${
>               NOTEMPTY
>             } | string | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: string,
>             value: (string | number | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             })[] | string | number | boolean | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             } | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>             value: string[] | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: less_than | less_equal | greater_than | greater_equal,
>             value: string | number | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: between | not_between,
>             value: (string | number)[],
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: in | not_in,
>             value: (string | number)[],
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: include_all | include_any | exclude_all | exclude_any,
>             value: {
>               id: string & any,
>               name?: string
>             }[],
>             type?: merge_field | pre_defined | value | field
>           } | (recursive)
>         )[],
>         group_operator: AND | OR | and | or
>       }
>     )[],
>     group_operator: AND | OR | and | or
>   },
>   sort_order?: any & any,
>   selection_details?: any & any,
>   selected_fields?: string[] | null,
>   type?: parent | child | null,
>   parent_record_field?: {
>     id?: string | null
>   },
>   child_relationship?: {
>     display_label?: string | null,
>     id?: string | null
>   }
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `get_records` | `object[] \| null` | No | Array of operation results. |

> [accordion] get\_records full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### list

`kiosks.list`

Get All Kiosks. To retrieve all the available Kiosks in your Zoho CRM organization. The response includes metadata for each Kiosk, such as version information, associated module, current status, creator and modifier details, and record context, if configured.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.kiosks.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `include_inner_details` | `string` | No | Controls additional inner details to include in the response. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   kiosks?: {
>     created_time?: string | null,
>     version_details?: {
>       parent_id?: null | null,
>       version_number?: number | null
>     } | null,
>     module?: {
>       api_name?: string | null,
>       id?: string | null
>     } | null,
>     description?: string | null | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     sequence_number?: number | null,
>     modified_time?: string | null,
>     group_id?: string | null,
>     current_record_module?: {
>       plural_label?: string | null,
>       api_name?: string | null,
>       id?: string | null
>     } | null | null | null,
>     associated?: boolean | null,
>     name?: string | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     id?: string | null,
>     status?: string | null,
>     group_api_name?: string | null,
>     chart_data?: {
>     } | null,
>     transitions?: {
>     }[] | null,
>     states?: {
>     }[] | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### listAssociations

`kiosks.listAssociations`

Kiosk Associations. To retrieve association information for all kiosks in your Zoho CRM organization, including detail view page associations with linked layout and module details. Use the Get All Kiosks API to retrieve the Kiosk ID.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.kiosks.listAssociations({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `include_inner_details` | `string` | No | Controls additional inner details to include in the response. |
| `module` | `string` | No | Filters associations by the specified module API name. |
| `include` | `string` | No | Specifies additional properties to include in the response. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   kiosks?: {
>     _associations?: {
>       resources?: null | null,
>       type?: string | null,
>       detail_view_page?: {
>         sequence_number?: number | null,
>         layout?: {
>           name?: string | null,
>           id?: string | null,
>           status?: string | null
>         } | null,
>         module?: {
>           display_label?: string | null,
>           api_name?: string | null,
>           name?: string | null,
>           id?: string | null
>         } | null,
>         name?: string | null,
>         id?: string | null
>       }[] | null
>     }[] | null,
>     id?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### listExecutions

`kiosks.listExecutions`

List kiosk executions. To retrieve all active executions for a specific kiosk in your Zoho CRM organization. For each execution, the response includes the user who ran the kiosk, the execution start and end times, the current or most recently visited state, and the transition available to execute next.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.kiosks.listExecutions({ kioskId: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `kioskId` | `string` | Yes | Specify the unique identifier of the kiosk for which you want to perform the operation. |
| `page` | `number \| string` | No | Page number for pagination. |
| `per_page` | `number \| string` | No | Number of results per page. |
| `include_inner_details` | `string` | No | Specify additional inner details to include in the response. Accepts a comma-separated list of dot-notation paths indicating which nested properties should return extended information. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   kiosk_executions?: {
>     Kiosk_End_Time?: string | null,
>     Owner?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     executable_info?: {
>       state?: {
>         name?: string | null,
>         id?: string | null
>       } | null,
>       transitions?: {
>         id?: string | null
>       }[] | null
>     } | null,
>     id?: string | null,
>     Kiosk_Start_Time?: string | null
>   }[] | null,
>   info?: {
>     per_page?: number | null,
>     count?: number | null,
>     page?: number | null,
>     more_records?: boolean | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### preview

`kiosks.preview`

Retrieve the Preview of a Specified Kiosk. Retrieves the configuration and details of the first screen state for a specified Kiosk in Zoho CRM. This API returns only the first screen data required to render the Kiosk and does not trigger any actions or require user interaction.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.kiosks.preview({ kioskId: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `current_record_id` | `string` | No | Specifies the ID of the record to use as the Current Record context while previewing the Kiosk. The record must belong to the module configured as the Current Record in the Kiosk. If this parameter is not provided, merge fields that reference the Current Record are not evaluated during the Kiosk preview and will return empty values. |
| `invoked_from` | `detail_view \| home_page \| cscript \| canvas` | No | Specify the context from which the kiosk preview is being invoked. Possible values: detail\_view - The kiosk is invoked from the CRM record detail view. home\_page - The Kiosk is invoked from the home page. cscript - The Kiosk is invoked from a Client Script. canvas - The Kiosk is invoked from a Canvas view. |
| `kioskId` | `string` | Yes | Specify the unique identifier of the kiosk for which you want to perform the operation. |
| `include_inner_details` | `string` | No | Specify additional inner details to include in the response. Accepts a comma-separated list of dot-notation paths indicating which nested properties should return extended information. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   kiosk_preview?: {
>     executable_info?: {
>       state?: {
>         name?: string | null,
>         id?: string | null
>       } | null,
>       transitions?: {
>         prop_name?: string | null,
>         is_connected_end?: boolean | null,
>         name?: string | null,
>         id?: string | null
>       }[] | null
>     } | null,
>     data?: {
>       GetRecords_1?: {
>         name?: string | null,
>         id?: string | null
>       }[] | null
>     } | null,
>     elements?: (
>       {
>         get_record?: {
>           selection_details?: {
>             selection_type?: string | null,
>             result_type?: string | null,
>             limit?: number | null
>           } | null,
>           open_record?: boolean | null,
>           api_name?: string | null,
>           module?: {
>             display_label?: string | null,
>             api_name?: string | null,
>             name?: string | null,
>             id?: string | null
>           } | null,
>           name?: string | null,
>           id?: string | null,
>           selected_fields?: {
>             ui_type?: number | null,
>             api_name?: string | null,
>             field_label?: string | null,
>             data_type?: string | null,
>             id?: string | null
>           }[] | null
>         } | null,
>         type?: string | null,
>         value?: null | null,
>         get_record_data?: {
>           First_Name?: string | null | null,
>           Company?: string | null,
>           Owner?: {
>             name?: string | null,
>             id?: string | null
>           } | null,
>           id?: string | null
>         }[] | null,
>         more_records?: boolean | null
>       } | {
>         field?: {
>           allow_multiple_upload?: null | null,
>           field_label?: string | null,
>           length?: number | null,
>           tooltip?: null | null,
>           _merge_field?: string | null,
>           number_separator?: boolean | null,
>           required?: boolean | null,
>           ui_type?: number | null,
>           read_only?: boolean | null,
>           api_name?: string | null,
>           data_type?: string | null,
>           currency?: null | null,
>           id?: string | null,
>           _pick_list_type?: string | null | null,
>           decimal_place?: null | null,
>           pick_list_values?: null | null
>         } | null,
>         type?: string | null,
>         value?: string | null
>       }
>     )[] | null,
>     width?: string | null,
>     kiosk?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     title?: string | null,
>     previous_states?: {
>       name?: string | null,
>       id?: string | null,
>       type?: string | null
>     }[] | null,
>     button_align?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### states.create

`kiosks.states.create`

Create a kiosk state. Creates a state (screen, action, decision, or GetRecords) in a Kiosk identified by Kiosk ID. Only one state can be created per request. The Kiosk must be in draft status; use the Clone a Kiosk API if it is published or inactive.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.kiosks.states.create({
	kioskId: 'example',
	states: [{}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `kioskId` | `string` | Yes | Specify the unique identifier of the Kiosk. |
| `states` | `(((any & any) & any) & any)[]` | Yes | Represents the array containing exactly one state object to create. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `states` | `object[] \| null` | No | Represents the array of operation result objects for the created kiosk states. |

> [accordion] states full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null,
>     rid?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### states.delete

`kiosks.states.delete`

Delete a kiosk state. To delete a specific state from a kiosk configuration in your Zoho CRM account. Removing a state eliminates all its associated configurations, transitions, and connected elements. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.kiosks.states.delete({ kioskId: 'example', stateId: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `delete_dependent_states` | `string` | No | When a state is deleted, all its associated configurations, transitions, and connected elements are removed. Use the delete\_dependent\_states query parameter to control whether dependent/child states should also be deleted or left as disconnected components. The default value is true. Possible values: true false |
| `kioskId` | `string` | Yes | Specify the unique identifier of the Kiosk. |
| `stateId` | `string` | Yes | Specify the unique identifier of the kiosk state. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `states` | `object \| null` | No | Represents the operation result for a single kiosk state in a create or update response. Contains the result code, status, message, and state details. |

> [accordion] states full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null,
>     rid?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> } | null
> ```

***

### states.get

`kiosks.states.get`

Get a specific kiosk state by ID. To retrieve the complete configuration of one specific state within a kiosk in Zoho CRM, including its transitions, associated fields, and configured properties. Use the include\_inner\_details query parameter to expand nested type information.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.kiosks.states.get({ kioskId: 'example', stateId: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `include_inner_details` | `string` | No | Specify to include additional inner details in the GET response for the kiosk state. |
| `include` | `string` | No | Specify additional properties to be included in the response for each Kiosk state. By default, the response returns only the basic metadata of each state which includes each state's id, name, and associated\_fields. **Possible values:** **configured\_properties** - Includes the configured\_properties key in the response for each state, which holds the list of merge fields and other dynamic references that have been configured within that state. When a state has no such configured properties, the value is returned as null. |
| `kioskId` | `string` | Yes | Specify the unique identifier of the Kiosk. |
| `stateId` | `string` | Yes | Specify the unique identifier of the kiosk state. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   states?: (
>     {
>       associated_fields?: {
>         api_name?: string | null,
>         id?: string | null,
>         type?: string | null
>       }[] | null,
>       configured_properties?: {
>         details?: {
>           name?: string | null,
>           component_name?: string | null
>         } | null,
>         type?: string | null
>       }[] | null | null,
>       from_transition?: {
>         name?: string | null,
>         id?: string | null
>       } | null,
>       name?: string | null,
>       details?: {
>         screen_details?: {
>           buttons?: {
>             prop_name?: string | null,
>             name?: string | null,
>             id?: string | null
>           }[] | null,
>           elements?: (
>             {
>               type?: string | null,
>               value?: string | null
>             } | {
>               get_record?: {
>                 selection_details?: {
>                   selection_type?: string | null,
>                   result_type?: string | null,
>                   limit?: number | null,
>                   range?: number | null
>                 } | null,
>                 open_record?: boolean | null,
>                 module?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 } | null,
>                 name?: string | null,
>                 id?: string | null,
>                 selected_fields?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 }[] | null
>               } | null,
>               ui_type?: number | null,
>               type?: string | null,
>               value?: null | null
>             } | {
>               field?: {
>                 allow_multiple_upload?: null | null,
>                 field_label?: string | null,
>                 length?: number | null | null,
>                 tooltip?: null | null,
>                 _merge_field?: null | null,
>                 number_separator?: boolean | null,
>                 required?: boolean | null,
>                 ui_type?: number | null,
>                 read_only?: boolean | null,
>                 api_name?: string | null,
>                 data_type?: string | null,
>                 currency?: null | null,
>                 id?: string | null,
>                 _pick_list_type?: null | null,
>                 decimal_place?: null | null,
>                 pick_list_values?: null | null
>               } | null,
>               type?: string | null,
>               value?: null | null
>             } | {
>               field?: {
>                 allow_multiple_upload?: null | null,
>                 field_label?: string | null,
>                 length?: number | null,
>                 tooltip?: null | null,
>                 _merge_field?: null | null,
>                 number_separator?: boolean | null,
>                 required?: boolean | null,
>                 ui_type?: number | null,
>                 read_only?: boolean | null,
>                 api_name?: string | null,
>                 data_type?: string | null,
>                 currency?: {
>                   rounding_option?: string | null,
>                   precision?: number | null
>                 } | null | null,
>                 id?: string | null,
>                 _pick_list_type?: null | null,
>                 decimal_place?: number | null,
>                 pick_list_values?: null | null
>               } | null,
>               type?: string | null,
>               value?: null | null
>             } | {
>               field?: {
>                 allow_multiple_upload?: null | null,
>                 field_label?: string | null,
>                 length?: number | null,
>                 tooltip?: null | null,
>                 _merge_field?: null | null,
>                 number_separator?: boolean | null,
>                 required?: boolean | null,
>                 ui_type?: number | null,
>                 read_only?: boolean | null,
>                 api_name?: string | null,
>                 data_type?: string | null,
>                 currency?: null | null,
>                 _pick_list_type?: string | null | null,
>                 id?: string | null,
>                 decimal_place?: null | null,
>                 pick_list_values?: {
>                   display_value?: string | null,
>                   sequence_number?: number | null,
>                   actual_value?: string | null,
>                   id?: string | null
>                 }[] | null
>               } | null,
>               type?: string | null,
>               value?: null | null
>             } | {
>               data_hub?: {
>                 selection_details?: {
>                   selection_type?: string | null | null,
>                   result_type?: string | null,
>                   limit?: number | null,
>                   range?: number | null | null
>                 } | null,
>                 module?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 } | null,
>                 name?: string | null,
>                 id?: string | null,
>                 selected_fields?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 }[] | null
>               } | null,
>               type?: string | null,
>               value?: null | null
>             }
>           )[] | null,
>           width?: string | null,
>           title?: string | null,
>           button_align?: string | null
>         } | null
>       } | null,
>       id?: string | null,
>       type?: string | null,
>       transitions?: {
>         name?: string | null,
>         id?: string | null
>       }[] | null
>     } | {
>       associated_fields?: {
>         path_details?: {
>           name?: string | null,
>           id?: string | null
>         }[] | null,
>         api_name?: string | null,
>         id?: string | null
>       }[] | null,
>       configured_properties?: {
>         details?: {
>           name?: string | null,
>           component_name?: string | null
>         } | null,
>         type?: string | null
>       }[] | null,
>       from_transition?: {
>         name?: string | null,
>         id?: string | null
>       } | null,
>       name?: string | null,
>       details?: {
>         path_details?: {
>           default?: boolean | null,
>           name?: string | null,
>           id?: string | null,
>           filter_conditions?: {
>             criteria_groupings?: (
>               {
>                 sequence_number?: number | null,
>                 resource?: null | null,
>                 criteria?: {
>                   field?: {
>                     id?: string | null,
>                     api_name?: string | null
>                   } | null,
>                   comparator?: string | null,
>                   value?: (string | number | {
>                     id?: string & any | null,
>                     name?: string & any | null
>                   } | {
>                     name?: string | null
>                   } | {
>                     id?: string | null,
>                     name?: string | null
>                   })[] | string | number | boolean | {
>                     id?: string & any | null,
>                     name?: string & any | null
>                   } | {
>                     name?: string | null
>                   } | {
>                     id?: string | null,
>                     name?: string | null
>                   } | string | string | string | string | null,
>                   type?: string | null,
>                   $disrupted?: boolean | null
>                 } | {
>                   field?: {
>                     id?: string | null,
>                     api_name?: string | null
>                   } | null,
>                   comparator?: string | null,
>                   value?: (string | number | {
>                     id?: string & any | null,
>                     name?: string & any | null
>                   } | {
>                     name?: string | null
>                   } | {
>                     id?: string | null,
>                     name?: string | null
>                   })[] | string | number | boolean | {
>                     id?: string & any | null,
>                     name?: string & any | null
>                   } | {
>                     name?: string | null
>                   } | {
>                     id?: string | null,
>                     name?: string | null
>                   } | string | null,
>                   type?: string | null,
>                   $disrupted?: boolean | null
>                 } | {
>                   field?: {
>                     id?: string | null,
>                     api_name?: string | null
>                   } | null,
>                   comparator?: string | null,
>                   value?: string[] | string | null,
>                   type?: string | null,
>                   $disrupted?: boolean | null
>                 } | {
>                   field?: {
>                     id?: string | null,
>                     api_name?: string | null
>                   } | null,
>                   comparator?: string | null,
>                   value?: string | number | string | null,
>                   type?: string | null,
>                   $disrupted?: boolean | null
>                 } | {
>                   field?: {
>                     id?: string | null,
>                     api_name?: string | null
>                   } | null,
>                   comparator?: string | null,
>                   value?: (string | number)[] | null,
>                   type?: string | null,
>                   $disrupted?: boolean | null
>                 } | {
>                   field?: {
>                     id?: string | null,
>                     api_name?: string | null
>                   } | null,
>                   comparator?: string | null,
>                   value?: (string | number)[] | null,
>                   type?: string | null,
>                   $disrupted?: boolean | null
>                 } | {
>                   field?: {
>                     id?: string | null,
>                     api_name?: string | null
>                   } | null,
>                   comparator?: string | null,
>                   value?: {
>                     id?: string & any | null,
>                     name?: string & any | null
>                   }[] | null,
>                   type?: string | null,
>                   $disrupted?: boolean | null
>                 } | {
>                   group?: (
>                     {
>                       field?: {
>                         id?: string | null,
>                         api_name?: string | null
>                       } | null,
>                       comparator?: string | null,
>                       value?: (string | number | {
>                         id?: string & any | null,
>                         name?: string & any | null
>                       } | {
>                         name?: string | null
>                       } | {
>                         id?: string | null,
>                         name?: string | null
>                       })[] | string | number | boolean | {
>                         id?: string & any | null,
>                         name?: string & any | null
>                       } | {
>                         name?: string | null
>                       } | {
>                         id?: string | null,
>                         name?: string | null
>                       } | string | string | string | string | null,
>                       type?: string | null,
>                       $disrupted?: boolean | null
>                     } | {
>                       field?: {
>                         id?: string | null,
>                         api_name?: string | null
>                       } | null,
>                       comparator?: string | null,
>                       value?: (string | number | {
>                         id?: string & any | null,
>                         name?: string & any | null
>                       } | {
>                         name?: string | null
>                       } | {
>                         id?: string | null,
>                         name?: string | null
>                       })[] | string | number | boolean | {
>                         id?: string & any | null,
>                         name?: string & any | null
>                       } | {
>                         name?: string | null
>                       } | {
>                         id?: string | null,
>                         name?: string | null
>                       } | string | null,
>                       type?: string | null,
>                       $disrupted?: boolean | null
>                     } | {
>                       field?: {
>                         id?: string | null,
>                         api_name?: string | null
>                       } | null,
>                       comparator?: string | null,
>                       value?: string[] | string | null,
>                       type?: string | null,
>                       $disrupted?: boolean | null
>                     } | {
>                       field?: {
>                         id?: string | null,
>                         api_name?: string | null
>                       } | null,
>                       comparator?: string | null,
>                       value?: string | number | string | null,
>                       type?: string | null,
>                       $disrupted?: boolean | null
>                     } | {
>                       field?: {
>                         id?: string | null,
>                         api_name?: string | null
>                       } | null,
>                       comparator?: string | null,
>                       value?: (string | number)[] | null,
>                       type?: string | null,
>                       $disrupted?: boolean | null
>                     } | {
>                       field?: {
>                         id?: string | null,
>                         api_name?: string | null
>                       } | null,
>                       comparator?: string | null,
>                       value?: (string | number)[] | null,
>                       type?: string | null,
>                       $disrupted?: boolean | null
>                     } | {
>                       field?: {
>                         id?: string | null,
>                         api_name?: string | null
>                       } | null,
>                       comparator?: string | null,
>                       value?: {
>                         id?: string & any | null,
>                         name?: string & any | null
>                       }[] | null,
>                       type?: string | null,
>                       $disrupted?: boolean | null
>                     } | {
>                       group?: (
>                         {
>                           field?: {
>                             id?: string | null,
>                             api_name?: string | null
>                           } | null,
>                           comparator?: string | null,
>                           value?: (string | number | {
>                             id?: string & any | null,
>                             name?: string & any | null
>                           } | {
>                             name?: string | null
>                           } | {
>                             id?: string | null,
>                             name?: string | null
>                           })[] | string | number | boolean | {
>                             id?: string & any | null,
>                             name?: string & any | null
>                           } | {
>                             name?: string | null
>                           } | {
>                             id?: string | null,
>                             name?: string | null
>                           } | string | string | string | string | null,
>                           type?: string | null,
>                           $disrupted?: boolean | null
>                         } | {
>                           field?: {
>                             id?: string | null,
>                             api_name?: string | null
>                           } | null,
>                           comparator?: string | null,
>                           value?: (string | number | {
>                             id?: string & any | null,
>                             name?: string & any | null
>                           } | {
>                             name?: string | null
>                           } | {
>                             id?: string | null,
>                             name?: string | null
>                           })[] | string | number | boolean | {
>                             id?: string & any | null,
>                             name?: string & any | null
>                           } | {
>                             name?: string | null
>                           } | {
>                             id?: string | null,
>                             name?: string | null
>                           } | string | null,
>                           type?: string | null,
>                           $disrupted?: boolean | null
>                         } | {
>                           field?: {
>                             id?: string | null,
>                             api_name?: string | null
>                           } | null,
>                           comparator?: string | null,
>                           value?: string[] | string | null,
>                           type?: string | null,
>                           $disrupted?: boolean | null
>                         } | {
>                           field?: {
>                             id?: string | null,
>                             api_name?: string | null
>                           } | null,
>                           comparator?: string | null,
>                           value?: string | number | string | null,
>                           type?: string | null,
>                           $disrupted?: boolean | null
>                         } | {
>                           field?: {
>                             id?: string | null,
>                             api_name?: string | null
>                           } | null,
>                           comparator?: string | null,
>                           value?: (string | number)[] | null,
>                           type?: string | null,
>                           $disrupted?: boolean | null
>                         } | {
>                           field?: {
>                             id?: string | null,
>                             api_name?: string | null
>                           } | null,
>                           comparator?: string | null,
>                           value?: (string | number)[] | null,
>                           type?: string | null,
>                           $disrupted?: boolean | null
>                         } | {
>                           field?: {
>                             id?: string | null,
>                             api_name?: string | null
>                           } | null,
>                           comparator?: string | null,
>                           value?: {
>                             id?: string & any | null,
>                             name?: string & any | null
>                           }[] | null,
>                           type?: string | null,
>                           $disrupted?: boolean | null
>                         } | (recursive)
>                       )[] | null,
>                       group_operator?: string | null,
>                       $disrupted?: boolean | null
>                     }
>                   )[] | null,
>                   group_operator?: string | null,
>                   $disrupted?: boolean | null
>                 } | null,
>                 type?: string | null,
>                 value?: string | null | null
>               } | {
>                 sequence_number?: number | null,
>                 resource?: {
>                   name?: string | null,
>                   id?: string | null
>                 } | null,
>                 criteria?: {
>                   field?: {
>                     id?: string | null,
>                     api_name?: string | null
>                   } | null,
>                   comparator?: string | null,
>                   value?: (string | number | {
>                     id?: string & any | null,
>                     name?: string & any | null
>                   } | {
>                     name?: string | null
>                   } | {
>                     id?: string | null,
>                     name?: string | null
>                   })[] | string | number | boolean | {
>                     id?: string & any | null,
>                     name?: string & any | null
>                   } | {
>                     name?: string | null
>                   } | {
>                     id?: string | null,
>                     name?: string | null
>                   } | string | string | string | string | null,
>                   type?: string | null,
>                   $disrupted?: boolean | null
>                 } | {
>                   field?: {
>                     id?: string | null,
>                     api_name?: string | null
>                   } | null,
>                   comparator?: string | null,
>                   value?: (string | number | {
>                     id?: string & any | null,
>                     name?: string & any | null
>                   } | {
>                     name?: string | null
>                   } | {
>                     id?: string | null,
>                     name?: string | null
>                   })[] | string | number | boolean | {
>                     id?: string & any | null,
>                     name?: string & any | null
>                   } | {
>                     name?: string | null
>                   } | {
>                     id?: string | null,
>                     name?: string | null
>                   } | string | null,
>                   type?: string | null,
>                   $disrupted?: boolean | null
>                 } | {
>                   field?: {
>                     id?: string | null,
>                     api_name?: string | null
>                   } | null,
>                   comparator?: string | null,
>                   value?: string[] | string | null,
>                   type?: string | null,
>                   $disrupted?: boolean | null
>                 } | {
>                   field?: {
>                     id?: string | null,
>                     api_name?: string | null
>                   } | null,
>                   comparator?: string | null,
>                   value?: string | number | string | null,
>                   type?: string | null,
>                   $disrupted?: boolean | null
>                 } | {
>                   field?: {
>                     id?: string | null,
>                     api_name?: string | null
>                   } | null,
>                   comparator?: string | null,
>                   value?: (string | number)[] | null,
>                   type?: string | null,
>                   $disrupted?: boolean | null
>                 } | {
>                   field?: {
>                     id?: string | null,
>                     api_name?: string | null
>                   } | null,
>                   comparator?: string | null,
>                   value?: (string | number)[] | null,
>                   type?: string | null,
>                   $disrupted?: boolean | null
>                 } | {
>                   field?: {
>                     id?: string | null,
>                     api_name?: string | null
>                   } | null,
>                   comparator?: string | null,
>                   value?: {
>                     id?: string & any | null,
>                     name?: string & any | null
>                   }[] | null,
>                   type?: string | null,
>                   $disrupted?: boolean | null
>                 } | {
>                   group?: (
>                     {
>                       field?: {
>                         id?: string | null,
>                         api_name?: string | null
>                       } | null,
>                       comparator?: string | null,
>                       value?: (string | number | {
>                         id?: string & any | null,
>                         name?: string & any | null
>                       } | {
>                         name?: string | null
>                       } | {
>                         id?: string | null,
>                         name?: string | null
>                       })[] | string | number | boolean | {
>                         id?: string & any | null,
>                         name?: string & any | null
>                       } | {
>                         name?: string | null
>                       } | {
>                         id?: string | null,
>                         name?: string | null
>                       } | string | string | string | string | null,
>                       type?: string | null,
>                       $disrupted?: boolean | null
>                     } | {
>                       field?: {
>                         id?: string | null,
>                         api_name?: string | null
>                       } | null,
>                       comparator?: string | null,
>                       value?: (string | number | {
>                         id?: string & any | null,
>                         name?: string & any | null
>                       } | {
>                         name?: string | null
>                       } | {
>                         id?: string | null,
>                         name?: string | null
>                       })[] | string | number | boolean | {
>                         id?: string & any | null,
>                         name?: string & any | null
>                       } | {
>                         name?: string | null
>                       } | {
>                         id?: string | null,
>                         name?: string | null
>                       } | string | null,
>                       type?: string | null,
>                       $disrupted?: boolean | null
>                     } | {
>                       field?: {
>                         id?: string | null,
>                         api_name?: string | null
>                       } | null,
>                       comparator?: string | null,
>                       value?: string[] | string | null,
>                       type?: string | null,
>                       $disrupted?: boolean | null
>                     } | {
>                       field?: {
>                         id?: string | null,
>                         api_name?: string | null
>                       } | null,
>                       comparator?: string | null,
>                       value?: string | number | string | null,
>                       type?: string | null,
>                       $disrupted?: boolean | null
>                     } | {
>                       field?: {
>                         id?: string | null,
>                         api_name?: string | null
>                       } | null,
>                       comparator?: string | null,
>                       value?: (string | number)[] | null,
>                       type?: string | null,
>                       $disrupted?: boolean | null
>                     } | {
>                       field?: {
>                         id?: string | null,
>                         api_name?: string | null
>                       } | null,
>                       comparator?: string | null,
>                       value?: (string | number)[] | null,
>                       type?: string | null,
>                       $disrupted?: boolean | null
>                     } | {
>                       field?: {
>                         id?: string | null,
>                         api_name?: string | null
>                       } | null,
>                       comparator?: string | null,
>                       value?: {
>                         id?: string & any | null,
>                         name?: string & any | null
>                       }[] | null,
>                       type?: string | null,
>                       $disrupted?: boolean | null
>                     } | {
>                       group?: (
>                         {
>                           field?: {
>                             id?: string | null,
>                             api_name?: string | null
>                           } | null,
>                           comparator?: string | null,
>                           value?: (string | number | {
>                             id?: string & any | null,
>                             name?: string & any | null
>                           } | {
>                             name?: string | null
>                           } | {
>                             id?: string | null,
>                             name?: string | null
>                           })[] | string | number | boolean | {
>                             id?: string & any | null,
>                             name?: string & any | null
>                           } | {
>                             name?: string | null
>                           } | {
>                             id?: string | null,
>                             name?: string | null
>                           } | string | string | string | string | null,
>                           type?: string | null,
>                           $disrupted?: boolean | null
>                         } | {
>                           field?: {
>                             id?: string | null,
>                             api_name?: string | null
>                           } | null,
>                           comparator?: string | null,
>                           value?: (string | number | {
>                             id?: string & any | null,
>                             name?: string & any | null
>                           } | {
>                             name?: string | null
>                           } | {
>                             id?: string | null,
>                             name?: string | null
>                           })[] | string | number | boolean | {
>                             id?: string & any | null,
>                             name?: string & any | null
>                           } | {
>                             name?: string | null
>                           } | {
>                             id?: string | null,
>                             name?: string | null
>                           } | string | null,
>                           type?: string | null,
>                           $disrupted?: boolean | null
>                         } | {
>                           field?: {
>                             id?: string | null,
>                             api_name?: string | null
>                           } | null,
>                           comparator?: string | null,
>                           value?: string[] | string | null,
>                           type?: string | null,
>                           $disrupted?: boolean | null
>                         } | {
>                           field?: {
>                             id?: string | null,
>                             api_name?: string | null
>                           } | null,
>                           comparator?: string | null,
>                           value?: string | number | string | null,
>                           type?: string | null,
>                           $disrupted?: boolean | null
>                         } | {
>                           field?: {
>                             id?: string | null,
>                             api_name?: string | null
>                           } | null,
>                           comparator?: string | null,
>                           value?: (string | number)[] | null,
>                           type?: string | null,
>                           $disrupted?: boolean | null
>                         } | {
>                           field?: {
>                             id?: string | null,
>                             api_name?: string | null
>                           } | null,
>                           comparator?: string | null,
>                           value?: (string | number)[] | null,
>                           type?: string | null,
>                           $disrupted?: boolean | null
>                         } | {
>                           field?: {
>                             id?: string | null,
>                             api_name?: string | null
>                           } | null,
>                           comparator?: string | null,
>                           value?: {
>                             id?: string & any | null,
>                             name?: string & any | null
>                           }[] | null,
>                           type?: string | null,
>                           $disrupted?: boolean | null
>                         } | (recursive)
>                       )[] | null,
>                       group_operator?: string | null,
>                       $disrupted?: boolean | null
>                     }
>                   )[] | null,
>                   group_operator?: string | null,
>                   $disrupted?: boolean | null
>                 } | null,
>                 type?: string | null,
>                 value?: string | null
>               }
>             )[] | null,
>             pattern?: string | null
>           } | null | null
>         }[] | null
>       } | null,
>       id?: string | null,
>       type?: string | null,
>       transitions?: {
>         default?: boolean | null,
>         name?: string | null,
>         id?: string | null
>       }[] | null
>     } | {
>       associated_fields?: {
>         api_name?: string | null,
>         id?: string | null,
>         type?: string | null
>       }[] | null | null,
>       configured_properties?: {
>       } | null | null,
>       from_transition?: {
>         name?: string | null,
>         id?: string | null
>       } | null,
>       name?: string | null,
>       details?: {
>       } | null,
>       id?: string | null,
>       type?: string | null,
>       transitions?: {
>         name?: string | null,
>         id?: string | null
>       }[] | null
>     } | {
>       associated_fields?: {
>         api_name?: string | null,
>         id?: string | null,
>         type?: string | null
>       }[] | null | null,
>       configured_properties?: {
>       } | null | null,
>       from_transition?: {
>         name?: string | null,
>         id?: string | null
>       } | null,
>       name?: string | null,
>       details?: {
>         get_record?: {
>           name?: string | null,
>           id?: string | null
>         } | null
>       } | null,
>       id?: string | null,
>       type?: string | null,
>       transitions?: {
>         name?: string | null,
>         id?: string | null
>       }[] | null | null
>     }
>   )[] | null
> } | {
>   success: true
> }
> ```

***

### states.list

`kiosks.states.list`

Get all states of a kiosk. To retrieve all the states configured in a kiosk in your Zoho CRM organization, along with their transition details and basic metadata such as name, type, and associated fields. Each state represents a screen, action, decision, or GetRecords.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.kiosks.states.list({ kioskId: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `include` | `string` | No | Specify additional properties to be included in the response for each Kiosk state. By default, the response returns only the basic metadata of each state which includes each state's id, name, and associated\_fields. **Possible values:** **configured\_properties** - Includes the configured\_properties key in the response for each state, which holds the list of merge fields and other dynamic references that have been configured within that state. When a state has no such configured properties, the value is returned as null. |
| `include_inner_details` | `string` | No | Specify to include additional inner details in the GET response for the kiosk state. |
| `kioskId` | `string` | Yes | Specify the unique identifier of the Kiosk. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   states?: {
>     associated_fields?: {
>       api_name?: string | null,
>       id?: string | null,
>       type?: string | null
>     }[] | null | null,
>     name?: string | null,
>     details?: {
>       screen_details?: {
>         width?: string | null,
>         title?: string | null,
>         button_align?: string | null
>       } | null
>     } | null | null,
>     id?: string | null,
>     type?: string | null,
>     from_transition?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     configured_properties?: {
>       details?: {
>         name?: string | null,
>         component_name?: string | null
>       } | null,
>       type?: string | null
>     }[] | null | null,
>     transitions?: {
>       name?: string | null,
>       id?: string | null
>     }[] | null | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### states.update

`kiosks.states.update`

Kiosk State. To update a particular state in a specific Kiosk in Zoho CRM using the Kiosk ID and state ID. Each state represents a screen, action, decision, or GetRecords. A Kiosk must be in the draft status to update a state.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.kiosks.states.update({
	kioskId: 'example',
	stateId: 'example',
	states: [{}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `kioskId` | `string` | Yes | Specify the unique identifier of the Kiosk. |
| `stateId` | `string` | Yes | Specify the unique identifier of the kiosk state. |
| `states` | `(((any & any) & any) & any)[]` | Yes | Represents the array containing exactly one state object to update. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `states` | `object[] \| null` | No | Represents the array of operation result objects for the updated kiosk states. |

> [accordion] states full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null,
>     rid?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### testRun

`kiosks.testRun`

Initiate a Test Run for a Kiosk. Starts a test run of a kiosk, draft or published, and returns its first state. The remaining states go through kiosks.executeState, which Zoho documents for published kiosks only, so a test run of a draft may not continue past its first state. The actions run on live records (emails, record changes) and are not undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.kiosks.testRun({
	kioskId: 'example',
	kiosk_test_run: [{}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `kioskId` | `string` | Yes | Specify the unique identifier of the kiosk for which you want to perform the operation. |
| `kiosk_test_run` | `object[]` | Yes | Contains one or more test run entries, each providing the data context for initiating a kiosk test run. |

> [accordion] kiosk\_test\_run full type
>
> ```ts theme={null}
> {
>   data?: {
>     Current_Record?: {
>       id?: string | null
>     },
>     id?: string | null
>   }
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kiosk_test_run` | `object[] \| null` | No | Contains the result of the test run, including status, message, and details of the next executable state. |

> [accordion] kiosk\_test\_run full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     next_executable_state?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     executed_dependent_states?: {
>       name?: string | null,
>       id?: string | null,
>       rid?: string | null,
>       type?: string | null,
>       transition?: {
>         name?: string | null,
>         id?: string | null,
>         rid?: string | null
>       } | null,
>       details?: {
>       } | null
>     }[] | null | null,
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### update

`kiosks.update`

Update a Kiosk. To update an existing draft Kiosk in Zoho CRM. This API allows you to update the Kiosk's name, description, group API name, and current record module. Use the Get All Kiosks API to retrieve the Kiosk ID.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.kiosks.update({
	kioskId: 'example',
	kiosks: [{}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `kioskId` | `string` | Yes | Specify the unique identifier of the kiosk. Use the [Get Kiosks API](kiosks.yaml#\$.paths./settings/kiosks.get) to retrieve Kiosk ID. |
| `kiosks` | `object[]` | Yes | Contains the details of the kiosk to be updated. Although the field is an array, only one kiosk can be updated per request. |

> [accordion] kiosks full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   group_api_name?: string | null,
>   description?: string | null,
>   current_record_module?: {
>     api_name?: string | null,
>     id?: string | null
>   }
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kiosks` | `object[] \| null` | No | Contains the list of kiosk result objects from the update operation. |

> [accordion] kiosks full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### updateAssociations

`kiosks.updateAssociations`

Kiosk Associations. This API allows you to associate an active Kiosk with the Record Detail View Page of a module. Once associated, the Kiosk will be available within the selected module's Record Detail View Page based on the specified layout. Use the Get All Kiosks API to retrieve the Kiosk ID.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.kiosks.updateAssociations({
	kioskId: 'example',
	kiosks: [{
		_associations: [{
			detail_view_page: [{
				layout: { id: '4876876000000333001' },
				module: {},
				name: 'example',
			}],
			type: 'example',
		}],
		id: '4876876000000333001',
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `kioskId` | `string` | Yes | Unique identifier of the kiosk. Use the [Get Kiosks API](kiosks.yaml#\$.paths./settings/kiosks.get) to retrieve the Kiosk ID. |
| `kiosks` | `object[]` | Yes | Array of kiosk association configurations. |

> [accordion] kiosks full type
>
> ```ts theme={null}
> {
>   _associations: {
>     type: string,
>     detail_view_page: {
>       layout: {
>         id: string
>       },
>       name: string,
>       _delete?: string | null,
>       module: {
>         name?: string | null,
>         id?: string | null,
>         api_name?: string | null
>       }
>     }[]
>   }[],
>   id: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `kiosks` | `object[] \| null` | No | Array of operation results. |

> [accordion] kiosks full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

## Layouts

### activate

`layouts.activate`

Activate Layout. Activates a single deactivated layout, making it available for use within the specified module. Optionally allows adding or removing profile associations during activation. Only one layout can be activated per request.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.layouts.activate({
	id: '4876876000000333001',
	module: 'Leads',
	layouts: [{ id: '4876876000000333001' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Specify the unique identifier of the layout to activate or deactivate. Refer to the [Get Layouts](layouts.yaml#\$.paths./settings/layouts.get) resource for valid values. |
| `module` | `string` | Yes | Specify the API name of the module that contains the layout. Refer to the [Get Modules](modules.yaml#\$.paths./settings/modules.get) resource for valid values. |
| `layouts` | `object[]` | Yes | Specify the array containing exactly one layout object to activate. The layout includes its unique identifier and optionally the profiles to associate or disassociate. Profile associations can be added (default) or removed (using \_delete flag). The array must contain exactly one item. |

> [accordion] layouts full type
>
> ```ts theme={null}
> {
>   id: string,
>   profiles?: {
>     id: string,
>     _delete?: boolean
>   }[]
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `layouts` | `object[] \| null` | No | Array containing the result of the layout activation operation. Always returned in the response. |

> [accordion] layouts full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### deactivate

`layouts.deactivate`

Deactivate Layout. Deactivates an active layout and transfers its configuration (profile associations, permissions, field mappings) to another active layout within the same module. At least one active layout must remain in the module. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.layouts.deactivate({ id: '4876876000000333001', module: 'Leads', transfer_to: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Specify the unique identifier of the layout to activate or deactivate. Refer to the [Get Layouts](layouts.yaml#\$.paths./settings/layouts.get) resource for valid values. |
| `module` | `string` | Yes | Specify the API name of the module that contains the layout. Refer to the [Get Modules](modules.yaml#\$.paths./settings/modules.get) resource for valid values. |
| `transfer_to` | `string` | Yes | Specify the unique identifier of an active layout within the same module to which the deactivated layout's profile associations and configuration will be transferred. The target layout must be different from the layout being deactivated. Refer to the [Get Layouts](layouts.yaml#\$.paths./settings/layouts.get) resource for valid values. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `layouts` | `object[] \| null` | No | Array containing the result of the layout deactivation operation. Always returned in the response. |

> [accordion] layouts full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### delete

`layouts.delete`

Delete a custom layout. To delete a custom layout from a module in your Zoho CRM organization. When the layout being deleted has associated records, a target layout must be specified to receive the transferred records and profile associations. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.layouts.delete({ id: '4876876000000333001', module: 'Leads' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Specify the unique identifier of the layout. Refer to the [Get Layouts](layouts.yaml#\$.paths./settings/layouts.get) resource for valid values. |
| `module` | `string` | Yes | Specify the API name of the required module. Refer to the [Get Modules](modules.yaml#\$.paths./settings/modules.get) resource for valid values. |
| `transfer_to` | `string` | No | Represents a unique numeric identifier for a CRM entity, expressed as a 64-bit integer serialized as a string to preserve precision in JSON. |
| `pipeline` | `string` | No | Represents a unique numeric identifier for a CRM entity, expressed as a 64-bit integer serialized as a string to preserve precision in JSON. |
| `stage` | `string` | No | Represents a unique numeric identifier for a CRM entity, expressed as a 64-bit integer serialized as a string to preserve precision in JSON. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `layouts` | `object[] \| null` | No | Contains one entry per layout included in the deletion request, each reporting the individual outcome — such as success or failure — for that specific layout. |

> [accordion] layouts full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### get

`layouts.get`

Get layout by ID. To retrieve the details of a specific layout by its layout ID for a specified module in your Zoho CRM account. Important Notes: - The profiles array is null when the user does not have "Module Customization" permission in their profile.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.layouts.get({ id: '4876876000000333001', module: 'Leads' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Specify the unique identifier of the layout. Refer to the [Get Layouts](layouts.yaml#\$.paths./settings/layouts.get) resource for valid values. |
| `module` | `string` | Yes | Specify the API name of the required module. Refer to the [Get Modules](modules.yaml#\$.paths./settings/modules.get) resource for valid values. |
| `mode` | `all \| business_card \| quick_create` | No | Specify the layout mode to filter the response. Available modes vary by module type. Possible values: `all` - Request all available layout modes. `business_card` - Business card layout view. `quick_create` - Quick create form layout. |
| `include` | `total_profiles \| portal_user_types` | No | Specify additional data to include in the response beyond the default layout structure. Possible values: `total_profiles` — include the total count of profiles associated with each layout. `portal_user_types` — include portal user type associations for each layout. |
| `include_inner_details` | `string` | No | Specify additional inner details to include in the response for each field. Possible values: `fields.allowed_permissions_to_update` - Include the set of permissions eligible for update per field. `fields.portal_user_types` - Include portal user type permission entries per field. |
| `include_element_types` | `field \| mirror_field` | No | Specify the type of field component in the layout, distinguishing standard fields from mirror fields that derive their value from a lookup source. Possible values: `field` — a standard data field in the layout. `mirror_field` — a field that reflects a value from a related module lookup. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   layouts?: {
>     has_more_profiles?: boolean | null,
>     created_time?: string | null | null,
>     convert_mapping?: {
>       Contacts?: {
>         display_label?: string | null,
>         name?: string | null,
>         id?: string | null
>       } | null,
>       Deals?: {
>         display_label?: string | null,
>         name?: string | null,
>         id?: string | null,
>         fields?: {
>           api_name?: string | null,
>           field_label?: string | null,
>           id?: string | null,
>           required?: boolean | null
>         }[] | null
>       } | null,
>       Accounts?: {
>         display_label?: string | null,
>         name?: string | null,
>         id?: string | null
>       } | null
>     } | {
>       SalesOrders?: {
>         display_label?: string | null,
>         name?: string | null,
>         id?: string | null
>       } | null,
>       Invoices?: {
>         display_label?: string | null,
>         name?: string | null,
>         id?: string | null
>       } | null
>     } | {
>       Invoices?: {
>         display_label?: string | null,
>         name?: string | null,
>         id?: string | null
>       } | null
>     } | {
>     } | null | null,
>     visible?: boolean | null,
>     created_for?: string | null | null,
>     portal_user_types?: {
>       default?: boolean | null,
>       name?: string | null,
>       id?: string | null,
>       _default_view?: {
>         name?: string | null,
>         id?: string | null,
>         type?: string | null
>       } | null
>     }[] | null,
>     profiles?: {
>       _default_assignment_view?: {
>         name?: string | null,
>         id?: string | null,
>         type?: string | null
>       } | null,
>       default?: boolean | null,
>       name?: string | null,
>       id?: string | null,
>       _default_view?: {
>         name?: string | null,
>         id?: string | null,
>         type?: string | null
>       } | null,
>       type?: string | null
>     }[] | null | null,
>     source?: string | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     sections?: {
>       isSubformSection?: boolean | null,
>       parent_section?: {
>         id?: string | null,
>         name?: string | null
>       } | null | null,
>       type?: string | null,
>       display_label?: string | null,
>       mode?: string | null,
>       sequence_number?: number | null,
>       actions_allowed?: {
>         add_field?: boolean | null,
>         rename?: boolean | null,
>         change_tab_traversal?: boolean | null,
>         reorder?: boolean | null,
>         delete?: boolean | null,
>         remove_field?: boolean | null,
>         change_column_count?: boolean | null
>       } | null,
>       tab_traversal?: string | null,
>       api_name?: string | null,
>       column_count?: number | null,
>       is_parent_section?: boolean | null,
>       name?: string | null,
>       generated_type?: string | null,
>       id?: string | null,
>       fields?: {
>         associated_module?: {
>           module?: string | null,
>           id?: string | null,
>           layout?: {
>             name?: string | null,
>             id?: string | null
>           } | null
>         } | null | null,
>         webhook?: boolean | null,
>         operation_type?: {
>           web_update?: boolean | null,
>           api_create?: boolean | null,
>           web_create?: boolean | null,
>           api_update?: boolean | null
>         } | null,
>         colour_code_enabled_by_system?: boolean | null,
>         field_label?: string | null,
>         tooltip?: {
>           name?: string | null,
>           value?: string | null
>         } | null | null,
>         display_format_properties?: {
>           split?: number | null,
>           radio_display_type?: string | null
>         } | null | null,
>         type?: string | null,
>         field_read_only?: boolean | null,
>         customizable_properties?: string[] | null | null,
>         required?: boolean | null,
>         subform_properties?: {
>           custom_width?: number | null | null,
>           pinned_column?: boolean | null
>         } | null | null,
>         display_label?: string | null,
>         allowed_permissions_to_update?: {
>           read_write?: boolean | null,
>           hidden?: boolean | null,
>           read_only?: boolean | null
>         } | null,
>         read_only?: boolean | null,
>         association_details?: {
>           related_field?: {
>             api_name?: string | null,
>             id?: string | null
>           } | null,
>           lookup_field?: {
>             api_name?: string | null,
>             id?: string | null
>           } | null
>         } | null | null,
>         businesscard_supported?: boolean | null,
>         sharing_properties?: {
>           scheduler_status?: string | null | null,
>           share_permission?: string | null,
>           share_preference_enabled?: boolean | null,
>           share_with_superiors?: boolean | null
>         } | null,
>         multi_module_lookup?: {
>           display_label?: string | null,
>           api_name?: string | null,
>           modules?: {
>             api_name?: string | null,
>             module_name?: string | null,
>             id?: string | null
>           }[] | null,
>           dynamic_module_addition_allowed?: boolean | null
>         } | null | null,
>         id?: string | null,
>         created_time?: string | null | null,
>         filterable?: boolean | null,
>         visible?: boolean | null,
>         mask_details?: {
>           show_first?: number | null,
>           complete_mask?: boolean | null,
>           show_last?: number | null,
>           profiles?: {
>             name?: string | null,
>             id?: string | null
>           }[] | null
>         } | {
>           complete_mask?: boolean | null,
>           profiles?: {
>             name?: string | null,
>             id?: string | null
>           }[] | null
>         } | null | null,
>         refer_from_field?: {
>           api_name?: string | null,
>           id?: string | null
>         } | null | null,
>         portal_user_types?: {
>           permission_type?: string | null,
>           name?: string | null,
>           id?: string | null
>         }[] | null,
>         profiles?: {
>           permission_type?: string | null,
>           name?: string | null,
>           id?: string | null
>         }[] | null,
>         view_type?: {
>           view?: boolean | null,
>           edit?: boolean | null,
>           quick_create?: boolean | null,
>           create?: boolean | null
>         } | null,
>         subform?: {
>           module?: string | null,
>           id?: string | null
>         } | null | null,
>         separator?: boolean | null,
>         searchable?: boolean | null,
>         history_tracking_enabled?: boolean | null,
>         show_type?: number | null,
>         external?: null | null,
>         api_name?: string | null,
>         parent_field?: {
>           api_name?: string | null,
>           name?: string | null,
>           id?: string | null
>         } | null | null,
>         unique?: {
>           case_sensitive?: boolean | null
>         } | null,
>         enable_colour_code?: boolean | null,
>         child_fields?: {
>           sequence_number?: number | null,
>           field?: {
>             api_name?: string | null,
>             name?: string | null,
>             id?: string | null
>           } | null
>         }[] | null | null,
>         pick_list_values?: {
>           display_value?: string | null,
>           sequence_number?: number | null,
>           record_category_value?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           deal_category?: string | null,
>           reference_value?: string | null,
>           maps?: {
>             api_name?: string | null,
>             id?: string | null,
>             pick_list_values?: {
>               display_value?: string | null,
>               colour_code?: string | null | null,
>               actual_value?: string | null,
>               id?: string | null
>             }[] | null
>           }[] | null,
>           colour_code?: string | null | null,
>           probability?: number | null,
>           forecast_category?: {
>             name?: string | null,
>             id?: string | null
>           } | null,
>           actual_value?: string | null,
>           id?: string | null,
>           forecast_type?: string | null,
>           type?: string | null
>         }[] | null | null,
>         system_mandatory?: boolean | null,
>         private?: {
>           restricted?: boolean | null,
>           type?: string | null,
>           export?: boolean | null
>         } | null | null,
>         virtual_field?: boolean | null,
>         json_type?: string | null,
>         crypt?: null | null,
>         range?: {
>           from?: number | null | null,
>           to?: number | null | null
>         } | null | null,
>         created_source?: string | null,
>         display_type?: number | null,
>         ui_type?: number | null,
>         validation_rule?: {
>           id?: string | null
>         } | null | null,
>         modified_time?: string | null | null,
>         file_upolad_optionlist?: {
>           display_value?: string | null,
>           actual_value?: string | null
>         }[] | null | null,
>         public?: boolean | null,
>         section_id?: number | null,
>         static_values?: {
>           sequence_number?: number | null,
>           id?: string | null,
>           value?: string | null
>         }[] | null | null,
>         currency?: {
>           rounding_option?: string | null,
>           precision?: number | null
>         } | null | null,
>         multiuserlookup?: {
>           linking_details?: {
>             module?: {
>               plural_label?: string | null,
>               api_name?: string | null,
>               id?: string | null
>             } | null,
>             lookup_field?: {
>               api_name?: string | null,
>               field_label?: string | null,
>               id?: string | null
>             } | null,
>             connected_lookup_field?: {
>               api_name?: string | null,
>               field_label?: string | null,
>               id?: string | null
>             } | null
>           } | null,
>           record_access?: boolean | null
>         } | null,
>         global_map_dependency?: {
>           id?: string | null
>         } | null | null,
>         custom_field?: boolean | null,
>         lookup?: {
>           display_label?: string | null | null,
>           revalidate_filter_during_edit?: boolean | null,
>           api_name?: string | null | null,
>           module?: {
>             api_name?: string | null,
>             crypt?: boolean | null,
>             id?: string | null
>           } | null,
>           id?: string | null | null,
>           query_details?: {
>             query_id?: string | number | null,
>             criteria?: {
>               comparator?: string | null,
>               field?: {
>                 api_name?: string | null,
>                 id?: string | null
>               } | null,
>               type?: string | null,
>               value?: string | number | boolean | null | null
>             } | null,
>             system_query_id?: string | null | null
>           } | {
>             system_query_id?: string | null | null
>           } | null
>         } | null | null,
>         hipaa_compliance?: {
>           restricted_in_export?: boolean | null,
>           restricted?: boolean | null
>         } | null | null,
>         convert_mapping?: {
>           Contacts?: string | null | null,
>           Deals?: string | null | null,
>           Accounts?: string | null | null
>         } | {
>           Invoices?: string | null | null,
>           Sales_Orders?: string | null | null
>         } | {
>           Invoices?: string | null | null
>         } | {
>         } | null,
>         address?: {
>           type?: string | null
>         } | null | null,
>         rollup_summary?: {
>           return_type?: string | null,
>           expression?: {
>             function_parameters?: {
>               api_name?: string | null
>             }[] | null,
>             criteria?: {
>               comparator?: string | null,
>               field?: {
>                 api_name?: string | null,
>                 id?: string | null
>               } | null,
>               type?: string | null,
>               value?: string | null
>             } | null | null,
>             function?: string | null
>           } | null,
>           based_on_module?: {
>             api_name?: string | null,
>             id?: string | null
>           } | null,
>           related_list?: {
>             api_name?: string | null,
>             id?: string | null
>           } | null | null,
>           rollup_based_on?: string | null
>         } | null | null,
>         length?: number | null,
>         column_name?: string | null,
>         display_field?: boolean | null,
>         pick_list_values_sorted_lexically?: boolean | null,
>         default_value?: string | boolean | null | null,
>         sortable?: boolean | null,
>         sequence_number?: number | null,
>         global_picklist?: {
>           api_name?: string | null,
>           id?: string | null
>         } | null | null,
>         display_format?: string | null | null,
>         history_tracking?: {
>           related_list_name?: string | null,
>           module?: {
>             api_name?: string | null,
>             id?: string | null
>           } | null,
>           duration_configured_field?: {
>             api_name?: string | null,
>             id?: string | null
>           } | null | null,
>           duration_configuration?: string | null,
>           followed_fields?: {
>             api_name?: string | null,
>             id?: string | null
>           }[] | null
>         } | null | null,
>         data_type?: string | null,
>         formula?: {
>           return_type?: string | null,
>           expression?: string | null,
>           evaluation_order?: number | null,
>           sub_return_type?: string | null | null,
>           dynamic?: boolean | null,
>           stop_compute_conditionally?: boolean | null,
>           assume_default?: boolean | null,
>           stop_compute_expression?: string | null | null
>         } | {
>         } | null,
>         static_field?: boolean | null,
>         additional_column?: string | null | null,
>         hipaa_compliance_enabled?: boolean | null,
>         query_details?: {
>           query_id?: number | null,
>           criteria?: {
>             comparator?: string | null,
>             field?: {
>               api_name?: string | null,
>               id?: string | null
>             } | null,
>             type?: string | null,
>             value?: string | number | boolean | null | null
>           } | null
>         } | null | null,
>         decimal_place?: number | null | null,
>         mass_update?: boolean | null,
>         multiselectlookup?: {
>           linking_details?: {
>             module?: {
>               visibility?: number | null,
>               plural_label?: string | null,
>               api_name?: string | null,
>               id?: string | null
>             } | null,
>             lookup_field?: {
>               api_name?: string | null,
>               field_label?: string | null,
>               id?: string | null
>             } | null,
>             connected_lookup_field?: {
>               api_name?: string | null,
>               field_label?: string | null,
>               id?: string | null
>             } | null
>           } | null,
>           connected_details?: {
>             field?: {
>               api_name?: string | null,
>               field_label?: string | null,
>               id?: string | null
>             } | null,
>             module?: {
>               plural_label?: string | null,
>               api_name?: string | null,
>               id?: string | null
>             } | null,
>             layouts?: {
>               api_name?: string | null,
>               id?: string | null
>             }[] | null
>           } | null,
>           related_list?: {
>             display_label?: string | null,
>             api_name?: string | null,
>             id?: string | null
>           } | null
>         } | null | null,
>         auto_number?: {
>           starting_number_length?: number | null,
>           prefix?: string | null | null,
>           start_number?: number | null | null,
>           suffix?: string | null | null
>         } | null | null,
>         quick_sequence_number?: string | null,
>         category?: number | null,
>         blueprint_supported?: boolean | null,
>         textarea?: {
>           type?: string | null
>         } | null,
>         element_type?: string | null,
>         enable_record_category?: boolean | null,
>         record_category_tracking_field?: {
>           api_name?: string | null,
>           id?: string | null
>         } | null | null,
>         enable_transition_for_record_category?: boolean | null,
>         record_category_values?: {
>           id?: string | null,
>           api_name?: string | null,
>           value?: string | null,
>           nature_of_category?: string | null
>         }[] | null,
>         lookup_field?: {
>           id?: string | null,
>           api_name?: string | null
>         } | null
>       }[] | null,
>       properties?: {
>         reorder_rows?: boolean | null,
>         bulk_addition?: {
>           lookup_field?: {
>             api_name?: string | null,
>             id?: string | null,
>             name?: string | null
>           } | null,
>           subform_fields?: {
>             api_name?: string | null,
>             id?: string | null,
>             name?: string | null
>           }[] | null | null
>         } | {
>         } | null | null,
>         tooltip?: {
>           name?: string | null,
>           value?: string | null
>         } | null | null,
>         maximum_rows?: number | null,
>         preference?: {
>           comparator?: string | null,
>           field?: {
>             api_name?: string | null,
>             id?: string | null
>           } | null,
>           type?: string | null,
>           value?: string | number | boolean | null | null
>         }[] | null
>       } | null | null
>     }[] | null,
>     display_label?: string | null,
>     show_business_card?: boolean | null,
>     actions_allowed?: {
>       edit?: boolean | null,
>       rename?: boolean | null,
>       clone?: boolean | null,
>       downgrade?: boolean | null,
>       delete?: boolean | null,
>       deactivate?: boolean | null,
>       set_layout_permissions?: boolean | null
>     } | null,
>     modified_time?: string | null | null,
>     api_name?: string | null,
>     name?: string | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     generated_type?: string | null,
>     id?: string | null,
>     total_profiles?: number | null,
>     status?: string | null
>   }[] | null
> } | {
>   layouts?: {
>     id?: string | null,
>     name?: string | null,
>     api_name?: string | null,
>     display_label?: string | null,
>     created_time?: string | null | null,
>     modified_time?: string | null | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     status?: string | null,
>     visible?: boolean | null,
>     show_business_card?: boolean | null,
>     generated_type?: string | null,
>     source?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### list

`layouts.list`

Get layouts metadata. To retrieve the layout configurations for a specified module in your Zoho CRM organization. Note: - The profiles array is null if the user does not have the Module Customization permission in their profile.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.layouts.list({ module: 'Leads' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the API name of the required module. Refer to the [Get Modules](modules.yaml#\$.paths./settings/modules.get) resource for valid values. |
| `mode` | `all \| business_card \| quick_create` | No | Specify the layout mode to filter the response. Available modes vary by module type. Possible values: `all` - Request all available layout modes. `business_card` - Business card layout view. `quick_create` - Quick create form layout. |
| `include` | `total_profiles \| portal_user_types` | No | Specify additional data to include in the response beyond the default layout structure. Possible values: `total_profiles` — include the total count of profiles associated with each layout. `portal_user_types` — include portal user type associations for each layout. |
| `include_inner_details` | `string` | No | Specify additional inner details to include in the response for each field. Possible values: `fields.allowed_permissions_to_update` - Include the set of permissions eligible for update per field. `fields.portal_user_types` - Include portal user type permission entries per field. |
| `include_element_types` | `field \| mirror_field` | No | Specify the type of field component in the layout, distinguishing standard fields from mirror fields that derive their value from a lookup source. Possible values: `field` — a standard data field in the layout. `mirror_field` — a field that reflects a value from a related module lookup. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   layouts?: {
>     has_more_profiles?: boolean | null,
>     created_time?: string | null | null,
>     convert_mapping?: {
>       Contacts?: {
>         display_label?: string | null,
>         name?: string | null,
>         id?: string | null
>       } | null,
>       Deals?: {
>         display_label?: string | null,
>         name?: string | null,
>         id?: string | null,
>         fields?: {
>           api_name?: string | null,
>           field_label?: string | null,
>           id?: string | null,
>           required?: boolean | null
>         }[] | null
>       } | null,
>       Accounts?: {
>         display_label?: string | null,
>         name?: string | null,
>         id?: string | null
>       } | null
>     } | {
>       SalesOrders?: {
>         display_label?: string | null,
>         name?: string | null,
>         id?: string | null
>       } | null,
>       Invoices?: {
>         display_label?: string | null,
>         name?: string | null,
>         id?: string | null
>       } | null
>     } | {
>       Invoices?: {
>         display_label?: string | null,
>         name?: string | null,
>         id?: string | null
>       } | null
>     } | {
>     } | null | null,
>     visible?: boolean | null,
>     created_for?: string | null | null,
>     portal_user_types?: {
>       default?: boolean | null,
>       name?: string | null,
>       id?: string | null,
>       _default_view?: {
>         name?: string | null,
>         id?: string | null,
>         type?: string | null
>       } | null
>     }[] | null,
>     profiles?: {
>       _default_assignment_view?: {
>         name?: string | null,
>         id?: string | null,
>         type?: string | null
>       } | null,
>       default?: boolean | null,
>       name?: string | null,
>       id?: string | null,
>       _default_view?: {
>         name?: string | null,
>         id?: string | null,
>         type?: string | null
>       } | null,
>       type?: string | null
>     }[] | null | null,
>     source?: string | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     sections?: {
>       isSubformSection?: boolean | null,
>       parent_section?: {
>         id?: string | null,
>         name?: string | null
>       } | null | null,
>       type?: string | null,
>       display_label?: string | null,
>       mode?: string | null,
>       sequence_number?: number | null,
>       actions_allowed?: {
>         add_field?: boolean | null,
>         rename?: boolean | null,
>         change_tab_traversal?: boolean | null,
>         reorder?: boolean | null,
>         delete?: boolean | null,
>         remove_field?: boolean | null,
>         change_column_count?: boolean | null
>       } | null,
>       tab_traversal?: string | null,
>       api_name?: string | null,
>       column_count?: number | null,
>       is_parent_section?: boolean | null,
>       name?: string | null,
>       generated_type?: string | null,
>       id?: string | null,
>       fields?: {
>         associated_module?: {
>           module?: string | null,
>           id?: string | null,
>           layout?: {
>             name?: string | null,
>             id?: string | null
>           } | null
>         } | null | null,
>         webhook?: boolean | null,
>         operation_type?: {
>           web_update?: boolean | null,
>           api_create?: boolean | null,
>           web_create?: boolean | null,
>           api_update?: boolean | null
>         } | null,
>         colour_code_enabled_by_system?: boolean | null,
>         field_label?: string | null,
>         tooltip?: {
>           name?: string | null,
>           value?: string | null
>         } | null | null,
>         display_format_properties?: {
>           split?: number | null,
>           radio_display_type?: string | null
>         } | null | null,
>         type?: string | null,
>         field_read_only?: boolean | null,
>         customizable_properties?: string[] | null | null,
>         required?: boolean | null,
>         subform_properties?: {
>           custom_width?: number | null | null,
>           pinned_column?: boolean | null
>         } | null | null,
>         display_label?: string | null,
>         allowed_permissions_to_update?: {
>           read_write?: boolean | null,
>           hidden?: boolean | null,
>           read_only?: boolean | null
>         } | null,
>         read_only?: boolean | null,
>         association_details?: {
>           related_field?: {
>             api_name?: string | null,
>             id?: string | null
>           } | null,
>           lookup_field?: {
>             api_name?: string | null,
>             id?: string | null
>           } | null
>         } | null | null,
>         businesscard_supported?: boolean | null,
>         sharing_properties?: {
>           scheduler_status?: string | null | null,
>           share_permission?: string | null,
>           share_preference_enabled?: boolean | null,
>           share_with_superiors?: boolean | null
>         } | null,
>         multi_module_lookup?: {
>           display_label?: string | null,
>           api_name?: string | null,
>           modules?: {
>             api_name?: string | null,
>             module_name?: string | null,
>             id?: string | null
>           }[] | null,
>           dynamic_module_addition_allowed?: boolean | null
>         } | null | null,
>         id?: string | null,
>         created_time?: string | null | null,
>         filterable?: boolean | null,
>         visible?: boolean | null,
>         mask_details?: {
>           show_first?: number | null,
>           complete_mask?: boolean | null,
>           show_last?: number | null,
>           profiles?: {
>             name?: string | null,
>             id?: string | null
>           }[] | null
>         } | {
>           complete_mask?: boolean | null,
>           profiles?: {
>             name?: string | null,
>             id?: string | null
>           }[] | null
>         } | null | null,
>         refer_from_field?: {
>           api_name?: string | null,
>           id?: string | null
>         } | null | null,
>         portal_user_types?: {
>           permission_type?: string | null,
>           name?: string | null,
>           id?: string | null
>         }[] | null,
>         profiles?: {
>           permission_type?: string | null,
>           name?: string | null,
>           id?: string | null
>         }[] | null,
>         view_type?: {
>           view?: boolean | null,
>           edit?: boolean | null,
>           quick_create?: boolean | null,
>           create?: boolean | null
>         } | null,
>         subform?: {
>           module?: string | null,
>           id?: string | null
>         } | null | null,
>         separator?: boolean | null,
>         searchable?: boolean | null,
>         history_tracking_enabled?: boolean | null,
>         show_type?: number | null,
>         external?: null | null,
>         api_name?: string | null,
>         parent_field?: {
>           api_name?: string | null,
>           name?: string | null,
>           id?: string | null
>         } | null | null,
>         unique?: {
>           case_sensitive?: boolean | null
>         } | null,
>         enable_colour_code?: boolean | null,
>         child_fields?: {
>           sequence_number?: number | null,
>           field?: {
>             api_name?: string | null,
>             name?: string | null,
>             id?: string | null
>           } | null
>         }[] | null | null,
>         pick_list_values?: {
>           display_value?: string | null,
>           sequence_number?: number | null,
>           record_category_value?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           deal_category?: string | null,
>           reference_value?: string | null,
>           maps?: {
>             api_name?: string | null,
>             id?: string | null,
>             pick_list_values?: {
>               display_value?: string | null,
>               colour_code?: string | null | null,
>               actual_value?: string | null,
>               id?: string | null
>             }[] | null
>           }[] | null,
>           colour_code?: string | null | null,
>           probability?: number | null,
>           forecast_category?: {
>             name?: string | null,
>             id?: string | null
>           } | null,
>           actual_value?: string | null,
>           id?: string | null,
>           forecast_type?: string | null,
>           type?: string | null
>         }[] | null | null,
>         system_mandatory?: boolean | null,
>         private?: {
>           restricted?: boolean | null,
>           type?: string | null,
>           export?: boolean | null
>         } | null | null,
>         virtual_field?: boolean | null,
>         json_type?: string | null,
>         crypt?: null | null,
>         range?: {
>           from?: number | null | null,
>           to?: number | null | null
>         } | null | null,
>         created_source?: string | null,
>         display_type?: number | null,
>         ui_type?: number | null,
>         validation_rule?: {
>           id?: string | null
>         } | null | null,
>         modified_time?: string | null | null,
>         file_upolad_optionlist?: {
>           display_value?: string | null,
>           actual_value?: string | null
>         }[] | null | null,
>         public?: boolean | null,
>         section_id?: number | null,
>         static_values?: {
>           sequence_number?: number | null,
>           id?: string | null,
>           value?: string | null
>         }[] | null | null,
>         currency?: {
>           rounding_option?: string | null,
>           precision?: number | null
>         } | null | null,
>         multiuserlookup?: {
>           linking_details?: {
>             module?: {
>               plural_label?: string | null,
>               api_name?: string | null,
>               id?: string | null
>             } | null,
>             lookup_field?: {
>               api_name?: string | null,
>               field_label?: string | null,
>               id?: string | null
>             } | null,
>             connected_lookup_field?: {
>               api_name?: string | null,
>               field_label?: string | null,
>               id?: string | null
>             } | null
>           } | null,
>           record_access?: boolean | null
>         } | null,
>         global_map_dependency?: {
>           id?: string | null
>         } | null | null,
>         custom_field?: boolean | null,
>         lookup?: {
>           display_label?: string | null | null,
>           revalidate_filter_during_edit?: boolean | null,
>           api_name?: string | null | null,
>           module?: {
>             api_name?: string | null,
>             crypt?: boolean | null,
>             id?: string | null
>           } | null,
>           id?: string | null | null,
>           query_details?: {
>             query_id?: string | number | null,
>             criteria?: {
>               comparator?: string | null,
>               field?: {
>                 api_name?: string | null,
>                 id?: string | null
>               } | null,
>               type?: string | null,
>               value?: string | number | boolean | null | null
>             } | null,
>             system_query_id?: string | null | null
>           } | {
>             system_query_id?: string | null | null
>           } | null
>         } | null | null,
>         hipaa_compliance?: {
>           restricted_in_export?: boolean | null,
>           restricted?: boolean | null
>         } | null | null,
>         convert_mapping?: {
>           Contacts?: string | null | null,
>           Deals?: string | null | null,
>           Accounts?: string | null | null
>         } | {
>           Invoices?: string | null | null,
>           Sales_Orders?: string | null | null
>         } | {
>           Invoices?: string | null | null
>         } | {
>         } | null,
>         address?: {
>           type?: string | null
>         } | null | null,
>         rollup_summary?: {
>           return_type?: string | null,
>           expression?: {
>             function_parameters?: {
>               api_name?: string | null
>             }[] | null,
>             criteria?: {
>               comparator?: string | null,
>               field?: {
>                 api_name?: string | null,
>                 id?: string | null
>               } | null,
>               type?: string | null,
>               value?: string | null
>             } | null | null,
>             function?: string | null
>           } | null,
>           based_on_module?: {
>             api_name?: string | null,
>             id?: string | null
>           } | null,
>           related_list?: {
>             api_name?: string | null,
>             id?: string | null
>           } | null | null,
>           rollup_based_on?: string | null
>         } | null | null,
>         length?: number | null,
>         column_name?: string | null,
>         display_field?: boolean | null,
>         pick_list_values_sorted_lexically?: boolean | null,
>         default_value?: string | boolean | null | null,
>         sortable?: boolean | null,
>         sequence_number?: number | null,
>         global_picklist?: {
>           api_name?: string | null,
>           id?: string | null
>         } | null | null,
>         display_format?: string | null | null,
>         history_tracking?: {
>           related_list_name?: string | null,
>           module?: {
>             api_name?: string | null,
>             id?: string | null
>           } | null,
>           duration_configured_field?: {
>             api_name?: string | null,
>             id?: string | null
>           } | null | null,
>           duration_configuration?: string | null,
>           followed_fields?: {
>             api_name?: string | null,
>             id?: string | null
>           }[] | null
>         } | null | null,
>         data_type?: string | null,
>         formula?: {
>           return_type?: string | null,
>           expression?: string | null,
>           evaluation_order?: number | null,
>           sub_return_type?: string | null | null,
>           dynamic?: boolean | null,
>           stop_compute_conditionally?: boolean | null,
>           assume_default?: boolean | null,
>           stop_compute_expression?: string | null | null
>         } | {
>         } | null,
>         static_field?: boolean | null,
>         additional_column?: string | null | null,
>         hipaa_compliance_enabled?: boolean | null,
>         query_details?: {
>           query_id?: number | null,
>           criteria?: {
>             comparator?: string | null,
>             field?: {
>               api_name?: string | null,
>               id?: string | null
>             } | null,
>             type?: string | null,
>             value?: string | number | boolean | null | null
>           } | null
>         } | null | null,
>         decimal_place?: number | null | null,
>         mass_update?: boolean | null,
>         multiselectlookup?: {
>           linking_details?: {
>             module?: {
>               visibility?: number | null,
>               plural_label?: string | null,
>               api_name?: string | null,
>               id?: string | null
>             } | null,
>             lookup_field?: {
>               api_name?: string | null,
>               field_label?: string | null,
>               id?: string | null
>             } | null,
>             connected_lookup_field?: {
>               api_name?: string | null,
>               field_label?: string | null,
>               id?: string | null
>             } | null
>           } | null,
>           connected_details?: {
>             field?: {
>               api_name?: string | null,
>               field_label?: string | null,
>               id?: string | null
>             } | null,
>             module?: {
>               plural_label?: string | null,
>               api_name?: string | null,
>               id?: string | null
>             } | null,
>             layouts?: {
>               api_name?: string | null,
>               id?: string | null
>             }[] | null
>           } | null,
>           related_list?: {
>             display_label?: string | null,
>             api_name?: string | null,
>             id?: string | null
>           } | null
>         } | null | null,
>         auto_number?: {
>           starting_number_length?: number | null,
>           prefix?: string | null | null,
>           start_number?: number | null | null,
>           suffix?: string | null | null
>         } | null | null,
>         quick_sequence_number?: string | null,
>         category?: number | null,
>         blueprint_supported?: boolean | null,
>         textarea?: {
>           type?: string | null
>         } | null,
>         element_type?: string | null,
>         enable_record_category?: boolean | null,
>         record_category_tracking_field?: {
>           api_name?: string | null,
>           id?: string | null
>         } | null | null,
>         enable_transition_for_record_category?: boolean | null,
>         record_category_values?: {
>           id?: string | null,
>           api_name?: string | null,
>           value?: string | null,
>           nature_of_category?: string | null
>         }[] | null,
>         lookup_field?: {
>           id?: string | null,
>           api_name?: string | null
>         } | null
>       }[] | null,
>       properties?: {
>         reorder_rows?: boolean | null,
>         bulk_addition?: {
>           lookup_field?: {
>             api_name?: string | null,
>             id?: string | null,
>             name?: string | null
>           } | null,
>           subform_fields?: {
>             api_name?: string | null,
>             id?: string | null,
>             name?: string | null
>           }[] | null | null
>         } | {
>         } | null | null,
>         tooltip?: {
>           name?: string | null,
>           value?: string | null
>         } | null | null,
>         maximum_rows?: number | null,
>         preference?: {
>           comparator?: string | null,
>           field?: {
>             api_name?: string | null,
>             id?: string | null
>           } | null,
>           type?: string | null,
>           value?: string | number | boolean | null | null
>         }[] | null
>       } | null | null
>     }[] | null,
>     display_label?: string | null,
>     show_business_card?: boolean | null,
>     actions_allowed?: {
>       edit?: boolean | null,
>       rename?: boolean | null,
>       clone?: boolean | null,
>       downgrade?: boolean | null,
>       delete?: boolean | null,
>       deactivate?: boolean | null,
>       set_layout_permissions?: boolean | null
>     } | null,
>     modified_time?: string | null | null,
>     api_name?: string | null,
>     name?: string | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     generated_type?: string | null,
>     id?: string | null,
>     total_profiles?: number | null,
>     status?: string | null
>   }[] | null
> } | {
>   layouts?: {
>     id?: string | null,
>     name?: string | null,
>     api_name?: string | null,
>     display_label?: string | null,
>     created_time?: string | null | null,
>     modified_time?: string | null | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     status?: string | null,
>     visible?: boolean | null,
>     show_business_card?: boolean | null,
>     generated_type?: string | null,
>     source?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### update

`layouts.update`

Update a custom layout. To update a custom layout in your Zoho CRM organization, including renaming it, modifying profile permissions, enabling or disabling the business card display, and creating, updating, or deleting sections and fields within sections.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.layouts.update({
	id: '4876876000000333001',
	module: 'Leads',
	layouts: [{}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Specify the unique identifier of the layout. Refer to the [Get Layouts](layouts.yaml#\$.paths./settings/layouts.get) resource for valid values. |
| `module` | `string` | Yes | Specify the API name of the required module. Refer to the [Get Modules](modules.yaml#\$.paths./settings/modules.get) resource for valid values. |
| `layouts` | `object[]` | Yes | Contains exactly one layout object defining the update operations to be applied, including sections, profiles, and display settings. |

> [accordion] layouts full type
>
> ```ts theme={null}
> {
>   name?: string,
>   show_business_card?: boolean,
>   profiles?: {
>     id: string,
>     _delete?: boolean
>   }[],
>   sections?: {
>     id?: string,
>     name?: string,
>     display_label?: string,
>     sequence_number?: number | string,
>     tab_traversal?: left_to_right | top_to_bottom,
>     column_count?: number | string,
>     fields?: {
>       id?: string,
>       field_label?: string,
>       data_type?: text | textarea | email | phone | website | integer | bigint | currency | double | percent | date | datetime | boolean | picklist | multiselectpicklist | lookup | multiselectlookup | autonumber | fileupload | imageupload | formula | rollup_summary | consent_lookup | profileimage | richtextarea | userlookup | multiuserlookup | event_reminder,
>       length?: number | string,
>       sequence_number?: number | string,
>       element_type?: field | mirror_field,
>       lookup_field?: {
>         id?: string,
>         api_name?: string
>       },
>       _delete?: {
>         permanent: boolean
>       },
>       association_details?: {
>         related_field: {
>           api_name?: string,
>           id?: string
>         },
>         lookup_field: {
>           api_name?: string,
>           id?: string,
>           reference_id?: string
>         }
>       } | null
>     }[],
>     _delete?: {
>       permanent: boolean
>     }
>   }[]
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `layouts` | `object[] \| null` | No | Contains the array of result entries for the layout update operation, each reporting the outcome for an individual layout. |

> [accordion] layouts full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

## Leads

### convert

`leads.convert`

Convert a Lead. Converts a Lead record into Contact, Account, and/or Deal records. Allows configuration of conversion behavior including overwrite settings, notifications, owner assignment, and tag carryover. The lead becomes a contact (and optionally an account and a deal) and is removed from Leads.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.leads.convert({
	leadId: 'example',
	data: [{}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `leadId` | `string` | Yes | Unique identifier of the Lead record to convert. Must be a valid Lead ID that exists in the CRM and has not been previously converted. Use the [Get Records API](record.yaml#\$.paths./module.get) to retrieve the lead ID. |
| `data` | `object[]` | Yes | Array of lead conversion configurations |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   overwrite?: boolean,
>   default?: any,
>   notify_lead_owner?: boolean,
>   notify_new_entity_owner?: boolean,
>   add_to_existing_record?: boolean,
>   assign_to?: {
>     id: string
>   },
>   Deals?: {
>     Deal_Name: string,
>     Campaign_Source?: string,
>     Amount?: number,
>     Contact_Role?: string,
>     Pipeline: string,
>     $move_attachments?: boolean,
>     Stage: string,
>     Closing_Date: string,
>     Type?: string,
>     Probability?: number | string,
>     Lead_Source?: string,
>     Next_Step?: string,
>     Description?: string
>   },
>   carry_over_tags?: {
>     Contacts?: {
>     },
>     Accounts?: {
>     },
>     Deals?: {
>     }
>   }
> }[]
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data?: {
>     code?: string | null,
>     message?: string | null,
>     status?: string | null,
>     details?: {
>       Contacts?: {
>         name?: string | null,
>         id?: string | null
>       } | null,
>       Deals?: {
>         name?: string | null,
>         id?: string | null
>       } | null | null,
>       Accounts?: {
>         name?: string | null,
>         id?: string | null
>       } | null | null
>     } | null
>   }[] | null
> } | {
>   data?: {
>     code?: string | null,
>     message?: string | null,
>     status?: string | null,
>     details?: {
>       job_id?: string | null
>     } | null
>   }[] | null
> } | {
>   data?: {
>     status?: string | null,
>     code?: string | null,
>     message?: string | null,
>     details?: {
>       api_name?: string | null,
>       json_path?: string | null,
>       mapped_field?: string | null,
>       expected_data_type?: string | null,
>       maximum_length?: number | null
>     } | null
>   }[] | null
> }
> ```

***

### getConversionOptions

`leads.getConversionOptions`

Lead Conversion Options. Retrieves available conversion options for a lead including matching contacts, accounts, field mappings, and layout preferences. This endpoint helps determine what conversion paths are available before performing the actual lead conversion.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.leads.getConversionOptions({ leadId: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `leadId` | `string` | Yes | The unique identifier of the Lead record (int64 as string) for which you want to retrieve conversion options. Use the [Get Records API](record.yaml#\$.paths./module.get) to retrieve the lead record ID. |
| `include_inner_details` | `string` | No | Fetches additional details of lookup or referenced inner resources within the same API call, avoiding separate dependent requests. Accepts a comma-separated list of inner resource paths starting from the root key of the response (the root key itself must not be included). Supports dot notation and JSONPath-style notation (e.g. \$..key.sub\_key). Invalid or non-permitted paths are silently ignored. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   __conversion_options?: {
>     module_preference?: {
>       api_name?: string | null,
>       id?: string | null
>     } | null | null,
>     Contacts?: {
>       Full_Name?: string | null,
>       Email?: string | null | null,
>       Layout?: {
>         name?: string | null,
>         id?: string | null
>       } | null,
>       Locked__s?: boolean | null,
>       Account_Name?: {
>         id?: string | null,
>         name?: string | null,
>         Locked__s?: boolean | null
>       } | null | null,
>       $editable?: boolean | null,
>       id?: string | null,
>       $approval_state?: string | null,
>       Data_Processing_Basis?: string | null | null
>     }[] | null | null,
>     Accounts?: {
>       Phone?: string | null | null,
>       Account_Type?: string | null | null,
>       Website?: string | null | null,
>       Account_Name?: string | null,
>       $editable?: boolean | null,
>       Locked__s?: boolean | null,
>       $approval_state?: string | null,
>       id?: string | null
>     }[] | null | null,
>     preference_field_matched_value?: {
>       Contacts?: {
>         field?: {
>           api_name?: string | null,
>           field_label?: string | null,
>           unique?: boolean | null | null,
>           id?: string | null
>         } | null,
>         matched_lead_value?: string | null
>       }[] | null | null,
>       Accounts?: {
>         field?: {
>           api_name?: string | null,
>           field_label?: string | null,
>           unique?: boolean | null | null,
>           id?: string | null
>         } | null,
>         matched_lead_value?: string | null
>       }[] | null | null
>     } | null | null,
>     modules_with_multiple_layouts?: {
>       api_name?: string | null,
>       id?: string | null
>     }[] | null | null
>   } | null
> } | {
>   success: true
> }
> ```

***

## Mail Merge

### download

`mailMerge.download`

Download mail merge document. To download the merged document created from a mail merge template for a specific record in your Zoho CRM organization. You can choose the output format as pdf, html, or docx, and optionally set a password for PDF documents.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.mailMerge.download({
	moduleApiName: 'Leads',
	recordId: 1,
	download_mail_merge: [{
		mail_merge_template: { name: 'example' },
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `moduleApiName` | `string` | Yes | Specify the API name of the CRM module for which you want to perform the mail merge action. Refer to the [Get Modules](modules.yaml#\$.paths./settings/modules.get) resource for valid values. |
| `recordId` | `number \| string` | Yes | Specify the unique ID of the record for which you want to perform the mail merge action. |
| `download_mail_merge` | `object[]` | Yes | Represents the list of download mail merge request objects. Contains one object per request. |

> [accordion] download\_mail\_merge full type
>
> ```ts theme={null}
> {
>   mail_merge_template: {
>     name: string
>   },
>   output_format?: pdf | html | docx,
>   file_name?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `download_mail_merge` | `object[] \| null` | No | Represents the list of download mail merge response objects. |

> [accordion] download\_mail\_merge full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### send

`mailMerge.send`

Send mail merge email. To send a personalized email to one or more recipients using a mail merge template associated with a specific record in your Zoho CRM organization. You can include recipients in the To, CC, and BCC fields, and optionally attach the merged document either as an inline image or a separate file. Sends the merged document by email.

**Risk:** `destructive`

```ts theme={null}
await corsair.zohocrm.api.mailMerge.send({
	moduleApiName: 'Leads',
	recordId: 1,
	send_mail_merge: [{
		mail_merge_template: { name: 'example' },
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `moduleApiName` | `string` | Yes | Specify the API name of the CRM module for which you want to perform the mail merge action. Refer to the [Get Modules](modules.yaml#\$.paths./settings/modules.get) resource for valid values. |
| `recordId` | `number \| string` | Yes | Specify the unique ID of the record for which you want to perform the mail merge action. |
| `send_mail_merge` | `object[]` | Yes | Represents the list of send mail merge request objects. Contains one object per request. |

> [accordion] send\_mail\_merge full type
>
> ```ts theme={null}
> {
>   bcc_email?: {
>     type: string,
>     value: string
>   }[],
>   mail_merge_template: {
>     name: string
>   },
>   subject?: string,
>   cc_email?: {
>     type: string,
>     value: string
>   }[],
>   attachment_name?: string,
>   to_address?: {
>     type: string,
>     value: string
>   }[],
>   type?: inline | attachment,
>   message?: string,
>   from_address?: {
>     type: string,
>     value: string
>   }
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `send_mail_merge` | `object[] \| null` | No | Represents the list of send mail merge response objects. |

> [accordion] send\_mail\_merge full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     report_link?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### sign

`mailMerge.sign`

Send mail merge document for signing. To send a merged document to one or more recipients for signing or approval using a mail merge template associated with a specific record in your Zoho CRM organization. Before using this operation for the first time, you must access the Merge and Sign dialog in the Zoho Writer UI once. Sends the merged document for signature with Zoho Sign.

**Risk:** `destructive`

```ts theme={null}
await corsair.zohocrm.api.mailMerge.sign({
	moduleApiName: 'Leads',
	recordId: 1,
	sign_mail_merge: [{
		file_name: 'example',
		mail_merge_template: { name: 'example' },
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `moduleApiName` | `string` | Yes | Specify the API name of the CRM module for which you want to perform the mail merge action. Refer to the [Get Modules](modules.yaml#\$.paths./settings/modules.get) resource for valid values. |
| `recordId` | `number \| string` | Yes | Specify the unique ID of the record for which you want to perform the mail merge action. |
| `sign_mail_merge` | `object[]` | Yes | Represents the list of sign mail merge request objects. Contains one object per request. |

> [accordion] sign\_mail\_merge full type
>
> ```ts theme={null}
> {
>   sign_in_order?: boolean,
>   signers?: {
>     recipient: {
>       type: email | merge_field,
>       value: string
>     },
>     recipient_name: string,
>     action_type: sign | approve
>   }[],
>   mail_merge_template: {
>     name: string
>   },
>   file_name: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `sign_mail_merge` | `object[] \| null` | No | Represents the list of sign mail merge response objects. |

> [accordion] sign\_mail\_merge full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     sign_resource_id?: string | null,
>     report_link?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

## Map Dependencies

### create

`mapDependencies.create`

Create a field dependency for a layout. To create a field dependency between a parent picklist field and a child picklist field for a specific layout in your Zoho CRM organization. Prerequisites - The selected layout must contain at least two option-based fields.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.mapDependencies.create({
	module: 'Leads',
	layoutId: '4876876000000333001',
	map_dependency: [{
		parent: { id: '4876876000000333001' },
		child: { id: '4876876000000333001' },
		pick_list_values: [{
			id: '4876876000000333001',
			maps: [{ id: '4876876000000333001' }],
		}],
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the API name of the module. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to get the valid API names. |
| `layoutId` | `string` | Yes | Specify the unique identifier of the layout. Use the [Get Layouts API](layouts.yaml#\$./settings/layouts.get) to get the ID of the layout. |
| `csrfToken` | `string` | No | Specify the CSRF token for additional request validation in server-side integrations. |
| `map_dependency` | `object[]` | Yes | Specify the field dependency configuration to create. |

> [accordion] map\_dependency full type
>
> ```ts theme={null}
> {
>   parent: {
>     id: string,
>     api_name?: string
>   },
>   child: {
>     id: string,
>     api_name?: string
>   },
>   pick_list_values: {
>     id: string,
>     actual_value?: string,
>     display_value?: string,
>     maps: {
>       id: string,
>       actual_value?: string,
>       display_value?: string
>     }[]
>   }[]
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `map_dependency` | `object[] \| null` | No | Contains the result of the create operation. |

> [accordion] map\_dependency full type
>
> ```ts theme={null}
> {
>   status?: string | null,
>   code?: string | null,
>   message?: string | null,
>   details?: {
>     id?: string | null
>   } | null
> }[] | null
> ```

***

### delete

`mapDependencies.delete`

Delete a field dependency. To delete a specific field dependency from a layout in your Zoho CRM organization. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.mapDependencies.delete({ module: 'Leads', layoutId: '4876876000000333001', dependencyId: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the API name of the module. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to get the valid API names. |
| `layoutId` | `string` | Yes | Specify the unique identifier of the layout. Use the [Get Layouts API](layouts.yaml#\$./settings/layouts.get) to get the ID of the layout. |
| `dependencyId` | `string` | Yes | Specify the unique identifier of the map dependency to retrieve, update, or delete. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `map_dependency` | `object[] \| null` | No | Contains the result of the delete operation. |

> [accordion] map\_dependency full type
>
> ```ts theme={null}
> {
>   status?: string | null,
>   code?: string | null,
>   message?: string | null,
>   details?: {
>     id?: string | null
>   } | null
> }[] | null
> ```

***

### get

`mapDependencies.get`

Get a field dependency by ID. To retrieve the complete details of a specific field dependency from a layout in your Zoho CRM organization, including all picklist value mappings.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.mapDependencies.get({ module: 'Leads', layoutId: '4876876000000333001', dependencyId: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the API name of the module. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to get the valid API names. |
| `layoutId` | `string` | Yes | Specify the unique identifier of the layout. Use the [Get Layouts API](layouts.yaml#\$./settings/layouts.get) to get the ID of the layout. |
| `dependencyId` | `string` | Yes | Specify the unique identifier of the map dependency to retrieve, update, or delete. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   map_dependency?: {
>     parent?: {
>       id?: string | null,
>       api_name?: string | null
>     } | null,
>     child?: {
>       id?: string | null,
>       api_name?: string | null
>     } | null,
>     pick_list_values?: {
>       id?: string | null,
>       actual_value?: string | null,
>       display_value?: string | null,
>       maps?: {
>         id?: string | null,
>         actual_value?: string | null,
>         display_value?: string | null
>       }[] | null
>     }[] | null,
>     internal?: boolean | null,
>     active?: boolean | null,
>     id?: string | null,
>     source?: number | null,
>     category?: number | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### list

`mapDependencies.list`

Get field dependencies for a layout. To retrieve the list of field dependencies configured for a specific layout in your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.mapDependencies.list({ layoutId: '4876876000000333001', module: 'Leads' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `layoutId` | `string` | Yes | Specify the unique identifier of the layout. Use the [Get Layouts API](layouts.yaml#\$./settings/layouts.get) to get the ID of the layout. |
| `module` | `string` | Yes | Specify the API name of the module. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to get the valid API names. |
| `page` | `number \| string` | No | Specify the page number to retrieve in the paginated response. |
| `per_page` | `number \| string` | No | Specify the number of records to include on each page of the response. |
| `filters` | `string` | No | Specify the filter criteria for field dependencies in JSON format. Supported filters allow narrowing results by specific field attributes using **comparator** and **field** attributes. Supported comparator values: **equal**, **in**. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   map_dependency?: {
>     parent?: {
>       id?: string | null,
>       api_name?: string | null
>     } | null,
>     child?: {
>       id?: string | null,
>       api_name?: string | null
>     } | null,
>     sub_module?: {
>       id?: string | null,
>       api_name?: string | null
>     } | null | null,
>     internal?: boolean | null,
>     active?: boolean | null,
>     id?: string | null,
>     source?: number | null,
>     category?: number | null
>   }[] | null,
>   info?: {
>     page?: number | null,
>     per_page?: number | null,
>     count?: number | null,
>     more_records?: boolean | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### update

`mapDependencies.update`

Update an existing field dependency. Updates the picklist value mappings for an existing field dependency. Use "\_delete": null to remove specific mappings.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.mapDependencies.update({
	module: 'Leads',
	layoutId: '4876876000000333001',
	dependencyId: 'example',
	map_dependency: [{
		parent: { id: '4876876000000333001' },
		child: { id: '4876876000000333001' },
		pick_list_values: [{
			id: '4876876000000333001',
			maps: [{ id: '4876876000000333001' }],
		}],
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the API name of the module. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to get the valid API names. |
| `layoutId` | `string` | Yes | Specify the unique identifier of the layout. Use the [Get Layouts API](layouts.yaml#\$./settings/layouts.get) to get the ID of the layout. |
| `dependencyId` | `string` | Yes | Specify the unique identifier of the map dependency to retrieve, update, or delete. |
| `map_dependency` | `object[]` | Yes | Specify the field dependency configuration to update. |

> [accordion] map\_dependency full type
>
> ```ts theme={null}
> {
>   parent: {
>     id: string,
>     api_name?: string
>   },
>   child: {
>     id: string,
>     api_name?: string
>   },
>   pick_list_values: {
>     id: string,
>     actual_value?: string,
>     display_value?: string,
>     maps: {
>       id: string,
>       actual_value?: string,
>       display_value?: string,
>       _delete?: null
>     }[]
>   }[],
>   internal?: boolean,
>   active?: boolean,
>   id?: string,
>   source?: number | string,
>   category?: number | string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `map_dependency` | `object[] \| null` | No | Contains the result of the update operation. |

> [accordion] map\_dependency full type
>
> ```ts theme={null}
> {
>   status?: string | null,
>   code?: string | null,
>   message?: string | null,
>   details?: {
>     id?: string | null
>   } | null
> }[] | null
> ```

***

## Mass Actions

### changeOwner

`massActions.changeOwner`

Submit mass change owner job. To bulk update the ownership of records in a specified module based on a Custom View, territory, or field-based criteria in your Zoho CRM organization. You cannot change the owner of related records using this API. You can change the owner of up to 50,000 records in a custom view.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.massActions.changeOwner({
	module: 'Leads',
	cvid: 'example',
	owner: { id: '4876876000000333001' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the API name of the CRM module. Refer to the [Get Modules](modules.yaml#\$.paths./settings/modules.get) resource for valid values. |
| `cvid` | `string` | Yes | Specify the unique ID of the Custom View whose records are to be reassigned. Refer to the [Get Custom Views](custom_views.yaml#\$.paths./settings/custom_views.get) resource for valid values. |
| `owner` | `object` | Yes | Specify the details of the user to assign as the new owner of the selected records. |
| `territory` | `object` | No | Specify the territory to use as the source of records for the ownership change. |
| `criteria` | `object` | No | Specify the criteria to filter which records are included in the ownership change. |

> [accordion] owner full type
>
> ```ts theme={null}
> {
>   id: string
> }
> ```

> [accordion] territory full type
>
> ```ts theme={null}
> {
>   id: string,
>   include_child?: boolean | null
> }
> ```

> [accordion] criteria full type
>
> ```ts theme={null}
> {
>   field: {
>     api_name: string,
>     id?: string
>   },
>   comparator: equal | ends_with | not_equal | greater_than | less_than | not_between | starts_with | between | less_equal | greater_equal,
>   value: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | Contains the job scheduling details returned when the mass change owner request is accepted. |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   status?: string | null,
>   code?: string | null,
>   message?: string | null,
>   details?: {
>     job_id?: string | null
>   } | null
> }[] | null
> ```

***

### convertLeads

`massActions.convertLeads`

Submit mass convert job for leads. To submit a mass convert job that converts lead records into Contacts, Accounts, or Deals in your Zoho CRM organization. The job runs asynchronously and returns a job identifier for status tracking.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.massActions.convertLeads({
	ids: ['4876876000000333001'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `ids` | `string[]` | Yes | The record IDs of the leads you want to convert. Use the [Get Records API](record.yaml#\$.paths./\{module}.get) to get the record IDs. Note that you can give a maximum of up to 50 records IDs in this array. |
| `Deals` | `object` | No | Must contain the mandatory keys "Deal\_Name", "Stage", "Closing\_Date", and "Pipeline"(if enabled), besides the other mandatory fields configured for the Deals module. Note that if there are layouts other than Standard, the custom-defined mandatory fields will not be processed while converting the lead. |
| `assign_to` | `object` | No | Specify the user to assign the converted records to. Refer to the [Get Users](users.yaml#\$.paths./users.get) resource for valid values. |
| `portal_user_type` | `object` | No | Specify the portal user type for the contact created from the converted lead. Refer to the [Get Portal User Types](portal_user_type.yaml#\$.paths./settings/portals/\{portal}/user_type/users.get) resource for valid values. |
| `related_modules` | `object[]` | No | The API name and ID of the modules such as Tasks, Meetings, or Calls. If the lead has one or all of these related records, the owner of these records will be changed to the user given in the "assign\_to" key. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to get the ID of the module. |
| `carry_over_tags` | `object[]` | No | The name and ID of the module you want to associate the tags to while converting the lead. For example, if you give contacts in this array, the tags of the lead will be carried over to the contact that the lead is converted to. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to get the ID of the module. Note that you can carry over tags to Contacts, Deals, and Accounts. |
| `move_attachments_to` | `object` | No | The name and ID of the module you want to move the attachments of the lead to after converting. Use the Modules API to get the ID of the module. Note that you can move the attachments to either Contacts, Deals, or Accounts. |
| `apply_assignment_threshold` | `boolean` | No | Specify whether assignment threshold rules should be applied when assigning the converted records. Possible values: **true** - Apply assignment threshold rules (default). **false** - Skip assignment threshold rules. |

> [accordion] Deals full type
>
> ```ts theme={null}
> {
>   Deal_Name: string
> }
> ```

> [accordion] assign\_to full type
>
> ```ts theme={null}
> {
>   id: string
> }
> ```

> [accordion] portal\_user\_type full type
>
> ```ts theme={null}
> {
>   id: string
> }
> ```

> [accordion] related\_modules full type
>
> ```ts theme={null}
> {
>   api_name: string,
>   id: string
> }[]
> ```

> [accordion] carry\_over\_tags full type
>
> ```ts theme={null}
> {
>   api_name: string,
>   id: string
> }[]
> ```

> [accordion] move\_attachments\_to full type
>
> ```ts theme={null}
> {
>   api_name: string,
>   id: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `code` | `string \| null` | No | Represents the response code indicating the job has been scheduled. Possible values: **SCHEDULED** - The mass convert job has been accepted and scheduled for execution. Example: "SCHEDULED". |
| `message` | `string \| null` | No | Represents the message describing the outcome of the mass convert job scheduling. |
| `status` | `string \| null` | No | Represents the status category of the response. Possible values: *success*\* - The mass convert job was scheduled successfully. Example: "success". |
| `details` | `object \| null` | No | Represents additional details about the scheduled mass convert job, including the job identifier. |

> [accordion] details full type
>
> ```ts theme={null}
> {
>   job_id?: string | null
> } | null
> ```

***

### deleteRecords

`massActions.deleteRecords`

Delete records in bulk by record IDs or Custom View. To delete records in bulk from a specified module in your Zoho CRM organization, either by providing record IDs for synchronous deletion or a Custom View ID for asynchronous batch deletion.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.massActions.deleteRecords({ module: 'Leads' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `Leads \| Accounts \| Contacts \| Deals \| Campaigns \| Tasks \| Calls \| Meetings \| Cases \| Solutions \| Products \| Vendors \| Price_Books \| Quotes \| Sales_Orders \| Purchase_Orders \| Invoices \| Custom \| Services \| Appointments` | Yes | Specify the API name of the CRM module for the mass delete operation. Make a [Get Modules API](modules.yaml#\$.paths./settings/modules.get) call for valid values. |
| `ids` | `string[] \| string[]` | No | — |
| `cvid` | `string \| string` | No | — |
| `territory` | `object` | No | — |

> [accordion] territory full type
>
> ```ts theme={null}
> {
>   id: string,
>   include_child?: boolean
> } | {
>   id: string,
>   include_child?: boolean
> }
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data?: (
>     {
>       status?: string | null,
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         id?: string | null
>       } | null
>     } | {
>       status?: string | null,
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         job_id?: string | null
>       } | null
>     }
>   )[] | null
> } | {
>   data?: (
>     {
>       status?: string | null,
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         id?: string | null
>       } | null
>     } | {
>       status?: string | null,
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         id?: string | null
>       } | null
>     }
>   )[] | null
> }
> ```

***

### deleteTags

`massActions.deleteTags`

Mass delete tags. To schedule a background job that deletes multiple tags in bulk from a single module in your Zoho CRM organization. You can delete tags in bulk from one module per API call.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.massActions.deleteTags({
	mass_delete: [{
		module: { api_name: 'example', id: '4876876000000333001' },
		tags: [{ id: '4876876000000333001' }],
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `mass_delete` | `object[]` | Yes | Specify the list of mass delete tag jobs. Each entry identifies the module and the tags to delete in that module within a single job. |

> [accordion] mass\_delete full type
>
> ```ts theme={null}
> {
>   module: {
>     api_name: string,
>     id: string
>   },
>   tags: {
>     id: string,
>     name?: string
>   }[]
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `status` | `string \| null` | No | Represents the status of the API call. For a scheduled job, the value is success. |
| `code` | `string \| null` | No | Represents the code that identifies the result of scheduling the mass delete tag job. For a successful schedule, the value is SCHEDULED. |
| `message` | `string \| null` | No | Represents the message that describes the outcome of scheduling the mass delete tag job. |
| `details` | `object \| null` | No | Represents the details of the scheduled mass delete tag job, including the job identifier returned by the system. |

> [accordion] details full type
>
> ```ts theme={null}
> {
>   job_id?: string | null
> } | null
> ```

***

### getChangeOwnerStatus

`massActions.getChangeOwnerStatus`

Get mass change owner job status. To retrieve the status of a previously scheduled mass change owner job in your Zoho CRM organization. The OAuth scope enforced is specific to the target module (for example, ZohoCRM.change\_owner.leads.READ for Leads); modules without a dedicated scope fall back to a generic custom-module scope.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.massActions.getChangeOwnerStatus({ module: 'Leads', job_id: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the API name of the CRM module. Refer to the [Get Modules](modules.yaml#\$.paths./settings/modules.get) resource for valid values. **Deals** and **Meetings** are normalized internally to **Potentials** and **Events** respectively before the job's module is checked. |
| `job_id` | `string` | Yes | Specify the unique ID of the mass change owner job returned in the response of [Mass Change Owner API](mass_change_owner.yaml#\$.paths./\{module}/actions/mass_change_owner.post). |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data?: {
>     Status?: string | null,
>     Failed_Count?: number | null,
>     Not_Updated_Count?: number | null,
>     Updated_Count?: number | null,
>     Total_Count?: number | null
>   }[] | null
> } | {
>   code?: string | null,
>   message?: string | null
> } | {
>   success: true
> }
> ```

***

### getConvertLeadsStatus

`massActions.getConvertLeadsStatus`

Get mass convert job status. To retrieve the current status and conversion counts of a previously scheduled mass convert job in your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.massActions.getConvertLeadsStatus({ job_id: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `job_id` | `string` | Yes | Specify the identifier of the mass convert job to retrieve the status for. You can get the Job ID from the response of the [Mass Convert API](mass_convert.yaml#\$.paths./Leads/actions/mass_convert.get). |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data?: {
>     Status?: string | null,
>     Total_Count?: number | null,
>     Converted_Count?: number | null,
>     Not_Converted_Count?: number | null,
>     Failed_Count?: number | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### getDeleteRecordsStatus

`massActions.getDeleteRecordsStatus`

Retrieve mass delete job status. To retrieve the status and record counts of a previously scheduled mass delete job in your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.massActions.getDeleteRecordsStatus({ module: 'Leads', job_id: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `Leads \| Accounts \| Contacts \| Deals \| Campaigns \| Tasks \| Calls \| Meetings \| Cases \| Solutions \| Products \| Vendors \| Price_Books \| Quotes \| Sales_Orders \| Purchase_Orders \| Invoices \| Custom \| Services \| Appointments` | Yes | Specify the API name of the CRM module for the mass delete operation. Make a [Get Modules API](modules.yaml#\$.paths./settings/modules.get) call for valid values. |
| `job_id` | `string` | Yes | Specify the job ID returned in the response of the [Mass Delete API](mass_delete.yaml#\$.paths./\{module}/actions/mass_delete.post). |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data?: {
>     Status?: string | null,
>     Total_Count?: number | null,
>     Deleted_Count?: number | null,
>     Failed_Count?: number | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### getDeleteTagsStatus

`massActions.getDeleteTagsStatus`

Mass Delete Tags Status. To retrieve the current status, the scheduled time, and the success and failure counts for a previously scheduled mass delete tag job in your Zoho CRM organization, using the job ID returned by the Mass Delete Tags POST operation.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.massActions.getDeleteTagsStatus({ job_id: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `job_id` | `string` | Yes | Specify the unique identifier of the mass delete tag job for which you want to retrieve the status. Use the job ID returned by the [Mass Delete Tags API](mass_delete_tags.yaml#\$.paths./settings/tags/actions/mass_delete.post). |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   mass_delete?: {
>     job_id?: string | null,
>     status?: string | null,
>     created_time?: string | null,
>     total_count?: number | null,
>     failed_count?: number | null,
>     deleted_count?: number | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### getUpdateRecordsStatus

`massActions.getUpdateRecordsStatus`

Get mass update job status. To retrieve the current status and record-processing counts of an asynchronous mass update job that was previously scheduled in your Zoho CRM organization. The job is identified by the job\_id returned in the response of the scheduler-type mass update request.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.massActions.getUpdateRecordsStatus({ module: 'Leads', job_id: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `Leads \| Accounts \| Contacts \| Deals \| Campaigns \| Tasks \| Calls \| Meetings \| Cases \| Solutions \| Products \| Vendors \| Price_Books \| Quotes \| Sales_Orders \| Purchase_Orders \| Invoices \| Custom` | Yes | Specify the API name of the CRM module on which the mass update operation must be performed. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to fetch the valid API name of the module. |
| `job_id` | `string` | Yes | Specify the unique ID of the mass update job whose status must be retrieved. This is the `job_id` returned in the response of the [Mass Update API](mass_update.yaml#\$/\{module}/actions/mass_update.post) request. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data?: {
>     Status?: string | null,
>     Failed_Count?: number | null,
>     Updated_Count?: number | null,
>     Not_Updated_Count?: number | null,
>     Total_Count?: number | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### updateRecords

`massActions.updateRecords`

Mass update records. To update a specific field value across multiple records of a module in your Zoho CRM organization in a single API call. The operation supports two modes.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.massActions.updateRecords({
	module: 'Leads',
	data: [{}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `Leads \| Accounts \| Contacts \| Deals \| Campaigns \| Tasks \| Calls \| Meetings \| Cases \| Solutions \| Products \| Vendors \| Price_Books \| Quotes \| Sales_Orders \| Purchase_Orders \| Invoices \| Custom` | Yes | Specify the API name of the CRM module on which the mass update operation must be performed. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to fetch the valid API name of the module. |
| `data` | `object[]` | Yes | Specify the array of objects, where each object maps a field's API name to the new value to be applied across the targeted records. The key must be provided along with either `ids` or `cvid`. |
| `ids` | `string[]` | No | Specify the record IDs to be mass updated synchronously. Use `ids` for non-scheduler updates that target a small batch of records and require immediate processing. Use the [Get Records API](record.yaml#\$.paths./\{module}.get) to get the valid IDs of the required records. > **Note**: > - You can use either **ids** key or the **cvid** key, you cannot use them both in a request. > - Scheduler type(using record IDs): > - You can mass update a maximum of 50,000 records in a single API call. > - Automation rules are triggered automatically when the record count is less than 1000. When the record count is greater than 1000, automation rules do not get triggered. > - If some of the records have invalid data, only those records will not be processed in the API call. > - Non-scheduler type(using CVID and territory ID): > - You can mass update a maximum of 500 records in a single API call. > - Automation rules such as approvals, blueprints, and workflows are triggered automatically. > - When you want to mass update records in a territory, you must specify the custom view ID. > - You cannot mass update Email, lookup fields, layout fields, multi-line fields, and line items. > - You can mass update up to three fields in the Deals module and only one field in all other modules in a single API call. |
| `cvid` | `string` | No | Specify the Custom View ID whose matching records must be mass updated. Use `cvid` to schedule an asynchronous background job that processes the records in the Custom View. Use the [Get Custom View API](custom_views.yaml#\$.paths./settings/custom_views.get) to get the ID of the requires custom view. The response returns a `job_id` that can be passed to [Get Mass Update Status API](mass_update.yaml#\$.paths./\{module}/actions/mass_update.get) to track the progress of the scheduled job. > **Note**: > The cvid key is supported for mass update via API in the following editions: > - Enterprise > - Ultimate > - CRM Plus > - Zoho One Enterprise |
| `territory` | `object` | No | Specify the territory whose records must be mass updated. This key is valid only when you provide a Custom View ID in `cvid`. |

> [accordion] data full type
>
> ```ts theme={null}
> {
> }[]
> ```

> [accordion] territory full type
>
> ```ts theme={null}
> {
>   id: string,
>   include_child?: boolean
> }
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data?: {
>     code?: string | null,
>     details?: {
>       job_id?: string | null
>     } | {
>       id?: string | null,
>       Modified_Time?: string | null,
>       Modified_By?: {
>         id?: string | null,
>         name?: string | null
>       } | null,
>       Created_By?: {
>         id?: string | null,
>         name?: string | null
>       } | null,
>       Created_Time?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   data?: any & any | null
> }
> ```

***

## Meetings

### cancel

`meetings.cancel`

Cancel a Meeting. To cancel a meeting and send an email regarding the meeting cancellation to the participants. A meeting can only be cancelled if attendees have already been invited and the meeting has not passed its scheduled end time. With send\_cancelling\_mail: true every participant gets a cancellation email; with false the meeting is cancelled without one.

**Risk:** `destructive`

```ts theme={null}
await corsair.zohocrm.api.meetings.cancel({
	event: 'example',
	data: [{ send_cancelling_mail: true }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `event` | `string` | Yes | This refers to the Event's id that need to be cancel |
| `data` | `object[]` | Yes | Array containing the cancellation notification preference. Mandatory. |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   send_cancelling_mail: boolean,
>   cancelled_by?: {
>     id: string
>   }
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | Array containing the cancellation result for the meeting. |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   message?: string | null,
>   status?: string | null,
>   details?: {
>     id?: string | null
>   } | null
> }[] | null
> ```

***

## Modules

### create

`modules.create`

Create a custom module. To create a custom module in your Zoho CRM organization. Only one module can be created per request. The required permission depends on the access type: Crm\_Implied\_Customize\_Zoho\_CRM for org-based modules and Crm\_Implied\_Create\_Team\_Module for team-based modules.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.modules.create({
	modules: [{}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `modules` | `any[]` | Yes | Specify the module definitions to create. Only one module definition object can be included per request. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `modules` | `object[] \| null` | No | Represents the array containing the result of the single module creation request. Contains exactly one item for each module creation request. |

> [accordion] modules full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### generateLink

`modules.generateLink`

Generate web-tab link for a module. To generate the configured web-tab link for a specific module in your Zoho CRM organization. The moduleid path parameter must be the module's API name (e.g., Leads, Contacts, Custom\_Module\_1).

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.modules.generateLink({ moduleid: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `moduleid` | `string` | Yes | Specify the API name of the module for which the web tab link has to be generated. This is case-sensitive Case-sensitive and should start with a letter and contain only alphanumeric characters and underscores. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   generate_link?: {
>     name?: string | null,
>     id?: string | null,
>     web_link?: string | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### get

`modules.get`

Get module metadata by API name. Retrieves complete metadata for a specific CRM module identified by its API name, including fields, layouts, profiles, related lists, and feature capabilities. Returns 204 when the module is not available through this endpoint, or 400 when the identifier is invalid or the module is unsupported.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.modules.get({ moduleIdentifier: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `moduleIdentifier` | `string \| string` | Yes | Specify the module identifier, either the numeric module ID or the module API name(case-sensitive). |
| `fields` | `string[]` | No | Specify the module property names to include in the response. Accepts an array of property names to filter the returned module fields. |
| `include_inner_details` | `string` | No | Specify the nested field paths to include additional inner details in the module response. Accepts comma-separated values. Allows requesting extra metadata beyond the default module fields(for example fields.lookup.query\_details.criteria.) |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   modules?: {
>     global_search_supported?: boolean | null,
>     public_fields_configured?: boolean | null,
>     recycle_bin_on_delete?: boolean | null,
>     has_more_profiles?: boolean | null,
>     sub_menu_available?: boolean | null,
>     lookupable?: boolean | null,
>     profile_count?: number | null,
>     module_type?: string | null,
>     cc_enabled?: boolean | null,
>     deletable?: boolean | null,
>     description?: string | null | null,
>     source?: string | null,
>     creatable?: boolean | null,
>     inventory_template_supported?: boolean | null,
>     modified_time?: string | null | null,
>     presence_sub_menu?: boolean | null,
>     triggers_supported?: boolean | null,
>     id?: string | null,
>     api_name?: string | null,
>     plural_label?: string | null,
>     actual_plural_label?: string | null,
>     actual_singular_label?: string | null,
>     singular_label?: string | null,
>     isBlueprintSupported?: boolean | null,
>     visibility?: number | null,
>     convertable?: boolean | null,
>     editable?: boolean | null,
>     emailTemplate_support?: boolean | null,
>     email_parser_supported?: boolean | null,
>     filter_supported?: boolean | null,
>     show_as_tab?: boolean | null,
>     web_link?: string | null | null,
>     viewable?: boolean | null,
>     api_supported?: boolean | null,
>     quick_create?: boolean | null,
>     generated_type?: string | null,
>     static_subform_properties?: {
>       fields?: {
>         api_name?: string | null,
>         id?: string | null
>       }[] | null
>     } | null,
>     feeds_required?: boolean | null,
>     scoring_supported?: boolean | null,
>     webform_supported?: boolean | null,
>     arguments?: {
>       name?: string | null,
>       value?: string | null
>     }[] | null,
>     module_name?: string | null,
>     business_card_field_limit?: number | null,
>     access_type?: string | null,
>     private_profile?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     track_current_data?: boolean | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     profiles?: {
>       id?: string | null,
>       name?: string | null
>     }[] | null,
>     parent_module?: {
>       api_name?: string | null,
>       id?: string | null
>     } | null,
>     $field_states?: string[] | null | null,
>     business_card_fields?: (
>       {
>         api_name?: string | null,
>         id?: string | null
>       } | string
>     )[] | null,
>     per_page?: number | null,
>     $properties?: (string | {
>     })[] | null | null,
>     $on_demand_properties?: string[] | null | null,
>     search_layout_fields?: string[] | null,
>     kanban_view_supported?: boolean | null,
>     lookup_field_properties?: {
>     } | null | null,
>     kanban_view?: boolean | null,
>     chart_view?: boolean | null,
>     chart_view_supported?: boolean | null,
>     related_lists?: {
>       id?: string | null,
>       sequence_number?: string | null,
>       display_label?: string | null,
>       api_name?: string | null,
>       module?: {
>       } | null | null,
>       name?: string | null,
>       action?: string | null | null,
>       href?: string | null | null,
>       type?: string | null,
>       connectedlookupApiName?: string | null,
>       field_enabled?: boolean | null,
>       customize_sort?: boolean | null,
>       customize_fields?: boolean | null,
>       customize_display_label?: boolean | null,
>       status?: string | null,
>       sort_by?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       sort_order?: string | null | null,
>       fields?: {
>         id?: string | null,
>         api_name?: string | null
>       }[] | null,
>       visibility?: number | null,
>       personality_name?: string | null,
>       record_operations?: {
>         edit?: boolean | null,
>         create?: boolean | null,
>         bulk_edit?: boolean | null,
>         delete?: boolean | null,
>         disassociate?: boolean | null,
>         assign?: boolean | null
>       } | null,
>       connectedmodule?: string | null | null,
>       linkingmodule?: string | null | null,
>       parent_related_lists?: {
>         api_name?: string | null,
>         id?: string | null
>       }[] | null | null,
>       _layout_specific_properties?: {
>         sequence_number?: number | null,
>         layout?: {
>           name?: string | null,
>           id?: string | null
>         } | null
>       }[] | null
>     }[] | null,
>     filter_status?: boolean | null,
>     related_list_properties?: {
>     } | null | null,
>     display_field?: string | {
>       api_name?: string | null,
>       id?: string | null
>     } | null | null,
>     layouts?: {
>       has_more_profiles?: boolean | null,
>       created_time?: string | null | null,
>       modified_time?: string | null | null,
>       visible?: boolean | null,
>       source?: string | null,
>       id?: string | null,
>       name?: string | null,
>       api_name?: string | null,
>       display_label?: string | null,
>       status?: string | null,
>       show_business_card?: boolean | null,
>       generated_type?: string | null,
>       created_for?: string | null | null,
>       convert_mapping?: {
>         Contacts?: {
>           display_label?: string | null,
>           name?: string | null,
>           id?: string | null
>         } | null,
>         Deals?: {
>           fields?: {
>             api_name?: string | null,
>             field_label?: string | null,
>             id?: string | null,
>             required?: boolean | null
>           }[] | null,
>           display_label?: string | null,
>           name?: string | null,
>           id?: string | null
>         } | null,
>         Accounts?: {
>           display_label?: string | null,
>           name?: string | null,
>           id?: string | null
>         } | null,
>         Invoices?: {
>           display_label?: string | null,
>           name?: string | null,
>           id?: string | null
>         } | null,
>         SalesOrders?: {
>           display_label?: string | null,
>           name?: string | null,
>           id?: string | null
>         } | null
>       } | null,
>       modified_by?: {
>         name?: string | null,
>         id?: string | null
>       } | null | null,
>       profiles?: {
>         default?: boolean | null,
>         name?: string | null,
>         id?: string | null,
>         _default_view?: {
>           name?: string | null,
>           id?: string | null,
>           type?: string | null
>         } | null,
>         _default_assignment_view?: {
>           name?: string | null,
>           id?: string | null,
>           type?: string | null
>         } | null
>       }[] | null,
>       created_by?: {
>         name?: string | null,
>         id?: string | null
>       } | null | null,
>       sections?: {
>       }[] | null,
>       actions_allowed?: {
>         edit?: boolean | null,
>         rename?: boolean | null,
>         clone?: boolean | null,
>         downgrade?: boolean | null,
>         delete?: boolean | null,
>         deactivate?: boolean | null,
>         set_layout_permissions?: boolean | null
>       } | null
>     }[] | null,
>     fields?: {
>     }[] | null,
>     custom_view?: {
>       cross_filters?: {
>       }[] | null,
>       $modified_criteria?: boolean | null,
>       display_value?: string | null,
>       system_name?: string | null | null,
>       category?: string | null,
>       created_time?: string | null | null,
>       modified_time?: string | null | null,
>       last_accessed_time?: string | null | null,
>       name?: string | null,
>       created_by?: {
>         name?: string | null,
>         id?: string | null
>       } | null | null,
>       modified_by?: {
>         name?: string | null,
>         id?: string | null
>       } | null | null,
>       module?: {
>         api_name?: string | null,
>         id?: string | null
>       } | null,
>       criteria?: {
>         comparator?: string | null,
>         field?: {
>           api_name?: string | null,
>           id?: string | null
>         } | null,
>         type?: string | null,
>         value?: any | null
>       } | null | null,
>       default?: boolean | null,
>       system_defined?: boolean | null,
>       locked?: boolean | null | null,
>       favorite?: number | null | null,
>       offline?: boolean | null,
>       access_type?: string | null,
>       shared_to?: (
>         {
>           subordinates?: boolean | null | null,
>           type?: string | null,
>           name?: string | null,
>           id?: string | null
>         } | {
>           subordinates?: boolean | null | null,
>           type?: string | null,
>           name?: string | null,
>           id?: string | null
>         }
>       )[] | null | null,
>       fields?: {
>         id?: string | null,
>         api_name?: string | null,
>         _pin?: boolean | null
>       }[] | null,
>       sort_by?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null | null,
>       sort_order?: string | null | null,
>       wrap_text?: boolean | null,
>       id?: string | null
>     } | null | null,
>     zia_view?: boolean | null,
>     default_mapping_fields?: {
>       api_name?: string | null,
>       id?: string | null
>     }[] | null,
>     activity_badge?: string | null,
>     status?: string | null,
>     sequence_number?: number | null,
>     $others_awaiting?: boolean | null,
>     territory?: {
>       name?: string | null,
>       id?: string | null,
>       subordinates?: boolean | null
>     } | null | null,
>     showleadchainsync?: boolean | null,
>     show_social?: boolean | null,
>     show_visitor?: boolean | null,
>     show_googlesync?: boolean | null,
>     showtiktoksync?: boolean | null,
>     show_webform?: boolean | null,
>     showfacebooksync?: boolean | null,
>     show_emailparser?: boolean | null,
>     showlinkedinsync?: boolean | null,
>     masked_fields_count?: number | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### list

`modules.list`

Retrieve modules. Retrieves the list of all modules available in the Zoho CRM account, including standard, custom, subform, and linking (MxN) modules. Supports optional filtering by status, feature\_name, and include to control the scope and depth of the response.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.modules.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `status` | `string` | No | Specify the visibility status to filter the modules returned in the response. Accepts comma-separated values to retrieve modules matching any of the specified statuses. This is case-sensitive. |
| `feature_name` | `Kiosk_Test_Run \| sales_motivator_games_users \| functions \| linkingmodule_custom_field_long_integer \| smart_prompt_zia_llm \| voc_parent \| linkingmodule_custom_field_dataparam \| mb_delete_limit_popup \| unsubscribe \| query_sources \| field_updates \| crl_queries_click \| web_case \| google_instant_booking \| emailsai_summary_translation \| ASKZIA_MODULE_CREATION \| static_subform_max_rows \| triggers \| public_field \| custom_field_datetime \| extensions \| mass_email \| nextgenui_new_panel_enabled \| connected_workflows_limit \| CANVAS_META_CACHE_REVERTER \| send_mail_attachments_total_count \| date_queries \| production_tracking \| nbx_early_access \| picklist colour coding V2 \| custom_field_dataparam \| teammodule_custom_field \| address_field_enabled \| data_storage_count \| privacy_modules \| email_relay \| manage_signals \| wizard_cross_screen_fields_in_criteria \| page_layout \| sample_subfeature_1 \| zoho_reports \| hipaa_compliance \| custom_dashboards \| imap \| Kiosk_Screens \| abm \| massconvert_dealcreation_newflow \| best_mode_to_contact_special_access \| action_field_update_product_configurator \| send_mail_inventory_module \| bounce_email_block \| reports \| personal_health_fields \| Lead_Status_Mapping \| CANVAS_META_CACHE \| analytics \| create_record \| anomaly_notifications \| organize_tabs \| wf_di_notification \| pathfinder_processing_count \| Kiosk \| detailview_customization \| orchestration_execution_limit \| export \| picklist colour coding \| detailview_canvasrules \| duplicate_check_preference \| bigin_domain_mapping \| web_tabs \| Kiosk_GetRecords_Fetch_limit \| custom_field_decision_box \| emailsai_test_account \| notes_short_content \| lookup_filter_new_mapping \| email_notifications \| exchange \| portal_readonlymodule \| custom_field_imageupload \| bcc_dropbox \| gsuite \| writing_assistant \| adwords \| roles \| voc \| consent_email \| disable_nio_flow \| custom_button_api_name_page_lyte \| linkingmodule_custom_field_radio \| firstname_limit_increase_revert \| autofollowup_rules \| microsoft_office \| support_access \| records_limit_custom_view \| zoho_mobile_edition \| outlook \| DATA_BRIDGE \| association_per_global_field \| subform_custom_field_check_box \| WF_BH_FLOW_CHANGE \| rfm_segmentation_contribution_module \| bulk_write \| file_storage_per_user \| event_rsvp_update \| slack \| custom_related_list \| cscript_dotsdk_spec_flow \| QuickML_Integration \| zia_config \| linkingmodule_custom_field_date \| mass_convert \| price_rule_volume \| smart_prompt_new_bot \| zia_agent_in_cb \| kiosk_versions_wise \| record_level_sharing_groups \| linkingmodule_custom_field_rich_text \| printview_customization \| LZ_FAAS_TEST \| linkingmodule_custom_field_imageupload \| related_list_customization \| portals_signup_form \| gdpr_lyte_revamp \| zia_agent \| email_storage_ui \| email_templates_attachments_total_size \| global_picklist_colourCode \| zoho_projects \| Stage_Probability_Mapping \| email_parser \| web_apps \| email_intent_workflow \| FX_CREDITS_STATIC_ISSUE_FIX \| Stage_Used_Option_Count \| user_licenses \| data_storage \| REPORT_FORMULA_DYNAMIC_GROUP_LIMIT \| Kiosk_Components \| zoho_campaigns \| canvas_reusable_component \| comparator \| custom_field_date \| custom_field_text_area \| web_vendor \| abm_segment_export \| Kiosk_GetRecord_Selection_Limit \| organization_emails \| cscript_mxn_field \| email_storage_trigger_resync \| wizards \| email_storage_phase2 \| functions_minimum_calls \| voc_inventory \| external_share_record \| email_authentication \| microsoft_teams \| smart_prompt_googleai_llm \| pages \| wizard_cscript_transition_begin \| best_time_to_contact \| zia_vision \| zoho_fsm \| zia_summary \| zoho_contracts \| zia_summary_multilanguage_support \| custom_field_url \| sales_motivator_dashboards \| detailview_canvasfiles \| custom_field_phone \| linkingmodule_custom_field_lookup \| schedule_mail \| mobilecanvas_kiosk_support \| zia_sales_recommendation \| business_card \| shift_hours \| instant_sync_cvid \| CHATBOT_MULTILINGUAL \| firstname_limit_increase \| used_option_count \| smart_prompt_in_cb \| calendar_schedule_user_event \| rfm_record_processing_count \| linkingmodule_custom_field_url \| path_finder_version_wise \| unused_option_count \| record_tags_count \| emailConfigFeatures \| zoho_expense \| bounce_email \| next_best_action \| field_level_security \| portal_personalitymodule \| domain_mappings \| custom_function_upgrade \| gmail_rest_api \| custom_field_check_box \| talk_with_us_zoho_voice_call \| email_workflow \| intergration \| sandbox \| AUTOMATIC_ANOMALY_ENCH_2 \| notify_owner \| mobiledetailview_customization \| territory_management \| custom_field_formula \| copy_customization \| form_rules_actions \| functions_limits \| scoring_rules \| sales_signals_mobile_notification_support \| custom_link \| Stage_Total_Option_Count \| inventory_management \| accessibility \| team_module_requester_settings \| dxeditor_m1 \| email_templates \| auto_response_rules \| campaign_hierarchy_depth \| sandbox_email_support \| journey_limit_increase \| Bundles__s \| excluded_profiles \| subform_allowed_file_limit \| abm_product \| MS_GRAPH_API \| sales_motivator_dashboards_comp \| zia_score_special_access \| feeds_autofollowuprules_support \| zoho_circuits_pricing \| linkingmodule_custom_field_fileupload \| email_duplication \| linkingmodule_custom_field_percentage \| webform_multidomain \| bigin_dashboards_new_signup \| abm_widget \| zia_call_transcription_cops \| email_credibility \| scheduled_mass_email \| emailparser \| FormviewCustomization \| custommodule \| zcircuits_free_execution_per_month \| orchestration_actions \| homepage_report_components \| BUSINESS_HOURS_SANDBOX \| business_hours \| pdf_sendmail_to_contacts \| auto_responders \| custom_field_small_text_area \| zia_record_summary_special_access \| orchestration_versions_wise \| mail_merge \| connected_workflows \| multicurrency \| zoho_invoice \| file_storage_base \| data_sharing_rules_criteria \| linkingmodule_custom_field_decimal \| waterfall \| connected_records \| web_multimodule_fields \| ListviewCustomization \| activity_badge_upgrade \| abm_contact \| record_level_sharing_indirect_groups \| homepage_components \| abm_plus \| form_rules \| services \| mail_apps \| validation_rule_custom_function \| linkingmodule_custom_field_phone \| payments_integration \| cscript_reports \| store_widget \| custom_field_long_integer \| workflow_rules_summary \| chart \| multipipelines \| cscript_commands \| REPORT_FORMULA_DYNAMIC_SELECT_LIMIT \| text_case_intelligence \| zoho_sign \| voc_sales \| zoho_mail \| record_clone \| multi_page_layout \| input_options_gs \| custom_ai_solutions \| portal_users_store_widget \| holidays \| component_suggestion_early_access \| cscript_dotsdk_new_flow \| email_emotion_analysis \| linkedIn_sales_navigator \| chat_support \| cscript_support_in_portals \| custom_field_integer \| subform_custom_field_large_text_area \| custom_link_new_tab \| recommendation_early_access_new_dc \| custom_field_email \| tiktok_leadchain \| MS_21VIANET \| webform_abtesting \| abm_churn \| telephony \| large_global_set \| mass_delete \| portal_users \| portal_authorizationmodule \| form_rules_branch_criteria_per_condition \| import \| subform_custom_field_small_text_area \| module_builder_new_ui \| zoho_forms \| subform_multiple_fileupload \| ZOHOCPQ \| abm_voc \| team_module_requester_settings_disable \| global_picklists \| live_chat \| zoho_support \| calendar_schedule_team_event \| zoho_circuits \| encrypt_field \| activity_calendar \| disable_ecw_recipient \| zia_call_analytics_automation \| switch_edition \| mb_lyte_qc_enabled \| homeview_customization \| Kiosk_GetRecords_Fetch \| blueprint_states \| calendar_schedule_team_call \| funnel \| subform_encrypt_field \| subform_custom_field_text_area \| CANVAS_BP_MANDATORY_CSCRIPT \| zia_summary_special_access \| ews_mailapps_integ \| datahub \| hamburger_menu_recommended_section \| abm_account \| twitter \| smart_prompt_anthropic_llm_special_access \| zcircuits_free_execution_per_user \| sales_motivator_games_rules \| Kiosk_Screen_Max_Buttons \| quadrant \| custom_reports \| sentiment_analysis \| webform analytics cleanup duration \| system_address_field_enabled \| custom_field_radio \| criteria_entities_product_configurator \| web_custommodule \| CLIENTPORTAL_FOOTER_HIDING \| zia_supported_deployment \| zoho_bookings \| price_rule_direct \| blueprint_transitions \| linkingmodule_custom_field_radiobutton \| custom_field_currency \| calendar_schedule_user \| enable_record_state \| form_rules_primary_condition \| module_deleted_core_flow \| call_transcription_early_access \| emailsai_selfmarketing \| disable_composer_default_spellcheck \| zoho_showtime \| schedule_mass_operation \| emails_ai \| Zoho_Docs \| custom_field_cfpool_userlookup \| gsearch_auto_complete \| blueprint_transition_during_fields \| google_calendar \| cscript_preload \| nextgenui_setuphome_enabled \| guided_selling \| emailFeatures \| api_trigger_limit \| smart_prompt_in_cb_special_access \| visitor_tracking \| mb_new_header \| REPORT_FORMULA_DYNAMIC_CRITERIA_LIMIT \| abm_deal \| rename_tabs \| cscript_subform_row_lock_function \| notes_badge_listview \| smart_prompt_cohere_llm \| validation_rules \| zia_conversation_summary_special_access \| subform_module_max_rows_crud \| linkingmodule_custom_field_decision_box \| zone \| bigin_dashboards_enabled \| global_picklist_per_module \| ear_for_email \| external_field \| cscript_multiuserlookup_field \| rules_limit_per_module \| marketplace \| linkingmodule_custom_field_text_area \| portal_users_new \| Translation_Workbench \| dynamic_lookup_filter \| subform \| linkingmodule_custom_field_text \| homepage_quick_link_components \| validation_rule_primary_condition \| forecasts \| mobilecanvas_navigator \| automation_new_massmail_sources_enabled \| Kiosk_Draft_Execution \| Lyte_Stage_Probability_Mapping \| cpq_dashboard_v2_2_support \| hide_unauthorized_create_link \| best_time_analytics_segmentation_access \| copy_customization_interdc \| custom_function_schedulers \| custom_field_decimal \| change_owner \| appsspace_enabled \| portal_parentmodule \| business_messages \| macros_suggest \| abm_data_enrichment \| portal_user_list_page_landing \| sales_motivator_tvchannels \| similarity_early_access \| email_templates_attachments_total_count \| crm_widgets \| notes_rich_text_support_disable \| zia_copilot \| workflow_rules_executeon_safieldupdate \| team_module_enabled \| mailmerge_email \| cscript \| Kiosk_Execution_Per_User \| trend_analysis \| ZRC \| module_limit_per_process \| zia_anomaly \| lux \| detailview_queries_association \| event_meeting_config \| canvas_clickto_ajaxedit \| chart_view \| office365 \| sample_feature_1 \| mailchimp \| abm_mood_score \| tags \| event_participants_reminder \| workflow_suggestion \| c3 \| abm_rel_flow_demo \| web_forms \| blueprint_common_transitions \| di_cases_access \| zia_reminder \| nbx_goal \| private_fields \| duplicate_image_detection_special_access \| sales_motivator_games_teams \| CANVAS_FILES_UDSDOWNLOAD \| linkingmodule_custom_field_currency \| mass_update_by_cvid \| dynamic_groups_product_configurator \| web_lead \| participants_limit \| best_time_analytics_early_access \| zia_summary_multilanguage_support_special_access \| smart_prompt_deepseek_llm_special_access \| linkingmodule_custom_field_pick_list \| custom_field \| mapview_and_autosuggest \| remote_sales_office \| data_storage_limits_more_than_200_user \| modules_prediction \| stage \| text_product_intelligence \| zia_owner_recommendation \| emailcatchAllFeatures \| sales_motivator_games \| action_entities_product_configurator \| unique_field \| teamdrive \| deduplication_tool \| target_meter \| inventory_templates \| google_docs \| record_level_sharing_indirect_roles \| record_locking_configurations \| query_workbench \| Map_Dependency_Fields \| IS_MAKING_NOTES_RT_NULL_ENABLED \| CHATBOT_QUERY_SUGGESTION \| ms_calendar \| custom_ai_studio \| sandbox_partial_deployment \| custom_field_percentage \| best_time_analytics_special_access \| data_migration \| feeds_followed_records_support \| custom_field_large_text_area \| data_enrichment \| people_enrichment \| phonebridge \| smart_prompt_anthropic_llm \| canvas_grid_layout \| customer_usage_data \| cadences \| custom_functions \| bm_line_integration \| sales_motivator \| cohort \| DT_Filter \| portals_authorization_criteria_count \| custom_field_mxn \| compliance_settings \| apiname_page_corruption_view_enabled \| custom_field_picklist \| best_mode_to_contact \| leadchain \| subform_max_rows_crud_v2 \| Kiosk_GetRecord_Selection_Limit_Fetch \| nextgenui_enabled \| form_rules_branch_condition \| api_name_page_lyte \| webform_analytics_revamp \| zia_score \| voc_dashboard_limit \| linking_module \| web_contact \| question_pages_gs \| ciscoteams \| custom_field_lookup \| price_rule \| calendar_schedule_user_call \| SHIFT_IMPORT \| presentation_special_access \| schedule_call \| linkedin_leadchain \| leads_prediction \| CHATBOT_V2_SPECIAL_ACCESS \| keyboard_shortcuts \| subForm_configured_fields \| free_data_backup \| intelligent_character_recognition \| ASKZIA_WORKFLOW_CREATION \| ListviewFromImageToCanvas \| recommendation \| custom_list_views \| custom_field_aggregate_fields \| smart_prompt \| zia_conversation_summary \| field_encryption \| CANVAS_SERVICE \| canvas_detailview_rl_scope \| approval_processes \| notes_rich_text_support \| pitch \| tasks \| team_spaces \| anomaly_notifications_new \| export_xlsx \| query_associations \| portals \| pathfinder_instance_creation_limit \| crm_variables \| zoho_cliq \| di_cases_access_ee \| calendar_schedule_team_per_service \| zoho_backstage \| people_enrichment_isc \| voc_computation_keyword_limit \| subform_permissions \| workflow_report \| user_associations_module_users \| mass_transfer \| CHATBOT_NEW_UI_ENABLED \| customize_setup \| workflow_rules_executeon_sectionupdate \| zia_copilot_language_support \| zia_in_email \| google_contacts \| picklist_history_tracking \| workflow_rules_executeon_fieldupdate \| Kiosk_GetRecords \| calendar_booking \| abm_recommendation \| unique_chk_for_contacts \| portal_user_group_new_ui \| webform_fields_limit \| record_level_sharing_users \| webhooks \| abm_suggested_segments \| subform_max_rows_crud \| subform_v2 \| ListviewCanvasRulesLimit \| workflow_rules \| cscript_notes_events \| teamspace_enabled \| subform_module_max_rows_crud_v2 \| google_chat \| send_mail \| people_enrichment_extension_migration \| zia_call_analytics \| homepage_kiosk_components \| custom_field_multi_select \| dup_chk_preference \| workflow \| writing_assistant_special_access \| voc_for_loweredition \| notes_edit_delete_by_owner \| abm_recommendation_kakfa_disable \| abm_tour \| booking_pages \| duplicate_image_detection \| workflow_rules_executeon_datetime \| report_export_daily \| call_transcription \| AI_CREDITS \| prediction \| calendar_schedule_team \| cscript_uploadfields_events \| zia_voice \| abm_segment_journey_limit \| zoho_assist \| cscript_subform_feild_set_visible_function \| record_level_sharing_roles \| relay_smtp_debug \| nbx_goal_ui \| customview_sandbox_support \| macro \| teammodule \| multiselect_filter_options \| assignment_rules \| social \| mailcollabview \| presentation_dc \| multicurrency_nf \| total_validation_rules \| Kiosk_Association_Limit_Per_Page \| locking_rules \| pathfinder_limit_increase \| nbx_live_update \| data_storage_per_user \| email_in \| custom_field_radio_button \| schedule_reports \| smart_prompt_siliconflow_llm \| full_data_sandbox \| subject_line_suggestion \| workflow_time_based_actions \| mass_update \| zoho_webinar \| workflow_rules_executeon_delete_plugin \| salesinbox \| text_call_intelligence \| zoho_docs \| emailsai_selfmarketing_phase2 \| voc_anonymous \| excluded_fields \| voc_primary \| abm_engagement_score \| linkingmodule_custom_field \| smart_prompt_special_access \| executable_file_upload_restrict \| pop_up_reminders \| trends \| custom_pages \| send_mail_attachments_total_size \| custom_field_auto_number \| text_note_intelligence \| zoho_pagesense \| sales_motivator_rules \| sales_motivator_tvchannels_comp \| product_configurator \| salesinbox_mobile \| split_view_enabled \| total_data_sharing_rules \| google_instant_booking_profile \| customization \| mobile_apps \| lead_conversion_layoutrule \| smart_prompt_zia_llm_special_access \| add_meeting \| record_image \| email_insights \| path_finder \| email \| email_authorisation \| zoho_survey \| churn_prediction \| assign_owner \| report_aggregates_limit \| custom_field_multi_select_multi_module_lookup \| component_suggestion \| dashboards_cache_reduced \| prm_feature_enabled \| Kiosk_Data_Hub \| route_iq \| price_rule_range \| client_portal_saml_configuration \| presentation \| rfm_draft \| linkingmodule_custom_field_small_text_area \| linkingmodule_custom_field_check_box \| canvas_flex_layout \| sales_motivator_targets \| crl_queries \| feedback_mechanism \| subform_permissions_disable \| CSCRIPT_ORG_ZAPPS_RETRY \| data_storage_per_user_more_than_200_user \| admin_center \| sales_motivator_teams_users \| tab_groups \| voc_component_limit \| data_sharing_rules \| subform_custom_field_pick_list \| Lookup_Filter \| records_limit \| custom_field_userlookup \| reports_scheduled \| recommendation_for_workflow \| case_escalation_rules \| FORMULA_DYNAMIC_CRITERIA_LIMIT \| workflow_rules_executeon_delete \| zoho_sheet \| zoho_flow_pricing \| sky_eye \| webform_analytics_url_revamp \| linkingmodule_custom_field_large_text_area \| linkingmodule_custom_field_integer \| webform_suggestions \| disable_sandbox_emailconsumer \| smart_prompt_cohere_llm_special_access \| similarity \| schedules \| field_prevent_duplicate \| zoho_creator \| zia_score_automation \| email_storage \| assignment_thresholds \| facebook_leadchain \| inc_used_option_count \| subform_custom_field \| listview_queries_association \| cv_anomaly \| user_associations_admin_users \| reporting_hierarchy \| smart_filters_limit \| integration_email \| subform_bulk_addition_max_rows \| custom_field_text \| smart_prompt_new_bot_v2_special_access \| zia_record_summary \| sales_signals \| rfm_segmentation \| form_rules_picklist_values_overall \| data_sharing \| zoho_flow \| blueprints \| user_type \| zia \| validation_rule_branch_condition \| record_state_options_limit \| booking_event_participant_limit \| smart_prompt_googleai_llm_special_access \| module_summary \| search_layout \| Competitors_Alert \| marketing_attribution \| abm_limit_enhancement \| nextgenui_user_settings_preference \| catalyst_solutions \| EXTERNAL_MODULE_CONFIG \| gmail \| best_time_analytics \| custom_field_fileupload \| record_level_sharing \| multiple_kanban_view \| audit_logs \| Closure_Restrictions \| linkingmodule_custom_field_multi_select \| functions_call_per_user \| zia_scoring_rule_special_access \| zia_pitch_special_access \| mailbox_mails_population \| additional_pipelines \| text_meeting_intelligence \| chatbot \| facebook \| user_associations \| custom_field_multiuserlookup \| smart_prompt_new_bot_v2 \| CSCRIPT_PAGES_MIGRATION \| bigin_dashboards_enabled_trigger \| caldav \| smart_prompt_deepseek_llm \| zia_field_creation \| zoho_circuits_execution \| custom_field_rich_text \| custom_button \| linkingmodule_custom_field_datetime \| reminders \| review_process \| zcircuits_max_execution_per_month \| RELATED_LIST_FIELDS \| sales_motivator_teams \| smart_prompt_siliconflow_llm_special_access \| revert_connected_records \| dashboards_enabled \| CHATBOT_DETAIL_VIEW \| report_export_records_limit \| webform_analytics \| Bundle_Product_Relations__s \| email_sending_restriction \| kpi \| events_notification_mail \| profiles \| record_level_sharing_indirect_users \| recommendation_early_access \| text_email_intelligence \| colourcode_option_count \| fx_mics \| custom_field_cfpool_lookup \| sandbox_data_population_modules \| CanvasRevisions \| email_sharing \| kanban_view \| static_resource \| connected_records_for_org_modules \| CANVAS_LV_CSCRIPT \| linkedin \| presentation_early_access \| custom_field_address_field \| file_cabinet \| m360_newmail_queue \| custom_button_in_zia_widgets \| zoho_campaigns_create \| lead_chain \| form_rules_picklist_values_per_condition \| groups \| email_attachments \| microsoft_outlook \| zia_call_audio_transcription \| gamification \| prediction_analytics \| zoho_subscription \| email_analytics \| ZIA_DASHBOARD_COMPANION \| cscript_subform_events \| linkingmodule_custom_field_email \| restricted_custom_buttons \| zoho_lens` | No | Specify the feature name to filter modules associated with a specific CRM feature.This is case-sensitive and follows snake\_case format. An empty string returns 400 error |
| `include` | `string` | No | Specify the additional module metadata fields to include in the response. Accepts comma-separated values. Allows retrieving optional module metadata that is not returned by default. |
| `fields` | `string[]` | No | Specify the module property names to include in the response. Accepts an array of property names to filter the returned module fields. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   modules?: {
>     global_search_supported?: boolean | null,
>     public_fields_configured?: boolean | null,
>     recycle_bin_on_delete?: boolean | null,
>     has_more_profiles?: boolean | null,
>     sub_menu_available?: boolean | null,
>     lookupable?: boolean | null,
>     profile_count?: number | null,
>     module_type?: string | null,
>     cc_enabled?: boolean | null,
>     deletable?: boolean | null,
>     description?: string | null | null,
>     creatable?: boolean | null,
>     inventory_template_supported?: boolean | null,
>     modified_time?: string | null | null,
>     presence_sub_menu?: boolean | null,
>     triggers_supported?: boolean | null,
>     id?: string | null,
>     api_name?: string | null,
>     plural_label?: string | null,
>     actual_plural_label?: string | null,
>     actual_singular_label?: string | null,
>     singular_label?: string | null,
>     isBlueprintSupported?: boolean | null,
>     visibility?: number | null,
>     convertable?: boolean | null,
>     editable?: boolean | null,
>     emailTemplate_support?: boolean | null,
>     email_parser_supported?: boolean | null,
>     filter_supported?: boolean | null,
>     show_as_tab?: boolean | null,
>     web_link?: string | null | null,
>     viewable?: boolean | null,
>     api_supported?: boolean | null,
>     quick_create?: boolean | null,
>     generated_type?: string | null,
>     static_subform_properties?: {
>       fields?: {
>         api_name?: string | null,
>         id?: string | null
>       }[] | null
>     } | null | null,
>     feeds_required?: boolean | null,
>     scoring_supported?: boolean | null,
>     webform_supported?: boolean | null,
>     arguments?: {
>       name?: string | null,
>       value?: string | null
>     }[] | null | null,
>     module_name?: string | null,
>     business_card_field_limit?: number | null,
>     access_type?: string | null,
>     private_profile?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     track_current_data?: boolean | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     profiles?: {
>       id?: string | null,
>       name?: string | null
>     }[] | null,
>     parent_module?: {
>       api_name?: string | null,
>       id?: string | null
>     } | null | null,
>     status?: string | null,
>     sequence_number?: number | null,
>     territory?: {
>       name?: string | null,
>       id?: string | null,
>       subordinates?: boolean | null
>     } | null | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### update

`modules.update`

Update Module Labels and Profiles. Updates the singular label, plural label, and profile assignments for the module identified by \{moduleIdentifier}. Immutable fields such as access\_type and api\_name cannot be changed; attempting to include them returns a NOT\_ALLOWED error.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.modules.update({
	moduleIdentifier: 'example',
	modules: [{
		singular_label: 'example',
		plural_label: 'example',
		id: '4876876000000333001',
		profiles: [{ id: '4876876000000333001' }],
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `moduleIdentifier` | `string \| string` | Yes | Specify the module identifier, either the numeric module ID or the module API name(case-sensitive). |
| `modules` | `object[]` | Yes | Single-element array containing the module object with the labels and profile assignments to update. Exactly one item is required. |

> [accordion] modules full type
>
> ```ts theme={null}
> {
>   singular_label: string,
>   plural_label: string,
>   id: string,
>   profiles: {
>     id: string
>   }[]
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `modules` | `object[] \| null` | No | Single-element array containing the success result for the updated module. |

> [accordion] modules full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### updateMany

`modules.updateMany`

Update CRM modules. Updates existing modules in the CRM. Allows modification of module labels (singular\_label, plural\_label) and profile assignments. Supports batch updates of up to 100 modules per request. Returns 200 when all modules update successfully, or 207 Multi-Status when some succeed and others fail.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.modules.updateMany({
	modules: [{ id: '4876876000000333001' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `modules` | `object[]` | Yes | Array of module objects to update, with one to 100 unique entries. Each entry must include `id`; `singular_label`, `plural_label`, and `profiles` are optional. |

> [accordion] modules full type
>
> ```ts theme={null}
> {
>   singular_label?: string,
>   plural_label?: string,
>   id: string,
>   profiles?: {
>     id: string,
>     _delete?: null
>   }[]
> }[]
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   modules?: {
>     code?: string | null,
>     details?: {
>       id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   modules?: (
>     {
>       code?: string | null,
>       details?: {
>         id?: string | null
>       } | null,
>       message?: string | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       details?: {
>         api_name?: string | null,
>         json_path?: string | null,
>         expected_data_type?: string | null
>       } | {
>         index?: number | null,
>         supported_values?: string[] | null,
>         param_name?: string | null
>       } | {
>         maximum_length?: number | null,
>         api_name?: string | null,
>         json_path?: string | null
>       } | null,
>       message?: string | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       details?: {
>         api_name?: string | null,
>         json_path?: string | null
>       } | null,
>       message?: string | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       details?: {
>         api_name?: string | null,
>         json_path?: string | null
>       } | null,
>       message?: string | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       details?: {
>         api_name?: string | null,
>         json_path?: string | null
>       } | null,
>       message?: string | null,
>       status?: string | null
>     }
>   )[] | null
> }
> ```

***

## Notes

### create

`notes.create`

Create Notes. Creates one or more note records.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.notes.create({
	data: [{}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[]` | Yes | Array of note objects to create |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   Note_Content?: string | null,
>   Note_Title?: string | null,
>   Parent_Id?: {
>     module: {
>       api_name?: string,
>       id?: string
>     },
>     id: string
>   }
> }[]
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data?: {
>     code?: string | null,
>     message?: string | null,
>     status?: string | null,
>     details?: {
>       id?: string | null,
>       Modified_Time?: string | null,
>       Created_Time?: string | null,
>       Created_By?: {
>         name?: string | null,
>         id?: string | null
>       } | null,
>       Modified_By?: {
>         name?: string | null,
>         id?: string | null
>       } | null
>     } | null
>   }[] | null
> } | {
>   data?: (
>     {
>       code?: string | null,
>       message?: string | null,
>       status?: string | null,
>       details?: {
>         id?: string | null,
>         Modified_Time?: string | null,
>         Created_Time?: string | null,
>         Created_By?: {
>           name?: string | null,
>           id?: string | null
>         } | null,
>         Modified_By?: {
>           name?: string | null,
>           id?: string | null
>         } | null
>       } | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       status?: string | null,
>       details?: {
>       } | null
>     }
>   )[] | null
> }
> ```

***

### createForRecord

`notes.createForRecord`

Related Notes. Creates one or more notes associated with a specific parent record. Either note content or note title must be provided (at least one is mandatory).

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.notes.createForRecord({
	parentRecordModule: 'Leads',
	parentRecordId: '4876876000000333001',
	data: [{}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parentRecordModule` | `string` | Yes | Specify the API name of the parent record module. Refer to [Get Modules](modules.yaml#\$.paths./settings/modules.get) for the list of supported modules. |
| `parentRecordId` | `string` | Yes | Specify the unique numeric ID of the parent record. |
| `data` | `object[]` | Yes | A JSON array containing the notes to create. |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   Note_Content?: string,
>   Note_Title?: string,
>   Parent_Id?: {
>     module: {
>       api_name?: string,
>       id?: string
>     },
>     id: string
>   }
> }[]
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data?: {
>     code?: string | null,
>     message?: string | null,
>     status?: string | null,
>     details?: {
>       id?: string | null,
>       Modified_Time?: string | null,
>       Created_Time?: string | null,
>       Created_By?: {
>         name?: string | null,
>         id?: string | null
>       } | null,
>       Modified_By?: {
>         name?: string | null,
>         id?: string | null
>       } | null
>     } | null
>   }[] | null
> } | {
>   data?: (
>     {
>       code?: string | null,
>       message?: string | null,
>       status?: string | null,
>       details?: {
>         id?: string | null,
>         Modified_Time?: string | null,
>         Created_Time?: string | null,
>         Created_By?: {
>           name?: string | null,
>           id?: string | null
>         } | null,
>         Modified_By?: {
>           name?: string | null,
>           id?: string | null
>         } | null
>       } | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       status?: string | null,
>       details?: {
>       } | null
>     }
>   )[] | null
> }
> ```

***

### delete

`notes.delete`

Delete a Specific Note. Permanently deletes a specific note by its ID. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.notes.delete({ id: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Unique identifier of the note. Use the [Get Notes API](notes.yaml#\$.paths./Notes.get) to retrieve the note IDs. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | Array of deletion results |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   message?: string | null,
>   status?: string | null,
>   details?: {
>     id?: string | null
>   } | null
> }[] | null
> ```

***

### deleteForRecord

`notes.deleteForRecord`

Related Note. Deletes a specific note record associated with a parent record using the note ID in the path. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.notes.deleteForRecord({ parentRecordModule: 'Leads', parentRecordId: '4876876000000333001', noteId: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parentRecordModule` | `string` | Yes | Specify the API name of the parent record module. Refer to [Get Modules](modules.yaml#\$.paths./settings/modules.get) for the list of supported modules. |
| `parentRecordId` | `string` | Yes | Specify the unique numeric ID of the parent record. |
| `noteId` | `string` | Yes | Specify the unique numeric ID of the note record. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | A JSON array representing the list of action status objects for the deleted note. |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   message?: string | null,
>   status?: string | null,
>   details?: {
>     id?: string | null
>   } | null
> }[] | null
> ```

***

### deleteMany

`notes.deleteMany`

Notes. Permanently deletes one or more notes using comma-separated note IDs. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.notes.deleteMany({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `ids` | `string` | No | Comma-separated list of note IDs to retrieve specific notes. Use the [Get Notes API](notes.yaml#\$.paths./Notes.get) to retrieve the note IDs. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data?: {
>     code?: string | null,
>     message?: string | null,
>     status?: string | null,
>     details?: {
>       id?: string | null
>     } | null
>   }[] | null
> } | {
>   data?: (
>     {
>       code?: string | null,
>       message?: string | null,
>       status?: string | null,
>       details?: {
>         id?: string | null
>       } | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       status?: string | null,
>       details?: {
>         id?: string | null
>       } | null
>     }
>   )[] | null
> }
> ```

***

### deleteManyForRecord

`notes.deleteManyForRecord`

Related Notes. Deletes one or more notes associated with a specific parent record using comma-separated note IDs in the query parameter. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.notes.deleteManyForRecord({ parentRecordModule: 'Leads', parentRecordId: '4876876000000333001', ids: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parentRecordModule` | `string` | Yes | Specify the API name of the parent record module. Refer to [Get Modules](modules.yaml#\$.paths./settings/modules.get) for the list of supported modules. |
| `parentRecordId` | `string` | Yes | Specify the unique numeric ID of the parent record. |
| `ids` | `string` | Yes | Specify a comma-separated list of note record IDs to delete. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data?: {
>     code?: string | null,
>     message?: string | null,
>     status?: string | null,
>     details?: {
>       id?: string | null
>     } | null
>   }[] | null
> } | {
>   data?: (
>     {
>       code?: string | null,
>       message?: string | null,
>       status?: string | null,
>       details?: {
>         id?: string | null
>       } | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       status?: string | null,
>       details?: {
>         id?: string | null
>       } | null
>     }
>   )[] | null
> }
> ```

***

### get

`notes.get`

Get a Specific Note. Retrieves details of a specific note by its ID.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.notes.get({ id: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Unique identifier of the note. Use the [Get Notes API](notes.yaml#\$.paths./Notes.get) to retrieve the note IDs. |
| `fields` | `string` | No | Comma-separated list of field API names to include in the response |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data?: {
>     id?: string | null,
>     Note_Title?: string | null | null,
>     Note_Content?: string | null,
>     $attachments?: {
>       $file_id?: string | null,
>       File_Name?: string | null,
>       Size?: string | null,
>       id?: string | null
>     }[] | null | null,
>     Parent_Id?: {
>       module?: {
>         api_name?: string | null,
>         id?: string | null
>       } | null,
>       name?: string | null,
>       id?: string | null
>     } | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### getForRecord

`notes.getForRecord`

Specific Related Note. Retrieves details of a specific note record associated with a CRM record in your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.notes.getForRecord({ parentRecordModule: 'Leads', parentRecordId: '4876876000000333001', noteId: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parentRecordModule` | `string` | Yes | Specify the API name of the parent record module. Refer to [Get Modules](modules.yaml#\$.paths./settings/modules.get) for the list of supported modules. |
| `parentRecordId` | `string` | Yes | Specify the unique numeric ID of the parent record. |
| `noteId` | `string` | Yes | Specify the unique numeric ID of the note record. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data?: {
>     id?: string | null,
>     Note_Title?: string | null | null,
>     Note_Content?: string | null | null,
>     $attachments?: {
>       $file_id?: string | null,
>       File_Name?: string | null,
>       Size?: string | null,
>       id?: string | null
>     }[] | null | null,
>     Parent_Id?: {
>       module?: {
>         api_name?: string | null,
>         id?: string | null
>       } | null,
>       name?: string | null,
>       id?: string | null
>     } | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### list

`notes.list`

Notes. Retrieves a list of notes. (GET /crm/v8/Notes)

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.notes.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `fields` | `string` | No | Comma-separated list of field API names to include in the response |
| `ids` | `string` | No | Comma-separated list of note IDs to retrieve specific notes. Use the [Get Notes API](notes.yaml#\$.paths./Notes.get) to retrieve the note IDs. |
| `per_page` | `number \| string` | No | Number of records per page |
| `page` | `number \| string` | No | Page number for pagination |
| `page_token` | `string` | No | Page token for retrieving records beyond the 2000-record limit. |
| `sort_order` | `asc \| desc` | No | Sort order (ascending or descending) |
| `sort_by` | `Modified_Time \| Created_Time \| id` | No | Field name to sort results by |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data?: {
>     id?: string | null,
>     Note_Title?: string | null | null,
>     Note_Content?: string | null | null,
>     $attachments?: {
>       $file_id?: string | null,
>       File_Name?: string | null,
>       Size?: string | null,
>       id?: string | null
>     }[] | null | null,
>     Parent_Id?: {
>       module?: {
>         api_name?: string | null,
>         id?: string | null
>       } | null,
>       name?: string | null,
>       id?: string | null
>     } | null
>   }[] | null,
>   info?: {
>     page?: number | null,
>     per_page?: number | null,
>     count?: number | null,
>     more_records?: boolean | null,
>     next_page_token?: string | null | null,
>     previous_page_token?: string | null | null,
>     page_token_expiry?: string | null | null,
>     sort_by?: string | null,
>     sort_order?: string | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### listForRecord

`notes.listForRecord`

Related Notes. Retrieves a paginated list of notes associated with a specific parent record in a CRM module.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.notes.listForRecord({ parentRecordModule: 'Leads', parentRecordId: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parentRecordModule` | `string` | Yes | Specify the API name of the parent record module. Refer to [Get Modules](modules.yaml#\$.paths./settings/modules.get) for the list of supported modules. |
| `parentRecordId` | `string` | Yes | Specify the unique numeric ID of the parent record. |
| `fields` | `string` | No | A comma-separated list of field API names to return in the response. If not specified, all available fields are included in the response. |
| `page` | `number \| string` | No | Specify the page number for pagination. The value must be **1 or greater**. |
| `perPage` | `number \| string` | No | To get the list of records available per page. The default and the maximum possible value is **200.** |
| `sort_by` | `id \| Created_Time \| Modified_Time` | No | Specify the field name to sort the note records by. Possible values: id - Sort by the note ID. Created\_Time - Sort by the creation date and time. Modified\_Time - Sort by the last modification date and time. |
| `sort_order` | `asc \| desc` | No | The order in which results are returned. Possible values: **asc** - Returns results in ascending order. **desc** - Returns results in descending order. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data?: {
>     id?: string | null,
>     Note_Title?: string | null | null,
>     Note_Content?: string | null | null,
>     $attachments?: {
>       $file_id?: string | null,
>       File_Name?: string | null,
>       Size?: string | null,
>       id?: string | null
>     }[] | null | null,
>     Parent_Id?: {
>       module?: {
>         api_name?: string | null,
>         id?: string | null
>       } | null,
>       name?: string | null,
>       id?: string | null
>     } | null
>   }[] | null,
>   info?: {
>     page?: number | null,
>     per_page?: number | null,
>     count?: number | null,
>     more_records?: boolean | null,
>     next_page_token?: string | null | null,
>     previous_page_token?: string | null | null,
>     page_token_expiry?: string | null | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### update

`notes.update`

Update a Specific Note. Updates a specific note by its ID. Either note content or note title must be provided (at least one is mandatory).

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.notes.update({
	id: '4876876000000333001',
	data: [{}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Unique identifier of the note. Use the [Get Notes API](notes.yaml#\$.paths./Notes.get) to retrieve the note IDs. |
| `data` | `object[]` | Yes | Array containing the note to update (single item only) |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   Note_Content?: string | null,
>   Note_Title?: string | null
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | Array of update results |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   message?: string | null,
>   status?: string | null,
>   details?: {
>     id?: string | null,
>     Modified_Time?: string | null,
>     Created_Time?: string | null,
>     Created_By?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     Modified_By?: {
>       name?: string | null,
>       id?: string | null
>     } | null
>   } | null
> }[] | null
> ```

***

### updateForRecord

`notes.updateForRecord`

Related Note. Updates an existing note associated with a specific parent record. Either note content or note title must be provided (at least one is mandatory).

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.notes.updateForRecord({
	parentRecordModule: 'Leads',
	parentRecordId: '4876876000000333001',
	noteId: '4876876000000333001',
	data: [{}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parentRecordModule` | `string` | Yes | Specify the API name of the parent record module. Refer to [Get Modules](modules.yaml#\$.paths./settings/modules.get) for the list of supported modules. |
| `parentRecordId` | `string` | Yes | Specify the unique numeric ID of the parent record. |
| `noteId` | `string` | Yes | Specify the unique numeric ID of the note record. |
| `data` | `object[]` | Yes | Specify the note fields to update. |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   Note_Content?: string,
>   Note_Title?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | Represents the list of action status objects for the updated note. |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   message?: string | null,
>   status?: string | null,
>   details?: {
>     id?: string | null,
>     Modified_Time?: string | null,
>     Created_Time?: string | null,
>     Created_By?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     Modified_By?: {
>       name?: string | null,
>       id?: string | null
>     } | null
>   } | null
> }[] | null
> ```

***

### updateMany

`notes.updateMany`

Update Notes. Updates one or more existing note records. Either note content or note title must be provided (at least one is mandatory) for each note.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.notes.updateMany({
	data: [{ id: '4876876000000333001' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[]` | Yes | Array of note objects to update |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   id: string,
>   Note_Content?: string | null,
>   Note_Title?: string | null
> }[]
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data?: {
>     code?: string | null,
>     message?: string | null,
>     status?: string | null,
>     details?: {
>       id?: string | null,
>       Modified_Time?: string | null,
>       Created_Time?: string | null,
>       Created_By?: {
>         name?: string | null,
>         id?: string | null
>       } | null,
>       Modified_By?: {
>         name?: string | null,
>         id?: string | null
>       } | null
>     } | null
>   }[] | null
> } | {
>   data?: (
>     {
>       code?: string | null,
>       message?: string | null,
>       status?: string | null,
>       details?: {
>         id?: string | null,
>         Modified_Time?: string | null,
>         Created_Time?: string | null,
>         Created_By?: {
>           name?: string | null,
>           id?: string | null
>         } | null,
>         Modified_By?: {
>           name?: string | null,
>           id?: string | null
>         } | null
>       } | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       status?: string | null,
>       details?: {
>       } | null
>     }
>   )[] | null
> }
> ```

***

### updateManyForRecord

`notes.updateManyForRecord`

Related Notes. Updates one or more notes associated with a specific CRM record in your Zoho CRM organization. Either note content or note title must be provided (at least one is mandatory) for each note.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.notes.updateManyForRecord({
	parentRecordModule: 'Leads',
	parentRecordId: '4876876000000333001',
	data: [{ id: '4876876000000333001' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parentRecordModule` | `string` | Yes | Specify the API name of the parent record module. Refer to [Get Modules](modules.yaml#\$.paths./settings/modules.get) for the list of supported modules. |
| `parentRecordId` | `string` | Yes | Specify the unique numeric ID of the parent record. |
| `data` | `object[]` | Yes | Specify the notes to update. |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   id: string,
>   Note_Content?: string,
>   Note_Title?: string
> }[]
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data?: {
>     code?: string | null,
>     message?: string | null,
>     status?: string | null,
>     details?: {
>       id?: string | null,
>       Modified_Time?: string | null,
>       Created_Time?: string | null,
>       Created_By?: {
>         name?: string | null,
>         id?: string | null
>       } | null,
>       Modified_By?: {
>         name?: string | null,
>         id?: string | null
>       } | null
>     } | null
>   }[] | null
> } | {
>   data?: (
>     {
>       code?: string | null,
>       message?: string | null,
>       status?: string | null,
>       details?: {
>         id?: string | null,
>         Modified_Time?: string | null,
>         Created_Time?: string | null,
>         Created_By?: {
>           name?: string | null,
>           id?: string | null
>         } | null,
>         Modified_By?: {
>           name?: string | null,
>           id?: string | null
>         } | null
>       } | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       status?: string | null,
>       details?: {
>       } | null
>     }
>   )[] | null
> }
> ```

***

## Notifications

### disable

`notifications.disable`

Disable notification channels. To disable one or more notification channels in your Zoho CRM organization. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.notifications.disable({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `channel_ids` | `string` | No | Specify a comma-separated list of channel IDs identifying the notification channels to disable. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   watch?: {
>     code?: string | null,
>     details?: {
>       resource_uri?: string | null,
>       resource_id?: string | null,
>       channel_id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   watch?: (
>     {
>       code?: string | null,
>       details?: {
>       } | null,
>       message?: string | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       details?: {
>         api_name?: string | null,
>         expected_data_type?: string | null,
>         json_path?: string | null,
>         ambiguity_due_to?: {
>           api_name?: string | null,
>           json_path?: string | null
>         }[] | null,
>         expected_fields?: {
>           api_name?: string | null,
>           json_path?: string | null
>         }[] | null,
>         dependee?: {
>           api_name?: string | null,
>           json_path?: string | null
>         } | null,
>         supported_values?: string[] | null,
>         maximum_length?: number | null
>       } | null,
>       message?: string | null,
>       status?: string | null
>     }
>   )[] | null
> }
> ```

***

### enable

`notifications.enable`

Create notification channels. To create one or more notification channels in your Zoho CRM organization. Zoho posts change events to notify\_url until channel\_expiry (at most one day ahead; one week for some modules).

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.notifications.enable({
	watch: [{
		notify_url: 'https://example.com/callback',
		events: ['example'],
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `watch` | `object[]` | Yes | Specify the list of notification channels to create. |

> [accordion] watch full type
>
> ```ts theme={null}
> {
>   notify_url: string,
>   channel_id?: string,
>   channel_expiry?: string,
>   events: string[],
>   token?: string
> }[]
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   watch?: {
>     code?: string | null,
>     details?: {
>       events?: {
>         channel_expiry?: string | null,
>         resource_uri?: string | null,
>         resource_id?: string | null,
>         resource_name?: string | null,
>         channel_id?: string | null
>       }[] | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   watch?: (
>     {
>       code?: string | null,
>       details?: {
>       } | null,
>       message?: string | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       details?: {
>         api_name?: string | null,
>         expected_data_type?: string | null,
>         json_path?: string | null,
>         ambiguity_due_to?: {
>           api_name?: string | null,
>           json_path?: string | null
>         }[] | null,
>         expected_fields?: {
>           api_name?: string | null,
>           json_path?: string | null
>         }[] | null,
>         dependee?: {
>           api_name?: string | null,
>           json_path?: string | null
>         } | null,
>         supported_values?: string[] | null,
>         maximum_length?: number | null
>       } | null,
>       message?: string | null,
>       status?: string | null
>     }
>   )[] | null
> }
> ```

***

### list

`notifications.list`

List active notification channels. To retrieve the list of active notification channels configured for your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.notifications.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | No | Specify the API name of the CRM module to filter the notification channel list. Refer to the [Get Modules](https://www.zoho.com/crm/developer/docs/api/v8/modules-api.html) resource for valid values. |
| `channel_id` | `string` | No | Specify the unique identifier of a single notification channel to filter the results. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   watch?: {
>     notify_on_related_action?: boolean | null,
>     channel_expiry?: string | null,
>     return_affected_field_values?: boolean | null,
>     resource_uri?: string | null,
>     resource_id?: string | null,
>     notify_url?: string | null,
>     resource_name?: string | null,
>     fields?: any[] | null | null,
>     notification_condition?: {
>       field_selection?: {
>         group_operator?: string | null,
>         group?: {
>           field?: {
>             api_name?: string | null,
>             id?: string | null
>           } | null,
>           group_operator?: string | null | null,
>           group?: any[] | null | null
>         }[] | null
>       } | null,
>       module?: {
>         api_name?: string | null,
>         id?: string | null
>       } | null,
>       type?: string | null
>     }[] | null | null,
>     channel_id?: string | null,
>     events?: string[] | null,
>     token?: string | null | null
>   }[] | null,
>   info?: {
>     per_page?: number | null,
>     count?: number | null,
>     page?: number | null,
>     more_records?: boolean | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### update

`notifications.update`

Update full notification details. To replace all properties of an existing notification channel in your Zoho CRM organization.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.notifications.update({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `watch` | `object[]` | No | Specify the list of notification channel replacements. |

> [accordion] watch full type
>
> ```ts theme={null}
> {
>   channel_id: string,
>   notify_url: string,
>   channel_expiry?: string,
>   events: string[],
>   notification_condition?: {
>     type: string
>   }[],
>   notify_on_related_action?: boolean,
>   return_affected_field_values?: boolean,
>   token?: string,
>   id?: string
> }[]
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   watch?: {
>     code?: string | null,
>     details?: {
>       events?: {
>         channel_expiry?: string | null,
>         resource_uri?: string | null,
>         resource_id?: string | null,
>         resource_name?: string | null,
>         channel_id?: string | null
>       }[] | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   watch?: (
>     {
>       code?: string | null,
>       details?: {
>       } | null,
>       message?: string | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       details?: {
>         api_name?: string | null,
>         expected_data_type?: string | null,
>         json_path?: string | null,
>         ambiguity_due_to?: {
>           api_name?: string | null,
>           json_path?: string | null
>         }[] | null,
>         expected_fields?: {
>           api_name?: string | null,
>           json_path?: string | null
>         }[] | null,
>         dependee?: {
>           api_name?: string | null,
>           json_path?: string | null
>         } | null,
>         supported_values?: string[] | null,
>         maximum_length?: number | null
>       } | null,
>       message?: string | null,
>       status?: string | null
>     }
>   )[] | null
> }
> ```

***

### updateInfo

`notifications.updateInfo`

Update notification channel information. To partially update the properties of a notification channel in your Zoho CRM organization.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.notifications.updateInfo({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `channel_id` | `string` | No | Specify the unique identifier of a single notification channel to filter the results. |
| `watch` | `object[]` | No | Specify the list of notification channel replacements. |

> [accordion] watch full type
>
> ```ts theme={null}
> {
>   channel_id: string,
>   notify_url: string,
>   channel_expiry?: string,
>   events: string[],
>   notification_condition?: {
>     type: string
>   }[],
>   notify_on_related_action?: boolean,
>   return_affected_field_values?: boolean,
>   token?: string,
>   id?: string
> }[]
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   watch?: {
>     code?: string | null,
>     details?: {
>       events?: {
>         channel_expiry?: string | null,
>         resource_uri?: string | null,
>         resource_id?: string | null,
>         resource_name?: string | null,
>         channel_id?: string | null
>       }[] | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   watch?: (
>     {
>       code?: string | null,
>       details?: {
>       } | null,
>       message?: string | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       details?: {
>         api_name?: string | null,
>         expected_data_type?: string | null,
>         json_path?: string | null,
>         ambiguity_due_to?: {
>           api_name?: string | null,
>           json_path?: string | null
>         }[] | null,
>         expected_fields?: {
>           api_name?: string | null,
>           json_path?: string | null
>         }[] | null,
>         dependee?: {
>           api_name?: string | null,
>           json_path?: string | null
>         } | null,
>         supported_values?: string[] | null,
>         maximum_length?: number | null
>       } | null,
>       message?: string | null,
>       status?: string | null
>     }
>   )[] | null
> }
> ```

***

## Org

### deletePhoto

`org.deletePhoto`

Delete the organization photo. To delete the organization photo from your Zoho CRM organization. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.org.deletePhoto({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `status` | `string \| null` | No | Status of the operation Example: "success". |
| `code` | `string \| null` | No | Response code Example: "SUCCESS". |
| `message` | `string \| null` | No | Success message |
| `details` | `object \| null` | No | Success response containing the deletion status for the organization photo. |

> [accordion] details full type
>
> ```ts theme={null}
> {
>   status?: string | null,
>   code?: string | null,
>   message?: string | null,
>   details?: {
>   } | null
> } | null
> ```

***

### get

`org.get`

Get organization details. To retrieve the organization details associated with your Zoho CRM account.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.org.get({});
```

**Input:** *empty object*

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   org?: {
>     country?: string | null | null,
>     photo_id?: string | null | null,
>     city?: string | null | null,
>     description?: string | null | null,
>     type?: string | null,
>     created_time?: string | null,
>     mc_status?: boolean | null | null,
>     gapps_enabled?: boolean | null,
>     translation_enabled?: boolean | null,
>     street?: string | null | null,
>     domain_name?: string | null,
>     alias?: string | null | null,
>     currency?: string | null,
>     id?: string | null,
>     employee_count?: string | null | null,
>     state?: string | null | null,
>     fax?: string | null | null,
>     zip?: string | null | null,
>     website?: string | null | null,
>     currency_symbol?: string | null,
>     mobile?: string | null | null,
>     currency_locale?: string | null,
>     primary_zuid?: string | null | null,
>     zia_portal_id?: number | null | null,
>     time_zone?: string | null,
>     zgid?: string | null,
>     country_code?: string | null | null,
>     deletable_org_account?: boolean | null,
>     license_details?: {
>       paid_expiry?: string | null | null,
>       users_license_purchased?: number | null,
>       trial_type?: string | null | null,
>       trial_expiry?: string | null | null,
>       paid?: boolean | null,
>       paid_type?: string | null,
>       portal_users_license_purchased?: number | null
>     } | null,
>     hierarchy_preferences?: {
>       type?: string | null,
>       strictly_reporting?: boolean | null | null
>     } | null,
>     phone?: string | null | null,
>     company_name?: string | null | null,
>     privacy_settings?: boolean | null,
>     primary_email?: string | null | null,
>     iso_code?: string | null,
>     hipaa_compliance_enabled?: boolean | null,
>     lite_users_enabled?: boolean | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### getPhoto

`org.getPhoto`

Organization photo. To retrieve the organization photo for your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.org.getPhoto({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `contentBase64` | `string` | No | The file, base64-encoded. Missing when the file came back as text or contentOmitted is set. |
| `text` | `string` | No | The file as text, in place of contentBase64, when it is a text file (CSV, JSON, Markdown, XML and the like) in UTF-8. |
| `contentType` | `string` | Yes | Media type of the file, for example application/pdf. |
| `byteLength` | `number` | Yes | Size of the file in bytes. |
| `filename` | `string` | No | The file name, when known. |
| `contentOmitted` | `not_requested \| over_limit` | No | Set when the content was left out: the caller did not ask for it, or the file was over the limit. |
| `fileId` | `string` | No | Where the host saved the file. Over the limit it comes in place of the content; a host that keeps every file sets it beside the content too. On Corsair it is a Files id (fil\_…): pass it to another app wherever that app takes a file URL, or read a text file or PDF with files.read\_text. |

***

### uploadPhoto

`org.uploadPhoto`

Upload Organization Photo. To upload a photo for your Zoho CRM organization.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.org.uploadPhoto({
	file: { base64: 'SGVsbG8gZnJvbSBDb3JzYWly', filename: 'notes.txt', contentType: 'text/plain' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `file` | `string \| object \| custom` | Yes | Specify the image file to upload as the organization photo. |

> [accordion] file full type
>
> ```ts theme={null}
> string | {
>   url: string,
>   filename?: string,
>   contentType?: string
> } | {
>   base64: string,
>   filename?: string,
>   contentType?: string
> } | custom
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `status` | `string \| null` | No | Status of the operation Example: "success". |
| `code` | `string \| null` | No | Response code Example: "SUCCESS". |
| `message` | `string \| null` | No | Success message |
| `details` | `object \| null` | No | Success response containing the upload status for the organization photo. |

> [accordion] details full type
>
> ```ts theme={null}
> {
>   status?: string | null,
>   code?: string | null,
>   message?: string | null,
>   details?: {
>   } | null
> } | null
> ```

***

## Picklist Values

### delete

`picklistValues.delete`

Delete a picklist field option. Delete picklist field option. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.picklistValues.delete({ module: 'Leads', fieldId: 'example', pickListValueId: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the API name of the CRM module that contains the field. Refer to the [Get Modules](modules.json#\$.paths./settings/modules.get) resource for valid values. |
| `fieldId` | `string` | Yes | Specify the unique numeric identifier of the field. Refer to the [Get Fields Metadata](fields.json#\$.paths./settings/fields/\{fieldId}.get) resource for valid values. |
| `pickListValueId` | `string` | Yes | Path parameter: pickListValueId |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   pick_list_values?: {
>     code?: string | null,
>     details?: {
>       id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   pick_list_values?: {
>     code?: string | null,
>     details?: {
>       job_id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> }
> ```

***

### get

`picklistValues.get`

get a picklist field option. Picklist field option GET.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.picklistValues.get({ module: 'Leads', fieldId: 'example', pickListValueId: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the API name of the CRM module that contains the field. Refer to the [Get Modules](modules.json#\$.paths./settings/modules.get) resource for valid values. |
| `fieldId` | `string` | Yes | Specify the unique numeric identifier of the field. Refer to the [Get Fields Metadata](fields.json#\$.paths./settings/fields/\{fieldId}.get) resource for valid values. |
| `pickListValueId` | `string` | Yes | Path parameter: pickListValueId |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   pick_list_values?: {
>     sequence_number?: number | null,
>     display_value?: string | null,
>     reference_value?: string | null,
>     colour_code?: string | null | null,
>     actual_value?: string | null,
>     id?: string | null,
>     type?: string | null,
>     layout_associations?: {
>       api_name?: string | null,
>       name?: string | null,
>       id?: string | null
>     }[] | null | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### list

`picklistValues.list`

Picklist Values for a Field. Returns the available pick list values for a specified field in a module, including display values (with translations if enabled), reference values, layout associations, and metadata. Returns 204 if the field exists but is not a pick list type. Does not support pagination.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.picklistValues.list({ fieldId: 'example', module: 'Leads' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `fieldId` | `string` | Yes | Specify the unique numeric identifier of the field. Refer to the [Get Fields Metadata](fields.json#\$.paths./settings/fields/\{fieldId}.get) resource for valid values. |
| `module` | `string` | Yes | Specify the API name of the CRM module that contains the field. Refer to the [Get Modules](modules.json#\$.paths./settings/modules.get) resource for valid values. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   pick_list_values?: {
>     sequence_number?: number | null,
>     display_value?: string | null,
>     reference_value?: string | null,
>     colour_code?: string | null | null,
>     actual_value?: string | null,
>     id?: string | null,
>     type?: string | null,
>     layout_associations?: {
>       api_name?: string | null,
>       name?: string | null,
>       id?: string | null
>     }[] | null | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### replace

`picklistValues.replace`

Replace Pick list values. Replace picklist value.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.picklistValues.replace({
	module: 'Leads',
	fieldId: '4876876000000002595',
	replace_pick_list_values: [{
		old_value: { display_value: 'Cold' },
		new_value: { display_value: 'Warm' },
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the API name of the CRM module that contains the field. Refer to the [Get Modules](modules.json#\$.paths./settings/modules.get) resource for valid values. |
| `fieldId` | `string` | Yes | Specify the unique numeric identifier of the field. Refer to the [Get Fields Metadata](fields.json#\$.paths./settings/fields/\{fieldId}.get) resource for valid values. |
| `replace_pick_list_values` | `object[]` | Yes | Replace picklist value with from and to options (Required) |

> [accordion] replace\_pick\_list\_values full type
>
> ```ts theme={null}
> {
>   old_value: {
>     display_value?: string | null,
>     id?: string | null
>   },
>   new_value: {
>     display_value?: string | null,
>     id?: string | null
>   },
>   delete_old_value?: boolean | null
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `replace_pick_list_values` | `object[] \| null` | No | Description of the replace option on schedule |

> [accordion] replace\_pick\_list\_values full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     job_id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

## Pipelines

### create

`pipelines.create`

Pipeline. Create a new pipeline for the specified Deals layout by providing a pipeline display label and one or more mapped stages.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.pipelines.create({
	layout_id: '4876876000000333001',
	pipeline: [{
		display_value: 'example',
		maps: [{ id: '4876876000000333001' }],
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `layout_id` | `string` | Yes | Specify the Layout ID of the Deals module. Use the [Get Layouts Metadata API](layouts.yaml#\$.paths./settings/layouts.get) to retrieve the Layout ID. |
| `pipeline` | `object[]` | Yes | Array of pipeline picklist configurations to create or update. |

> [accordion] pipeline full type
>
> ```ts theme={null}
> {
>   display_value: string,
>   default?: boolean,
>   maps: {
>     id: string,
>     display_value?: string,
>     sequence_number?: number | string
>   }[]
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `pipeline` | `object[] \| null` | No | Array of individual success responses matching the request pipeline items. |

> [accordion] pipeline full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### get

`pipelines.get`

Specific Pipeline. Retrieve a specific pipeline by pipeline ID for the specified Deals layout.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.pipelines.get({ layout_id: '4876876000000333001', pipelineIdentifier: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `layout_id` | `string` | Yes | Specify the Layout ID of the Deals module. Use the [Get Layouts Metadata API](layouts.yaml#\$.paths./settings/layouts.get) to retrieve the Layout ID. |
| `pipelineIdentifier` | `string` | Yes | Specify the Pipeline ID. Use the [Get Pipeline API](pipeline.yaml#\$.paths./settings/pipeline.get) to get the Pipeline ID. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   pipeline?: {
>     display_value?: string | null,
>     default?: boolean | null,
>     maps?: {
>       display_value?: string | null,
>       sequence_number?: number | null,
>       colour_code?: string | null,
>       forecast_category?: {
>         name?: string | null,
>         id?: string | null
>       } | null,
>       actual_value?: string | null,
>       id?: string | null,
>       forecast_type?: string | null
>     }[] | null,
>     actual_value?: string | null,
>     id?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### list

`pipelines.list`

Pipelines. Retrieve all pipelines available for the specified Deals layout. Use the required layout\_id query parameter to identify the layout.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.pipelines.list({ layout_id: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `layout_id` | `string` | Yes | Specify the Layout ID of the Deals module. Use the [Get Layouts Metadata API](layouts.yaml#\$.paths./settings/layouts.get) to retrieve the Layout ID. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   pipeline?: {
>     display_value?: string | null,
>     default?: boolean | null,
>     maps?: {
>       display_value?: string | null,
>       sequence_number?: number | null,
>       colour_code?: string | null,
>       forecast_category?: {
>         name?: string | null,
>         id?: string | null
>       } | null,
>       actual_value?: string | null,
>       id?: string | null,
>       forecast_type?: string | null
>     }[] | null,
>     actual_value?: string | null,
>     id?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### replace

`pipelines.replace`

Pipeline. Update or replace a specific pipeline identified by the path ID for the specified layout.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.pipelines.replace({
	pipelineIdentifier: 'example',
	layout_id: '4876876000000333001',
	pipeline: [{}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pipelineIdentifier` | `string` | Yes | Specify the Pipeline ID. Use the [Get Pipeline API](pipeline.yaml#\$.paths./settings/pipeline.get) to get the Pipeline ID. |
| `layout_id` | `string` | Yes | Specify the Layout ID of the Deals module. Use the [Get Layouts Metadata API](layouts.yaml#\$.paths./settings/layouts.get) to retrieve the Layout ID. |
| `pipeline` | `object[]` | Yes | Array of pipeline picklist configurations to create or update. |

> [accordion] pipeline full type
>
> ```ts theme={null}
> {
>   display_value?: string,
>   _delete?: {
>     permanent: any | null
>   },
>   default?: boolean,
>   maps?: {
>     id: string,
>     display_value?: string,
>     _delete?: {
>       permanent: any | null
>     },
>     sequence_number?: number | string
>   }[]
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `pipeline` | `object[] \| null` | No | Array of individual success responses matching the request pipeline items. |

> [accordion] pipeline full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### replaceMany

`pipelines.replaceMany`

Pipeline. Update, or delete a pipeline for the specified layout using the supplied pipeline configuration in the request body.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.pipelines.replaceMany({
	layout_id: '4876876000000333001',
	pipeline: [{ id: '4876876000000333001' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `layout_id` | `string` | Yes | Specify the Layout ID of the Deals module. Use the [Get Layouts Metadata API](layouts.yaml#\$.paths./settings/layouts.get) to retrieve the Layout ID. |
| `pipeline` | `object[]` | Yes | Array of pipeline picklist configurations to create or update. |

> [accordion] pipeline full type
>
> ```ts theme={null}
> {
>   id: string,
>   display_value?: string,
>   _delete?: {
>     permanent: any | null
>   },
>   default?: boolean,
>   maps?: {
>     id: string,
>     display_value?: string,
>     _delete?: {
>       permanent: any | null
>     },
>     sequence_number?: number | string
>   }[]
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `pipeline` | `object[] \| null` | No | Array of individual success responses matching the request pipeline items. |

> [accordion] pipeline full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### transferAndDelete

`pipelines.transferAndDelete`

Transfer Pipeline. Transfer records and stage mappings from one pipeline to another in the specified layout, and delete the source pipeline after the transfer is scheduled.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.pipelines.transferAndDelete({
	layout_id: '4876876000000333001',
	transfer_pipeline: [{
		pipeline: { from: 'example', to: 'example' },
		stages: [{ from: 'example', to: 'example' }],
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `layout_id` | `string` | Yes | Specify the Layout ID of the Deals module. Use the [Get Layouts Metadata API](layouts.yaml#\$.paths./settings/layouts.get) to retrieve the Layout ID. |
| `transfer_pipeline` | `object[]` | Yes | Array of pipeline transfer mappings showing source and target configurations. |

> [accordion] transfer\_pipeline full type
>
> ```ts theme={null}
> {
>   pipeline: {
>     from: string,
>     to: string
>   },
>   stages: {
>     from: string,
>     to: string
>   }[]
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `transfer_pipeline` | `object[] \| null` | No | Array of pipeline transfer scheduling results maintaining 1:1 correspondence with request. |

> [accordion] transfer\_pipeline full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     job_id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### update

`pipelines.update`

Pipeline. Update or delete a specific pipeline identified by the path ID within the specified layout.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.pipelines.update({
	pipelineIdentifier: 'example',
	layout_id: '4876876000000333001',
	pipeline: [{}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `pipelineIdentifier` | `string` | Yes | Specify the Pipeline ID. Use the [Get Pipeline API](pipeline.yaml#\$.paths./settings/pipeline.get) to get the Pipeline ID. |
| `layout_id` | `string` | Yes | Specify the Layout ID of the Deals module. Use the [Get Layouts Metadata API](layouts.yaml#\$.paths./settings/layouts.get) to retrieve the Layout ID. |
| `pipeline` | `object[]` | Yes | Array of pipeline picklist configurations to create or update. |

> [accordion] pipeline full type
>
> ```ts theme={null}
> {
>   display_value?: string,
>   _delete?: {
>     permanent: any | null
>   },
>   default?: boolean,
>   maps?: {
>     id: string,
>     display_value?: string,
>     _delete?: {
>       permanent: any | null
>     },
>     sequence_number?: number | string
>   }[]
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `pipeline` | `object[] \| null` | No | Array of individual success responses matching the request pipeline items. |

> [accordion] pipeline full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### updateMany

`pipelines.updateMany`

Pipeline. Update or delete a pipeline for the specified layout using a request body that identifies the pipeline and its stage mappings.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.pipelines.updateMany({
	layout_id: '4876876000000333001',
	pipeline: [{ id: '4876876000000333001' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `layout_id` | `string` | Yes | Specify the Layout ID of the Deals module. Use the [Get Layouts Metadata API](layouts.yaml#\$.paths./settings/layouts.get) to retrieve the Layout ID. |
| `pipeline` | `object[]` | Yes | Array of pipeline picklist configurations to create or update. |

> [accordion] pipeline full type
>
> ```ts theme={null}
> {
>   id: string,
>   display_value?: string,
>   _delete?: {
>     permanent: any | null
>   },
>   default?: boolean,
>   maps?: {
>     id: string,
>     display_value?: string,
>     _delete?: {
>       permanent: any | null
>     },
>     sequence_number?: number | string
>   }[]
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `pipeline` | `object[] \| null` | No | Array of individual success responses matching the request pipeline items. |

> [accordion] pipeline full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

## Portals

### create

`portals.create`

Portal. To create a Client Portal for the Zoho CRM organization. Only one portal can be created per organization. The portal name must be unique across Zoho, between 6 and 30 characters.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.portals.create({
	portals: [{ name: 'example' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `portals` | `object[]` | Yes | Specify the list of portals to create. Only one portal is allowed per request. |

> [accordion] portals full type
>
> ```ts theme={null}
> {
>   name: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `portals` | `object[] \| null` | No | Represents the list of created portals. |

> [accordion] portals full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   message?: string | null,
>   details?: {
>     name?: string | null
>   } | null,
>   status?: string | null
> }[] | null
> ```

***

### get

`portals.get`

Specific Portal. To retrieve the complete configuration of a specific portal in the Zoho CRM organization, including its SAML authentication settings, active status, and creation metadata.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.portals.get({ portal: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `portal` | `string` | Yes | Specify the API name of the portal to retrieve or update. Use the Get Portals operation to retrieve the list of available portals and their names. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   portals?: {
>     name?: string | null,
>     created_time?: string | null,
>     modified_time?: string | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     zaid?: string | null,
>     active?: boolean | null,
>     saml_configuration?: {
>       login_url?: string | null,
>       logout_url?: string | null,
>       public_key?: string | null,
>       active?: boolean | null,
>       modified_by?: {
>         name?: string | null,
>         id?: string | null
>       } | null,
>       created_by?: {
>         name?: string | null,
>         id?: string | null
>       } | null
>     } | null | null,
>     login_url?: string | null,
>     acs_url?: string | null,
>     admin_zuid?: number | null,
>     default_relay_state_url?: string | null,
>     issuer?: string | null,
>     single_logout_url?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### list

`portals.list`

Portals. To retrieve the list of all portals configured for the Zoho CRM organization. A 204 response indicates no portal has been created yet.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.portals.list({});
```

**Input:** *empty object*

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   portals?: {
>     created_time?: string | null,
>     modified_time?: string | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     zaid?: string | null,
>     name?: string | null,
>     active?: boolean | null,
>     login_url?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### update

`portals.update`

Portal. To update the configuration of an existing portal in the Zoho CRM organization, including the portal name and SAML single sign-on settings.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.portals.update({
	portal: 'example',
	portals: [{}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `portal` | `string` | Yes | Specify the API name of the portal to retrieve or update. Use the Get Portals operation to retrieve the list of available portals and their names. |
| `portals` | `object[]` | Yes | Specify the list of portal update objects. Only one portal is allowed per request. |

> [accordion] portals full type
>
> ```ts theme={null}
> {
>   name?: string,
>   saml_configuration?: {
>     login_url: string,
>     logout_url: string,
>     public_key: string,
>     active?: boolean
>   }
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `portals` | `object[] \| null` | No | Represents the list of updated portal results. |

> [accordion] portals full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   message?: string | null,
>   details?: {
>     name?: string | null
>   } | null,
>   status?: string | null
> }[] | null
> ```

***

### users.changeStatus

`portals.users.changeStatus`

Change status of portal users. Changing portal users status.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.portals.users.changeStatus({
	portal: 'example',
	userType: 1,
	recordId: 1,
	active: true,
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `portal` | `string` | Yes | Specify the unique identifier of the portal. Refer to the [Get Portals](https://www.zoho.com/crm/developer/docs/api/v8/get-portals.html) resource for valid values. |
| `userType` | `number \| string` | Yes | Specify the user type of the portal users. Refer to the [Get Portal User Types](https://www.zoho.com/crm/developer/docs/api/v8/get-user-types.html) resource for valid values. |
| `recordId` | `number \| string` | Yes | Specify the unique identifier of the CRM record for which you want to perform the portal action. |
| `active` | `boolean` | Yes | **true** activates the user in the portal, and **false** deactivates the user in the portal. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `change_status` | `object[] \| null` | No | Represents the list of portal user status change results. Contains one result object per requested status change. |

> [accordion] change\_status full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     personality_id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### users.changeStatusMany

`portals.users.changeStatusMany`

Portal User Status. To activate or deactivate multiple portal users in bulk in your Zoho CRM organization for the specified portal and user type.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.portals.users.changeStatusMany({
	portal: 'example',
	userType: 1,
	change_status: [{
		users: [{ personality_id: 'example', active: true }],
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `portal` | `string` | Yes | Specify the unique identifier of the portal. Refer to the [Get Portals](https://www.zoho.com/crm/developer/docs/api/v8/get-portals.html) resource for valid values. |
| `userType` | `number \| string` | Yes | Specify the user type of the portal users. Refer to the [Get Portal User Types](https://www.zoho.com/crm/developer/docs/api/v8/get-user-types.html) resource for valid values. |
| `change_status` | `object[]` | Yes | Represents the list of portal user status change results. Contains one result object per requested status change. |

> [accordion] change\_status full type
>
> ```ts theme={null}
> {
>   users: {
>     active: boolean,
>     personality_id: string
>   }[],
>   id?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `change_status` | `object[] \| null` | No | Represents the list of portal user status change results. Contains one result object per requested status change. |

> [accordion] change\_status full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     job_id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### users.deleteMany

`portals.users.deleteMany`

delete portal users. To delete one or more portal users from your Zoho CRM organization for the specified portal and user type. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.portals.users.deleteMany({ portal: 'example', userType: 1 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `portal` | `string` | Yes | Specify the unique identifier of the portal. Refer to the [Get Portals](https://www.zoho.com/crm/developer/docs/api/v8/get-portals.html) resource for valid values. |
| `userType` | `number \| string` | Yes | Specify the user type of the portal users. Refer to the [Get Portal User Types](https://www.zoho.com/crm/developer/docs/api/v8/get-user-types.html) resource for valid values. |
| `personality_ids` | `string` | No | List for record IDs of portal users to be deleted. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `users` | `object[] \| null` | No | Represents the list of deleted portal user results. Contains one result object per requested deletion. |

> [accordion] users full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   message?: string | null,
>   details?: {
>     personality_id?: string | null
>   } | null,
>   status?: string | null
> }[] | null
> ```

***

### users.getScheduledInviteInfo

`portals.users.getScheduledInviteInfo`

Invite portal users. To retrieve the status of a scheduled portal invitation job in your Zoho CRM organization using the job identifier returned when invitations were scheduled.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.portals.users.getScheduledInviteInfo({ module: 'Leads' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the API name of the CRM module for which you want to manage portal users. Refer to the [Get Modules](https://www.zoho.com/crm/developer/docs/api/v8/modules-api.html) resource for valid values. |
| `job_id` | `string` | No | The ID of the job you received in the response of the [Bulk Invite Users to a Portal API](https://www.zoho.com/crm/developer/docs/api/v8/portal-bulk-invite-users.html). When you do not include this parameter, the response will contain an array of all the jobs that were scheduled previously. If you give an incorrect job\_id, you will get an empty response(HTTP 204). |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   portal_invite?: {
>     data?: {
>       details?: {
>         id?: string | null
>       } | null,
>       code?: string | null,
>       message?: string | null,
>       status?: string | null
>     }[] | null,
>     job_id?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### users.invite

`portals.users.invite`

Invite portal users. To send a portal invitation to a single CRM record in your Zoho CRM organization, inviting or re-inviting the record as a portal user for the specified user type. Emails a portal invitation.

**Risk:** `destructive`

```ts theme={null}
await corsair.zohocrm.api.portals.users.invite({
	module: 'Leads',
	recordId: 1,
	user_type_id: 'example',
	type: 'reinvite',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the API name of the CRM module for which you want to manage portal users. Refer to the [Get Modules](https://www.zoho.com/crm/developer/docs/api/v8/modules-api.html) resource for valid values. |
| `recordId` | `number \| string` | Yes | Specify the unique identifier of the CRM record for which you want to perform the portal action. |
| `language` | `"" \| it_IT \| ru_RU \| pl_PL \| tr_TR \| hi_IN \| pt_BR \| th_TH \| fr_FR \| ja_JP \| in_ID \| cs_CZ \| de_DE \| hu_HU \| zh_TW \| es_ES \| nl_NL \| sv_SE \| da_DK \| bg_BG \| vi_VN \| iw_IL \| hr_HR \| en_GB \| ko_KR \| en_US \| zh_CN \| ar_EG \| pt_PT` | No | Preferred language for the invitation |
| `user_type_id` | `string` | Yes | The ID of the user type you want to assign this user with. Use the [Get User Types API](https://www.zoho.com/crm/developer/docs/api/v8/get-user-types.html) for this ID. |
| `type` | `reinvite \| invite` | Yes | Represents whether the user is invited the first time or is re-invited. The possible values are invite and reinvite. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `portal_invite` | `object[] \| null` | No | Represents the list of portal invitation response objects. Contains one object per invitation batch. |

> [accordion] portal\_invite full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     record_id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### users.inviteMany

`portals.users.inviteMany`

Invite portal users. To send portal invitations in bulk to CRM records in your Zoho CRM organization for the specified module, scheduling them as asynchronous invitation jobs. Emails portal invitations.

**Risk:** `destructive`

```ts theme={null}
await corsair.zohocrm.api.portals.users.inviteMany({
	module: 'Leads',
	portal_invite: [{
		data: [{ id: '4876876000000333001', user_type_id: 'example', type: 'reinvite' }],
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the API name of the CRM module for which you want to manage portal users. Refer to the [Get Modules](https://www.zoho.com/crm/developer/docs/api/v8/modules-api.html) resource for valid values. |
| `portal_invite` | `object[]` | Yes | Specify the list of portal invitation objects. Each object must contain a **data** array of user records to invite. |

> [accordion] portal\_invite full type
>
> ```ts theme={null}
> {
>   data: {
>     id: string,
>     user_type_id: string,
>     type: reinvite | invite,
>     language?: "" | it_IT | ru_RU | pl_PL | tr_TR | hi_IN | pt_BR | th_TH | fr_FR | ja_JP | in_ID | cs_CZ | de_DE | hu_HU | zh_TW | es_ES | nl_NL | sv_SE | da_DK | bg_BG | vi_VN | iw_IL | hr_HR | en_GB | ko_KR | en_US | zh_CN | ar_EG | pt_PT | null
>   }[]
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `portal_invite` | `object[] \| null` | No | Represents the list of portal invitation response objects. Contains one object per invitation batch. |

> [accordion] portal\_invite full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     job_id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### users.list

`portals.users.list`

List portal users. To retrieve the list of portal users in your Zoho CRM organization for the specified portal and user type, with optional filtering by source.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.portals.users.list({ portal: 'example', userType: 1 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `portal` | `string` | Yes | Specify the unique identifier of the portal. Refer to the [Get Portals](https://www.zoho.com/crm/developer/docs/api/v8/get-portals.html) resource for valid values. |
| `userType` | `number \| string` | Yes | Specify the user type of the portal users. Refer to the [Get Portal User Types](https://www.zoho.com/crm/developer/docs/api/v8/get-user-types.html) resource for valid values. |
| `page` | `number \| string` | No | Represents the number of records to return per page. |
| `per_page` | `number \| string` | No | Represents number of records to return per page. |
| `Source__s` | `string` | No | Represents the source of the user record. |
| `filters` | `string` | No | Represents the filters of the user record. |
| `personality_ids` | `string` | No | Represents the list of portal user record IDs to filter the results. |
| `type` | `string` | No | Represents the filter type for the portal users. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   users?: {
>     personality_id?: string | null,
>     confirm?: boolean | null,
>     status_reason__s?: string | null,
>     created_time?: string | null,
>     module?: string | null,
>     name?: string | null,
>     active?: boolean | null,
>     email?: string | null,
>     Source__s?: string | null
>   }[] | null,
>   info?: {
>     total_count?: number | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### users.transfer

`portals.users.transfer`

Transfer portal users from one user group to another. To transfer one or more portal users from one user type group to another within the same portal in your Zoho CRM organization.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.portals.users.transfer({
	portal: 'example',
	userType: 1,
	transfer_To: 'example',
	personality_ids: 'example',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `portal` | `string` | Yes | Specify the unique identifier of the portal. Refer to the [Get Portals](https://www.zoho.com/crm/developer/docs/api/v8/get-portals.html) resource for valid values. |
| `userType` | `number \| string` | Yes | Specify the user type of the portal users. Refer to the [Get Portal User Types](https://www.zoho.com/crm/developer/docs/api/v8/get-user-types.html) resource for valid values. |
| `transfer_To` | `string` | Yes | The ID of the user type to which you want to transfer the users. |
| `personality_ids` | `string` | Yes | The ID of the user type to which you want to transfer the users. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `users` | `object[] \| null` | No | Represents the list of transferred portal user results. Contains one result object per transferred user. |

> [accordion] users full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     personality_id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### userTypes.create

`portals.userTypes.create`

Portal User Type. Creates a new portal user type for the specified portal. A portal user type defines the personality module, invitation field, and per-module access permissions for portal users. The portal must already exist in the organization's Zoho CRM account.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.portals.userTypes.create({
	portal: 'example',
	user_type: [{
		invitation_field: {},
		modules: [{
			id: '4876876000000333001',
			permissions: { view: true },
			shared_type: 'private',
		}],
		name: 'example',
		personality_module: {},
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `portal` | `string` | Yes | Specify the API name of the portal whose user types are being managed. This is the unique identifier for the portal in Zoho CRM. |
| `user_type` | `object[]` | Yes | An array containing the portal user type configuration to create. Must contain exactly one user type object. |

> [accordion] user\_type full type
>
> ```ts theme={null}
> {
>   personality_module: {
>     api_name?: string,
>     id?: string
>   },
>   name: string,
>   active?: boolean | null,
>   invitation_field: {
>     api_name?: string | null,
>     id?: string
>   },
>   deactive_user_count?: number | string | null,
>   modules: {
>     plural_label?: string | null,
>     shared_type: private | public,
>     api_name?: string,
>     permissions: {
>       view: boolean,
>       delete_attachment?: boolean | null,
>       edit?: boolean | null,
>       edit_shared_records?: boolean | null,
>       create?: boolean | null,
>       create_attachment?: boolean | null,
>       delete?: boolean | null
>     },
>     id: string,
>     filters?: {
>       display_label?: string,
>       api_name?: string,
>       id?: string
>     }[] | null,
>     fields?: {
>       read_only?: boolean | null,
>       api_name?: string,
>       id?: string,
>       permissions?: {
>         iscustomizable: boolean,
>         view?: boolean,
>         edit?: boolean,
>         create?: boolean,
>         delete?: boolean
>       }[]
>     }[] | null,
>     layouts?: {
>       display_label?: string,
>       name?: string,
>       id?: string,
>       _default_view?: {
>         display_label?: string,
>         name?: string,
>         id?: string,
>         type?: string
>       } | {
>         display_label?: string,
>         name?: string,
>         id?: string,
>         type?: string
>       }
>     }[] | null,
>     views?: {
>       display_label?: string,
>       name?: string,
>       id?: string,
>       type?: canvas_view | custom_view
>     } | null
>   }[]
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `user_type` | `object[] \| null` | No | An array containing the full configuration of the newly created portal user type, including its generated identifier. |

> [accordion] user\_type full type
>
> ```ts theme={null}
> {
>   default?: boolean | null,
>   personality_module?: {
>     plural_label?: string | null,
>     api_name?: string | null,
>     id?: string | null
>   } | null,
>   name?: string | null,
>   active?: boolean | null,
>   invitation_field?: {
>     api_name?: string | null | null,
>     id?: string | null
>   } | null,
>   id?: string | null,
>   modules?: {
>     plural_label?: string | null | null,
>     shared_type?: string | null,
>     api_name?: string | null,
>     permissions?: {
>       view?: boolean | null,
>       delete_attachment?: boolean | null | null,
>       edit?: boolean | null | null,
>       edit_shared_records?: boolean | null | null,
>       create?: boolean | null | null,
>       create_attachment?: boolean | null | null,
>       delete?: boolean | null | null
>     } | null,
>     id?: string | null,
>     filters?: {
>       display_label?: string | null,
>       api_name?: string | null,
>       id?: string | null
>     }[] | null | null,
>     fields?: {
>       read_only?: boolean | null | null,
>       api_name?: string | null,
>       id?: string | null,
>       permissions?: {
>         iscustomizable?: boolean | null,
>         view?: boolean | null,
>         edit?: boolean | null,
>         create?: boolean | null,
>         delete?: boolean | null
>       }[] | null
>     }[] | null | null,
>     layouts?: {
>       display_label?: string | null,
>       name?: string | null,
>       id?: string | null,
>       _default_view?: {
>         display_label?: string | null,
>         name?: string | null,
>         id?: string | null,
>         type?: string | null
>       } | {
>         display_label?: string | null,
>         name?: string | null,
>         id?: string | null,
>         type?: string | null
>       } | null
>     }[] | null | null,
>     views?: {
>       display_label?: string | null,
>       name?: string | null,
>       id?: string | null,
>       type?: string | null
>     } | null | null
>   }[] | null
> }[] | null
> ```

***

### userTypes.delete

`portals.userTypes.delete`

Delete user type. Deletes the specified portal user type from the portal. If portal users are assigned to this user type, provide transfer\_To with the ID of another user type to transfer them before deletion. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.portals.userTypes.delete({ portal: 'example', userTypeId: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `portal` | `string` | Yes | Specify the API name of the portal whose user types are being managed. This is the unique identifier for the portal in Zoho CRM. |
| `userTypeId` | `string` | Yes | Provide the unique numeric identifier of the portal user type to retrieve, update, or delete. |
| `transfer_To` | `string` | No | The ID of the portal user type to transfer existing users to before deleting. Required when the user type being deleted has active users assigned to it. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `user_type` | `object[] \| null` | No | An array containing the result of the delete operation, including the identifier of the deleted user type. |

> [accordion] user\_type full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### userTypes.get

`portals.userTypes.get`

Portal User Type. Retrieves the full configuration of a single portal user type, including identity fields, active status, user counts, audit metadata, personality module, invitation field, and per-module access permissions.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.portals.userTypes.get({ portal: 'example', userTypeId: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `portal` | `string` | Yes | Specify the API name of the portal whose user types are being managed. This is the unique identifier for the portal in Zoho CRM. |
| `userTypeId` | `string` | Yes | Provide the unique numeric identifier of the portal user type to retrieve, update, or delete. |
| `include_inner_details` | `string` | No | When set to `fields` or another resource key, the response includes the detailed fields or sub-resource properties for the included modules. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   user_type?: {
>     default?: boolean | null,
>     active_user_count?: number | null,
>     personality_module?: {
>       plural_label?: string | null,
>       api_name?: string | null,
>       id?: string | null
>     } | null,
>     name?: string | null,
>     active?: boolean | null,
>     invitation_field?: {
>       api_name?: string | null,
>       id?: string | null
>     } | null,
>     id?: string | null,
>     deactive_user_count?: number | null,
>     modules?: {
>       plural_label?: string | null | null,
>       shared_type?: string | null,
>       api_name?: string | null,
>       permissions?: {
>         view?: boolean | null,
>         delete_attachment?: boolean | null | null,
>         edit?: boolean | null | null,
>         edit_shared_records?: boolean | null | null,
>         create?: boolean | null | null,
>         create_attachment?: boolean | null | null,
>         delete?: boolean | null | null
>       } | null,
>       id?: string | null,
>       filters?: {
>         display_label?: string | null,
>         api_name?: string | null,
>         id?: string | null
>       }[] | null | null,
>       fields?: {
>         read_only?: boolean | null | null,
>         api_name?: string | null,
>         id?: string | null,
>         permissions?: {
>           iscustomizable?: boolean | null,
>           view?: boolean | null,
>           edit?: boolean | null,
>           create?: boolean | null,
>           delete?: boolean | null
>         }[] | null
>       }[] | null | null,
>       layouts?: {
>         display_label?: string | null,
>         name?: string | null,
>         id?: string | null,
>         _default_view?: {
>           display_label?: string | null,
>           name?: string | null,
>           id?: string | null,
>           type?: string | null
>         } | {
>           display_label?: string | null,
>           name?: string | null,
>           id?: string | null,
>           type?: string | null
>         } | null
>       }[] | null | null,
>       views?: {
>         display_label?: string | null,
>         name?: string | null,
>         id?: string | null,
>         type?: string | null
>       } | null | null
>     }[] | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### userTypes.list

`portals.userTypes.list`

Portal User Types. Retrieves a list of all portal user types configured for the specified portal, with their summary configuration including name, status, user counts, and last modification time.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.portals.userTypes.list({ portal: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `portal` | `string` | Yes | Specify the API name of the portal whose user types are being managed. This is the unique identifier for the portal in Zoho CRM. |
| `include` | `string` | No | When set to `modules`, the response includes the full list of CRM modules and their access configurations for each portal user type. |
| `include_inner_details` | `string` | No | When set to `fields` or another resource key, the response includes the detailed fields or sub-resource properties for the included modules. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   user_type?: {
>     created_time?: string | null,
>     default?: boolean | null,
>     modified_time?: string | null,
>     active_user_count?: number | null,
>     personality_module?: {
>       plural_label?: string | null,
>       api_name?: string | null,
>       id?: string | null
>     } | null,
>     name?: string | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     active?: boolean | null,
>     invitation_field?: {
>       api_name?: string | null,
>       id?: string | null
>     } | null,
>     id?: string | null,
>     deactive_user_count?: number | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### userTypes.update

`portals.userTypes.update`

Portal User Type. Updates the configuration of an existing portal user type. You can modify module-level access settings, including shared type, allowed layouts, filter fields, and field-level permissions.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.portals.userTypes.update({
	portal: 'example',
	userTypeId: 'example',
	user_type: [{}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `portal` | `string` | Yes | Specify the API name of the portal whose user types are being managed. This is the unique identifier for the portal in Zoho CRM. |
| `userTypeId` | `string` | Yes | Provide the unique numeric identifier of the portal user type to retrieve, update, or delete. |
| `user_type` | `object[]` | Yes | An array containing the portal user type configuration to update. Must contain exactly one user type object with the fields to be modified. |

> [accordion] user\_type full type
>
> ```ts theme={null}
> {
>   personality_module?: {
>     api_name?: string,
>     id?: string
>   },
>   name?: string | null,
>   active?: boolean | null,
>   modules?: {
>     shared_type?: public | private | null,
>     permissions?: {
>       edit_shared_records?: boolean,
>       create?: boolean,
>       view?: boolean,
>       edit?: boolean,
>       delete?: boolean
>     },
>     id?: string,
>     filters?: {
>       display_label?: string,
>       id?: string,
>       api_name?: string
>     }[] | null,
>     layouts?: {
>       display_label?: string,
>       name?: string,
>       id?: string,
>       _default_view?: {
>         display_label?: string,
>         name?: string,
>         id?: string,
>         type?: string
>       } | {
>         display_label?: string,
>         name?: string,
>         id?: string,
>         type?: string
>       }
>     }[] | null,
>     views?: {
>       display_label?: string,
>       name?: string,
>       id?: string,
>       type?: canvas_view | custom_view
>     } | null
>   }[] | null
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `user_type` | `object[] \| null` | No | An array containing the result of the update operation, including the updated user type identifier. |

> [accordion] user\_type full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

## Profiles

### clone

`profiles.clone`

Clone a CRM profile. Creates a new profile by cloning the existing profile identified by \{id}. The request body must include the new profile's name, which must be unique within the organization and must not exceed 50 characters. See Create a Profile.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.profiles.clone({
	id: '4876876000000333001',
	profiles: [{ name: 'example' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Unique record identifier - a 64-bit integer encoded as a string of 1 to 19 decimal digits. |
| `profiles` | `object[]` | Yes | Single-item JSON array containing the new profile definition for the clone operation. |

> [accordion] profiles full type
>
> ```ts theme={null}
> {
>   name: string,
>   description?: string | null
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `profiles` | `object[] \| null` | No | Array containing the clone action result (contains at most one entry). |

> [accordion] profiles full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### delete

`profiles.delete`

Profile. Transfers all users of the profile identified by \{id} to the profile specified by the transfer\_to query parameter, then permanently deletes the source profile. System profiles (Administrator, Standard) cannot be deleted. See Transfer Users and Delete a Profile. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.profiles.delete({ id: '4876876000000333001', transfer_to: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Unique record identifier - a 64-bit integer encoded as a string of 1 to 19 decimal digits. |
| `transfer_to` | `string` | Yes | Unique record identifier - a 64-bit integer encoded as a string of 1 to 19 decimal digits. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `status` | `string \| null` | No | Status of the operation result. Possible values: `success`. Example: "success". |
| `code` | `string \| null` | No | The status code of the result. **Possible values:** **SUCCESS** Example: "SUCCESS". |
| `message` | `string \| null` | No | Human-readable message confirming the delete result. |
| `details` | `object \| null` | No | Additional details returned with the delete operation result. |

> [accordion] details full type
>
> ```ts theme={null}
> {
>   id?: string | null
> } | null
> ```

***

### get

`profiles.get`

Profile. Retrieves the full details of the CRM profile identified by \{id}, including its complete permission tree organized by sections and categories. See Get Profiles.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.profiles.get({ id: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Unique record identifier - a 64-bit integer encoded as a string of 1 to 19 decimal digits. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   profiles?: {
>     api_name?: string | null,
>     id?: string | null,
>     created_time?: string | null | null,
>     modified_time?: string | null | null,
>     name?: string | null,
>     display_label?: string | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     description?: string | null | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     custom?: boolean | null,
>     type?: string | null,
>     permissions_details?: {
>       display_label?: string | null,
>       module?: string | null | null,
>       name?: string | null,
>       customizable?: boolean | null,
>       id?: string | null,
>       enabled?: boolean | null,
>       tooltip_msg?: string | null,
>       api_name?: string | null,
>       active?: boolean | null,
>       description?: string | null | null,
>       custom_permission?: boolean | null,
>       parent_permissions?: string[] | null | null
>     }[] | null,
>     $has_more?: boolean | null,
>     sections?: {
>       name?: string | null,
>       categories?: {
>         display_label?: string | null,
>         permissions_details?: string[] | null,
>         name?: string | null,
>         module?: string | null | null
>       }[] | null
>     }[] | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### list

`profiles.list`

Profiles. Retrieves the paginated list of all profiles in the organization, including each profile's name, type, permission details, and section groupings. Use the type query parameter to filter by profile type, and include\_types to include Lite or Support profiles alongside the default set.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.profiles.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `type` | `private_profile \| normal_profile \| portal_profile` | No | Filters the returned profiles by profile type. Use `private_profile` to retrieve profiles used exclusively with team modules - private profiles are not allowed for normal custom modules, and non-private profiles are not allowed for team modules. **Possible values:** **`private_profile`**, **`normal_profile`**, **`portal_profile`**. |
| `include_types` | `string` | No | Comma-separated list of additional profile types to include alongside the default Administrator, Standard, and custom profiles. Accepted pattern: `(Lite\|Support)(,(Lite\|Support))*`. |
| `filters` | `any` | No | JSON-encoded filter criteria to narrow the profiles returned. Accepts a `Filters` object with `group` conditions and a `group_operator`. |
| `page` | `number \| string` | No | Page number for paginated results. Defaults to 1. |
| `per_page` | `number \| string` | No | Maximum number of profiles to return per page. Minimum 1, maximum 200. Defaults to 200. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   profiles?: {
>     api_name?: string | null,
>     id?: string | null,
>     created_time?: string | null | null,
>     modified_time?: string | null | null,
>     name?: string | null,
>     display_label?: string | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     description?: string | null | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     custom?: boolean | null,
>     type?: string | null,
>     permissions_details?: {
>       display_label?: string | null,
>       module?: string | null | null,
>       name?: string | null,
>       customizable?: boolean | null,
>       id?: string | null,
>       enabled?: boolean | null,
>       tooltip_msg?: string | null,
>       api_name?: string | null,
>       active?: boolean | null,
>       description?: string | null | null,
>       custom_permission?: boolean | null,
>       parent_permissions?: string[] | null | null
>     }[] | null,
>     $has_more?: boolean | null,
>     sections?: {
>       name?: string | null,
>       categories?: {
>         display_label?: string | null,
>         permissions_details?: string[] | null,
>         name?: string | null,
>         module?: string | null | null
>       }[] | null
>     }[] | null
>   }[] | null,
>   info?: {
>     per_page?: number | null,
>     page?: number | null,
>     count?: number | null,
>     more_records?: boolean | null,
>     license_limit?: number | null
>   } | {
>     license_limit?: number | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### patch

`profiles.patch`

Profile. Partially updates the name, description, and permission enablement for the profile identified by \{id}. System profiles (Administrator, Standard) cannot be updated. See Update Profile Permission.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.profiles.patch({
	id: '4876876000000333001',
	profiles: [{}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Unique record identifier - a 64-bit integer encoded as a string of 1 to 19 decimal digits. |
| `profiles` | `object[]` | Yes | Specify a single-item JSON array containing the profile update payload. |

> [accordion] profiles full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   description?: string | null,
>   permissions_details?: {
>     id: string,
>     enabled: boolean
>   }[]
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `profiles` | `object[] \| null` | No | Update results for the profile (up to 50 entries). |

> [accordion] profiles full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   status?: string | null,
>   message?: string | null
> }[] | null
> ```

***

### update

`profiles.update`

Specific Profile. Replaces the name, description, and permission enablement for the profile identified by \{id}. System profiles (Administrator, Standard) cannot be updated. See Update Profile Permission.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.profiles.update({
	id: '4876876000000333001',
	profiles: [{}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Unique record identifier - a 64-bit integer encoded as a string of 1 to 19 decimal digits. |
| `profiles` | `object[]` | Yes | Specify a single-item JSON array containing the profile update payload. |

> [accordion] profiles full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   description?: string | null,
>   permissions_details?: {
>     id: string,
>     enabled: boolean
>   }[]
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `profiles` | `object[] \| null` | No | Update results for the profile (up to 50 entries). |

> [accordion] profiles full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   status?: string | null,
>   message?: string | null
> }[] | null
> ```

***

## Record Locking

### configurations.create

`recordLocking.configurations.create`

Create record locking configuration. Creates a new record locking configuration for the specified module. You can define locking rules, restricted actions, excluded fields, and other settings.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.recordLocking.configurations.create({
	module: 'Leads',
	record_locking_configurations: [{ lock_type: 'automatic' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | The API name of the module for which the record locking configuration is being managed. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve module names. |
| `record_locking_configurations` | `object[]` | Yes | Array containing the record locking configuration details to be created. |

> [accordion] record\_locking\_configurations full type
>
> ```ts theme={null}
> {
>   lock_type: automatic | manual | both,
>   locked_for?: all_profiles | all_profiles_except_excluded_profiles,
>   restricted_actions?: (change_owner | update | delete | tags)[],
>   excluded_fields?: {
>     id: string
>   }[],
>   feature_type?: string,
>   locking_rules?: {
>     name: string,
>     lock_existing_records?: boolean,
>     criteria: {
>     }
>   }[],
>   restricted_communications?: string[],
>   restricted_custom_buttons?: {
>     id: string
>   }[],
>   lock_excluded_profiles?: {
>     id: string
>   }[],
>   lock_for_portal_users?: boolean
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `record_locking_configurations` | `object[] \| null` | No | Array containing details of the created record locking configuration. |

> [accordion] record\_locking\_configurations full type
>
> ```ts theme={null}
> {
>   status?: string | null,
>   code?: string | null,
>   message?: string | null,
>   details?: {
>     id?: string | null
>   } | null
> }[] | null
> ```

***

### configurations.delete

`recordLocking.configurations.delete`

Delete specific record locking configuration. Deletes a specific record locking configuration using the configuration ID provided in the URL path. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.recordLocking.configurations.delete({ id: '4876876000000333001', module: 'Leads' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Unique identifier of the record locking configuration. This ID is returned in the response when a configuration is created or retrieved. |
| `module` | `string` | Yes | API name of the module. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve module names. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `record_locking_configurations` | `object[] \| null` | No | Array containing the deletion response. |

> [accordion] record\_locking\_configurations full type
>
> ```ts theme={null}
> {
>   status?: string | null,
>   code?: string | null,
>   message?: string | null,
>   details?: {
>     id?: string | null
>   } | null
> }[] | null
> ```

***

### configurations.deleteMany

`recordLocking.configurations.deleteMany`

Delete record locking configuration. Deletes the record locking configuration(s) for the specified module using the provided configuration IDs. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.recordLocking.configurations.deleteMany({ module: 'Leads', ids: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | The API name of the module for which the configuration should be deleted. |
| `ids` | `string` | Yes | Comma-separated list of record locking configuration IDs to delete. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `record_locking_configurations` | `object[] \| null` | No | Array containing details of the deleted configuration(s). |

> [accordion] record\_locking\_configurations full type
>
> ```ts theme={null}
> {
>   status?: string | null,
>   code?: string | null,
>   message?: string | null,
>   details?: {
>     id?: string | null
>   } | null
> }[] | null
> ```

***

### configurations.get

`recordLocking.configurations.get`

Get specific record locking configuration. Retrieves a specific record locking configuration using the configuration ID provided in the URL path.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.recordLocking.configurations.get({ module: 'Leads', id: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | API name of the module. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve module names. |
| `id` | `string` | Yes | Unique identifier of the record locking configuration. This ID is returned in the response when a configuration is created or retrieved. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   record_locking_configurations?: {
>     lock_type?: string | null,
>     locked_for?: string | null,
>     restricted_actions?: string[] | null,
>     created_time?: string | null,
>     excluded_fields?: {
>       api_name?: string | null,
>       id?: string | null
>     }[] | null,
>     feature_type?: string | null,
>     locking_rules?: {
>       name?: string | null,
>       id?: string | null,
>       lock_existing_records?: boolean | null,
>       criteria?: {
>         comparator?: string | null,
>         field?: {
>           api_name?: string | null,
>           id?: string | null
>         } | null,
>         type?: string | null,
>         value?: any | null
>       } | null
>     }[] | null,
>     modified_time?: string | null,
>     restricted_communications?: string[] | null,
>     system_defined?: boolean | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     id?: string | null,
>     restricted_custom_buttons?: {
>       name?: string | null,
>       id?: string | null
>     }[] | null | null,
>     lock_excluded_profiles?: {
>       name?: string | null,
>       id?: string | null
>     }[] | null,
>     lock_for_portal_users?: boolean | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### configurations.list

`recordLocking.configurations.list`

Get record locking configuration. Retrieves the existing record locking configuration for the specified module.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.recordLocking.configurations.list({ module: 'Leads' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | The API name of the module for which the record locking configuration is being managed. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve module names. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   record_locking_configurations?: {
>     lock_type?: string | null,
>     locked_for?: string | null,
>     restricted_actions?: string[] | null,
>     created_time?: string | null,
>     excluded_fields?: {
>       api_name?: string | null,
>       id?: string | null
>     }[] | null,
>     feature_type?: string | null,
>     locking_rules?: {
>       name?: string | null,
>       id?: string | null,
>       lock_existing_records?: boolean | null,
>       criteria?: {
>         comparator?: string | null,
>         field?: {
>           api_name?: string | null,
>           id?: string | null
>         } | null,
>         type?: string | null,
>         value?: any | null
>       } | null
>     }[] | null,
>     modified_time?: string | null,
>     restricted_communications?: string[] | null,
>     system_defined?: boolean | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     id?: string | null,
>     restricted_custom_buttons?: {
>       name?: string | null,
>       id?: string | null
>     }[] | null | null,
>     lock_excluded_profiles?: {
>       name?: string | null,
>       id?: string | null
>     }[] | null,
>     lock_for_portal_users?: boolean | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### configurations.update

`recordLocking.configurations.update`

Update specific record locking configuration. Updates an existing record locking configuration for the specified module using the configuration ID provided in the URL path.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.recordLocking.configurations.update({
	id: '4876876000000333001',
	module: 'Leads',
	record_locking_configurations: [{ id: '4876876000000333001' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Unique identifier of the record locking configuration. This ID is returned in the response when a configuration is created or retrieved. |
| `module` | `string` | Yes | API name of the module. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve module names. |
| `record_locking_configurations` | `object[]` | Yes | Array containing the updated configuration. |

> [accordion] record\_locking\_configurations full type
>
> ```ts theme={null}
> {
>   lock_type?: automatic | manual | both,
>   locked_for?: all_profiles | all_profiles_except_excluded_profiles,
>   restricted_actions?: (change_owner | update | delete | tags)[],
>   excluded_fields?: {
>     id: string
>   }[],
>   feature_type?: string,
>   locking_rules?: {
>     name: string,
>     id?: string,
>     lock_existing_records?: boolean,
>     criteria: {
>     }
>   }[],
>   restricted_communications?: string[],
>   id: string,
>   lock_excluded_profiles?: {
>     id: string
>   }[],
>   lock_for_portal_users?: boolean
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `record_locking_configurations` | `object[] \| null` | No | Array containing the update response. |

> [accordion] record\_locking\_configurations full type
>
> ```ts theme={null}
> {
>   status?: string | null,
>   code?: string | null,
>   message?: string | null,
>   details?: {
>     id?: string | null
>   } | null
> }[] | null
> ```

***

### configurations.updateMany

`recordLocking.configurations.updateMany`

Update record locking configuration. Updates an existing record locking configuration for the specified module. You can modify any of the configuration settings.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.recordLocking.configurations.updateMany({
	module: 'Leads',
	record_locking_configurations: [{ id: '4876876000000333001' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | The API name of the module for which the record locking configuration is being managed. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve module names. |
| `record_locking_configurations` | `object[]` | Yes | Array containing the updated record locking configuration. |

> [accordion] record\_locking\_configurations full type
>
> ```ts theme={null}
> {
>   lock_type?: automatic | manual | both,
>   locked_for?: all_profiles | all_profiles_except_excluded_profiles,
>   restricted_actions?: (change_owner | update | delete | tags)[],
>   excluded_fields?: {
>     id: string
>   }[],
>   feature_type?: string,
>   locking_rules?: {
>     name: string,
>     id?: string,
>     lock_existing_records?: boolean,
>     criteria: {
>     }
>   }[],
>   restricted_communications?: string[],
>   id: string,
>   lock_excluded_profiles?: {
>     id: string
>   }[],
>   lock_for_portal_users?: boolean
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `record_locking_configurations` | `object[] \| null` | No | Array containing the update response. |

> [accordion] record\_locking\_configurations full type
>
> ```ts theme={null}
> {
>   status?: string | null,
>   code?: string | null,
>   message?: string | null,
>   details?: {
>     id?: string | null
>   } | null
> }[] | null
> ```

***

### getLock

`recordLocking.getLock`

Get record locking information by ID. To retrieve the locking information details of a specific locked record in your Zoho CRM account using its locking information ID, including the user who locked the record, the lock source, reason, and timestamp.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.recordLocking.getLock({ moduleName: 'Leads', recordId: '4876876000000333001', lockId: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `moduleName` | `string` | Yes | The API name of the module to which the locked record belongs. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve module ID and API name. |
| `recordId` | `string` | Yes | Specify the unique identifier of the record for which you want to manage the lock. |
| `lockId` | `string` | Yes | Specify the unique identifier of the lock record to be removed or updated. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data?: {
>     Locked_By__s?: {
>       name?: string | null,
>       id?: string | null,
>       module?: string | null
>     } | null | null,
>     Locked_For__s?: {
>       module?: {
>         api_name?: string | null,
>         id?: string | null
>       } | null,
>       name?: string | null,
>       id?: string | null
>     } | null,
>     $field_states?: string | null | null,
>     Locked_Reason__s?: string | null | null,
>     $editable?: boolean | null,
>     $sharing_permission?: string | null,
>     Lock_Source__s?: string | null,
>     Locked_Time__s?: string | null,
>     Record_Locking_Configuration_Id__s?: string | null,
>     Record_Locking_Rule_Id__s?: string | null | null,
>     id?: string | null,
>     Feature_Type__s?: string | null,
>     $zia_visions?: string | null | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### listLocks

`recordLocking.listLocks`

Get record locking information. To retrieve the locking information details of a locked record in your Zoho CRM account, including the user who locked the record, the lock source, reason, and timestamp.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.recordLocking.listLocks({ moduleName: 'Leads', recordId: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `moduleName` | `string` | Yes | The API name of the module to which the locked record belongs. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve module ID and API name. |
| `recordId` | `string` | Yes | Specify the unique identifier of the record for which you want to manage the lock. |
| `fields` | `string` | No | Specify the field API names to include in the response. Accepts comma-separated values. Use the [Get Fields Metadata API](fields.yaml#\$.paths./settings/fields.get) to retrieve the field IDs. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data?: {
>     Locked_By__s?: {
>       name?: string | null,
>       id?: string | null,
>       module?: string | null
>     } | null | null,
>     Locked_For__s?: {
>       module?: {
>         api_name?: string | null,
>         id?: string | null
>       } | null,
>       name?: string | null,
>       id?: string | null
>     } | null,
>     $field_states?: string | null | null,
>     Locked_Reason__s?: string | null | null,
>     $editable?: boolean | null,
>     $sharing_permission?: string | null,
>     Lock_Source__s?: string | null,
>     Locked_Time__s?: string | null,
>     Record_Locking_Configuration_Id__s?: string | null,
>     Record_Locking_Rule_Id__s?: string | null | null,
>     id?: string | null,
>     Feature_Type__s?: string | null,
>     $zia_visions?: string | null | null
>   }[] | null,
>   info?: {
>     per_page?: number | null,
>     count?: number | null,
>     page?: number | null,
>     more_records?: boolean | null,
>     next_page_token?: string | null | null,
>     previous_page_token?: string | null | null,
>     page_token_expiry?: string | null | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### lock

`recordLocking.lock`

Lock a record. To lock a record in the specified module of your Zoho CRM account with a reason for locking.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.recordLocking.lock({
	recordId: '4876876000000333001',
	moduleName: 'Leads',
	data: [{ Locked_Reason__s: 'example' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `recordId` | `string` | Yes | Specify the unique identifier of the record for which you want to manage the lock. |
| `moduleName` | `string` | Yes | The API name of the module to which the locked record belongs. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve module ID and API name. |
| `data` | `object[]` | Yes | Specify the locking information details for the record. |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   Locked_Reason__s: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | Contains the response details for the lock operation. |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   status?: string | null,
>   code?: string | null,
>   message?: string | null,
>   details?: {
>     id?: string | null,
>     Created_Time?: string | null,
>     Modified_Time?: string | null,
>     Modified_By?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     Created_By?: {
>       name?: string | null,
>       id?: string | null
>     } | null
>   } | {
>     id?: string | null
>   } | null
> }[] | null
> ```

***

### unlock

`recordLocking.unlock`

Remove lock from a locked record. To remove the lock from a locked record in the specified module of your Zoho CRM account. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.recordLocking.unlock({ moduleName: 'Leads', recordId: '4876876000000333001', lockId: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `moduleName` | `string` | Yes | The ID of the locked record from which the lock is to be removed. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve module ID and API name. |
| `recordId` | `string` | Yes | The ID of the locked record from which the lock is to be removed. |
| `lockId` | `string` | Yes | Specify the unique identifier of the lock record to be removed or updated. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | Contains the response details for the unlock operation. |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   status?: string | null,
>   code?: string | null,
>   message?: string | null,
>   details?: {
>     id?: string | null,
>     Created_Time?: string | null,
>     Modified_Time?: string | null,
>     Modified_By?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     Created_By?: {
>       name?: string | null,
>       id?: string | null
>     } | null
>   } | {
>     id?: string | null
>   } | null
> }[] | null
> ```

***

### updateLock

`recordLocking.updateLock`

Update locking reason of a locked record. To update the locking reason of a locked record in the specified module of your Zoho CRM account.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.recordLocking.updateLock({
	moduleName: 'Leads',
	recordId: '4876876000000333001',
	lockId: 'example',
	data: [{ Locked_Reason__s: 'example' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `moduleName` | `string` | Yes | The unique identifier of the record whose locking reason needs to be updated. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve module IDs. |
| `recordId` | `string` | Yes | The unique identifier of the record whose locking reason needs to be updated. |
| `lockId` | `string` | Yes | Specify the unique identifier of the lock record to be removed or updated. |
| `data` | `object[]` | Yes | Specify the locking information details for the record. |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   Locked_Reason__s: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | Contains the response details for the update operation. |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   status?: string | null,
>   code?: string | null,
>   message?: string | null,
>   details?: {
>     id?: string | null,
>     Created_Time?: string | null,
>     Modified_Time?: string | null,
>     Modified_By?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     Created_By?: {
>       name?: string | null,
>       id?: string | null
>     } | null
>   } | {
>     id?: string | null
>   } | null
> }[] | null
> ```

***

## Records

### changeOwner

`records.changeOwner`

Change Owner. To change the owner of a specific record in the specified CRM module in your Zoho CRM organization. Note: The module name Deals is accepted and internally resolved to Potentials. Meetings is internally resolved to Events.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.records.changeOwner({
	module: 'Leads',
	record: '4876876000000333001',
	owner: { id: '4876876000000333001' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the API name of the module. |
| `record` | `string` | Yes | Specify the ID of the record for which you want to change the owner. |
| `owner_id` | `string` | No | Deprecated — use the `owner.id` field in the request body instead. |
| `owner` | `object` | Yes | Specify the details of the new owner for the record. |
| `notify` | `boolean \| null` | No | Specify whether to notify the new owner via email when the record is assigned.\nPossible values:\n**true** - The new owner is notified via email.\n**false** - The new owner is not notified via email. |
| `related_modules` | `object[]` | No | Specify the related modules for which you want to transfer record ownership along with the main record. |

> [accordion] owner full type
>
> ```ts theme={null}
> {
>   id: string
> }
> ```

> [accordion] related\_modules full type
>
> ```ts theme={null}
> {
>   api_name?: Tasks | Events | Calls | Contacts | Deals,
>   id?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | Data containing the result of the owner change operation |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### changeOwnerMany

`records.changeOwnerMany`

Change Owner. Updates the owner of multiple records in the module. Note: The module name Deals is accepted and internally resolved to Potentials. Meetings is internally resolved to Events.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.records.changeOwnerMany({
	module: 'Leads',
	ids: ['4876876000000333001'],
	owner: { id: '4876876000000333001' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the API name of the module. |
| `owner_id` | `string` | No | Deprecated — use the `owner.id` field in the request body instead. |
| `ids` | `string[]` | Yes | Specify the IDs of the records for which you want to change the owner. |
| `owner` | `object` | Yes | Specify the details of the new owner for the records. |
| `notify` | `boolean \| null` | No | Specify whether to notify the new owner via email when the records are assigned.\nPossible values:\n**true** - The new owner is notified via email.\n**false** - The new owner is not notified via email. |
| `related_modules` | `object[]` | No | Specify the related modules for which you want to transfer record ownership along with the main record. |

> [accordion] owner full type
>
> ```ts theme={null}
> {
>   id: string
> }
> ```

> [accordion] related\_modules full type
>
> ```ts theme={null}
> {
>   api_name?: Tasks | Events | Calls | Contacts | Deals,
>   id?: string
> }[]
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data?: {
>     code?: string | null,
>     details?: {
>       id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   data?: {
>     code?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   data?: {
>     code?: string | null,
>     status?: string | null
>   }[] | null
> }
> ```

***

### clone

`records.clone`

Record Clone. Clones a record in the specified module. Use the Get Modules API to retrieve the module ID and API name. Use the Get Fields Metadata API to retrieve the field IDs and API names. By default, the field values of the parent record are copied to the cloned record.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.records.clone({
	module: 'Leads',
	recordId: '4876876000000333001',
	data: [{}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the API name of the module. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve the module ID and API name. |
| `recordId` | `string` | Yes | Specify the unique ID of the record. Use the [Get Records API](record.yaml#\$.paths./module.get) to retrieve the record IDs. |
| `data` | `object[]` | Yes | Represents the data value. |
| `apply_feature_execution` | `object[]` | No | Use the "apply\_feature\_execution" array to trigger supported CRM features when creating or updating a record through the API. Specify "layout\_rules" to apply layout rules or "criteria\_validation\_rule" to trigger validation rules. For "layout\_rules", ensure the request includes all fields required by the layout rule criteria; otherwise, the API returns an error. For "criteria\_validation\_rule", all applicable validation rules are evaluated, and the API returns "MULTIPLE\_OR\_MULTI\_ERRORS" if multiple rules fail. |
| `skip_feature_execution` | `object[]` | No | Use the "skip\_feature\_execution" array to skip Cadences execution when creating a record through the API. Specify "cadences" as the value of the "name" key and include this key alongside "data" in the request. |
| `trigger` | `(approval \| workflow \| blueprint \| pathfinder \| orchestration)[]` | No | Specifies the CRM features to execute for the API request. Supported values are "workflow", "approval", and "blueprint". If the "trigger" parameter is not specified, workflows, approvals, and blueprints related to the API are executed. Specify an empty array \[] to prevent these features from executing. |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   Layout?: {
>     id: string
>   },
>   Wizard?: {
>     id: string
>   }
> }[]
> ```

> [accordion] apply\_feature\_execution full type
>
> ```ts theme={null}
> {
>   name: layout_rules | range_validation | assignment_rules | function_validation_rule | criteria_validation_rule | global_map_dependency | territory_subordinates
> }[]
> ```

> [accordion] skip\_feature\_execution full type
>
> ```ts theme={null}
> {
>   name: assignment_rules | cadences | connected_workflows
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | Represents the data value. |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   message?: string | null,
>   status?: string | null,
>   details?: {
>     id?: string | null,
>     Modified_Time?: string | null,
>     Created_Time?: string | null,
>     Created_By?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     Modified_By?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     $approval_state?: string | null,
>     $state?: string | null,
>     $wizard_connection_path?: string | null | null,
>     $process_flow?: boolean | null,
>     $locked_for_me?: boolean | null,
>     $approved?: boolean | null,
>     $status?: string | null,
>     $layout_id?: {
>       id?: string | null,
>       name?: string | null,
>       display_label?: string | null
>     } | null,
>     $has_more?: {
>     } | null
>   } | null
> }[] | null
> ```

***

### count

`records.count`

Module Record Count. To retrieve the total number of records in a specified Zoho CRM module, optionally filtered by a Custom View or search criteria. The count can be filtered using cvid (Custom View ID) or search parameters (criteria, email, phone, or word).

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.records.count({ moduleApiName: 'Leads' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `moduleApiName` | `string` | Yes | Specify the API name of the module for which you want to retrieve the record count. Refer to the [Get Modules](modules.yaml#\$.paths./settings/modules.get) resource for valid values. |
| `email` | `string` | No | Specify an email address to filter the count to records that contain this value in any email field of the specified module. Encode special characters before submitting (for example, use `p%2Bboyle@abc.com` for `p+boyle@abc.com`). |
| `phone` | `string` | No | Specify a phone number to filter the count to records that contain this value in any phone field of the specified module. |
| `word` | `string` | No | Specify a search term to filter the count to records that contain this word in any searchable field within the specified module. |
| `cvid` | `string` | No | Specify the ID of the Custom View from which to retrieve the record count. Refer to the [Get Custom Views](custom_views.yaml#\$.paths./settings/custom_views.get) resource for valid values. |
| `criteria` | `string` | No | Performs search by following the shown criteria: `(({api_name}:{operator}:{value}) and/or ({api_name}:{operator}:{value}))` Performs a search based on the following format: `(({field_API_name}:{operator}:{value}) and/or ({field_API_name}:{operator}:{value}))` Replace `{field_API_name}`, `{operator}`, and `{value}` with the appropriate field API name, condition, and value. **Key Points:** - You can search for a maximum of **10 criteria** (with same or different columns) - The only operator that is supported for **encrypted fields** is `equals` - When using the `equals` operator in the Search API, it behaves like `contains`, retrieving records that include the specified value **Single Condition:** If the condition is `(Company:equals:ABC)`, the response will include records with "ABC" as well as "ABC Inc" in the Company field. **Multiple Conditions:** `equals` still behaves like `contains`. For example, `((Company:equals:ABC) and (First_Name:starts_with:M))`, it retrieves records where the "First Name" starts with "M" and the "Company" contains "ABC" (e.g., "ABC" or "ABC Inc."). **Note:** The above behaviour does not apply to the **picklist field type**. **IN Operator:** The `in` operator checks if a field's value matches any value in a given list. For example, `(Full_Name:in:Patricia,Boyle,Kate)`, it retrieves records where the Full Name is Patricia, Boyle, or Kate. **Special Character Handling:** When a single-line field value contains characters such as `{`, `}`, `[`, `]`, `^`, `:`, `-`, `/`, `!`, `?`, `*`, `_`, `@`, space, the Search API returns records with similar-looking values, even if the characters are not an exact match. For example, if Record A has the field value `sales-team@zoho.com` and Record B has `sales_team@zoho.com`, a search using `equals:sales-team@zoho.com` may return both records. **Escaping Special Characters:** When using parentheses `()`, commas `,`, or a backslash `\\` as the last character in a search value, follow these steps: 1. Escape special characters using a backslash `\\` 2. Encode the value before making the API request. Select the value of the criteria, right-click the value, and choose the EncodeURIComponent option. **Example 1: Escaping Parentheses and Commas** - Search term: `((Last_Name:equals:Burns,B) and (First_Name:starts_with:M))` - Escape the comma `\\,`: `((Last_Name:equals:Burns\\,B) and (First_Name:starts_with:M))` - Encode the value: `((Last_Name:equals:Burns%5C%2CB) and (First_Name:starts_with:M))` **Example 2: Escaping a Backslash at the End** - Search term: `(Last_Name:equals:K\\)` - Escape the backslash `\\\\`: `(Last_Name:equals:K\\\\)` - Encode the value: `(Last_Name:equals:K%5C%5C)` **Supported Data Types:** `picklist`, `owner_lookup`, `user_lookup`, `lookup`, `phone`, `email`, `date`, `datetime`, `text`, `textarea`, `integer`, `currency`, `decimal`, `multiselectpicklist`, `bigint`, `percent`, `formula`, `website`, `boolean`, `double` **Supported Operators:** `equals`, `starts_with`, `in`, `not_equal`, `greater_equal`, `greater_than`, `less_equal`, `less_than`, `between` **Operator Compatibility by Data Type:** \| Data Type \| equals \| starts\_with \| in \| not\_equal \| greater\_equal \| greater\_than \| less\_equal \| less\_than \| between \| \|---\|:---:\|:---:\|:---:\|:---:\|:---:\|:---:\|:---:\|:---:\|:---:\| \| **text** \| ✓ \| ✓ \| ✓ \| ✓ \| ✗ \| ✗ \| ✗ \| ✗ \| ✗ \| \| **textarea** \| ✓ \| ✓ \| ✓ \| ✓ \| ✗ \| ✗ \| ✗ \| ✗ \| ✗ \| \| **email** \| ✓ \| ✓ \| ✓ \| ✓ \| ✗ \| ✗ \| ✗ \| ✗ \| ✗ \| \| **phone** \| ✓ \| ✓ \| ✓ \| ✓ \| ✗ \| ✗ \| ✗ \| ✗ \| ✗ \| \| **website** \| ✓ \| ✓ \| ✓ \| ✓ \| ✗ \| ✗ \| ✗ \| ✗ \| ✗ \| \| **picklist** \| ✓ \| ✗ \| ✓ \| ✓ \| ✗ \| ✗ \| ✗ \| ✗ \| ✗ \| \| **multiselectpicklist** \| ✓ \| ✗ \| ✓ \| ✓ \| ✗ \| ✗ \| ✗ \| ✗ \| ✗ \| \| **lookup** \| ✓ \| ✓ \| ✓ \| ✓ \| ✗ \| ✗ \| ✗ \| ✗ \| ✗ \| \| **owner\_lookup** \| ✓ \| ✓ \| ✓ \| ✓ \| ✗ \| ✗ \| ✗ \| ✗ \| ✗ \| \| **user\_lookup** \| ✓ \| ✓ \| ✓ \| ✓ \| ✗ \| ✗ \| ✗ \| ✗ \| ✗ \| \| **boolean** \| ✓ \| ✗ \| ✗ \| ✓ \| ✗ \| ✗ \| ✗ \| ✗ \| ✗ \| \| **integer** \| ✓ \| ✗ \| ✓ \| ✓ \| ✓ \| ✓ \| ✓ \| ✓ \| ✓ \| \| **bigint** \| ✓ \| ✗ \| ✓ \| ✓ \| ✓ \| ✓ \| ✓ \| ✓ \| ✓ \| \| **currency** \| ✓ \| ✗ \| ✓ \| ✓ \| ✓ \| ✓ \| ✓ \| ✓ \| ✓ \| \| **decimal** \| ✓ \| ✗ \| ✓ \| ✓ \| ✓ \| ✓ \| ✓ \| ✓ \| ✓ \| \| **double** \| ✓ \| ✗ \| ✓ \| ✓ \| ✓ \| ✓ \| ✓ \| ✓ \| ✓ \| \| **percent** \| ✓ \| ✗ \| ✓ \| ✓ \| ✓ \| ✓ \| ✓ \| ✓ \| ✓ \| \| **date** \| ✓ \| ✗ \| ✓ \| ✓ \| ✓ \| ✓ \| ✓ \| ✓ \| ✓ \| \| **datetime** \| ✓ \| ✗ \| ✓ \| ✓ \| ✓ \| ✓ \| ✓ \| ✓ \| ✓ \| \| **formula** \| ✓ \| ✓ \| ✓ \| ✓ \| ✓ \| ✓ \| ✓ \| ✓ \| ✓ \| **Legend:** ✓ = Supported, ✗ = Not Supported **Note:** Refer to the Zoho CRM API documentation for the most up-to-date operator compatibility information. |
| `filters` | `object` | No | Represents the top-level filter criterion for data selection, supporting both simple field-based filters and complex grouped filters with logical operators. |
| `include_filters` | `string` | No | To include inner details of criteria and cross filters |
| `cross_filters` | `string` | No | Cross filter criteria for related module records |
| `converted` | `true \| false \| both` | No | Specify the conversion status to filter the count to lead records. This parameter is supported only for the **Leads** module. Possible values: **true** - Count only converted leads. **false** - Count only unconverted leads. **both** - Count leads regardless of conversion status. |
| `approved` | `true \| false \| both` | No | Specify the approval status to filter the count to lead records. This parameter is supported only for the **Leads** module. Possible values: **true** - Count only approved leads. **false** - Count only unapproved leads. **both** - Count leads regardless of approval status. |
| `page` | `number \| string` | No | Specify the page number to retrieve when paginating through results. |
| `per_page` | `number \| string` | No | Specify the number of records to include per page. |
| `type` | `AllUsers \| ActiveUsers \| DeactiveUsers \| ConfirmedUsers \| ConfirmedReportingUsers \| NotConfirmedUsers \| DeletedUsers \| ActiveConfirmedUsers \| AdminUsers \| ActiveConfirmedAdmins \| CurrentUser` | No | Specify the type of user records to count. This parameter is supported only for the **Users** module. Possible values: **AllUsers** - All users. **ActiveUsers** - Active users. **DeactiveUsers** - Deactivated users. **ConfirmedUsers** - Confirmed users. **ConfirmedReportingUsers** - Confirmed users with reporting access. **NotConfirmedUsers** - Unconfirmed users. **DeletedUsers** - Deleted users. **ActiveConfirmedUsers** - Active and confirmed users. **AdminUsers** - Users with administrator privileges. **ActiveConfirmedAdmins** - Active, confirmed users with administrator privileges. **CurrentUser** - The currently authenticated user. |

> [accordion] filters full type
>
> ```ts theme={null}
> {
>   field: {
>     id?: string,
>     api_name: string
>   },
>   comparator: string,
>   value: (string | number | {
>     id: string & any,
>     name?: string
>   } | {
>     name: string
>   } | {
>     id: string,
>     name?: string
>   })[] | string | number | boolean | {
>     id: string & any,
>     name?: string
>   } | {
>     name: string
>   } | {
>     id: string,
>     name?: string
>   } | ${
>     EMPTY
>   } | ${
>     NOTEMPTY
>   } | ${
>     TODAY
>   } | ${
>     TOMORROW
>   } | ${
>     TOMORROWPLUS
>   } | ${
>     YESTERDAY
>   } | ${
>     YESTERDAYMINUS
>   } | ${
>     LASTMONTH
>   } | ${
>     THISMONTH
>   } | ${
>     NEXTMONTH
>   } | ${
>     LASTWEEK
>   } | ${
>     THISWEEK
>   } | ${
>     NEXTWEEK
>   } | ${
>     THISYEAR
>   } | ${
>     THISFY
>   } | ${
>     THISFQ
>   } | ${
>     LASTYEAR
>   } | ${
>     PREVFY
>   } | ${
>     PREVFQ
>   } | ${
>     NEXTYEAR
>   } | ${
>     NEXTFY
>   } | ${
>     NEXTFQ
>   } | ${
>     EMPTY
>   } | ${
>     NOTEMPTY
>   } | string | string,
>   type?: merge_field | pre_defined | value | field
> } | {
>   field: {
>     id?: string,
>     api_name: string
>   },
>   comparator: string,
>   value: (string | number | {
>     id: string & any,
>     name?: string
>   } | {
>     name: string
>   } | {
>     id: string,
>     name?: string
>   })[] | string | number | boolean | {
>     id: string & any,
>     name?: string
>   } | {
>     name: string
>   } | {
>     id: string,
>     name?: string
>   } | string,
>   type?: merge_field | pre_defined | value | field
> } | {
>   field: {
>     id?: string,
>     api_name: string
>   },
>   comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>   value: string[] | string,
>   type?: merge_field | pre_defined | value | field
> } | {
>   field: {
>     id?: string,
>     api_name: string
>   },
>   comparator: less_than | less_equal | greater_than | greater_equal,
>   value: string | number | string,
>   type?: merge_field | pre_defined | value | field
> } | {
>   field: {
>     id?: string,
>     api_name: string
>   },
>   comparator: between | not_between,
>   value: (string | number)[],
>   type?: merge_field | pre_defined | value | field
> } | {
>   field: {
>     id?: string,
>     api_name: string
>   },
>   comparator: in | not_in,
>   value: (string | number)[],
>   type?: merge_field | pre_defined | value | field
> } | {
>   field: {
>     id?: string,
>     api_name: string
>   },
>   comparator: include_all | include_any | exclude_all | exclude_any,
>   value: {
>     id: string & any,
>     name?: string
>   }[],
>   type?: merge_field | pre_defined | value | field
> } | {
>   group: (
>     {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: string,
>       value: (string | number | {
>         id: string & any,
>         name?: string
>       } | {
>         name: string
>       } | {
>         id: string,
>         name?: string
>       })[] | string | number | boolean | {
>         id: string & any,
>         name?: string
>       } | {
>         name: string
>       } | {
>         id: string,
>         name?: string
>       } | ${
>         EMPTY
>       } | ${
>         NOTEMPTY
>       } | ${
>         TODAY
>       } | ${
>         TOMORROW
>       } | ${
>         TOMORROWPLUS
>       } | ${
>         YESTERDAY
>       } | ${
>         YESTERDAYMINUS
>       } | ${
>         LASTMONTH
>       } | ${
>         THISMONTH
>       } | ${
>         NEXTMONTH
>       } | ${
>         LASTWEEK
>       } | ${
>         THISWEEK
>       } | ${
>         NEXTWEEK
>       } | ${
>         THISYEAR
>       } | ${
>         THISFY
>       } | ${
>         THISFQ
>       } | ${
>         LASTYEAR
>       } | ${
>         PREVFY
>       } | ${
>         PREVFQ
>       } | ${
>         NEXTYEAR
>       } | ${
>         NEXTFY
>       } | ${
>         NEXTFQ
>       } | ${
>         EMPTY
>       } | ${
>         NOTEMPTY
>       } | string | string,
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: string,
>       value: (string | number | {
>         id: string & any,
>         name?: string
>       } | {
>         name: string
>       } | {
>         id: string,
>         name?: string
>       })[] | string | number | boolean | {
>         id: string & any,
>         name?: string
>       } | {
>         name: string
>       } | {
>         id: string,
>         name?: string
>       } | string,
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>       value: string[] | string,
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: less_than | less_equal | greater_than | greater_equal,
>       value: string | number | string,
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: between | not_between,
>       value: (string | number)[],
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: in | not_in,
>       value: (string | number)[],
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: include_all | include_any | exclude_all | exclude_any,
>       value: {
>         id: string & any,
>         name?: string
>       }[],
>       type?: merge_field | pre_defined | value | field
>     } | {
>       group: (
>         {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: string,
>           value: (string | number | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           })[] | string | number | boolean | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           } | ${
>             EMPTY
>           } | ${
>             NOTEMPTY
>           } | ${
>             TODAY
>           } | ${
>             TOMORROW
>           } | ${
>             TOMORROWPLUS
>           } | ${
>             YESTERDAY
>           } | ${
>             YESTERDAYMINUS
>           } | ${
>             LASTMONTH
>           } | ${
>             THISMONTH
>           } | ${
>             NEXTMONTH
>           } | ${
>             LASTWEEK
>           } | ${
>             THISWEEK
>           } | ${
>             NEXTWEEK
>           } | ${
>             THISYEAR
>           } | ${
>             THISFY
>           } | ${
>             THISFQ
>           } | ${
>             LASTYEAR
>           } | ${
>             PREVFY
>           } | ${
>             PREVFQ
>           } | ${
>             NEXTYEAR
>           } | ${
>             NEXTFY
>           } | ${
>             NEXTFQ
>           } | ${
>             EMPTY
>           } | ${
>             NOTEMPTY
>           } | string | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: string,
>           value: (string | number | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           })[] | string | number | boolean | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           } | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>           value: string[] | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: less_than | less_equal | greater_than | greater_equal,
>           value: string | number | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: between | not_between,
>           value: (string | number)[],
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: in | not_in,
>           value: (string | number)[],
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: include_all | include_any | exclude_all | exclude_any,
>           value: {
>             id: string & any,
>             name?: string
>           }[],
>           type?: merge_field | pre_defined | value | field
>         } | (recursive)
>       )[],
>       group_operator: AND | OR | and | or
>     }
>   )[],
>   group_operator: AND | OR | and | or
> }
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   count?: number | null
> } | {
>   success: true
> }
> ```

***

### create

`records.create`

Create records in a specified module. Creates one or more records in the specified module in your Zoho CRM organization. Use the Get Modules API to retrieve the module API name. Use the Get Fields Metadata API to retrieve the available field API names and data types. You can create up to 100 records in a single API call.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.records.create({
	module: 'Leads',
	data: [{ Last_Name: 'Rivera', Company: 'Northpeak' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the API name of the module. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve the module ID and API name. |
| `data` | `object[]` | Yes | Represents the data value. |
| `apply_feature_execution` | `object[]` | No | Use the "apply\_feature\_execution" array to trigger supported CRM features when creating or updating a record through the API. Specify "layout\_rules" to apply layout rules or "criteria\_validation\_rule" to trigger validation rules. For "layout\_rules", ensure the request includes all fields required by the layout rule criteria; otherwise, the API returns an error. For "criteria\_validation\_rule", all applicable validation rules are evaluated, and the API returns "MULTIPLE\_OR\_MULTI\_ERRORS" if multiple rules fail. |
| `skip_feature_execution` | `object[]` | No | Use the "skip\_feature\_execution" array to skip Cadences execution when creating a record through the API. Specify "cadences" as the value of the "name" key and include this key alongside "data" in the request. |
| `trigger` | `(approval \| workflow \| blueprint \| pathfinder \| orchestration)[]` | No | Specifies the CRM features to execute for the API request. Supported values are "workflow", "approval", and "blueprint". If the "trigger" parameter is not specified, workflows, approvals, and blueprints related to the API are executed. Specify an empty array \[] to prevent these features from executing. |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   Layout?: {
>     id: string
>   },
>   Wizard?: {
>     id: string
>   }
> }[]
> ```

> [accordion] apply\_feature\_execution full type
>
> ```ts theme={null}
> {
>   name: layout_rules | range_validation | assignment_rules | function_validation_rule | criteria_validation_rule | global_map_dependency | territory_subordinates
> }[]
> ```

> [accordion] skip\_feature\_execution full type
>
> ```ts theme={null}
> {
>   name: assignment_rules | cadences | connected_workflows
> }[]
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data?: {
>     code?: string | null,
>     message?: string | null,
>     status?: string | null,
>     details?: {
>       id?: string | null,
>       Modified_Time?: string | null,
>       Created_Time?: string | null,
>       Created_By?: {
>         name?: string | null,
>         id?: string | null
>       } | null,
>       Modified_By?: {
>         name?: string | null,
>         id?: string | null
>       } | null,
>       $approval_state?: string | null,
>       $state?: string | null,
>       $wizard_connection_path?: string | null | null,
>       $process_flow?: boolean | null,
>       $locked_for_me?: boolean | null,
>       $approved?: boolean | null,
>       $status?: string | null,
>       $layout_id?: {
>         id?: string | null,
>         name?: string | null,
>         display_label?: string | null
>       } | null,
>       $has_more?: {
>       } | null
>     } | null
>   }[] | null
> } | {
>   data?: any & any | null
> }
> ```

***

### delete

`records.delete`

Delete a specific record by ID. To permanently delete a specific record by its unique ID from the specified module in your Zoho CRM organization. Use the Get Records API to retrieve the record IDs. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.records.delete({ module: 'Leads', recordId: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the API name of the module. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve the module ID and API name. |
| `recordId` | `string` | Yes | Specify the unique ID of the record. Use the [Get Records API](record.yaml#\$.paths./module.get) to retrieve the record IDs. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | Represents the data value. |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   message?: string | null,
>   status?: string | null,
>   details?: {
>     id?: string | null
>   } | null
> }[] | null
> ```

***

### deleteMany

`records.deleteMany`

Delete records from a specified module. To permanently delete more records from the specified module in your Zoho CRM organization, use the Get Records API to retrieve the record IDs. A maximum of 100 records can be deleted per API call. By default, all workflows related to this API are executed. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.records.deleteMany({ module: 'Leads' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the API name of the module. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve the module ID and API name. |
| `ids` | `string[]` | No | Specify a comma-separated list of record IDs. Use the [Get Records API](record.yaml#\$.paths./module.get) to retrieve the record IDs. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data?: {
>     code?: string | null,
>     details?: {
>       id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   data?: any & any | null
> }
> ```

***

### deletePhoto

`records.deletePhoto`

Delete a record photo. To delete the photo associated with a specific record in your Zoho CRM organization. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.records.deletePhoto({ module: 'Leads', record: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the API name of the module for which you want to manage the record photo. Refer to the [Get Modules Metadata API](modules.yaml#\$.paths./settings/modules.get) to retrieve the module's API name. |
| `record` | `string` | Yes | Specify the unique identifier of the record for which you want to manage the photo. Use the [Get Records API](record.yaml#\$.paths./module.get) to retrieve the record IDs. |
| `restrict_triggers` | `string` | No | (Optional) Comma-separated list of automation triggers to suppress during the operation. Accepted values are `workflow`, `approval`, `blueprint`, `pathfinder`, and `orchestration`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `code` | `string \| null` | No | Represents the success code for the photo delete operation. Possible values: **SUCCESS**. Example: "SUCCESS". |
| `message` | `string \| null` | No | Represents the success message describing the result of the delete operation. |
| `status` | `string \| null` | No | Represents the status of the response. Possible values: **success**. Example: "success". |
| `details` | `object \| null` | No | Represents additional details about the delete operation. |

> [accordion] details full type
>
> ```ts theme={null}
> {
> } | null
> ```

***

### get

`records.get`

Get a record by ID from a specified module. To retrieve the details of a specific record by its unique ID from the specified module in your Zoho CRM organization. Use the Get Modules API to retrieve the module ID and API name. Use the Get Records API to retrieve the record IDs.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.records.get({ recordId: '4876876000000333001', module: 'Leads' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `recordId` | `string` | Yes | Specify the unique ID of the record. Use the [Get Records API](record.yaml#\$.paths./module.get) to retrieve the record IDs. |
| `module` | `string` | Yes | Specify the API name of the module. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve the module ID and API name. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data?: {
>     id?: string | null,
>     Owner?: {
>       name?: string | null,
>       id?: string | null,
>       email?: string | null
>     } | null,
>     Created_Time?: string | null,
>     Modified_Time?: string | null,
>     Created_By?: {
>       name?: string | null,
>       id?: string | null,
>       email?: string | null
>     } | null,
>     Modified_By?: {
>       name?: string | null,
>       id?: string | null,
>       email?: string | null
>     } | null,
>     Wizard?: {
>       id?: string | null
>     } | null,
>     $state?: string | null,
>     $wizard_connection_path?: string | null | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### getFullData

`records.getFullData`

Rich text field content for a specific record. Retrieves the full content of rich text multi-line fields for a specific record identified by its record ID in the path. The 'fields' query parameter is optional for this endpoint - if omitted, all rich text fields of the record are returned.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.records.getFullData({ moduleApiName: 'Leads', id: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `moduleApiName` | `string` | Yes | The API name of the CRM module containing the record(s) whose rich text fields you want to retrieve (e.g., Leads, Contacts, Deals, Accounts). This is a mandatory path parameter. |
| `fields` | `string` | No | A comma-separated list of rich text field API names whose values you want to retrieve. Mandatory when retrieving rich text fields for multiple records (maximum 8 field API names). Optional when retrieving rich text fields for a specific record - if omitted, all rich text fields of the record are returned. |
| `id` | `string` | Yes | The unique identifier of the record whose rich text field content you want to retrieve. Must be a valid numeric record ID. If the ID is invalid, an INVALID\_DATA error (HTTP 400) is returned. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data?: {
>     id?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### getFullDataMany

`records.getFullDataMany`

Rich text field content for multiple records. Retrieves the full content of rich text multi-line fields for multiple records in a single request. Both the 'ids' and 'fields' query parameters are mandatory. You can specify up to 200 record IDs in the 'ids' parameter and up to 8 rich text field API names in the 'fields' parameter.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.records.getFullDataMany({ moduleApiName: 'Leads', ids: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `moduleApiName` | `string` | Yes | The API name of the CRM module containing the record(s) whose rich text fields you want to retrieve (e.g., Leads, Contacts, Deals, Accounts). This is a mandatory path parameter. |
| `fields` | `string` | No | A comma-separated list of rich text field API names whose values you want to retrieve. Mandatory when retrieving rich text fields for multiple records (maximum 8 field API names). Optional when retrieving rich text fields for a specific record - if omitted, all rich text fields of the record are returned. |
| `ids` | `string` | Yes | Mandatory when retrieving rich text fields for multiple records. A comma-separated list of unique record IDs whose rich text field values you want to retrieve. You can specify up to 200 record IDs. Exceeding this limit results in an INVALID\_REQUEST error. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data?: {
>     id?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### getMergeStatus

`records.getMergeStatus`

Get Merge Job Status. To retrieve the status of a scheduled merge job in your Zoho CRM organization. Use the optional job\_id query parameter to filter results to a specific job.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.records.getMergeStatus({ masterRecordId: '4876876000000333001', module: 'Leads' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `job_id` | `string` | No | The ID represents the unique identifier of your scheduled merge job, which you get from the response of the [Merge Records API](find_and_merge.yaml#\$.paths./\{module}/\{masterRecordId}/actions/merge.get). |
| `masterRecordId` | `string` | Yes | Specify the unique identifier of the master record to be retained after the merge operation. |
| `module` | `Accounts \| Contacts \| Leads \| Deals \| Cases \| Campaigns` | Yes | Specify the CRM module name containing the records to be merged. Possible values: **Accounts** - Accounts module. **Contacts** - Contacts module. **Leads** - Leads module. **Deals** - Deals module. **Vendors** - Cases module. Additionally, **custom modules** are also supported in this API. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   merge?: {
>     job_id?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### getPhoto

`records.getPhoto`

Get a record photo. To retrieve the photo associated with a specific record in your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.records.getPhoto({ module: 'Leads', record: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the API name of the module for which you want to manage the record photo. Refer to the [Get Modules Metadata API](modules.yaml#\$.paths./settings/modules.get) to retrieve the module's API name. |
| `record` | `string` | Yes | Specify the unique identifier of the record for which you want to manage the photo. Use the [Get Records API](record.yaml#\$.paths./module.get) to retrieve the record IDs. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `contentBase64` | `string` | No | The file, base64-encoded. Missing when the file came back as text or contentOmitted is set. |
| `text` | `string` | No | The file as text, in place of contentBase64, when it is a text file (CSV, JSON, Markdown, XML and the like) in UTF-8. |
| `contentType` | `string` | Yes | Media type of the file, for example application/pdf. |
| `byteLength` | `number` | Yes | Size of the file in bytes. |
| `filename` | `string` | No | The file name, when known. |
| `contentOmitted` | `not_requested \| over_limit` | No | Set when the content was left out: the caller did not ask for it, or the file was over the limit. |
| `fileId` | `string` | No | Where the host saved the file. Over the limit it comes in place of the content; a host that keeps every file sets it beside the content too. On Corsair it is a Files id (fil\_…): pass it to another app wherever that app takes a file URL, or read a text file or PDF with files.read\_text. |

***

### list

`records.list`

Get records from a specified module. Retrieves records from the specified module in your Zoho CRM organization. Use the Get Modules API to retrieve the module ID and API name. Use "sort\_by" and "sort\_order" to control the sorting of records. To fetch up to 2000 records, use "page" (1-10) and "per\_page" (maximum 200). Pass fields (comma-separated API names, at most 50): Zoho requires it. Up to 200 records a page; page 1-10, then page\_token from info.next\_page\_token for later pages. An empty module answers 204: \{ success: true }.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.records.list({ module: 'Leads', fields: 'Last_Name,Email,Company', per_page: 10 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the API name of the module. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve the module ID and API name. |
| `fields` | `string` | Yes | Specify a comma-separated list of field API names to include in the response. Use the [Get Fields Metadata API](fields.yaml#\$.paths./settings/fields.get) to retrieve the field IDs and API names. |
| `territory_id` | `string` | No | Specify the unique ID of the territory. Use the [Get Territories API](territories.yaml#\$.paths./settings/territories.get) to retrieve the territory ID. |
| `ids` | `string[]` | No | Specify a comma-separated list of record IDs. Use the [Get Records API](record.yaml#\$.paths./module.get) to retrieve the record IDs. |
| `cvid` | `string` | No | Specify the unique ID of the Custom View. Use the [Get Custom Views Metadata API](custom_views.yaml#\$.paths./settings/custom_views.get) to retrieve the Custom View IDs. |
| `filters` | `object` | No | Represents the top-level filter criterion for data selection, supporting both simple field-based filters and complex grouped filters with logical operators. |
| `cross_filters` | `object[]` | No | Represents a list of cross-filter objects that filter Custom View records based on related module records' criteria. |
| `filterId` | `string` | No | The filter identifier |
| `per_page` | `number \| string` | No | Specify the number of records to return per page. Maximum is 200. |
| `page` | `number \| string` | No | Specify the page number to retrieve. Starts at 1. |
| `page_token` | `string` | No | Specify the page token to retrieve records beyond the first 2,000 results. Use the **next\_page\_token** value from a previous response to access the next page of results. |
| `sort_order` | `desc \| asc` | No | Specify the sort order for the records.\<br/> \<b>Possible values:\</b> \<br/>desc - Returns records in descending order.\<br/> asc - Returns records in ascending order. |
| `sort_by` | `id \| Created_Time \| Modified_Time` | No | Specify the field to sort records by. Possible values:**id** - Sorts by record ID. **Created\_Time** - Sorts by creation timestamp. **Modified\_Time** - Sorts by last modification timestamp. |
| `converted` | `false \| true \| both` | No | Specify whether to retrieve converted, unconverted, or both types of records. Possible values:**false** - Returns only unconverted records. **true** - Returns only converted records. **both** - Returns both converted and unconverted records. |
| `include_child` | `boolean` | No | Specify whether to include records assigned to child territories of the specified territory. |

> [accordion] filters full type
>
> ```ts theme={null}
> {
>   field: {
>     id?: string,
>     api_name: string
>   },
>   comparator: string,
>   value: (string | number | {
>     id: string & any,
>     name?: string
>   } | {
>     name: string
>   } | {
>     id: string,
>     name?: string
>   })[] | string | number | boolean | {
>     id: string & any,
>     name?: string
>   } | {
>     name: string
>   } | {
>     id: string,
>     name?: string
>   } | ${
>     EMPTY
>   } | ${
>     NOTEMPTY
>   } | ${
>     TODAY
>   } | ${
>     TOMORROW
>   } | ${
>     TOMORROWPLUS
>   } | ${
>     YESTERDAY
>   } | ${
>     YESTERDAYMINUS
>   } | ${
>     LASTMONTH
>   } | ${
>     THISMONTH
>   } | ${
>     NEXTMONTH
>   } | ${
>     LASTWEEK
>   } | ${
>     THISWEEK
>   } | ${
>     NEXTWEEK
>   } | ${
>     THISYEAR
>   } | ${
>     THISFY
>   } | ${
>     THISFQ
>   } | ${
>     LASTYEAR
>   } | ${
>     PREVFY
>   } | ${
>     PREVFQ
>   } | ${
>     NEXTYEAR
>   } | ${
>     NEXTFY
>   } | ${
>     NEXTFQ
>   } | ${
>     EMPTY
>   } | ${
>     NOTEMPTY
>   } | string | string,
>   type?: merge_field | pre_defined | value | field
> } | {
>   field: {
>     id?: string,
>     api_name: string
>   },
>   comparator: string,
>   value: (string | number | {
>     id: string & any,
>     name?: string
>   } | {
>     name: string
>   } | {
>     id: string,
>     name?: string
>   })[] | string | number | boolean | {
>     id: string & any,
>     name?: string
>   } | {
>     name: string
>   } | {
>     id: string,
>     name?: string
>   } | string,
>   type?: merge_field | pre_defined | value | field
> } | {
>   field: {
>     id?: string,
>     api_name: string
>   },
>   comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>   value: string[] | string,
>   type?: merge_field | pre_defined | value | field
> } | {
>   field: {
>     id?: string,
>     api_name: string
>   },
>   comparator: less_than | less_equal | greater_than | greater_equal,
>   value: string | number | string,
>   type?: merge_field | pre_defined | value | field
> } | {
>   field: {
>     id?: string,
>     api_name: string
>   },
>   comparator: between | not_between,
>   value: (string | number)[],
>   type?: merge_field | pre_defined | value | field
> } | {
>   field: {
>     id?: string,
>     api_name: string
>   },
>   comparator: in | not_in,
>   value: (string | number)[],
>   type?: merge_field | pre_defined | value | field
> } | {
>   field: {
>     id?: string,
>     api_name: string
>   },
>   comparator: include_all | include_any | exclude_all | exclude_any,
>   value: {
>     id: string & any,
>     name?: string
>   }[],
>   type?: merge_field | pre_defined | value | field
> } | {
>   group: (
>     {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: string,
>       value: (string | number | {
>         id: string & any,
>         name?: string
>       } | {
>         name: string
>       } | {
>         id: string,
>         name?: string
>       })[] | string | number | boolean | {
>         id: string & any,
>         name?: string
>       } | {
>         name: string
>       } | {
>         id: string,
>         name?: string
>       } | ${
>         EMPTY
>       } | ${
>         NOTEMPTY
>       } | ${
>         TODAY
>       } | ${
>         TOMORROW
>       } | ${
>         TOMORROWPLUS
>       } | ${
>         YESTERDAY
>       } | ${
>         YESTERDAYMINUS
>       } | ${
>         LASTMONTH
>       } | ${
>         THISMONTH
>       } | ${
>         NEXTMONTH
>       } | ${
>         LASTWEEK
>       } | ${
>         THISWEEK
>       } | ${
>         NEXTWEEK
>       } | ${
>         THISYEAR
>       } | ${
>         THISFY
>       } | ${
>         THISFQ
>       } | ${
>         LASTYEAR
>       } | ${
>         PREVFY
>       } | ${
>         PREVFQ
>       } | ${
>         NEXTYEAR
>       } | ${
>         NEXTFY
>       } | ${
>         NEXTFQ
>       } | ${
>         EMPTY
>       } | ${
>         NOTEMPTY
>       } | string | string,
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: string,
>       value: (string | number | {
>         id: string & any,
>         name?: string
>       } | {
>         name: string
>       } | {
>         id: string,
>         name?: string
>       })[] | string | number | boolean | {
>         id: string & any,
>         name?: string
>       } | {
>         name: string
>       } | {
>         id: string,
>         name?: string
>       } | string,
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>       value: string[] | string,
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: less_than | less_equal | greater_than | greater_equal,
>       value: string | number | string,
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: between | not_between,
>       value: (string | number)[],
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: in | not_in,
>       value: (string | number)[],
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: include_all | include_any | exclude_all | exclude_any,
>       value: {
>         id: string & any,
>         name?: string
>       }[],
>       type?: merge_field | pre_defined | value | field
>     } | {
>       group: (
>         {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: string,
>           value: (string | number | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           })[] | string | number | boolean | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           } | ${
>             EMPTY
>           } | ${
>             NOTEMPTY
>           } | ${
>             TODAY
>           } | ${
>             TOMORROW
>           } | ${
>             TOMORROWPLUS
>           } | ${
>             YESTERDAY
>           } | ${
>             YESTERDAYMINUS
>           } | ${
>             LASTMONTH
>           } | ${
>             THISMONTH
>           } | ${
>             NEXTMONTH
>           } | ${
>             LASTWEEK
>           } | ${
>             THISWEEK
>           } | ${
>             NEXTWEEK
>           } | ${
>             THISYEAR
>           } | ${
>             THISFY
>           } | ${
>             THISFQ
>           } | ${
>             LASTYEAR
>           } | ${
>             PREVFY
>           } | ${
>             PREVFQ
>           } | ${
>             NEXTYEAR
>           } | ${
>             NEXTFY
>           } | ${
>             NEXTFQ
>           } | ${
>             EMPTY
>           } | ${
>             NOTEMPTY
>           } | string | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: string,
>           value: (string | number | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           })[] | string | number | boolean | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           } | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>           value: string[] | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: less_than | less_equal | greater_than | greater_equal,
>           value: string | number | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: between | not_between,
>           value: (string | number)[],
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: in | not_in,
>           value: (string | number)[],
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: include_all | include_any | exclude_all | exclude_any,
>           value: {
>             id: string & any,
>             name?: string
>           }[],
>           type?: merge_field | pre_defined | value | field
>         } | (recursive)
>       )[],
>       group_operator: AND | OR | and | or
>     }
>   )[],
>   group_operator: AND | OR | and | or
> }
> ```

> [accordion] cross\_filters full type
>
> ```ts theme={null}
> {
>   include_objects: boolean,
>   relation: {
>     api_name: string,
>     id?: string,
>     $disrupted?: boolean
>   },
>   criteria: {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: string,
>     value: (string | number | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     })[] | string | number | boolean | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     } | ${
>       EMPTY
>     } | ${
>       NOTEMPTY
>     } | ${
>       TODAY
>     } | ${
>       TOMORROW
>     } | ${
>       TOMORROWPLUS
>     } | ${
>       YESTERDAY
>     } | ${
>       YESTERDAYMINUS
>     } | ${
>       LASTMONTH
>     } | ${
>       THISMONTH
>     } | ${
>       NEXTMONTH
>     } | ${
>       LASTWEEK
>     } | ${
>       THISWEEK
>     } | ${
>       NEXTWEEK
>     } | ${
>       THISYEAR
>     } | ${
>       THISFY
>     } | ${
>       THISFQ
>     } | ${
>       LASTYEAR
>     } | ${
>       PREVFY
>     } | ${
>       PREVFQ
>     } | ${
>       NEXTYEAR
>     } | ${
>       NEXTFY
>     } | ${
>       NEXTFQ
>     } | ${
>       EMPTY
>     } | ${
>       NOTEMPTY
>     } | string | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: string,
>     value: (string | number | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     })[] | string | number | boolean | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     } | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>     value: string[] | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: less_than | less_equal | greater_than | greater_equal,
>     value: string | number | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: between | not_between,
>     value: (string | number)[],
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: in | not_in,
>     value: (string | number)[],
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: include_all | include_any | exclude_all | exclude_any,
>     value: {
>       id: string & any,
>       name?: string
>     }[],
>     type?: merge_field | pre_defined | value | field
>   } | {
>     group: (
>       {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: string,
>         value: (string | number | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         })[] | string | number | boolean | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         } | ${
>           EMPTY
>         } | ${
>           NOTEMPTY
>         } | ${
>           TODAY
>         } | ${
>           TOMORROW
>         } | ${
>           TOMORROWPLUS
>         } | ${
>           YESTERDAY
>         } | ${
>           YESTERDAYMINUS
>         } | ${
>           LASTMONTH
>         } | ${
>           THISMONTH
>         } | ${
>           NEXTMONTH
>         } | ${
>           LASTWEEK
>         } | ${
>           THISWEEK
>         } | ${
>           NEXTWEEK
>         } | ${
>           THISYEAR
>         } | ${
>           THISFY
>         } | ${
>           THISFQ
>         } | ${
>           LASTYEAR
>         } | ${
>           PREVFY
>         } | ${
>           PREVFQ
>         } | ${
>           NEXTYEAR
>         } | ${
>           NEXTFY
>         } | ${
>           NEXTFQ
>         } | ${
>           EMPTY
>         } | ${
>           NOTEMPTY
>         } | string | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: string,
>         value: (string | number | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         })[] | string | number | boolean | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         } | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>         value: string[] | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: less_than | less_equal | greater_than | greater_equal,
>         value: string | number | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: between | not_between,
>         value: (string | number)[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: in | not_in,
>         value: (string | number)[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: include_all | include_any | exclude_all | exclude_any,
>         value: {
>           id: string & any,
>           name?: string
>         }[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         group: (
>           {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: string,
>             value: (string | number | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             })[] | string | number | boolean | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             } | ${
>               EMPTY
>             } | ${
>               NOTEMPTY
>             } | ${
>               TODAY
>             } | ${
>               TOMORROW
>             } | ${
>               TOMORROWPLUS
>             } | ${
>               YESTERDAY
>             } | ${
>               YESTERDAYMINUS
>             } | ${
>               LASTMONTH
>             } | ${
>               THISMONTH
>             } | ${
>               NEXTMONTH
>             } | ${
>               LASTWEEK
>             } | ${
>               THISWEEK
>             } | ${
>               NEXTWEEK
>             } | ${
>               THISYEAR
>             } | ${
>               THISFY
>             } | ${
>               THISFQ
>             } | ${
>               LASTYEAR
>             } | ${
>               PREVFY
>             } | ${
>               PREVFQ
>             } | ${
>               NEXTYEAR
>             } | ${
>               NEXTFY
>             } | ${
>               NEXTFQ
>             } | ${
>               EMPTY
>             } | ${
>               NOTEMPTY
>             } | string | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: string,
>             value: (string | number | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             })[] | string | number | boolean | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             } | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>             value: string[] | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: less_than | less_equal | greater_than | greater_equal,
>             value: string | number | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: between | not_between,
>             value: (string | number)[],
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: in | not_in,
>             value: (string | number)[],
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: include_all | include_any | exclude_all | exclude_any,
>             value: {
>               id: string & any,
>               name?: string
>             }[],
>             type?: merge_field | pre_defined | value | field
>           } | (recursive)
>         )[],
>         group_operator: AND | OR | and | or
>       }
>     )[],
>     group_operator: AND | OR | and | or
>   }
> }[]
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data?: {
>     id?: string | null,
>     Owner?: {
>       name?: string | null,
>       id?: string | null,
>       email?: string | null
>     } | null,
>     Created_Time?: string | null,
>     Modified_Time?: string | null,
>     Created_By?: {
>       name?: string | null,
>       id?: string | null,
>       email?: string | null
>     } | null,
>     Modified_By?: {
>       name?: string | null,
>       id?: string | null,
>       email?: string | null
>     } | null,
>     Wizard?: {
>       id?: string | null
>     } | null,
>     $state?: string | null,
>     $wizard_connection_path?: string | null | null
>   }[] | null,
>   info?: {
>     page?: number | null,
>     call?: boolean | null,
>     per_page?: number | null,
>     count?: number | null,
>     more_records?: boolean | null,
>     email?: boolean | null,
>     sort_by?: string | null,
>     sort_order?: string | null,
>     next_page_token?: string | null | null,
>     previous_page_token?: string | null | null,
>     page_token_expiry?: string | null | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### listDeleted

`records.listDeleted`

Get deleted records from a specified module. To retrieve the list of deleted records from the specified module in your Zoho CRM organization, including records in the recycle bin and permanently deleted records. Use the Get Modules API to retrieve the module ID and API name.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.records.listDeleted({ module: 'Leads' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the API name of the module. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve the module ID and API name. |
| `type` | `all \| recycle \| permanent` | No | Specify the category of deleted records to retrieve. Possible values: **all** - Returns both recycled and permanently deleted records. **recycle** - Returns only records in the Recycle Bin. **permanent** - Returns only permanently deleted records. |
| `page` | `number \| string` | No | Specify the page number to retrieve. Starts at 1. |
| `per_page` | `number \| string` | No | Specify the number of records to return per page. Maximum is 200. |
| `ifModifiedSince` | `string` | No | Use this header to get the list of records modified after the specified timestamp. The timestamp must be in ISO 8601 format. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data?: {
>     id?: string | null,
>     display_name?: string | null | null,
>     type?: string | null,
>     deleted_time?: string | null,
>     deleted_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null
>   }[] | null,
>   info?: {
>     per_page?: number | null,
>     count?: number | null,
>     page?: number | null,
>     more_records?: boolean | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### merge

`records.merge`

Merge Records. To merge duplicate records in your Zoho CRM organization into a single master record. Supports field-level value selection from child records and file attachment management. The other records are merged into the master and deleted.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.records.merge({
	masterRecordId: '4876876000000333001',
	module: 'Leads',
	merge: [{
		data: [{ id: '4876876000000333001' }],
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `masterRecordId` | `string` | Yes | Specify the unique identifier of the master record to be retained after the merge operation. |
| `module` | `Accounts \| Contacts \| Leads \| Deals \| Cases \| Campaigns` | Yes | Specify the CRM module name containing the records to be merged. Possible values: **Accounts** - Accounts module. **Contacts** - Contacts module. **Leads** - Leads module. **Deals** - Deals module. **Vendors** - Cases module. Additionally, **custom modules** are also supported in this API. |
| `feature` | `string` | No | Triggers the web record approval flow instead of the standard merge flow. |
| `merge` | `object[]` | Yes | Specify the configurations for the merge. The array must contain exactly one object. |

> [accordion] merge full type
>
> ```ts theme={null}
> {
>   data: {
>     id: string,
>     _fields?: {
>       api_name: string,
>       _data?: {
>         id: string
>       }[] | null
>     }[]
>   }[],
>   master_record_fields?: {
>     api_name: string,
>     _data?: {
>       id: string
>     }[] | null
>   }[]
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `merge` | `object[] \| null` | No | Contains the list of merge operation results indicating whether the merge completed or was scheduled. |

> [accordion] merge full type
>
> ```ts theme={null}
> (
>   {
>     code?: string | null,
>     details?: {
>       id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   } | {
>     code?: string | null,
>     details?: {
>       job_id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }
> )[] | null
> ```

***

### search

`records.search`

Search Records by Criteria, Word, Email, or Phone. To search for records within a specified module in your Zoho CRM organization using criteria-based conditions, full-text word search, or lookup by email or phone number. Give one of criteria, email, phone or word. No match answers 204: \{ success: true }.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.records.search({ module: 'Leads' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the API name of the module to search within. Refer to [Get Modules](https://www.zoho.com/crm/developer/docs/api/v8/modules-api.html) to retrieve a list of available modules. |
| `approval_state` | `approval_process_pending \| webform_invalid \| review_process_pending \| webform_invalid_approval \| zia_vision_validation \| review_process_rejected \| webform_unapproved \| email_parser_waiting \| approved \| merge_pending \| email_parser_rejected \| zia_vision_rejected \| zia_vision_pending \| approval_process_rejected \| webform_double_optin` | No | Specify the approval state to filter records by. The search returns only records in the specified approval state. Possible values: **approval\_process\_pending**, **webform\_invalid**, **review\_process\_pending**, **webform\_invalid\_approval**, **zia\_vision\_validation**, **review\_process\_rejected**, **webform\_unapproved**, **email\_parser\_waiting**, **approved**, **merge\_pending**, **email\_parser\_rejected**, **zia\_vision\_rejected**, **zia\_vision\_pending**, **approval\_process\_rejected**, **webform\_double\_optin**. |
| `criteria` | `string` | No | Specify a criteria string to filter records using field-specific conditions and operators. Performs a search using the following format: `(({field_API_name}:{operator}:{value}) and/or ({field_API_name}:{operator}:{value}))` Replace `{field_API_name}`, `{operator}`, and `{value}` with the appropriate field API name, condition, and value. - You can search using a maximum of 10 criteria, with the same or different fields. - The only operator supported for encrypted fields is `equals`. When using the `equals` operator in the Search API, it behaves like `contains`, retrieving records that include the specified value. For a single condition, if the condition is: `(Company:equals:ABC)` the response includes records with `ABC` as well as `ABC Inc.` in the `Company` field. For multiple conditions, `equals` continues to behave like `contains`. **For example:** `((Company:equals:ABC) and (First_Name:starts_with:M))` This retrieves records where: - `First_Name` starts with `M` - `Company` contains `ABC` (for example, `ABC` or `ABC Inc.`) \*\* Note\*\*: This behavior does not apply to picklist fields. The `in` operator checks whether a field value matches any value in a given list. **For example:** `(Full_Name:in:Patricia,Boyle,Kate)` This retrieves records where the `Full_Name` is `Patricia`, `Boyle`, or `Kate`. When a single-line field value contains characters such as: `{ } [ ] ^ : - / ! ? * _ @` or spaces, the Search API may return records with similar-looking values, even when the characters are not an exact match. For example: - Record A: `sales-team@zoho.com` - Record B: `sales_team@zoho.com` A search using: `equals:sales-team@zoho.com` may return both records. **Escaping Special Characters** When using parentheses `(` `)`, commas `,`, or a backslash `\\` as the last character in a search value: 1. Escape special characters using a backslash (`\\`). 2. Encode the value before making the API request. 3. Select the value of the criteria, right-click the value, and choose the `EncodeURIComponent` option. **Example 1: Escaping Parentheses and Commas** Search term: `((Last_Name:equals:Burns,B) and (First_Name:starts_with:M))` Escape the comma: `((Last_Name:equals:Burns\\,B) and (First_Name:starts_with:M))` Encode the value: `((Last_Name:equals:Burns%5C%2CB) and (First_Name:starts_with:M))` **Example 2: Escaping a Backslash at the End** Search term: `(Last_Name:equals:K\\)` Escape the backslash: `(Last_Name:equals:K\\\\)` Encode the value: `(Last_Name:equals:K%5C%5C)` **Supported Data Types** - `picklist` - `owner_lookup` - `user_lookup` - `lookup` - `phone` - `email` - `date` - `datetime` - `text` - `textarea` - `integer` - `currency` - `decimal` - `multiselectpicklist` - `bigint` - `percent` - `formula` - `website` - `boolean` - `double` **Supported Operators** - `equals` - `starts_with` - `in` - `not_equal` - `greater_equal` - `greater_than` - `less_equal` - `less_than` - `between` Refer to the following note for operator support by field type. \* **Date, DateTime:** `equals`, `not_equal`, `greater_equal`, `greater_than`, `less_equal`, `less_than`, `between`, `in` \* **Integer, Currency, Decimal:** `equals`, `not_equal`, `greater_equal`, `greater_than`, `less_equal`, `less_than`, `between`, `in` \* **Boolean:** `equals`, `not_equal` \* **textarea:** `equals`, `not_equal`, `starts_with` \* **Lookup (user/owner):** `equals`, `not_equal`, `in` \* **Picklist, Autonumber:** `equals`, `not_equal`, `in` \* **Text, Email, Phone, Website:** `equals`, `not_equal`, `starts_with`, `in` \* **multiselectpicklist:** `equals`, `not_equal`, `in`, `starts_with` \* **bigint:** `equals`, `not_equal`, `greater_than`, `greater_equal`, `less_than`, `less_equal`, `between`, `in` \* **percent:** `equals`, `not_equal`, `greater_than`, `greater_equal`, `less_than`, `less_equal`, `between`, `in` \* **formula:** Operators depend on the formula return type. Check the corresponding data type's supported operators. |
| `converted` | `true \| false \| both` | No | Specify whether to filter records by their conversion status. Applicable only for the Leads module. Possible values: **true** - Returns only converted leads. **false** - Returns only unconverted leads. **both** - Returns all leads regardless of conversion status. Defaults to **false**. |
| `word` | `string` | No | Specify the word or phrase to search for across all searchable text fields in the module. The value must be at least two characters long. Performs a global search with minimum 2 characters required. This is the broadest search method but may be slower than specific field searches. *Mandatory if criteria, email, and phone are not present.* |
| `email` | `string` | No | Specify the email address to search for across all email-type fields in the module. Partial matches are supported and searches multiple email fields simultaneously. *Mandatory if criteria, phone, and word are not present.* |
| `phone` | `string` | No | Specify the phone number to search for across all phone-type fields in the module. The value must be at least three characters long and may include digits, spaces, hyphens, parentheses, and the plus sign. Supports various phone number formats including international, national, and partial numbers. *Mandatory if criteria, email, and word are not present.* |
| `fields` | `string` | No | Specify a comma-separated list of field API names to include in the response. If omitted, the response includes all fields accessible to the current user. |
| `page` | `number \| string` | No | Specify the page number to retrieve for paginated results. The minimum value is 1. Defaults to 1. |
| `per_page` | `number \| string` | No | Specify the number of records to return per page. The minimum value is 1, the maximum is 200, and the default is 200. |
| `sort_by` | `string` | No | Specify the API name of the field to sort the search results by. |
| `sort_order` | `asc \| desc` | No | Specify the direction in which to sort the results. Defaults to **desc**. Possible values: **asc** - Ascending order (A-Z, 1-9). **desc** - Descending order (Z-A, 9-1). |
| `type` | `ActiveAndDeactive \| CurrentUser \| DeletedUsers \| ParentRoleUsers \| ChildRoleUsers \| DeactiveUsers \| NotConfirmedUsers \| ConfirmedUsers \| ActiveUsers \| AdminUsers \| ActiveConfirmedAdmins \| ActiveConfirmedUsers \| DeveloperUsers \| SubordinateRoleUsers \| AllUsers \| AllActiveUsers` | No | Specify the user type to filter the search results by. Possible values: **ActiveAndDeactive**, **CurrentUser**, **DeletedUsers**, **ParentRoleUsers**, **ChildRoleUsers**, **DeactiveUsers**, **NotConfirmedUsers**, **ConfirmedUsers**, **ActiveUsers**, **AdminUsers**, **ActiveConfirmedAdmins**, **ActiveConfirmedUsers**, **DeveloperUsers**, **SubordinateRoleUsers**, **AllUsers**, **AllActiveUsers**. **Note** - Only one of the mandatory parameters (`criteria`, `email`, `phone`, or `word`) can be used in a single request. - If multiple parameters are provided, the API processes them in the following priority order: 1. `criteria` 2. `email` 3. `phone` 4. `word` - Only the highest-priority parameter in the request is processed. - The `page` and `per_page` parameters help retrieve records based on their position in Zoho CRM. - A single API call can fetch a maximum of 200 records. - To retrieve more records, adjust the `page` and `per_page` values. Example: To fetch 400 records: - First API call: `page=1&per_page=200` -> Fetches records 1-200 - Second API call: `page=2&per_page=200` -> Fetches records 201-400 By making two API calls, all 400 records can be retrieved. - The Search API allows you to search for and retrieve a maximum of 2,000 records. If the search exceeds 2,000 records, the API returns a `LIMIT_REACHED` error. - Values of fields containing sensitive health data are retrieved only when the **Restrict Data Access through API** option in the compliance settings is disabled. If the option is enabled, the field value is returned as `null`. Refer to [HIPAA compliance documentation](https://www.zoho.com/crm/developer/docs/api/v8/hipaa-compliance.html) for more details. - When you create or edit a record and search for it immediately, you may receive a `204 NO CONTENT` response due to indexing delays. To fetch records without delay, use the [Query API](https://www.zoho.com/crm/developer/docs/api/v8/Get-Records-through-COQL-Query.html). - The `in` operator supports up to 100 values. - The `full_name` field contains the concatenated values of the `First Name` and `Last Name` fields. - `full_name` is a read-only field available only in the `Leads`, `Contacts`, and `Users` modules. To retrieve subform records that match your search criteria, use the API name of the corresponding subform module. To retrieve multi-select lookup (MxN) records that match your search criteria, use the API name of the corresponding linking module. |
| `include_lite_users` | `boolean` | No | Indicates whether lite users should be included in the search results. |
| `role_id` | `string` | No | Filter users by role ID. This parameter is supported only for the Users module. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data?: {
>     id?: string | null,
>     Owner?: {
>       name?: string | null,
>       id?: string | null,
>       email?: string | null
>     } | null,
>     Created_Time?: string | null,
>     Modified_Time?: string | null,
>     Created_By?: {
>       name?: string | null,
>       id?: string | null,
>       email?: string | null
>     } | null,
>     Modified_By?: {
>       name?: string | null,
>       id?: string | null,
>       email?: string | null
>     } | null
>   }[] | null,
>   info?: {
>     per_page?: number | null,
>     count?: number | null,
>     page?: number | null,
>     more_records?: boolean | null,
>     sort_by?: string | null,
>     sort_order?: string | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### searchMany

`records.searchMany`

Bulk Search Records by Criteria, Word, Email, or Phone. Searches for records in the specified module that match the given search criteria. This API accepts the same search parameters as the GET /\{module}/search API, but they are provided in the request body instead of query parameters.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.records.searchMany({ module: 'Leads' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the API name of the module to search within. Refer to [Get Modules](https://www.zoho.com/crm/developer/docs/api/v8/modules-api.html) to retrieve a list of available modules. |
| `approval_state` | `approval_process_pending \| webform_invalid \| review_process_pending \| webform_invalid_approval \| zia_vision_validation \| review_process_rejected \| webform_unapproved \| email_parser_waiting \| approved \| merge_pending \| email_parser_rejected \| zia_vision_rejected \| zia_vision_pending \| approval_process_rejected \| webform_double_optin` | No | Specify the approval state to filter records by. The search returns only records in the specified approval state. Possible values: **approval\_process\_pending**, **webform\_invalid**, **review\_process\_pending**, **webform\_invalid\_approval**, **zia\_vision\_validation**, **review\_process\_rejected**, **webform\_unapproved**, **email\_parser\_waiting**, **approved**, **merge\_pending**, **email\_parser\_rejected**, **zia\_vision\_rejected**, **zia\_vision\_pending**, **approval\_process\_rejected**, **webform\_double\_optin**. |
| `criteria` | `string` | No | Specify a criteria string to filter records using field-specific conditions and operators. Performs a search using the following format: `(({field_API_name}:{operator}:{value}) and/or ({field_API_name}:{operator}:{value}))` Replace `{field_API_name}`, `{operator}`, and `{value}` with the appropriate field API name, condition, and value. - You can search using a maximum of 10 criteria, with the same or different fields. - The only operator supported for encrypted fields is `equals`. When using the `equals` operator in the Search API, it behaves like `contains`, retrieving records that include the specified value. For a single condition, if the condition is: `(Company:equals:ABC)` the response includes records with `ABC` as well as `ABC Inc.` in the `Company` field. For multiple conditions, `equals` continues to behave like `contains`. **For example:** `((Company:equals:ABC) and (First_Name:starts_with:M))` This retrieves records where: - `First_Name` starts with `M` - `Company` contains `ABC` (for example, `ABC` or `ABC Inc.`) \*\* Note\*\*: This behavior does not apply to picklist fields. The `in` operator checks whether a field value matches any value in a given list. **For example:** `(Full_Name:in:Patricia,Boyle,Kate)` This retrieves records where the `Full_Name` is `Patricia`, `Boyle`, or `Kate`. When a single-line field value contains characters such as: `{ } [ ] ^ : - / ! ? * _ @` or spaces, the Search API may return records with similar-looking values, even when the characters are not an exact match. For example: - Record A: `sales-team@zoho.com` - Record B: `sales_team@zoho.com` A search using: `equals:sales-team@zoho.com` may return both records. **Escaping Special Characters** When using parentheses `(` `)`, commas `,`, or a backslash `\\` as the last character in a search value: 1. Escape special characters using a backslash (`\\`). 2. Encode the value before making the API request. 3. Select the value of the criteria, right-click the value, and choose the `EncodeURIComponent` option. **Example 1: Escaping Parentheses and Commas** Search term: `((Last_Name:equals:Burns,B) and (First_Name:starts_with:M))` Escape the comma: `((Last_Name:equals:Burns\\,B) and (First_Name:starts_with:M))` Encode the value: `((Last_Name:equals:Burns%5C%2CB) and (First_Name:starts_with:M))` **Example 2: Escaping a Backslash at the End** Search term: `(Last_Name:equals:K\\)` Escape the backslash: `(Last_Name:equals:K\\\\)` Encode the value: `(Last_Name:equals:K%5C%5C)` **Supported Data Types** - `picklist` - `owner_lookup` - `user_lookup` - `lookup` - `phone` - `email` - `date` - `datetime` - `text` - `textarea` - `integer` - `currency` - `decimal` - `multiselectpicklist` - `bigint` - `percent` - `formula` - `website` - `boolean` - `double` **Supported Operators** - `equals` - `starts_with` - `in` - `not_equal` - `greater_equal` - `greater_than` - `less_equal` - `less_than` - `between` Refer to the following note for operator support by field type. \* **Date, DateTime:** `equals`, `not_equal`, `greater_equal`, `greater_than`, `less_equal`, `less_than`, `between`, `in` \* **Integer, Currency, Decimal:** `equals`, `not_equal`, `greater_equal`, `greater_than`, `less_equal`, `less_than`, `between`, `in` \* **Boolean:** `equals`, `not_equal` \* **textarea:** `equals`, `not_equal`, `starts_with` \* **Lookup (user/owner):** `equals`, `not_equal`, `in` \* **Picklist, Autonumber:** `equals`, `not_equal`, `in` \* **Text, Email, Phone, Website:** `equals`, `not_equal`, `starts_with`, `in` \* **multiselectpicklist:** `equals`, `not_equal`, `in`, `starts_with` \* **bigint:** `equals`, `not_equal`, `greater_than`, `greater_equal`, `less_than`, `less_equal`, `between`, `in` \* **percent:** `equals`, `not_equal`, `greater_than`, `greater_equal`, `less_than`, `less_equal`, `between`, `in` \* **formula:** Operators depend on the formula return type. Check the corresponding data type's supported operators. |
| `converted` | `true \| false \| both` | No | Specify whether to filter records by their conversion status. Applicable only for the Leads module. Possible values: **true** - Returns only converted leads. **false** - Returns only unconverted leads. **both** - Returns all leads regardless of conversion status. Defaults to **false**. |
| `word` | `string` | No | Specify the word or phrase to search for across all searchable text fields in the module. The value must be at least two characters long. Performs a global search with minimum 2 characters required. This is the broadest search method but may be slower than specific field searches. *Mandatory if criteria, email, and phone are not present.* |
| `email` | `string` | No | Specify the email address to search for across all email-type fields in the module. Partial matches are supported and searches multiple email fields simultaneously. *Mandatory if criteria, phone, and word are not present.* |
| `phone` | `string` | No | Specify the phone number to search for across all phone-type fields in the module. The value must be at least three characters long and may include digits, spaces, hyphens, parentheses, and the plus sign. Supports various phone number formats including international, national, and partial numbers. *Mandatory if criteria, email, and word are not present.* |
| `fields` | `string` | No | Specify a comma-separated list of field API names to include in the response. If omitted, the response includes all fields accessible to the current user. |
| `page` | `number \| string` | No | Specify the page number to retrieve for paginated results. The minimum value is 1. Defaults to 1. |
| `per_page` | `number \| string` | No | Specify the number of records to return per page. The minimum value is 1, the maximum is 200, and the default is 200. |
| `sort_by` | `string` | No | Specify the API name of the field to sort the search results by. |
| `sort_order` | `asc \| desc` | No | Specify the direction in which to sort the results. Defaults to **desc**. Possible values: **asc** - Ascending order (A-Z, 1-9). **desc** - Descending order (Z-A, 9-1). |
| `type` | `ActiveAndDeactive \| CurrentUser \| DeletedUsers \| ParentRoleUsers \| ChildRoleUsers \| DeactiveUsers \| NotConfirmedUsers \| ConfirmedUsers \| ActiveUsers \| AdminUsers \| ActiveConfirmedAdmins \| ActiveConfirmedUsers \| DeveloperUsers \| SubordinateRoleUsers \| AllUsers \| AllActiveUsers` | No | Specify the user type to filter the search results by. Possible values: **ActiveAndDeactive**, **CurrentUser**, **DeletedUsers**, **ParentRoleUsers**, **ChildRoleUsers**, **DeactiveUsers**, **NotConfirmedUsers**, **ConfirmedUsers**, **ActiveUsers**, **AdminUsers**, **ActiveConfirmedAdmins**, **ActiveConfirmedUsers**, **DeveloperUsers**, **SubordinateRoleUsers**, **AllUsers**, **AllActiveUsers**. **Note** - Only one of the mandatory parameters (`criteria`, `email`, `phone`, or `word`) can be used in a single request. - If multiple parameters are provided, the API processes them in the following priority order: 1. `criteria` 2. `email` 3. `phone` 4. `word` - Only the highest-priority parameter in the request is processed. - The `page` and `per_page` parameters help retrieve records based on their position in Zoho CRM. - A single API call can fetch a maximum of 200 records. - To retrieve more records, adjust the `page` and `per_page` values. Example: To fetch 400 records: - First API call: `page=1&per_page=200` -> Fetches records 1-200 - Second API call: `page=2&per_page=200` -> Fetches records 201-400 By making two API calls, all 400 records can be retrieved. - The Search API allows you to search for and retrieve a maximum of 2,000 records. If the search exceeds 2,000 records, the API returns a `LIMIT_REACHED` error. - Values of fields containing sensitive health data are retrieved only when the **Restrict Data Access through API** option in the compliance settings is disabled. If the option is enabled, the field value is returned as `null`. Refer to [HIPAA compliance documentation](https://www.zoho.com/crm/developer/docs/api/v8/hipaa-compliance.html) for more details. - When you create or edit a record and search for it immediately, you may receive a `204 NO CONTENT` response due to indexing delays. To fetch records without delay, use the [Query API](https://www.zoho.com/crm/developer/docs/api/v8/Get-Records-through-COQL-Query.html). - The `in` operator supports up to 100 values. - The `full_name` field contains the concatenated values of the `First Name` and `Last Name` fields. - `full_name` is a read-only field available only in the `Leads`, `Contacts`, and `Users` modules. To retrieve subform records that match your search criteria, use the API name of the corresponding subform module. To retrieve multi-select lookup (MxN) records that match your search criteria, use the API name of the corresponding linking module. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data?: {
>     id?: string | null,
>     Owner?: {
>       name?: string | null,
>       id?: string | null,
>       email?: string | null
>     } | null,
>     Created_Time?: string | null,
>     Modified_Time?: string | null,
>     Created_By?: {
>       name?: string | null,
>       id?: string | null,
>       email?: string | null
>     } | null,
>     Modified_By?: {
>       name?: string | null,
>       id?: string | null,
>       email?: string | null
>     } | null
>   }[] | null,
>   info?: {
>     per_page?: number | null,
>     count?: number | null,
>     page?: number | null,
>     more_records?: boolean | null,
>     sort_by?: string | null,
>     sort_order?: string | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### update

`records.update`

Update a specific record by ID. To update the field values of a specific record in the specified module in your Zoho CRM organization. Use the Get Modules API to retrieve the module ID and API name. Use the Get Fields Metadata API to retrieve the field IDs and API names.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.records.update({
	module: 'Leads',
	recordId: '4876876000000333001',
	data: [{}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the API name of the module. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve the module ID and API name. |
| `recordId` | `string` | Yes | Specify the unique ID of the record. Use the [Get Records API](record.yaml#\$.paths./module.get) to retrieve the record IDs. |
| `data` | `object[]` | Yes | Represents the data value. |
| `apply_feature_execution` | `object[]` | No | Use the "apply\_feature\_execution" array to trigger supported CRM features when creating or updating a record through the API. Specify "layout\_rules" to apply layout rules or "criteria\_validation\_rule" to trigger validation rules. For "layout\_rules", ensure the request includes all fields required by the layout rule criteria; otherwise, the API returns an error. For "criteria\_validation\_rule", all applicable validation rules are evaluated, and the API returns "MULTIPLE\_OR\_MULTI\_ERRORS" if multiple rules fail. |
| `skip_feature_execution` | `object[]` | No | Represents the skip feature execution value. |
| `trigger` | `(approval \| workflow \| blueprint \| pathfinder \| orchestration)[]` | No | Represents the trigger value. |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   $append_values?: string,
>   Layout?: {
>     id: string
>   }
> }[]
> ```

> [accordion] apply\_feature\_execution full type
>
> ```ts theme={null}
> {
>   name: layout_rules | range_validation | assignment_rules | function_validation_rule | criteria_validation_rule | global_map_dependency | territory_subordinates
> }[]
> ```

> [accordion] skip\_feature\_execution full type
>
> ```ts theme={null}
> {
>   name: assignment_rules | cadences | connected_workflows
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | Represents the data value. |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   message?: string | null,
>   status?: string | null,
>   details?: {
>     id?: string | null,
>     Modified_Time?: string | null,
>     Created_Time?: string | null,
>     Created_By?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     Modified_By?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     $approval_state?: string | null,
>     $state?: string | null,
>     $wizard_connection_path?: string | null | null,
>     $process_flow?: boolean | null,
>     $locked_for_me?: boolean | null,
>     $approved?: boolean | null,
>     $status?: string | null,
>     $layout_id?: {
>       id?: string | null,
>       name?: string | null,
>       display_label?: string | null
>     } | null,
>     $has_more?: {
>     } | null
>   } | null
> }[] | null
> ```

***

### updateMany

`records.updateMany`

Update records in a specified module. Updates one or more existing records in the specified module in your Zoho CRM organization. Use the Get Modules API to retrieve the module API name and the Get Fields Metadata API to retrieve the field API names. A maximum of 100 records can be updated per API call.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.records.updateMany({
	module: 'Leads',
	data: [{ id: '4876876000000333001' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the API name of the module. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve the module ID and API name. |
| `data` | `object[]` | Yes | Represents the data value. |
| `apply_feature_execution` | `object[]` | No | Represents the apply feature execution value. |
| `skip_feature_execution` | `object[]` | No | Represents the skip feature execution value. |
| `trigger` | `(approval \| workflow \| blueprint \| pathfinder \| orchestration)[]` | No | Represents the trigger value. |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   id: string,
>   $append_values?: string,
>   Layout?: {
>     id: string
>   }
> }[]
> ```

> [accordion] apply\_feature\_execution full type
>
> ```ts theme={null}
> {
>   name: layout_rules | range_validation | assignment_rules | function_validation_rule | criteria_validation_rule | global_map_dependency | territory_subordinates
> }[]
> ```

> [accordion] skip\_feature\_execution full type
>
> ```ts theme={null}
> {
>   name: assignment_rules | cadences | connected_workflows
> }[]
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data?: {
>     code?: string | null,
>     message?: string | null,
>     status?: string | null,
>     details?: {
>       id?: string | null,
>       Modified_Time?: string | null,
>       Created_Time?: string | null,
>       Created_By?: {
>         name?: string | null,
>         id?: string | null
>       } | null,
>       Modified_By?: {
>         name?: string | null,
>         id?: string | null
>       } | null,
>       $approval_state?: string | null,
>       $state?: string | null,
>       $wizard_connection_path?: string | null | null,
>       $process_flow?: boolean | null,
>       $locked_for_me?: boolean | null,
>       $approved?: boolean | null,
>       $status?: string | null,
>       $layout_id?: {
>         id?: string | null,
>         name?: string | null,
>         display_label?: string | null
>       } | null,
>       $has_more?: {
>       } | null
>     } | null
>   }[] | null
> } | {
>   data?: any & any | null
> }
> ```

***

### uploadPhoto

`records.uploadPhoto`

Upload a record photo. To upload a photo for a specific record in your Zoho CRM organization.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.records.uploadPhoto({
	module: 'Leads',
	record: '4876876000000333001',
	file: { base64: 'SGVsbG8gZnJvbSBDb3JzYWly', filename: 'notes.txt', contentType: 'text/plain' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the API name of the module for which you want to manage the record photo. Refer to the [Get Modules Metadata API](modules.yaml#\$.paths./settings/modules.get) to retrieve the module's API name. |
| `record` | `string` | Yes | Specify the unique identifier of the record for which you want to manage the photo. Use the [Get Records API](record.yaml#\$.paths./module.get) to retrieve the record IDs. |
| `restrict_triggers` | `string` | No | (Optional) Comma-separated list of automation triggers to suppress during the operation. Accepted values are `workflow`, `approval`, `blueprint`, `pathfinder`, and `orchestration`. |
| `file` | `string \| object \| custom` | Yes | Specify the photo file to upload for the record. |

> [accordion] file full type
>
> ```ts theme={null}
> string | {
>   url: string,
>   filename?: string,
>   contentType?: string
> } | {
>   base64: string,
>   filename?: string,
>   contentType?: string
> } | custom
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `code` | `string \| null` | No | Represents the success code for the photo upload operation. Possible values: **SUCCESS**. Example: "SUCCESS". |
| `message` | `string \| null` | No | Represents the success message describing the result of the upload operation. |
| `status` | `string \| null` | No | Represents the status of the response. Possible values: **success**. Example: "success". |
| `details` | `object \| null` | No | Represents additional details about the upload operation. |

> [accordion] details full type
>
> ```ts theme={null}
> {
> } | null
> ```

***

### upsert

`records.upsert`

Create or update records in a specified module. The Upsert API inserts a new record or updates an existing record based on duplicate check field values. If a matching record is found, it is updated; otherwise, a new record is inserted. When using the Upsert API, the system checks for duplicate records based on the duplicate check fields.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.records.upsert({
	module: 'Leads',
	data: [{}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the API name of the module. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve the module ID and API name. |
| `data` | `object[]` | Yes | List of records to be created or updated using the upsert operation. |
| `trigger` | `(approval \| workflow \| blueprint \| pathfinder \| orchestration)[]` | No | Specifies the CRM features to execute for the API request. Supported values are "workflow", "approval", and "blueprint". If the "trigger" parameter is not specified, workflows, approvals, and blueprints related to the API are executed. Specify an empty array \[] to prevent these features from executing. |
| `duplicate_check_fields` | `string[]` | No | Specifies the fields used to check for duplicate records during an Upsert operation. Duplicate check fields can be system-defined unique fields or user-defined unique fields. The following are the system-defined duplicate check fields for the respective modules: Leads - "Email"; Accounts - "Account\_Name"; Contacts - "Email"; Deals - "Deal\_Name"; Campaigns - "Campaign\_Name"; Cases - "Subject"; Solutions - "Solution\_Title"; Products - "Product\_Name"; Vendors - "Vendor\_Name"; PriceBooks - "Price\_Book\_Name"; Quotes - "Subject"; SalesOrders - "Subject"; PurchaseOrders - "Subject"; Invoices - "Subject"; Custom Modules - "Name". If a matching record is found based on these fields, the record is updated; otherwise, a new record is inserted. |
| `wf_trigger` | `string \| null` | No | Workflow trigger identifier to be executed as part of the upsert operation. |
| `lar_id` | `string` | No | The unique ID of the assignment rule to trigger while inserting a record. Use the Get Assignment Rules API to retrieve valid values. This key must be provided parallel to the data key. Supported for all modules where assignment rules are applicable, such as Leads, Contacts, Deals, Accounts, Tasks, Cases, and Custom. |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   $append_values?: string,
>   Layout?: {
>     id: string
>   }
> }[]
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data?: {
>     code?: string | null,
>     duplicate_field?: string | null | null,
>     action?: string | null,
>     message?: string | null,
>     status?: string | null,
>     details?: {
>       id?: string | null,
>       Modified_Time?: string | null,
>       Created_Time?: string | null,
>       Created_By?: {
>         name?: string | null,
>         id?: string | null
>       } | null,
>       Modified_By?: {
>         name?: string | null,
>         id?: string | null
>       } | null,
>       $approval_state?: string | null
>     } | null
>   }[] | null
> } | {
>   data?: any & any | null
> }
> ```

***

## Record Sharing

### list

`recordSharing.list`

Share Records. To retrieve the share details of a specific record in a module of your Zoho CRM organization. The response lists each entry with the recipient, the access level, and the sharing metadata.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.recordSharing.list({ moduleApiName: 'Leads', recordId: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `moduleApiName` | `string` | Yes | Specify the API name of the module that owns the record. Refer to the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) for valid values. |
| `recordId` | `string` | Yes | Specify the unique ID of the record. Refer to the [Get Records API](record.yaml#\$.paths./\{module}.get) for valid values. |
| `sharedTo` | `string` | No | Specify the unique ID of the user whose share entries you want to retrieve. When set, the response returns only the share entries for that user. Use the [Get Users API](users.yaml#\$paths./users.get) to get the valid IDs for the users. |
| `view` | `manage \| summary` | No | Specify the level of detail to include in the response. **Possible values**: summary, manage. |
| `approved` | `true \| false \| both` | No | Filters sharing records by approval status. - `true` - return only approved sharing entries - `false` - return only unapproved (pending) sharing entries - `both` - return all sharing entries regardless of approval status |
| `current_user` | `boolean` | No | Specify whether to return only the share entries for the current user. When set to **true**, the response returns only the share entries for the user making the API call. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   share?: {
>     shared_with?: {
>       name?: string | null,
>       id?: string | null,
>       type?: string | null
>     } | null,
>     share_related_records?: boolean | null,
>     shared_through?: {
>       module?: {
>         name?: string | null,
>         id?: string | null
>       } | null,
>       id?: string | null
>     } | null,
>     shared_time?: string | null,
>     permission?: string | null,
>     shared_by?: {
>       name?: string | null,
>       id?: string | null,
>       zuid?: string | null
>     } | null,
>     type?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### revokeAll

`recordSharing.revokeAll`

Revoke sharing on a record. To revoke all sharing on a specific record in a module of your Zoho CRM organization. Use this operation to remove access that was previously granted to users, roles, or groups through record-level sharing. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.recordSharing.revokeAll({ moduleApiName: 'Leads', recordId: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `moduleApiName` | `string` | Yes | Specify the API name of the module that owns the record. Refer to the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) for valid values. |
| `recordId` | `string` | Yes | Specify the unique ID of the record. Refer to the [Get Records API](record.yaml#\$.paths./\{module}.get) for valid values. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `share` | `object \| null` | No | Represents the share record revoke response details. |

> [accordion] share full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> } | null
> ```

***

### share

`recordSharing.share`

Share a record. To share a specific record in a module with one or more users, roles, or groups. A record can be shared with up to 10 users, 5 roles, and 5 groups. > Note: > - The records can be shared to other users in the organization only if certain conditions are met.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.recordSharing.share({
	moduleApiName: 'Leads',
	recordId: '4876876000000333001',
	share: [{
		type: 'private',
		permission: 'read_only',
		shared_with: { type: 'example', id: '4876876000000333001' },
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `moduleApiName` | `string` | Yes | Specify the API name of the module that owns the record. Refer to the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) for valid values. |
| `recordId` | `string` | Yes | Specify the unique ID of the record. Refer to the [Get Records API](record.yaml#\$.paths./\{module}.get) for valid values. |
| `share` | `object[]` | Yes | Specify 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. |
| `notify_shared_members` | `boolean` | No | Specify whether to send a notification to the members with whom the record is shared. **Possible values**: - true - false |
| `notify_on_completion` | `boolean` | No | Specify whether to send an email notification to the record owner once the share action is completed. **Possible values**: - true - false |

> [accordion] share full type
>
> ```ts theme={null}
> {
>   type: private | public,
>   share_related_records?: boolean,
>   permission: read_only | read_write | full_access,
>   shared_with: {
>     type: string,
>     id: string
>   } | {
>     type: string,
>     id: string
>   } | {
>     type: string,
>     id: string
>   }
> }[]
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   share?: {
>     code?: string | null,
>     details?: {
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   share?: (
>     {
>       code?: string | null,
>       details?: {
>       } | null,
>       message?: string | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       details?: {
>         api_name?: string | null,
>         json_path?: string | null
>       } | null,
>       message?: string | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       details?: {
>         api_name?: string | null,
>         json_path?: string | null,
>         regex?: string | null
>       } | null,
>       message?: string | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       details?: {
>         api_name?: string | null,
>         json_path?: string | null,
>         dependee?: {
>           api_name?: string | null,
>           json_path?: string | null
>         } | null
>       } | null,
>       message?: string | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       details?: {
>         api_name?: string | null,
>         json_path?: string | null
>       } | null,
>       message?: string | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       details?: {
>         api_name?: string | null,
>         json_path?: string | null
>       } | null,
>       message?: string | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       details?: {
>         limit?: number | null,
>         api_name?: string | null,
>         json_path?: string | null
>       } | null,
>       message?: string | null,
>       status?: string | null
>     }
>   )[] | null
> }
> ```

***

### update

`recordSharing.update`

Update share permissions. To update the sharing permissions of a specific record in a module of your Zoho CRM organization. The update can change the access level, change the visibility between private and public, or alter whether related records are shared along with the record.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.recordSharing.update({
	moduleApiName: 'Leads',
	recordId: '4876876000000333001',
	share: [{
		type: 'private',
		permission: 'read_only',
		shared_with: { type: 'example', id: '4876876000000333001' },
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `moduleApiName` | `string` | Yes | Specify the API name of the module that owns the record. Refer to the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) for valid values. |
| `recordId` | `string` | Yes | Specify the unique ID of the record. Refer to the [Get Records API](record.yaml#\$.paths./\{module}.get) for valid values. |
| `share` | `object[]` | Yes | Specify the list of share entries to update. Each entry defines a recipient, the access level, and the type of sharing. |
| `notify_shared_members` | `boolean` | No | Specify whether to send a notification to the members with whom the record is shared. **Possible values**: - true - false |
| `notify_on_completion` | `boolean` | No | Specify whether to send an email notification to the record owner once the share action is completed. \**Possible values*: - true - false |

> [accordion] share full type
>
> ```ts theme={null}
> {
>   type: private | public,
>   share_related_records?: boolean,
>   permission: read_only | read_write | full_access,
>   shared_with: {
>     type: string,
>     id: string
>   } | {
>     type: string,
>     id: string
>   } | {
>     type: string,
>     id: string
>   },
>   id?: string
> }[]
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   share?: {
>     code?: string | null,
>     details?: {
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   share?: (
>     {
>       code?: string | null,
>       details?: {
>       } | null,
>       message?: string | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       details?: {
>         api_name?: string | null,
>         json_path?: string | null
>       } | null,
>       message?: string | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       details?: {
>         api_name?: string | null,
>         json_path?: string | null,
>         regex?: string | null
>       } | null,
>       message?: string | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       details?: {
>         api_name?: string | null,
>         json_path?: string | null,
>         dependee?: {
>           api_name?: string | null,
>           json_path?: string | null
>         } | null
>       } | null,
>       message?: string | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       details?: {
>         api_name?: string | null,
>         json_path?: string | null
>       } | null,
>       message?: string | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       details?: {
>         api_name?: string | null,
>         json_path?: string | null
>       } | null,
>       message?: string | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       details?: {
>         limit?: number | null,
>         api_name?: string | null,
>         json_path?: string | null
>       } | null,
>       message?: string | null,
>       status?: string | null
>     }
>   )[] | null
> }
> ```

***

## Recycle Bin

### count

`recycleBin.count`

Get recycle-bin record count. To retrieve the total count of records currently present in the Recycle Bin in your Zoho CRM account. The count reflects every entry across all modules.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.recycleBin.count({});
```

**Input:** *empty object*

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   count?: number | null
> } | {
>   success: true
> }
> ```

***

### delete

`recycleBin.delete`

Delete a recycle-bin record permanently. To permanently delete a single record from the Recycle Bin in your Zoho CRM account using its unique ID. Deleting a parent record also removes all its associated child records from the Recycle Bin, such as Notes and Attachments.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.recycleBin.delete({ recordId: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `recordId` | `string` | Yes | Specify the unique ID of the recycle-bin record you want to delete permanently. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `recycle_bin` | `object[] \| null` | No | Represents the list of per-item results for the deletion request, with one entry for the single deleted record. |

> [accordion] recycle\_bin full type
>
> ```ts theme={null}
> {
>   status?: string | null,
>   code?: string | null,
>   message?: string | null,
>   details?: {
>     id?: string | null
>   } | null
> }[] | null
> ```

***

### deleteMany

`recycleBin.deleteMany`

Delete recycle-bin records. To permanently delete one or more records from the Recycle Bin in your Zoho CRM account. When deleting a parent record, Zoho CRM also removes all its associated child records from the Recycle Bin, such as Notes and Attachments.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.recycleBin.deleteMany({ filters: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `filters` | `string` | Yes | Specify the URL-encoded filter expression that scopes the operation to recycle-bin records matching the supplied conditions. The expression is a JSON object with a top-level **AND** group of field conditions covering **display\_name**, **module**, **deleted\_by**, or **deleted\_time**. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   recycle_bin?: (
>     {
>       status?: string | null,
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         id?: string | null
>       } | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       details?: {
>       } | null,
>       status?: string | null
>     }
>   )[] | null
> } | {
>   recycle_bin?: (
>     {
>       status?: string | null,
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         id?: string | null
>       } | null
>     } | {
>       status?: string | null,
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         param_name?: string | null,
>         api_name?: string | null,
>         json_path?: string | null,
>         expected_data_type?: string | null,
>         param_names?: string[] | null,
>         expected_fields?: {
>           api_name?: string | null,
>           json_path?: string | null
>         }[] | null,
>         ambiguity_due_to?: {
>           api_name?: string | null,
>           json_path?: string | null
>         }[] | null,
>         id?: string | null,
>         resource_path_index?: number | null
>       } | null
>     }
>   )[] | null
> }
> ```

***

### empty

`recycleBin.empty`

Empty the Recycle Bin. To permanently delete every record from the Recycle Bin in your Zoho CRM account. This action is irreversible - the records cannot be restored after this operation completes. Deletes every record in the recycle bin for good.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.recycleBin.empty({});
```

**Input:** *empty object*

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>   } | null,
>   message?: string | null,
>   status?: string | null
> } | {
>   code?: string | null,
>   details?: {
>   } | null,
>   message?: string | null,
>   status?: string | null
> }
> ```

***

### get

`recycleBin.get`

Get a recycle-bin record. To retrieve metadata for a single record from the Recycle Bin in your Zoho CRM account using its unique ID. The response includes the display name, source module, deletion timestamp, original owner, and the user who deleted the record.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.recycleBin.get({ recordId: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `recordId` | `string` | Yes | Specify the unique ID of the recycle-bin record you want to retrieve. The **recordId** in the URL takes precedence over any **filters** or **ids** values supplied as query parameters. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   recycle_bin?: {
>     display_name?: string | null,
>     deleted_time?: string | null,
>     owner?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     module?: {
>       api_name?: string | null,
>       id?: string | null
>     } | null,
>     deleted_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     id?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### list

`recycleBin.list`

Get recycle-bin records. To retrieve a paginated list of records currently present in the Recycle Bin in your Zoho CRM account. The response contains up to 200 records per page, along with pagination metadata.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.recycleBin.list({});
```

**Input:** *empty object*

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   recycle_bin?: {
>     display_name?: string | null,
>     deleted_time?: string | null,
>     owner?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     module?: {
>       api_name?: string | null,
>       id?: string | null
>     } | null,
>     deleted_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     id?: string | null
>   }[] | null,
>   info?: {
>     per_page?: number | null,
>     count?: number | null,
>     page?: number | null,
>     more_records?: boolean | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### restore

`recycleBin.restore`

Restore a Recycle Bin record. To restore a single deleted record from the Recycle Bin in your Zoho CRM account. The record is moved back to its original module along with all its associated child records, such as Notes and Attachments.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.recycleBin.restore({ recordId: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `recordId` | `string` | Yes | Specify the unique ID of the recycle-bin record you want to restore. The **recordId** in the URL takes precedence over any restoration scope given in a request body. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `recycle_bin` | `object[] \| null` | No | List of per-item results for the operation. Each entry is either a success result or a scheduled-job result. |

> [accordion] recycle\_bin full type
>
> ```ts theme={null}
> (
>   {
>     status?: string | null,
>     code?: string | null,
>     message?: string | null,
>     details?: {
>       id?: string | null
>     } | null
>   } | {
>     code?: string | null,
>     message?: string | null,
>     details?: {
>     } | null,
>     status?: string | null
>   }
> )[] | null
> ```

***

### restoreMany

`recycleBin.restoreMany`

Restore multiple Recycle Bin records. To restore one or more deleted records from the Recycle Bin in your Zoho CRM account.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.recycleBin.restoreMany({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `ids` | `string[]` | No | Specify the unique IDs of the recycle-bin records you want to restore. Mutually exclusive with **filters** and **restore\_all\_records**. |
| `filters` | `object` | No | Specify the filter criteria to select recycle-bin records for restoration. Mutually exclusive with **ids** and **restore\_all\_records**. Restoration based on filters is always scheduled as a background job, regardless of the number of matching records. |
| `restore_all_records` | `boolean` | No | Specify whether every record currently in the Recycle Bin should be restored. Possible values: **true** - Every record in the Recycle Bin is restored. This option cannot be combined with **ids** or **filters** and the operation is always scheduled as a background job. **false** - Either **ids** or **filters** must be supplied to scope the restoration. |

> [accordion] filters full type
>
> ```ts theme={null}
> {
>   group_operator: string,
>   group: {
>     field: {
>       api_name: string
>     },
>     comparator: string,
>     value: string | number | boolean
>   }[]
> }
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   recycle_bin?: (
>     {
>       status?: string | null,
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         id?: string | null
>       } | null
>     } | {
>       code?: string | null,
>       message?: string | null,
>       details?: {
>       } | null,
>       status?: string | null
>     }
>   )[] | null
> } | {
>   recycle_bin?: (
>     {
>       status?: string | null,
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         id?: string | null
>       } | null
>     } | {
>       status?: string | null,
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         param_name?: string | null,
>         api_name?: string | null,
>         json_path?: string | null,
>         expected_data_type?: string | null,
>         param_names?: string[] | null,
>         expected_fields?: {
>           api_name?: string | null,
>           json_path?: string | null
>         }[] | null,
>         ambiguity_due_to?: {
>           api_name?: string | null,
>           json_path?: string | null
>         }[] | null,
>         id?: string | null,
>         resource_path_index?: number | null
>       } | null
>     }
>   )[] | null
> }
> ```

***

## Related Lists

### list

`relatedLists.list`

Related Lists. To retrieve the configuration of related list panels for a specific module in your Zoho CRM organization, including display metadata, available record operations, and layout-specific settings.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.relatedLists.list({ module: 'Leads' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the API name of the CRM module for which to retrieve related lists. Refer to the [Get Modules](https://www.zoho.com/crm/developer/docs/api/v8/modules-api.html) resource for valid values. |
| `layout_id` | `string` | No | Specify the unique identifier of the layout to scope the related lists response. Refer to the [Layouts API](https://www.zoho.com/crm/developer/docs/api/v8/layouts-meta.html) resource for valid values. |
| `status` | `visible \| scheduled_for_deletion \| user_hidden` | No | Specify the visibility status to filter related lists. Possible values: **visible**, **scheduled\_for\_deletion**, **user\_hidden**. |
| `extra_properties` | `boolean` | No | Set to **true** to include additional metadata properties for each related list entry beyond the default set. Possible values: **true**, **false**. |
| `include_inner_details` | `string` | No | Specify a comma-separated list of detail keys to embed in each related list object. Controls which nested detail blocks are included in the response. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   related_lists?: (
>     {
>       id?: string | null,
>       sequence_number?: string | null,
>       display_label?: string | null,
>       api_name?: string | null,
>       module?: {
>         api_name?: string | null,
>         id?: string | null,
>         plural_label?: string | null
>       } | null | null,
>       name?: string | null,
>       action?: string | null | null,
>       href?: string | null | null,
>       type?: string | null,
>       connectedlookupApiName?: string | null,
>       customize_sort?: boolean | null,
>       customize_fields?: boolean | null,
>       customize_display_label?: boolean | null,
>       status?: string | null,
>       visibility?: number | null,
>       personality_name?: string | null,
>       record_operations?: {
>         edit?: boolean | null,
>         create?: boolean | null,
>         bulk_edit?: boolean | null,
>         delete?: boolean | null,
>         disassociate?: boolean | null,
>         assign?: boolean | null
>       } | null,
>       connectedmodule?: string | null | null,
>       linkingmodule?: string | null | null,
>       parent_related_lists?: {
>         api_name?: string | null,
>         id?: string | null
>       }[] | null | null,
>       _layout_specific_properties?: {
>         sequence_number?: string | null,
>         status?: string | null,
>         layout?: {
>           name?: string | null,
>           id?: string | null
>         } | null
>       }[] | null | null,
>       field_enabled?: boolean | null,
>       multiselectlookup?: {
>         field?: {
>           api_name?: string | null,
>           field_label?: string | null,
>           id?: string | null
>         } | null,
>         linking_details?: {
>           visibility?: number | null,
>           module?: {
>             plural_label?: string | null,
>             api_name?: string | null,
>             id?: string | null
>           } | null,
>           lookup_field?: {
>             api_name?: string | null,
>             id?: string | null
>           } | null,
>           connected_lookup_field?: {
>             api_name?: string | null,
>             id?: string | null
>           } | null
>         } | null,
>         connected_details?: {
>           field?: {
>             api_name?: string | null,
>             field_label?: string | null,
>             id?: string | null
>           } | null,
>           module?: {
>             plural_label?: string | null,
>             api_name?: string | null,
>             id?: string | null
>           } | null,
>           related_list?: {
>             display_label?: string | null,
>             api_name?: string | null,
>             id?: string | null
>           } | null
>         } | null,
>         field_enabled?: boolean | null
>       } | null,
>       sort_by?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null | null,
>       sort_order?: string | null | null,
>       fields?: {
>         sequence_number?: number | null,
>         id?: string | null,
>         api_name?: string | null,
>         field_label?: string | null,
>         ui_type?: number | null,
>         enable_colour_code?: boolean | null,
>         separator?: boolean | null,
>         decimal_place?: number | null | null,
>         lookup?: {
>           display_label?: string | null,
>           revalidate_filter_during_edit?: boolean | null,
>           api_name?: string | null,
>           module?: {
>             api_name?: string | null,
>             id?: string | null
>           } | null,
>           id?: string | null,
>           query_details?: {
>             system_query_id?: string | null | null
>           } | null
>         } | null,
>         formula?: {
>           return_type?: string | null
>         } | null,
>         rollup_summary?: {
>           return_type?: string | null
>         } | null,
>         pick_list_values?: {
>           display_value?: string | null,
>           sequence_number?: number | null,
>           reference_value?: string | null,
>           colour_code?: string | null | null,
>           actual_value?: string | null,
>           id?: string | null,
>           type?: string | null
>         }[] | null,
>         mask_details?: {
>         } | null,
>         refer_from_field?: {
>         } | null
>       }[] | null | null
>     } | {
>       id?: string | null,
>       sequence_number?: string | null,
>       display_label?: string | null,
>       api_name?: string | null,
>       module?: {
>         api_name?: string | null,
>         id?: string | null,
>         plural_label?: string | null
>       } | null | null,
>       name?: string | null,
>       action?: string | null | null,
>       href?: string | null | null,
>       type?: string | null,
>       connectedlookupApiName?: string | null,
>       customize_sort?: boolean | null,
>       customize_fields?: boolean | null,
>       customize_display_label?: boolean | null,
>       status?: string | null,
>       visibility?: number | null,
>       personality_name?: string | null,
>       record_operations?: {
>         edit?: boolean | null,
>         create?: boolean | null,
>         bulk_edit?: boolean | null,
>         delete?: boolean | null,
>         disassociate?: boolean | null,
>         assign?: boolean | null
>       } | null,
>       connectedmodule?: string | null | null,
>       linkingmodule?: string | null | null,
>       parent_related_lists?: {
>         api_name?: string | null,
>         id?: string | null
>       }[] | null | null,
>       _layout_specific_properties?: {
>         sequence_number?: string | null,
>         status?: string | null,
>         layout?: {
>           name?: string | null,
>           id?: string | null
>         } | null
>       }[] | null | null,
>       sort_by?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null | null,
>       sort_order?: string | null | null,
>       fields?: {
>         sequence_number?: number | null,
>         id?: string | null,
>         api_name?: string | null,
>         field_label?: string | null,
>         ui_type?: number | null,
>         enable_colour_code?: boolean | null,
>         separator?: boolean | null,
>         decimal_place?: number | null | null,
>         lookup?: {
>           display_label?: string | null,
>           revalidate_filter_during_edit?: boolean | null,
>           api_name?: string | null,
>           module?: {
>             api_name?: string | null,
>             id?: string | null
>           } | null,
>           id?: string | null,
>           query_details?: {
>             system_query_id?: string | null | null
>           } | null
>         } | null,
>         formula?: {
>           return_type?: string | null
>         } | null,
>         rollup_summary?: {
>           return_type?: string | null
>         } | null,
>         pick_list_values?: {
>           display_value?: string | null,
>           sequence_number?: number | null,
>           reference_value?: string | null,
>           colour_code?: string | null | null,
>           actual_value?: string | null,
>           id?: string | null,
>           type?: string | null
>         }[] | null,
>         mask_details?: {
>         } | null,
>         refer_from_field?: {
>         } | null
>       }[] | null | null
>     }
>   )[] | null
> } | {
>   success: true
> }
> ```

***

## Related Records

### count

`relatedRecords.count`

Get related records count. To retrieve the count of related records for a specified parent record in your Zoho CRM organization. Supports optional filtering by approval status, conversion status, category type, and field-level equality criteria. A single request can include up to 20 related list count specifications.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.relatedRecords.count({
	moduleApiName: 'Leads',
	recordId: '4876876000000333001',
	get_related_records_count: [{
		related_list: { api_name: 'example', id: '4876876000000333001' },
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `moduleApiName` | `string` | Yes | Specify the API name of the CRM module that contains the parent record. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve the module API name and its unique ID. |
| `recordId` | `string` | Yes | Specify the unique ID of the parent record for which you want to count related records. Use the [Get Records API](record.yaml#\$.paths./module.get) to retrieve the record ID. |
| `get_related_records_count` | `object[]` | Yes | Represents the array of related list count request objects. Each object specifies a related list to query and optional filtering criteria to apply before counting. |

> [accordion] get\_related\_records\_count full type
>
> ```ts theme={null}
> {
>   related_list: {
>     api_name: string,
>     id: string
>   },
>   params?: {
>     approved?: boolean,
>     filters: {
>       comparator: string,
>       field: {
>         api_name: string
>       },
>       value: string
>     },
>     converted?: boolean,
>     category?: link | files,
>     approval_state?: string
>   }
> }[]
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   get_related_records_count?: {
>     count?: number | null,
>     related_list?: {
>       api_name?: string | null,
>       id?: string | null
>     } | null
>   }[] | null
> } | {
>   get_related_records_count?: (
>     {
>       count?: number | null,
>       related_list?: {
>         api_name?: string | null,
>         id?: string | null
>       } | null
>     } | {
>       status?: string | null,
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         api_name?: string | null,
>         json_path?: string | null
>       } | {
>         expected_fields?: {
>           api_name?: string | null,
>           json_path?: string | null
>         }[] | null
>       } | {
>         ambiguity_due_to?: {
>           api_name?: string | null,
>           json_path?: string | null
>         }[] | null
>       } | {
>         expected_data_type?: string | null,
>         api_name?: string | null,
>         json_path?: string | null
>       } | {
>       } | null
>     }
>   )[] | null
> } | {
>   get_related_records_count?: (
>     {
>       count?: number | null,
>       related_list?: {
>         api_name?: string | null,
>         id?: string | null
>       } | null
>     } | {
>       status?: string | null,
>       code?: string | null,
>       message?: string | null,
>       details?: {
>         api_name?: string | null,
>         json_path?: string | null
>       } | null
>     }
>   )[] | null
> }
> ```

***

### delink

`relatedRecords.delink`

Delink a related record. To delink a specific related record from a parent record in your Zoho CRM organization. This operation removes only the relationship link - the related record itself remains intact in its module. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.relatedRecords.delink({
	parentRecordModule: 'Leads',
	parentRecord: '4876876000000333001',
	relatedList: 'example',
	record: '4876876000000333001',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parentRecordModule` | `string` | Yes | Specify the API name of the module the parent record belongs to. Refer to the [Get Modules](https://www.zoho.com/crm/developer/docs/api/v8/modules-api.html) resource for valid values. |
| `parentRecord` | `string` | Yes | Specify the unique numeric identifier of the parent record. |
| `relatedList` | `string` | Yes | Specify the API name of the related list containing the records to retrieve or modify. Refer to the [Get Related Lists](https://www.zoho.com/crm/developer/docs/api/v8/related-list-meta.html) resource for valid values. |
| `record` | `string` | Yes | Specify the unique numeric identifier of the specific related record. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | Array of operation results per record. |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null,
>     api_name?: string | null,
>     json_path?: string | null,
>     param_name?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### delinkMany

`relatedRecords.delinkMany`

Delink related records. To delink multiple records from a parent record's related list in your Zoho CRM organization. This operation removes only the relationship links - the related records themselves remain intact in their respective modules. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.relatedRecords.delinkMany({
	parentRecordModule: 'Leads',
	parentRecord: '4876876000000333001',
	relatedList: 'example',
	ids: '4876876000000333001',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parentRecordModule` | `string` | Yes | Specify the API name of the module the parent record belongs to. Refer to the [Get Modules](https://www.zoho.com/crm/developer/docs/api/v8/modules-api.html) resource for valid values. |
| `parentRecord` | `string` | Yes | Specify the unique numeric identifier of the parent record. |
| `relatedList` | `string` | Yes | Specify the API name of the related list containing the records to retrieve or modify. Refer to the [Get Related Lists](https://www.zoho.com/crm/developer/docs/api/v8/related-list-meta.html) resource for valid values. |
| `ids` | `string` | Yes | Specify the unique identifiers of the records to delink from the parent record as a comma-separated list. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | Array of operation results per record. |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null,
>     api_name?: string | null,
>     json_path?: string | null,
>     param_name?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### get

`relatedRecords.get`

Get a related record. To retrieve the details of a specific related record from a specified related list of a parent record in your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.relatedRecords.get({
	parentRecordModule: 'Leads',
	parentRecord: '4876876000000333001',
	relatedList: 'example',
	record: '4876876000000333001',
	fields: 'Last_Name,Email',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parentRecordModule` | `string` | Yes | Specify the API name of the module the parent record belongs to. Refer to the [Get Modules](https://www.zoho.com/crm/developer/docs/api/v8/modules-api.html) resource for valid values. |
| `parentRecord` | `string` | Yes | Specify the unique numeric identifier of the parent record. |
| `relatedList` | `string` | Yes | Specify the API name of the related list containing the records to retrieve or modify. Refer to the [Get Related Lists](https://www.zoho.com/crm/developer/docs/api/v8/related-list-meta.html) resource for valid values. |
| `record` | `string` | Yes | Specify the unique numeric identifier of the specific related record. |
| `fields` | `string` | Yes | Specify the API names of the fields to include in the response as a comma-separated list. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data?: {
>     id?: string | null,
>     Created_Time?: string | null,
>     Modified_Time?: string | null,
>     Moved_To__s?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### list

`relatedRecords.list`

Related Records. To retrieve the list of records associated with a parent record from a specified related list in your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.relatedRecords.list({
	parentRecordModule: 'Leads',
	parentRecord: '4876876000000333001',
	relatedList: 'example',
	fields: 'Last_Name,Email',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parentRecordModule` | `string` | Yes | Specify the API name of the module the parent record belongs to. Refer to the [Get Modules](https://www.zoho.com/crm/developer/docs/api/v8/modules-api.html) resource for valid values. |
| `parentRecord` | `string` | Yes | Specify the unique numeric identifier of the parent record. |
| `relatedList` | `string` | Yes | Specify the API name of the related list containing the records to retrieve or modify. Refer to the [Get Related Lists](https://www.zoho.com/crm/developer/docs/api/v8/related-list-meta.html) resource for valid values. |
| `fields` | `string` | Yes | Specify the API names of the fields to include in the response as a comma-separated list. |
| `page` | `number \| string` | No | Specify the page number for paginating results. |
| `perPage` | `number \| string` | No | Specify the number of records to return per page. The page and per\_page parameter is used to fetch records according to their position in the CRM. Let us assume that the user has to fetch 400 records. The maximum number of records that one can get for an API call is 200. So, for records above the 200th position, they cannot be fetched. By using the page (1 and 2) and per\_page (200) parameter, the user can fetch all 400 records using 2 API calls. If the requested related list is not present or hidden in a layout, the system will return an INVALID\_DATA response. |
| `ifModifiedSince` | `string` | No | Specify the date and time in RFC 2822 format. The response includes only records modified after this timestamp. |
| `page_token` | `string` | No | Specify the token to retrieve the next set of records beyond the first 2,000 results. Use the **next\_page\_token** value from the previous response. |
| `ids` | `string` | No | Specify the unique identifiers of the records to retrieve as a comma-separated list. |
| `sort_order` | `asc \| desc` | No | Specify the sort direction for the related records. Possible values: **asc**, **desc**. |
| `sort_by` | `id \| Created_Time \| Modified_Time` | No | Specify the field to sort the related records by. Possible values: **ID**, **Created\_Time**, **Modified\_Time**. |
| `converted` | `true \| false \| both` | No | Specify whether to filter records by conversion status. Possible values: **true**, **false**, **both**. |
| `approved` | `true \| false \| both` | No | Filter records by approval status. When set to true, returns only approved records; when false, returns only unapproved records. |
| `approval_state` | `webform_unapproved \| approved \| approval_process_pending \| approval_process_rejected \| webform_invalid \| webform_invalid_approval \| webform_double_optin \| review_process_pending \| review_process_rejected \| merge_pending \| zia_vision_pending \| zia_vision_rejected \| zia_vision_validation \| email_parser_waiting \| email_parser_rejected \| approval_process_recalled` | No | Filter records by their current approval state. |
| `filters` | `object` | No | Represents the top-level filter criterion for data selection, supporting both simple field-based filters and complex grouped filters with logical operators. |

> [accordion] filters full type
>
> ```ts theme={null}
> {
>   field: {
>     id?: string,
>     api_name: string
>   },
>   comparator: string,
>   value: (string | number | {
>     id: string & any,
>     name?: string
>   } | {
>     name: string
>   } | {
>     id: string,
>     name?: string
>   })[] | string | number | boolean | {
>     id: string & any,
>     name?: string
>   } | {
>     name: string
>   } | {
>     id: string,
>     name?: string
>   } | ${
>     EMPTY
>   } | ${
>     NOTEMPTY
>   } | ${
>     TODAY
>   } | ${
>     TOMORROW
>   } | ${
>     TOMORROWPLUS
>   } | ${
>     YESTERDAY
>   } | ${
>     YESTERDAYMINUS
>   } | ${
>     LASTMONTH
>   } | ${
>     THISMONTH
>   } | ${
>     NEXTMONTH
>   } | ${
>     LASTWEEK
>   } | ${
>     THISWEEK
>   } | ${
>     NEXTWEEK
>   } | ${
>     THISYEAR
>   } | ${
>     THISFY
>   } | ${
>     THISFQ
>   } | ${
>     LASTYEAR
>   } | ${
>     PREVFY
>   } | ${
>     PREVFQ
>   } | ${
>     NEXTYEAR
>   } | ${
>     NEXTFY
>   } | ${
>     NEXTFQ
>   } | ${
>     EMPTY
>   } | ${
>     NOTEMPTY
>   } | string | string,
>   type?: merge_field | pre_defined | value | field
> } | {
>   field: {
>     id?: string,
>     api_name: string
>   },
>   comparator: string,
>   value: (string | number | {
>     id: string & any,
>     name?: string
>   } | {
>     name: string
>   } | {
>     id: string,
>     name?: string
>   })[] | string | number | boolean | {
>     id: string & any,
>     name?: string
>   } | {
>     name: string
>   } | {
>     id: string,
>     name?: string
>   } | string,
>   type?: merge_field | pre_defined | value | field
> } | {
>   field: {
>     id?: string,
>     api_name: string
>   },
>   comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>   value: string[] | string,
>   type?: merge_field | pre_defined | value | field
> } | {
>   field: {
>     id?: string,
>     api_name: string
>   },
>   comparator: less_than | less_equal | greater_than | greater_equal,
>   value: string | number | string,
>   type?: merge_field | pre_defined | value | field
> } | {
>   field: {
>     id?: string,
>     api_name: string
>   },
>   comparator: between | not_between,
>   value: (string | number)[],
>   type?: merge_field | pre_defined | value | field
> } | {
>   field: {
>     id?: string,
>     api_name: string
>   },
>   comparator: in | not_in,
>   value: (string | number)[],
>   type?: merge_field | pre_defined | value | field
> } | {
>   field: {
>     id?: string,
>     api_name: string
>   },
>   comparator: include_all | include_any | exclude_all | exclude_any,
>   value: {
>     id: string & any,
>     name?: string
>   }[],
>   type?: merge_field | pre_defined | value | field
> } | {
>   group: (
>     {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: string,
>       value: (string | number | {
>         id: string & any,
>         name?: string
>       } | {
>         name: string
>       } | {
>         id: string,
>         name?: string
>       })[] | string | number | boolean | {
>         id: string & any,
>         name?: string
>       } | {
>         name: string
>       } | {
>         id: string,
>         name?: string
>       } | ${
>         EMPTY
>       } | ${
>         NOTEMPTY
>       } | ${
>         TODAY
>       } | ${
>         TOMORROW
>       } | ${
>         TOMORROWPLUS
>       } | ${
>         YESTERDAY
>       } | ${
>         YESTERDAYMINUS
>       } | ${
>         LASTMONTH
>       } | ${
>         THISMONTH
>       } | ${
>         NEXTMONTH
>       } | ${
>         LASTWEEK
>       } | ${
>         THISWEEK
>       } | ${
>         NEXTWEEK
>       } | ${
>         THISYEAR
>       } | ${
>         THISFY
>       } | ${
>         THISFQ
>       } | ${
>         LASTYEAR
>       } | ${
>         PREVFY
>       } | ${
>         PREVFQ
>       } | ${
>         NEXTYEAR
>       } | ${
>         NEXTFY
>       } | ${
>         NEXTFQ
>       } | ${
>         EMPTY
>       } | ${
>         NOTEMPTY
>       } | string | string,
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: string,
>       value: (string | number | {
>         id: string & any,
>         name?: string
>       } | {
>         name: string
>       } | {
>         id: string,
>         name?: string
>       })[] | string | number | boolean | {
>         id: string & any,
>         name?: string
>       } | {
>         name: string
>       } | {
>         id: string,
>         name?: string
>       } | string,
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>       value: string[] | string,
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: less_than | less_equal | greater_than | greater_equal,
>       value: string | number | string,
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: between | not_between,
>       value: (string | number)[],
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: in | not_in,
>       value: (string | number)[],
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: include_all | include_any | exclude_all | exclude_any,
>       value: {
>         id: string & any,
>         name?: string
>       }[],
>       type?: merge_field | pre_defined | value | field
>     } | {
>       group: (
>         {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: string,
>           value: (string | number | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           })[] | string | number | boolean | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           } | ${
>             EMPTY
>           } | ${
>             NOTEMPTY
>           } | ${
>             TODAY
>           } | ${
>             TOMORROW
>           } | ${
>             TOMORROWPLUS
>           } | ${
>             YESTERDAY
>           } | ${
>             YESTERDAYMINUS
>           } | ${
>             LASTMONTH
>           } | ${
>             THISMONTH
>           } | ${
>             NEXTMONTH
>           } | ${
>             LASTWEEK
>           } | ${
>             THISWEEK
>           } | ${
>             NEXTWEEK
>           } | ${
>             THISYEAR
>           } | ${
>             THISFY
>           } | ${
>             THISFQ
>           } | ${
>             LASTYEAR
>           } | ${
>             PREVFY
>           } | ${
>             PREVFQ
>           } | ${
>             NEXTYEAR
>           } | ${
>             NEXTFY
>           } | ${
>             NEXTFQ
>           } | ${
>             EMPTY
>           } | ${
>             NOTEMPTY
>           } | string | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: string,
>           value: (string | number | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           })[] | string | number | boolean | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           } | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>           value: string[] | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: less_than | less_equal | greater_than | greater_equal,
>           value: string | number | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: between | not_between,
>           value: (string | number)[],
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: in | not_in,
>           value: (string | number)[],
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: include_all | include_any | exclude_all | exclude_any,
>           value: {
>             id: string & any,
>             name?: string
>           }[],
>           type?: merge_field | pre_defined | value | field
>         } | (recursive)
>       )[],
>       group_operator: AND | OR | and | or
>     }
>   )[],
>   group_operator: AND | OR | and | or
> }
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data?: {
>     id?: string | null,
>     Created_Time?: string | null,
>     Modified_Time?: string | null,
>     Moved_To__s?: string | null
>   }[] | null,
>   info?: {
>     page?: number | null,
>     per_page?: number | null,
>     count?: number | null,
>     more_records?: boolean | null,
>     next_page_token?: string | null | null,
>     page_token_expiry?: string | null | null,
>     previous_page_token?: string | null | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### listDeleted

`relatedRecords.listDeleted`

List deleted related records. To retrieve the list of records that were previously associated with a parent record but have since been deleted from the related list in your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.relatedRecords.listDeleted({
	parentRecordModule: 'Leads',
	parentRecord: '4876876000000333001',
	relatedList: 'example',
	fields: 'Last_Name,Email',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parentRecordModule` | `string` | Yes | Specify the API name of the module the parent record belongs to. Refer to the [Get Modules](https://www.zoho.com/crm/developer/docs/api/v8/modules-api.html) resource for valid values. |
| `parentRecord` | `string` | Yes | Specify the unique numeric identifier of the parent record. |
| `relatedList` | `string` | Yes | Specify the API name of the related list containing the records to retrieve or modify. Refer to the [Get Related Lists](https://www.zoho.com/crm/developer/docs/api/v8/related-list-meta.html) resource for valid values. |
| `fields` | `string` | Yes | Specify the API names of the fields to include in the response as a comma-separated list. |
| `page` | `number \| string` | No | Specify the page number for paginating results. |
| `perPage` | `number \| string` | No | Specify the number of records to return per page. The page and per\_page parameter is used to fetch records according to their position in the CRM. Let us assume that the user has to fetch 400 records. The maximum number of records that one can get for an API call is 200. So, for records above the 200th position, they cannot be fetched. By using the page (1 and 2) and per\_page (200) parameter, the user can fetch all 400 records using 2 API calls. If the requested related list is not present or hidden in a layout, the system will return an INVALID\_DATA response. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data?: {
>     id?: string | null,
>     $member_info?: {
>       id?: string | null,
>       Created_Time?: string | null,
>       Modified_Time?: string | null
>     } | null,
>     Moved_To__s?: string | null
>   }[] | null,
>   info?: {
>     page?: number | null,
>     per_page?: number | null,
>     count?: number | null,
>     more_records?: boolean | null,
>     next_page_token?: string | null | null,
>     page_token_expiry?: string | null | null,
>     previous_page_token?: string | null | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### update

`relatedRecords.update`

Update a related record. To update the properties of a specific record associated with a parent record in your Zoho CRM organization.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.relatedRecords.update({
	parentRecordModule: 'Leads',
	parentRecord: '4876876000000333001',
	relatedList: 'example',
	record: '4876876000000333001',
	data: [{ id: '4876876000000333001' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parentRecordModule` | `string` | Yes | Specify the API name of the module the parent record belongs to. Refer to the [Get Modules](https://www.zoho.com/crm/developer/docs/api/v8/modules-api.html) resource for valid values. |
| `parentRecord` | `string` | Yes | Specify the unique numeric identifier of the parent record. |
| `relatedList` | `string` | Yes | Specify the API name of the related list containing the records to retrieve or modify. Refer to the [Get Related Lists](https://www.zoho.com/crm/developer/docs/api/v8/related-list-meta.html) resource for valid values. |
| `record` | `string` | Yes | Specify the unique numeric identifier of the specific related record. |
| `data` | `object[]` | Yes | Array containing the record to update. |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   id: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | Array of operation results per record. |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null,
>     api_name?: string | null,
>     json_path?: string | null,
>     param_name?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### updateMany

`relatedRecords.updateMany`

Update related records. To update multiple records associated with a parent record in a specified related list in your Zoho CRM organization.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.relatedRecords.updateMany({
	parentRecordModule: 'Leads',
	parentRecord: '4876876000000333001',
	relatedList: 'example',
	data: [{ id: '4876876000000333001' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `parentRecordModule` | `string` | Yes | Specify the API name of the module the parent record belongs to. Refer to the [Get Modules](https://www.zoho.com/crm/developer/docs/api/v8/modules-api.html) resource for valid values. |
| `parentRecord` | `string` | Yes | Specify the unique numeric identifier of the parent record. |
| `relatedList` | `string` | Yes | Specify the API name of the related list containing the records to retrieve or modify. Refer to the [Get Related Lists](https://www.zoho.com/crm/developer/docs/api/v8/related-list-meta.html) resource for valid values. |
| `data` | `object[]` | Yes | Array of records to update with their IDs and field values. |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   id: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | Array of operation results per record. |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null,
>     api_name?: string | null,
>     json_path?: string | null,
>     param_name?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

## Roles

### create

`roles.create`

Create a role. Creates a new role in your Zoho CRM organization.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.roles.create({
	roles: [{
		name: 'example',
		reporting_to: {},
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `roles` | `object[]` | Yes | Specify the array of role objects to create. You can include exactly one object per request (bulk create/update is not supported). |

> [accordion] roles full type
>
> ```ts theme={null}
> {
>   reporting_to: {
>     id?: string
>   },
>   share_with_peers?: boolean | null,
>   description?: string | null,
>   name: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `roles` | `object[] \| null` | No | Represents the list of role creation results. |

> [accordion] roles full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### delete

`roles.delete`

Delete a role. Deletes a role in your Zoho CRM organization and moves its users to another role. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.roles.delete({ role: 1, transfer_to_id: 1 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `role` | `number \| string` | Yes | The unique ID of the role. |
| `transfer_to_id` | `number \| string` | Yes | The unique ID of the role to which subordinate records are transferred before the deletion. Refer to the [Get Roles](roles.yaml#\$.paths./settings/roles.get) resource for valid values. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `roles` | `object[] \| null` | No | Represents the list containing the role deletion result. |

> [accordion] roles full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### get

`roles.get`

Get a role. Returns the details of a single role, specified by its ID in the URL.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.roles.get({ role: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `role` | `string` | Yes | Specify the unique ID of the role for which you want to retrieve the details. Refer to the [Get Roles](roles.yaml#\$.paths./settings/roles.get) resource for valid values. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   roles?: {
>     display_label?: string | null,
>     forecast_manager?: {
>       id?: string | null,
>       name?: string | null
>     } | null | null,
>     reporting_to?: {
>       id?: string | null,
>       name?: string | null
>     } | null | null,
>     api_name?: string | null,
>     share_with_peers?: boolean | null,
>     description?: string | null | null,
>     id?: string | null,
>     name?: string | null,
>     created_by__s?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     modified_by__s?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     modified_time__s?: string | null | null,
>     created_time__s?: string | null | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### list

`roles.list`

Get all roles. Returns the list of all roles configured in your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.roles.list({});
```

**Input:** *empty object*

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   roles?: {
>     display_label?: string | null,
>     forecast_manager?: {
>       id?: string | null,
>       name?: string | null
>     } | null | null,
>     reporting_to?: {
>       id?: string | null,
>       name?: string | null
>     } | null | null,
>     api_name?: string | null,
>     share_with_peers?: boolean | null,
>     description?: string | null | null,
>     id?: string | null,
>     name?: string | null,
>     created_by__s?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     modified_by__s?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     modified_time__s?: string | null | null,
>     created_time__s?: string | null | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### update

`roles.update`

Update a role. Updates a single role, specified by its ID in the URL.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.roles.update({
	role: 1,
	roles: [{ name: 'example' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `role` | `number \| string` | Yes | The unique ID of the role. |
| `roles` | `object[]` | Yes | Specify the array containing the role object to update. |

> [accordion] roles full type
>
> ```ts theme={null}
> {
>   reporting_to?: {
>     id?: string
>   },
>   share_with_peers?: boolean,
>   description?: string | null,
>   name: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `roles` | `object[] \| null` | No | Represents the list containing the role update result. |

> [accordion] roles full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### updateMany

`roles.updateMany`

Update a role. Updates an existing role in your Zoho CRM organization.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.roles.updateMany({
	roles: [{ id: '4876876000000333001' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `roles` | `object[]` | Yes | Specify the array of role objects to update. |

> [accordion] roles full type
>
> ```ts theme={null}
> {
>   id: string,
>   reporting_to?: {
>     id?: string
>   },
>   forecast_manager?: {
>     id?: string,
>     name?: string | null
>   },
>   share_with_peers?: boolean,
>   description?: string | null,
>   name?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `roles` | `object[] \| null` | No | Represents the role update result. |

> [accordion] roles full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

## Scoring Rules

### activate

`scoringRules.activate`

Activate a scoring rule. Activates an inactive scoring rule identified by ruleId, enabling it to start evaluating and scoring CRM records based on its configured criteria.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.scoringRules.activate({ ruleId: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `ruleId` | `string` | Yes | Specifies the unique ID of the Scoring Rule to retrieve, update, activate, deactivate, delete, or clone. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `scoring_rules` | `object[] \| null` | No | Activation result for the scoring rule, containing the status and details of the activated rule. |

> [accordion] scoring\_rules full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     unsaved_custom_fields?: {
>       field_label?: string | null
>     }[] | null,
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### clone

`scoringRules.clone`

Clone a scoring rule. To clone a Scoring Rule in your Zoho CRM organization.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.scoringRules.clone({ ruleId: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `ruleId` | `string` | Yes | Specifies the unique ID of the Scoring Rule to retrieve, update, activate, deactivate, delete, or clone. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `scoring_rules` | `object[] \| null` | No | Clone result for the scoring rule, containing the status and ID of the newly cloned rule. |

> [accordion] scoring\_rules full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     unsaved_custom_fields?: {
>       field_label?: string | null
>     }[] | null,
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### create

`scoringRules.create`

Scoring Rules. Creates one or more scoring rules for specified modules and layouts. Only Leads and Contacts modules support signal rules. Deals, Accounts and Custom Modules do not support signal rules.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.scoringRules.create({
	scoring_rules: [{
		module: {},
		name: 'example',
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `scoring_rules` | `object[]` | Yes | Represents an array of Scoring Rule definitions to create. Required for POST operations. |

> [accordion] scoring\_rules full type
>
> ```ts theme={null}
> {
>   custom_fields?: {
>     id?: string,
>     field_label?: string,
>     api_name?: string,
>     reference_field?: {
>       api_name?: Positive_Score | Negative_Score | Touch_Point_Positive_Score | Touch_Point_Negative_Score | Touch_Point_Score | Score,
>       id?: string
>     }
>   }[] | null,
>   module: {
>     api_name?: string,
>     id?: string
>   },
>   description?: string | null,
>   active?: boolean,
>   layout?: {
>     display_label?: string,
>     api_name?: string,
>     id?: string
>   } | null,
>   field_rules?: {
>     score?: number | string,
>     id?: string,
>     criteria?: {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: string,
>       value: (string | number | {
>         id: string & any,
>         name?: string
>       } | {
>         name: string
>       } | {
>         id: string,
>         name?: string
>       })[] | string | number | boolean | {
>         id: string & any,
>         name?: string
>       } | {
>         name: string
>       } | {
>         id: string,
>         name?: string
>       } | ${
>         EMPTY
>       } | ${
>         NOTEMPTY
>       } | ${
>         TODAY
>       } | ${
>         TOMORROW
>       } | ${
>         TOMORROWPLUS
>       } | ${
>         YESTERDAY
>       } | ${
>         YESTERDAYMINUS
>       } | ${
>         LASTMONTH
>       } | ${
>         THISMONTH
>       } | ${
>         NEXTMONTH
>       } | ${
>         LASTWEEK
>       } | ${
>         THISWEEK
>       } | ${
>         NEXTWEEK
>       } | ${
>         THISYEAR
>       } | ${
>         THISFY
>       } | ${
>         THISFQ
>       } | ${
>         LASTYEAR
>       } | ${
>         PREVFY
>       } | ${
>         PREVFQ
>       } | ${
>         NEXTYEAR
>       } | ${
>         NEXTFY
>       } | ${
>         NEXTFQ
>       } | ${
>         EMPTY
>       } | ${
>         NOTEMPTY
>       } | string | string,
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: string,
>       value: (string | number | {
>         id: string & any,
>         name?: string
>       } | {
>         name: string
>       } | {
>         id: string,
>         name?: string
>       })[] | string | number | boolean | {
>         id: string & any,
>         name?: string
>       } | {
>         name: string
>       } | {
>         id: string,
>         name?: string
>       } | string,
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>       value: string[] | string,
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: less_than | less_equal | greater_than | greater_equal,
>       value: string | number | string,
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: between | not_between,
>       value: (string | number)[],
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: in | not_in,
>       value: (string | number)[],
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: include_all | include_any | exclude_all | exclude_any,
>       value: {
>         id: string & any,
>         name?: string
>       }[],
>       type?: merge_field | pre_defined | value | field
>     } | {
>       group: (
>         {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: string,
>           value: (string | number | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           })[] | string | number | boolean | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           } | ${
>             EMPTY
>           } | ${
>             NOTEMPTY
>           } | ${
>             TODAY
>           } | ${
>             TOMORROW
>           } | ${
>             TOMORROWPLUS
>           } | ${
>             YESTERDAY
>           } | ${
>             YESTERDAYMINUS
>           } | ${
>             LASTMONTH
>           } | ${
>             THISMONTH
>           } | ${
>             NEXTMONTH
>           } | ${
>             LASTWEEK
>           } | ${
>             THISWEEK
>           } | ${
>             NEXTWEEK
>           } | ${
>             THISYEAR
>           } | ${
>             THISFY
>           } | ${
>             THISFQ
>           } | ${
>             LASTYEAR
>           } | ${
>             PREVFY
>           } | ${
>             PREVFQ
>           } | ${
>             NEXTYEAR
>           } | ${
>             NEXTFY
>           } | ${
>             NEXTFQ
>           } | ${
>             EMPTY
>           } | ${
>             NOTEMPTY
>           } | string | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: string,
>           value: (string | number | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           })[] | string | number | boolean | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           } | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>           value: string[] | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: less_than | less_equal | greater_than | greater_equal,
>           value: string | number | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: between | not_between,
>           value: (string | number)[],
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: in | not_in,
>           value: (string | number)[],
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: include_all | include_any | exclude_all | exclude_any,
>           value: {
>             id: string & any,
>             name?: string
>           }[],
>           type?: merge_field | pre_defined | value | field
>         } | {
>           group: (
>             {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: string,
>               value: (string | number | {
>                 id: string & any,
>                 name?: string
>               } | {
>                 name: string
>               } | {
>                 id: string,
>                 name?: string
>               })[] | string | number | boolean | {
>                 id: string & any,
>                 name?: string
>               } | {
>                 name: string
>               } | {
>                 id: string,
>                 name?: string
>               } | ${
>                 EMPTY
>               } | ${
>                 NOTEMPTY
>               } | ${
>                 TODAY
>               } | ${
>                 TOMORROW
>               } | ${
>                 TOMORROWPLUS
>               } | ${
>                 YESTERDAY
>               } | ${
>                 YESTERDAYMINUS
>               } | ${
>                 LASTMONTH
>               } | ${
>                 THISMONTH
>               } | ${
>                 NEXTMONTH
>               } | ${
>                 LASTWEEK
>               } | ${
>                 THISWEEK
>               } | ${
>                 NEXTWEEK
>               } | ${
>                 THISYEAR
>               } | ${
>                 THISFY
>               } | ${
>                 THISFQ
>               } | ${
>                 LASTYEAR
>               } | ${
>                 PREVFY
>               } | ${
>                 PREVFQ
>               } | ${
>                 NEXTYEAR
>               } | ${
>                 NEXTFY
>               } | ${
>                 NEXTFQ
>               } | ${
>                 EMPTY
>               } | ${
>                 NOTEMPTY
>               } | string | string,
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: string,
>               value: (string | number | {
>                 id: string & any,
>                 name?: string
>               } | {
>                 name: string
>               } | {
>                 id: string,
>                 name?: string
>               })[] | string | number | boolean | {
>                 id: string & any,
>                 name?: string
>               } | {
>                 name: string
>               } | {
>                 id: string,
>                 name?: string
>               } | string,
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>               value: string[] | string,
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: less_than | less_equal | greater_than | greater_equal,
>               value: string | number | string,
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: between | not_between,
>               value: (string | number)[],
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: in | not_in,
>               value: (string | number)[],
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: include_all | include_any | exclude_all | exclude_any,
>               value: {
>                 id: string & any,
>                 name?: string
>               }[],
>               type?: merge_field | pre_defined | value | field
>             } | (recursive)
>           )[],
>           group_operator: AND | OR | and | or
>         }
>       )[],
>       group_operator: AND | OR | and | or
>     }
>   }[],
>   name: string,
>   signal_rules?: {
>     score?: number | string,
>     id?: string,
>     signal?: {
>       namespace?: string,
>       id?: string
>     }
>   }[] | null
> }[]
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   scoring_rules?: {
>     code?: string | null,
>     details?: {
>       id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   scoring_rules?: {
>     code?: string | null,
>     details?: {
>       unsaved_custom_fields?: {
>         field_label?: string | null
>       }[] | null,
>       id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> }
> ```

***

### deactivate

`scoringRules.deactivate`

Deactivate a scoring rule. Deactivates an active scoring rule identified by ruleId, suspending its scoring evaluation without deleting it. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.scoringRules.deactivate({ ruleId: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `ruleId` | `string` | Yes | Specifies the unique ID of the Scoring Rule to retrieve, update, activate, deactivate, delete, or clone. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `scoring_rules` | `object[] \| null` | No | Deactivation result for the scoring rule, containing the status and details of the deactivated rule. |

> [accordion] scoring\_rules full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     unsaved_custom_fields?: {
>       field_label?: string | null
>     }[] | null,
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### delete

`scoringRules.delete`

Delete a scoring rules by ID. Permanently deletes a single scoring rule identified by ruleId. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.scoringRules.delete({ ruleId: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `ruleId` | `string` | Yes | Specifies the unique ID of the Scoring Rule to retrieve, update, activate, deactivate, delete, or clone. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `scoring_rules` | `object[] \| null` | No | Deletion result for the scoring rule, containing the status and ID of the deleted rule. |

> [accordion] scoring\_rules full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     unsaved_custom_fields?: {
>       field_label?: string | null
>     }[] | null,
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### deleteMany

`scoringRules.deleteMany`

Scoring Rules. Permanently deletes multiple scoring rules. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.scoringRules.deleteMany({ ids: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `ids` | `string` | Yes | Specifies the IDs of the Scoring Rules to delete, provided as a comma-separated list. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   scoring_rules?: {
>     code?: string | null,
>     details?: {
>       unsaved_custom_fields?: {
>         field_label?: string | null
>       }[] | null,
>       id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   scoring_rules?: {
>     code?: string | null,
>     details?: {
>       unsaved_custom_fields?: {
>         field_label?: string | null
>       }[] | null,
>       id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> }
> ```

***

### get

`scoringRules.get`

Get scoring rule by ID. To retrieve the details of a specific Scoring Rule by its ID in your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.scoringRules.get({ ruleId: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `ruleId` | `string` | Yes | Specifies the unique ID of the Scoring Rule to retrieve, update, activate, deactivate, delete, or clone. |
| `include_inner_details` | `string` | No | Comma-separated list of inner detail fields to include in the response. Supported values: custom\_fields.field\_label, custom\_fields.reference\_field. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   scoring_rules?: {
>     created_time?: string | null,
>     has_signal_rules?: boolean | null,
>     custom_fields?: {
>       id?: string | null,
>       field_label?: string | null,
>       api_name?: string | null,
>       reference_field?: {
>         api_name?: string | null,
>         id?: string | null
>       } | null
>     }[] | null | null,
>     module?: {
>       api_name?: string | null,
>       id?: string | null
>     } | null,
>     description?: string | null | null,
>     active?: boolean | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null,
>       zuid?: string | null
>     } | null,
>     layout?: {
>       display_label?: string | null,
>       api_name?: string | null,
>       id?: string | null
>     } | null | null,
>     modified_time?: string | null | null,
>     field_rules?: {
>       score?: number | null,
>       id?: string | null,
>       criteria?: {
>         field?: {
>           id?: string | null,
>           api_name?: string | null
>         } | null,
>         comparator?: string | null,
>         value?: (string | number | {
>           id?: string & any | null,
>           name?: string & any | null
>         } | {
>           name?: string | null
>         } | {
>           id?: string | null,
>           name?: string | null
>         })[] | string | number | boolean | {
>           id?: string & any | null,
>           name?: string & any | null
>         } | {
>           name?: string | null
>         } | {
>           id?: string | null,
>           name?: string | null
>         } | string | string | string | string | null,
>         type?: string | null,
>         $disrupted?: boolean | null
>       } | {
>         field?: {
>           id?: string | null,
>           api_name?: string | null
>         } | null,
>         comparator?: string | null,
>         value?: (string | number | {
>           id?: string & any | null,
>           name?: string & any | null
>         } | {
>           name?: string | null
>         } | {
>           id?: string | null,
>           name?: string | null
>         })[] | string | number | boolean | {
>           id?: string & any | null,
>           name?: string & any | null
>         } | {
>           name?: string | null
>         } | {
>           id?: string | null,
>           name?: string | null
>         } | string | null,
>         type?: string | null,
>         $disrupted?: boolean | null
>       } | {
>         field?: {
>           id?: string | null,
>           api_name?: string | null
>         } | null,
>         comparator?: string | null,
>         value?: string[] | string | null,
>         type?: string | null,
>         $disrupted?: boolean | null
>       } | {
>         field?: {
>           id?: string | null,
>           api_name?: string | null
>         } | null,
>         comparator?: string | null,
>         value?: string | number | string | null,
>         type?: string | null,
>         $disrupted?: boolean | null
>       } | {
>         field?: {
>           id?: string | null,
>           api_name?: string | null
>         } | null,
>         comparator?: string | null,
>         value?: (string | number)[] | null,
>         type?: string | null,
>         $disrupted?: boolean | null
>       } | {
>         field?: {
>           id?: string | null,
>           api_name?: string | null
>         } | null,
>         comparator?: string | null,
>         value?: (string | number)[] | null,
>         type?: string | null,
>         $disrupted?: boolean | null
>       } | {
>         field?: {
>           id?: string | null,
>           api_name?: string | null
>         } | null,
>         comparator?: string | null,
>         value?: {
>           id?: string & any | null,
>           name?: string & any | null
>         }[] | null,
>         type?: string | null,
>         $disrupted?: boolean | null
>       } | {
>         group?: (
>           {
>             field?: {
>               id?: string | null,
>               api_name?: string | null
>             } | null,
>             comparator?: string | null,
>             value?: (string | number | {
>               id?: string & any | null,
>               name?: string & any | null
>             } | {
>               name?: string | null
>             } | {
>               id?: string | null,
>               name?: string | null
>             })[] | string | number | boolean | {
>               id?: string & any | null,
>               name?: string & any | null
>             } | {
>               name?: string | null
>             } | {
>               id?: string | null,
>               name?: string | null
>             } | string | string | string | string | null,
>             type?: string | null,
>             $disrupted?: boolean | null
>           } | {
>             field?: {
>               id?: string | null,
>               api_name?: string | null
>             } | null,
>             comparator?: string | null,
>             value?: (string | number | {
>               id?: string & any | null,
>               name?: string & any | null
>             } | {
>               name?: string | null
>             } | {
>               id?: string | null,
>               name?: string | null
>             })[] | string | number | boolean | {
>               id?: string & any | null,
>               name?: string & any | null
>             } | {
>               name?: string | null
>             } | {
>               id?: string | null,
>               name?: string | null
>             } | string | null,
>             type?: string | null,
>             $disrupted?: boolean | null
>           } | {
>             field?: {
>               id?: string | null,
>               api_name?: string | null
>             } | null,
>             comparator?: string | null,
>             value?: string[] | string | null,
>             type?: string | null,
>             $disrupted?: boolean | null
>           } | {
>             field?: {
>               id?: string | null,
>               api_name?: string | null
>             } | null,
>             comparator?: string | null,
>             value?: string | number | string | null,
>             type?: string | null,
>             $disrupted?: boolean | null
>           } | {
>             field?: {
>               id?: string | null,
>               api_name?: string | null
>             } | null,
>             comparator?: string | null,
>             value?: (string | number)[] | null,
>             type?: string | null,
>             $disrupted?: boolean | null
>           } | {
>             field?: {
>               id?: string | null,
>               api_name?: string | null
>             } | null,
>             comparator?: string | null,
>             value?: (string | number)[] | null,
>             type?: string | null,
>             $disrupted?: boolean | null
>           } | {
>             field?: {
>               id?: string | null,
>               api_name?: string | null
>             } | null,
>             comparator?: string | null,
>             value?: {
>               id?: string & any | null,
>               name?: string & any | null
>             }[] | null,
>             type?: string | null,
>             $disrupted?: boolean | null
>           } | {
>             group?: (
>               {
>                 field?: {
>                   id?: string | null,
>                   api_name?: string | null
>                 } | null,
>                 comparator?: string | null,
>                 value?: (string | number | {
>                   id?: string & any | null,
>                   name?: string & any | null
>                 } | {
>                   name?: string | null
>                 } | {
>                   id?: string | null,
>                   name?: string | null
>                 })[] | string | number | boolean | {
>                   id?: string & any | null,
>                   name?: string & any | null
>                 } | {
>                   name?: string | null
>                 } | {
>                   id?: string | null,
>                   name?: string | null
>                 } | string | string | string | string | null,
>                 type?: string | null,
>                 $disrupted?: boolean | null
>               } | {
>                 field?: {
>                   id?: string | null,
>                   api_name?: string | null
>                 } | null,
>                 comparator?: string | null,
>                 value?: (string | number | {
>                   id?: string & any | null,
>                   name?: string & any | null
>                 } | {
>                   name?: string | null
>                 } | {
>                   id?: string | null,
>                   name?: string | null
>                 })[] | string | number | boolean | {
>                   id?: string & any | null,
>                   name?: string & any | null
>                 } | {
>                   name?: string | null
>                 } | {
>                   id?: string | null,
>                   name?: string | null
>                 } | string | null,
>                 type?: string | null,
>                 $disrupted?: boolean | null
>               } | {
>                 field?: {
>                   id?: string | null,
>                   api_name?: string | null
>                 } | null,
>                 comparator?: string | null,
>                 value?: string[] | string | null,
>                 type?: string | null,
>                 $disrupted?: boolean | null
>               } | {
>                 field?: {
>                   id?: string | null,
>                   api_name?: string | null
>                 } | null,
>                 comparator?: string | null,
>                 value?: string | number | string | null,
>                 type?: string | null,
>                 $disrupted?: boolean | null
>               } | {
>                 field?: {
>                   id?: string | null,
>                   api_name?: string | null
>                 } | null,
>                 comparator?: string | null,
>                 value?: (string | number)[] | null,
>                 type?: string | null,
>                 $disrupted?: boolean | null
>               } | {
>                 field?: {
>                   id?: string | null,
>                   api_name?: string | null
>                 } | null,
>                 comparator?: string | null,
>                 value?: (string | number)[] | null,
>                 type?: string | null,
>                 $disrupted?: boolean | null
>               } | {
>                 field?: {
>                   id?: string | null,
>                   api_name?: string | null
>                 } | null,
>                 comparator?: string | null,
>                 value?: {
>                   id?: string & any | null,
>                   name?: string & any | null
>                 }[] | null,
>                 type?: string | null,
>                 $disrupted?: boolean | null
>               } | (recursive)
>             )[] | null,
>             group_operator?: string | null,
>             $disrupted?: boolean | null
>           }
>         )[] | null,
>         group_operator?: string | null,
>         $disrupted?: boolean | null
>       } | null
>     }[] | null,
>     name?: string | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null,
>       zuid?: string | null
>     } | null | null,
>     signal_rules?: {
>       score?: number | null,
>       id?: string | null,
>       _delete?: null | null,
>       signal?: {
>         namespace?: string | null,
>         id?: string | null
>       } | null
>     }[] | null | null,
>     id?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### list

`scoringRules.list`

Scoring Rules. To retrieve a list of Scoring Rules configured in your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.scoringRules.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | No | Specifies the API name of the module to filter Scoring Rules by. |
| `layout_id` | `number` | No | Specifies the unique ID of the layout to filter Scoring Rules by. |
| `page` | `number \| string` | No | Specifies the page number for paginated results. |
| `per_page` | `number \| string` | No | Specifies the number of Scoring Rules to return per page. |
| `name` | `string` | No | Specifies the name of the Scoring Rule to filter by. |
| `fields` | `string` | No | Comma-separated list of fields to include in the response. If this param is passed, except the mentioned fields, value of other fields will be null. Supported values: field\_rules, signal\_rules, name, description, active. |
| `active` | `boolean` | No | Filter rules by their active/inactive status. Pass 'true' to retrieve only active rules, 'false' for inactive rules. Omit to retrieve all rules regardless of status. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   scoring_rules?: {
>     created_time?: string | null,
>     has_signal_rules?: boolean | null,
>     custom_fields?: {
>       id?: string | null,
>       field_label?: string | null,
>       api_name?: string | null,
>       reference_field?: {
>         api_name?: string | null,
>         id?: string | null
>       } | null
>     }[] | null | null,
>     module?: {
>       api_name?: string | null,
>       id?: string | null
>     } | null,
>     description?: string | null | null,
>     active?: boolean | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null,
>       zuid?: string | null
>     } | null,
>     layout?: {
>       display_label?: string | null,
>       api_name?: string | null,
>       id?: string | null
>     } | null | null,
>     modified_time?: string | null | null,
>     field_rules?: {
>       score?: number | null,
>       id?: string | null,
>       criteria?: {
>         field?: {
>           id?: string | null,
>           api_name?: string | null
>         } | null,
>         comparator?: string | null,
>         value?: (string | number | {
>           id?: string & any | null,
>           name?: string & any | null
>         } | {
>           name?: string | null
>         } | {
>           id?: string | null,
>           name?: string | null
>         })[] | string | number | boolean | {
>           id?: string & any | null,
>           name?: string & any | null
>         } | {
>           name?: string | null
>         } | {
>           id?: string | null,
>           name?: string | null
>         } | string | string | string | string | null,
>         type?: string | null,
>         $disrupted?: boolean | null
>       } | {
>         field?: {
>           id?: string | null,
>           api_name?: string | null
>         } | null,
>         comparator?: string | null,
>         value?: (string | number | {
>           id?: string & any | null,
>           name?: string & any | null
>         } | {
>           name?: string | null
>         } | {
>           id?: string | null,
>           name?: string | null
>         })[] | string | number | boolean | {
>           id?: string & any | null,
>           name?: string & any | null
>         } | {
>           name?: string | null
>         } | {
>           id?: string | null,
>           name?: string | null
>         } | string | null,
>         type?: string | null,
>         $disrupted?: boolean | null
>       } | {
>         field?: {
>           id?: string | null,
>           api_name?: string | null
>         } | null,
>         comparator?: string | null,
>         value?: string[] | string | null,
>         type?: string | null,
>         $disrupted?: boolean | null
>       } | {
>         field?: {
>           id?: string | null,
>           api_name?: string | null
>         } | null,
>         comparator?: string | null,
>         value?: string | number | string | null,
>         type?: string | null,
>         $disrupted?: boolean | null
>       } | {
>         field?: {
>           id?: string | null,
>           api_name?: string | null
>         } | null,
>         comparator?: string | null,
>         value?: (string | number)[] | null,
>         type?: string | null,
>         $disrupted?: boolean | null
>       } | {
>         field?: {
>           id?: string | null,
>           api_name?: string | null
>         } | null,
>         comparator?: string | null,
>         value?: (string | number)[] | null,
>         type?: string | null,
>         $disrupted?: boolean | null
>       } | {
>         field?: {
>           id?: string | null,
>           api_name?: string | null
>         } | null,
>         comparator?: string | null,
>         value?: {
>           id?: string & any | null,
>           name?: string & any | null
>         }[] | null,
>         type?: string | null,
>         $disrupted?: boolean | null
>       } | {
>         group?: (
>           {
>             field?: {
>               id?: string | null,
>               api_name?: string | null
>             } | null,
>             comparator?: string | null,
>             value?: (string | number | {
>               id?: string & any | null,
>               name?: string & any | null
>             } | {
>               name?: string | null
>             } | {
>               id?: string | null,
>               name?: string | null
>             })[] | string | number | boolean | {
>               id?: string & any | null,
>               name?: string & any | null
>             } | {
>               name?: string | null
>             } | {
>               id?: string | null,
>               name?: string | null
>             } | string | string | string | string | null,
>             type?: string | null,
>             $disrupted?: boolean | null
>           } | {
>             field?: {
>               id?: string | null,
>               api_name?: string | null
>             } | null,
>             comparator?: string | null,
>             value?: (string | number | {
>               id?: string & any | null,
>               name?: string & any | null
>             } | {
>               name?: string | null
>             } | {
>               id?: string | null,
>               name?: string | null
>             })[] | string | number | boolean | {
>               id?: string & any | null,
>               name?: string & any | null
>             } | {
>               name?: string | null
>             } | {
>               id?: string | null,
>               name?: string | null
>             } | string | null,
>             type?: string | null,
>             $disrupted?: boolean | null
>           } | {
>             field?: {
>               id?: string | null,
>               api_name?: string | null
>             } | null,
>             comparator?: string | null,
>             value?: string[] | string | null,
>             type?: string | null,
>             $disrupted?: boolean | null
>           } | {
>             field?: {
>               id?: string | null,
>               api_name?: string | null
>             } | null,
>             comparator?: string | null,
>             value?: string | number | string | null,
>             type?: string | null,
>             $disrupted?: boolean | null
>           } | {
>             field?: {
>               id?: string | null,
>               api_name?: string | null
>             } | null,
>             comparator?: string | null,
>             value?: (string | number)[] | null,
>             type?: string | null,
>             $disrupted?: boolean | null
>           } | {
>             field?: {
>               id?: string | null,
>               api_name?: string | null
>             } | null,
>             comparator?: string | null,
>             value?: (string | number)[] | null,
>             type?: string | null,
>             $disrupted?: boolean | null
>           } | {
>             field?: {
>               id?: string | null,
>               api_name?: string | null
>             } | null,
>             comparator?: string | null,
>             value?: {
>               id?: string & any | null,
>               name?: string & any | null
>             }[] | null,
>             type?: string | null,
>             $disrupted?: boolean | null
>           } | {
>             group?: (
>               {
>                 field?: {
>                   id?: string | null,
>                   api_name?: string | null
>                 } | null,
>                 comparator?: string | null,
>                 value?: (string | number | {
>                   id?: string & any | null,
>                   name?: string & any | null
>                 } | {
>                   name?: string | null
>                 } | {
>                   id?: string | null,
>                   name?: string | null
>                 })[] | string | number | boolean | {
>                   id?: string & any | null,
>                   name?: string & any | null
>                 } | {
>                   name?: string | null
>                 } | {
>                   id?: string | null,
>                   name?: string | null
>                 } | string | string | string | string | null,
>                 type?: string | null,
>                 $disrupted?: boolean | null
>               } | {
>                 field?: {
>                   id?: string | null,
>                   api_name?: string | null
>                 } | null,
>                 comparator?: string | null,
>                 value?: (string | number | {
>                   id?: string & any | null,
>                   name?: string & any | null
>                 } | {
>                   name?: string | null
>                 } | {
>                   id?: string | null,
>                   name?: string | null
>                 })[] | string | number | boolean | {
>                   id?: string & any | null,
>                   name?: string & any | null
>                 } | {
>                   name?: string | null
>                 } | {
>                   id?: string | null,
>                   name?: string | null
>                 } | string | null,
>                 type?: string | null,
>                 $disrupted?: boolean | null
>               } | {
>                 field?: {
>                   id?: string | null,
>                   api_name?: string | null
>                 } | null,
>                 comparator?: string | null,
>                 value?: string[] | string | null,
>                 type?: string | null,
>                 $disrupted?: boolean | null
>               } | {
>                 field?: {
>                   id?: string | null,
>                   api_name?: string | null
>                 } | null,
>                 comparator?: string | null,
>                 value?: string | number | string | null,
>                 type?: string | null,
>                 $disrupted?: boolean | null
>               } | {
>                 field?: {
>                   id?: string | null,
>                   api_name?: string | null
>                 } | null,
>                 comparator?: string | null,
>                 value?: (string | number)[] | null,
>                 type?: string | null,
>                 $disrupted?: boolean | null
>               } | {
>                 field?: {
>                   id?: string | null,
>                   api_name?: string | null
>                 } | null,
>                 comparator?: string | null,
>                 value?: (string | number)[] | null,
>                 type?: string | null,
>                 $disrupted?: boolean | null
>               } | {
>                 field?: {
>                   id?: string | null,
>                   api_name?: string | null
>                 } | null,
>                 comparator?: string | null,
>                 value?: {
>                   id?: string & any | null,
>                   name?: string & any | null
>                 }[] | null,
>                 type?: string | null,
>                 $disrupted?: boolean | null
>               } | (recursive)
>             )[] | null,
>             group_operator?: string | null,
>             $disrupted?: boolean | null
>           }
>         )[] | null,
>         group_operator?: string | null,
>         $disrupted?: boolean | null
>       } | null
>     }[] | null,
>     name?: string | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null,
>       zuid?: string | null
>     } | null | null,
>     signal_rules?: {
>       score?: number | null,
>       id?: string | null,
>       _delete?: null | null,
>       signal?: {
>         namespace?: string | null,
>         id?: string | null
>       } | null
>     }[] | null | null,
>     id?: string | null
>   }[] | null,
>   info?: {
>     per_page?: number | null,
>     count?: number | null,
>     page?: number | null,
>     more_records?: boolean | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### update

`scoringRules.update`

Update a scoring rules by ID. To update a specific Scoring Rule by its ID in your Zoho CRM organization.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.scoringRules.update({
	ruleId: 'example',
	scoring_rules: [{}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `ruleId` | `string` | Yes | Specifies the unique ID of the Scoring Rule to retrieve, update, activate, deactivate, delete, or clone. |
| `scoring_rules` | `object[]` | Yes | Represents an array of Scoring Rule update objects. Required for PUT operations. |

> [accordion] scoring\_rules full type
>
> ```ts theme={null}
> {
>   custom_fields?: {
>     id?: string,
>     field_label?: string,
>     api_name?: string,
>     reference_field?: {
>       api_name?: Positive_Score | Negative_Score | Touch_Point_Positive_Score | Touch_Point_Negative_Score | Touch_Point_Score | Score,
>       id?: string
>     },
>     _delete?: null
>   }[] | null,
>   description?: string | null,
>   active?: boolean,
>   field_rules?: {
>     score?: number | string,
>     id?: string,
>     criteria?: {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: string,
>       value: (string | number | {
>         id: string & any,
>         name?: string
>       } | {
>         name: string
>       } | {
>         id: string,
>         name?: string
>       })[] | string | number | boolean | {
>         id: string & any,
>         name?: string
>       } | {
>         name: string
>       } | {
>         id: string,
>         name?: string
>       } | ${
>         EMPTY
>       } | ${
>         NOTEMPTY
>       } | ${
>         TODAY
>       } | ${
>         TOMORROW
>       } | ${
>         TOMORROWPLUS
>       } | ${
>         YESTERDAY
>       } | ${
>         YESTERDAYMINUS
>       } | ${
>         LASTMONTH
>       } | ${
>         THISMONTH
>       } | ${
>         NEXTMONTH
>       } | ${
>         LASTWEEK
>       } | ${
>         THISWEEK
>       } | ${
>         NEXTWEEK
>       } | ${
>         THISYEAR
>       } | ${
>         THISFY
>       } | ${
>         THISFQ
>       } | ${
>         LASTYEAR
>       } | ${
>         PREVFY
>       } | ${
>         PREVFQ
>       } | ${
>         NEXTYEAR
>       } | ${
>         NEXTFY
>       } | ${
>         NEXTFQ
>       } | ${
>         EMPTY
>       } | ${
>         NOTEMPTY
>       } | string | string,
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: string,
>       value: (string | number | {
>         id: string & any,
>         name?: string
>       } | {
>         name: string
>       } | {
>         id: string,
>         name?: string
>       })[] | string | number | boolean | {
>         id: string & any,
>         name?: string
>       } | {
>         name: string
>       } | {
>         id: string,
>         name?: string
>       } | string,
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>       value: string[] | string,
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: less_than | less_equal | greater_than | greater_equal,
>       value: string | number | string,
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: between | not_between,
>       value: (string | number)[],
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: in | not_in,
>       value: (string | number)[],
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: include_all | include_any | exclude_all | exclude_any,
>       value: {
>         id: string & any,
>         name?: string
>       }[],
>       type?: merge_field | pre_defined | value | field
>     } | {
>       group: (
>         {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: string,
>           value: (string | number | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           })[] | string | number | boolean | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           } | ${
>             EMPTY
>           } | ${
>             NOTEMPTY
>           } | ${
>             TODAY
>           } | ${
>             TOMORROW
>           } | ${
>             TOMORROWPLUS
>           } | ${
>             YESTERDAY
>           } | ${
>             YESTERDAYMINUS
>           } | ${
>             LASTMONTH
>           } | ${
>             THISMONTH
>           } | ${
>             NEXTMONTH
>           } | ${
>             LASTWEEK
>           } | ${
>             THISWEEK
>           } | ${
>             NEXTWEEK
>           } | ${
>             THISYEAR
>           } | ${
>             THISFY
>           } | ${
>             THISFQ
>           } | ${
>             LASTYEAR
>           } | ${
>             PREVFY
>           } | ${
>             PREVFQ
>           } | ${
>             NEXTYEAR
>           } | ${
>             NEXTFY
>           } | ${
>             NEXTFQ
>           } | ${
>             EMPTY
>           } | ${
>             NOTEMPTY
>           } | string | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: string,
>           value: (string | number | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           })[] | string | number | boolean | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           } | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>           value: string[] | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: less_than | less_equal | greater_than | greater_equal,
>           value: string | number | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: between | not_between,
>           value: (string | number)[],
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: in | not_in,
>           value: (string | number)[],
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: include_all | include_any | exclude_all | exclude_any,
>           value: {
>             id: string & any,
>             name?: string
>           }[],
>           type?: merge_field | pre_defined | value | field
>         } | {
>           group: (
>             {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: string,
>               value: (string | number | {
>                 id: string & any,
>                 name?: string
>               } | {
>                 name: string
>               } | {
>                 id: string,
>                 name?: string
>               })[] | string | number | boolean | {
>                 id: string & any,
>                 name?: string
>               } | {
>                 name: string
>               } | {
>                 id: string,
>                 name?: string
>               } | ${
>                 EMPTY
>               } | ${
>                 NOTEMPTY
>               } | ${
>                 TODAY
>               } | ${
>                 TOMORROW
>               } | ${
>                 TOMORROWPLUS
>               } | ${
>                 YESTERDAY
>               } | ${
>                 YESTERDAYMINUS
>               } | ${
>                 LASTMONTH
>               } | ${
>                 THISMONTH
>               } | ${
>                 NEXTMONTH
>               } | ${
>                 LASTWEEK
>               } | ${
>                 THISWEEK
>               } | ${
>                 NEXTWEEK
>               } | ${
>                 THISYEAR
>               } | ${
>                 THISFY
>               } | ${
>                 THISFQ
>               } | ${
>                 LASTYEAR
>               } | ${
>                 PREVFY
>               } | ${
>                 PREVFQ
>               } | ${
>                 NEXTYEAR
>               } | ${
>                 NEXTFY
>               } | ${
>                 NEXTFQ
>               } | ${
>                 EMPTY
>               } | ${
>                 NOTEMPTY
>               } | string | string,
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: string,
>               value: (string | number | {
>                 id: string & any,
>                 name?: string
>               } | {
>                 name: string
>               } | {
>                 id: string,
>                 name?: string
>               })[] | string | number | boolean | {
>                 id: string & any,
>                 name?: string
>               } | {
>                 name: string
>               } | {
>                 id: string,
>                 name?: string
>               } | string,
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>               value: string[] | string,
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: less_than | less_equal | greater_than | greater_equal,
>               value: string | number | string,
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: between | not_between,
>               value: (string | number)[],
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: in | not_in,
>               value: (string | number)[],
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: include_all | include_any | exclude_all | exclude_any,
>               value: {
>                 id: string & any,
>                 name?: string
>               }[],
>               type?: merge_field | pre_defined | value | field
>             } | (recursive)
>           )[],
>           group_operator: AND | OR | and | or
>         }
>       )[],
>       group_operator: AND | OR | and | or
>     }
>   }[],
>   name?: string,
>   signal_rules?: {
>     score?: number | string,
>     id?: string,
>     _delete?: null,
>     signal?: {
>       namespace?: string,
>       id?: string
>     }
>   }[] | null,
>   id?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `scoring_rules` | `object[] \| null` | No | Update result for the scoring rule, containing the status and ID of the updated rule. |

> [accordion] scoring\_rules full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     unsaved_custom_fields?: {
>       field_label?: string | null
>     }[] | null,
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### updateMany

`scoringRules.updateMany`

Scoring Rules. Updates one or more scoring rules. Returns 200 (all success) or 207 (partial success).

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.scoringRules.updateMany({
	scoring_rules: [{}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `scoring_rules` | `object[]` | Yes | Array of scoring rule update objects (Required) |

> [accordion] scoring\_rules full type
>
> ```ts theme={null}
> {
>   custom_fields?: {
>     id?: string,
>     field_label?: string,
>     api_name?: string,
>     reference_field?: {
>       api_name?: Positive_Score | Negative_Score | Touch_Point_Positive_Score | Touch_Point_Negative_Score | Touch_Point_Score | Score,
>       id?: string
>     },
>     _delete?: null
>   }[] | null,
>   description?: string | null,
>   active?: boolean,
>   field_rules?: {
>     score?: number | string,
>     id?: string,
>     criteria?: {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: string,
>       value: (string | number | {
>         id: string & any,
>         name?: string
>       } | {
>         name: string
>       } | {
>         id: string,
>         name?: string
>       })[] | string | number | boolean | {
>         id: string & any,
>         name?: string
>       } | {
>         name: string
>       } | {
>         id: string,
>         name?: string
>       } | ${
>         EMPTY
>       } | ${
>         NOTEMPTY
>       } | ${
>         TODAY
>       } | ${
>         TOMORROW
>       } | ${
>         TOMORROWPLUS
>       } | ${
>         YESTERDAY
>       } | ${
>         YESTERDAYMINUS
>       } | ${
>         LASTMONTH
>       } | ${
>         THISMONTH
>       } | ${
>         NEXTMONTH
>       } | ${
>         LASTWEEK
>       } | ${
>         THISWEEK
>       } | ${
>         NEXTWEEK
>       } | ${
>         THISYEAR
>       } | ${
>         THISFY
>       } | ${
>         THISFQ
>       } | ${
>         LASTYEAR
>       } | ${
>         PREVFY
>       } | ${
>         PREVFQ
>       } | ${
>         NEXTYEAR
>       } | ${
>         NEXTFY
>       } | ${
>         NEXTFQ
>       } | ${
>         EMPTY
>       } | ${
>         NOTEMPTY
>       } | string | string,
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: string,
>       value: (string | number | {
>         id: string & any,
>         name?: string
>       } | {
>         name: string
>       } | {
>         id: string,
>         name?: string
>       })[] | string | number | boolean | {
>         id: string & any,
>         name?: string
>       } | {
>         name: string
>       } | {
>         id: string,
>         name?: string
>       } | string,
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>       value: string[] | string,
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: less_than | less_equal | greater_than | greater_equal,
>       value: string | number | string,
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: between | not_between,
>       value: (string | number)[],
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: in | not_in,
>       value: (string | number)[],
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: include_all | include_any | exclude_all | exclude_any,
>       value: {
>         id: string & any,
>         name?: string
>       }[],
>       type?: merge_field | pre_defined | value | field
>     } | {
>       group: (
>         {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: string,
>           value: (string | number | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           })[] | string | number | boolean | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           } | ${
>             EMPTY
>           } | ${
>             NOTEMPTY
>           } | ${
>             TODAY
>           } | ${
>             TOMORROW
>           } | ${
>             TOMORROWPLUS
>           } | ${
>             YESTERDAY
>           } | ${
>             YESTERDAYMINUS
>           } | ${
>             LASTMONTH
>           } | ${
>             THISMONTH
>           } | ${
>             NEXTMONTH
>           } | ${
>             LASTWEEK
>           } | ${
>             THISWEEK
>           } | ${
>             NEXTWEEK
>           } | ${
>             THISYEAR
>           } | ${
>             THISFY
>           } | ${
>             THISFQ
>           } | ${
>             LASTYEAR
>           } | ${
>             PREVFY
>           } | ${
>             PREVFQ
>           } | ${
>             NEXTYEAR
>           } | ${
>             NEXTFY
>           } | ${
>             NEXTFQ
>           } | ${
>             EMPTY
>           } | ${
>             NOTEMPTY
>           } | string | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: string,
>           value: (string | number | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           })[] | string | number | boolean | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           } | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>           value: string[] | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: less_than | less_equal | greater_than | greater_equal,
>           value: string | number | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: between | not_between,
>           value: (string | number)[],
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: in | not_in,
>           value: (string | number)[],
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: include_all | include_any | exclude_all | exclude_any,
>           value: {
>             id: string & any,
>             name?: string
>           }[],
>           type?: merge_field | pre_defined | value | field
>         } | {
>           group: (
>             {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: string,
>               value: (string | number | {
>                 id: string & any,
>                 name?: string
>               } | {
>                 name: string
>               } | {
>                 id: string,
>                 name?: string
>               })[] | string | number | boolean | {
>                 id: string & any,
>                 name?: string
>               } | {
>                 name: string
>               } | {
>                 id: string,
>                 name?: string
>               } | ${
>                 EMPTY
>               } | ${
>                 NOTEMPTY
>               } | ${
>                 TODAY
>               } | ${
>                 TOMORROW
>               } | ${
>                 TOMORROWPLUS
>               } | ${
>                 YESTERDAY
>               } | ${
>                 YESTERDAYMINUS
>               } | ${
>                 LASTMONTH
>               } | ${
>                 THISMONTH
>               } | ${
>                 NEXTMONTH
>               } | ${
>                 LASTWEEK
>               } | ${
>                 THISWEEK
>               } | ${
>                 NEXTWEEK
>               } | ${
>                 THISYEAR
>               } | ${
>                 THISFY
>               } | ${
>                 THISFQ
>               } | ${
>                 LASTYEAR
>               } | ${
>                 PREVFY
>               } | ${
>                 PREVFQ
>               } | ${
>                 NEXTYEAR
>               } | ${
>                 NEXTFY
>               } | ${
>                 NEXTFQ
>               } | ${
>                 EMPTY
>               } | ${
>                 NOTEMPTY
>               } | string | string,
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: string,
>               value: (string | number | {
>                 id: string & any,
>                 name?: string
>               } | {
>                 name: string
>               } | {
>                 id: string,
>                 name?: string
>               })[] | string | number | boolean | {
>                 id: string & any,
>                 name?: string
>               } | {
>                 name: string
>               } | {
>                 id: string,
>                 name?: string
>               } | string,
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>               value: string[] | string,
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: less_than | less_equal | greater_than | greater_equal,
>               value: string | number | string,
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: between | not_between,
>               value: (string | number)[],
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: in | not_in,
>               value: (string | number)[],
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: include_all | include_any | exclude_all | exclude_any,
>               value: {
>                 id: string & any,
>                 name?: string
>               }[],
>               type?: merge_field | pre_defined | value | field
>             } | (recursive)
>           )[],
>           group_operator: AND | OR | and | or
>         }
>       )[],
>       group_operator: AND | OR | and | or
>     }
>   }[],
>   name?: string,
>   signal_rules?: {
>     score?: number | string,
>     id?: string,
>     _delete?: null,
>     signal?: {
>       namespace?: string,
>       id?: string
>     }
>   }[] | null,
>   id?: string
> }[]
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   scoring_rules?: {
>     code?: string | null,
>     details?: {
>       unsaved_custom_fields?: {
>         field_label?: string | null
>       }[] | null,
>       id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   scoring_rules?: {
>     code?: string | null,
>     details?: {
>       unsaved_custom_fields?: {
>         field_label?: string | null
>       }[] | null,
>       id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> }
> ```

***

## Service Preferences

### get

`servicePreferences.get`

Get service preferences. Retrieves the service preference settings of the organization, including whether the job sheet is enabled for service appointments. Use this API to check whether a job sheet can be generated once a service appointment is marked complete.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.servicePreferences.get({});
```

**Input:** *empty object*

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   service_preferences?: {
>     job_sheet_enabled?: boolean | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### update

`servicePreferences.update`

Update service preferences. Updates the service preference settings of the organization. Use this API to enable or disable the job sheet, which controls whether a job sheet can be generated for a service appointment once the appointment is marked complete.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.servicePreferences.update({
	service_preferences: { job_sheet_enabled: true },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `service_preferences` | `object` | Yes | Represents the service preference settings to update for the organization. |

> [accordion] service\_preferences full type
>
> ```ts theme={null}
> {
>   job_sheet_enabled: boolean
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `service_preferences` | `object \| null` | No | Represents the result of updating the service preference settings of the organization. |

> [accordion] service\_preferences full type
>
> ```ts theme={null}
> {
>   status?: string | null,
>   code?: string | null,
>   message?: string | null,
>   details?: {
>   } | null
> } | null
> ```

***

## Services

### create

`services.create`

Create service records in Zoho CRM. To create one or more service records in your Zoho CRM organization, submitting up to 100 service objects per request, each configurable with a name, duration, price, location, members, availability type, and availability window.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.services.create({
	data: [{
		Availability_Type: 'Specific Day(s)',
		Duration: 1,
		Location: 'Business Address',
		Members: [{}],
		Price: 1,
		Service_Name: 'example',
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[]` | Yes | Specify the array of service objects to be created. You can include up to 100 objects. |
| `skip_mandatory` | `boolean \| null` | No | Specify whether to skip mandatory-field validation when creating service records. |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   Job_Sheet_Required?: Yes | No | null,
>   Owner?: {
>     full_name?: string | null,
>     name?: string | null,
>     id?: string | null
>   },
>   Available_Timings?: {
>     From?: string | null,
>     To?: string | null
>   }[] | null,
>   Description?: string | null,
>   Available_From?: string | null,
>   Service_Name: string,
>   Available_Till?: string | null,
>   Available_Days?: string[] | null,
>   Duration: number | string,
>   Tax?: {
>     id?: null,
>     value?: string | null
>   }[] | null,
>   Price: number | string,
>   Layout?: {
>     id?: string | null
>   },
>   zia_suggested_users?: {
>   } | null,
>   Availability_Type: Specific Day(s) | Specific Date Range | Every Business Days | Specific Date(s),
>   $zia_owner_assignment?: string | null,
>   Members: {
>     name?: string | null,
>     Members?: {
>       name?: string | null,
>       Members?: (recursive),
>       id?: string | null
>     },
>     id?: string | null
>   }[],
>   Available_Dates?: string[] | null,
>   Location: Business Address | Business Address and Client Address | Client Address
> }[]
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data?: {
>     code?: string | null,
>     details?: {
>       Modified_Time?: string | null,
>       Modified_By?: {
>         name?: string | null,
>         id?: string | null
>       } | null,
>       Created_Time?: string | null,
>       id?: string | null,
>       Created_By?: {
>         name?: string | null,
>         id?: string | null
>       } | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   data?: (
>     {
>       details?: {
>         Modified_Time?: string | null,
>         Modified_By?: {
>           name?: string | null,
>           id?: string | null
>         } | null,
>         Created_Time?: string | null,
>         id?: string | null,
>         Created_By?: {
>           name?: string | null,
>           id?: string | null
>         } | null
>       } | null,
>       code?: string | null,
>       message?: string | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       details?: {
>         api_name?: string | null,
>         json_path?: string | null
>       } | null,
>       message?: string | null,
>       status?: string | null
>     }
>   )[] | null
> }
> ```

***

### delete

`services.delete`

Delete a service record by ID. To delete a service record from your Zoho CRM organization by its unique ID. When a service record is removed, all appointments associated with that service are also removed; however, deals created upon completion of an appointment under the service are not affected. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.services.delete({ id: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Specify the unique ID of the service record to be deleted. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | Represents the per-record status array containing the result for each deleted service record. |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     Modified_Time?: string | null,
>     Modified_By?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     Created_Time?: string | null,
>     id?: string | null,
>     Created_By?: {
>       name?: string | null,
>       id?: string | null
>     } | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### deleteMany

`services.deleteMany`

Delete one or more service records. To delete one or more service records from your Zoho CRM organization. All appointments associated with the deleted services are also deleted; however, deals created upon completion of those appointments are not deleted. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.services.deleteMany({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `ids` | `number` | No | Specify the IDs of the service records to be deleted. Provide them as comma-separated values with a maximum of **100** IDs per request. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data?: {
>     code?: string | null,
>     details?: {
>       Modified_Time?: string | null,
>       Modified_By?: {
>         name?: string | null,
>         id?: string | null
>       } | null,
>       Created_Time?: string | null,
>       id?: string | null,
>       Created_By?: {
>         name?: string | null,
>         id?: string | null
>       } | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   data?: (
>     {
>       details?: {
>         Modified_Time?: string | null,
>         Modified_By?: {
>           name?: string | null,
>           id?: string | null
>         } | null,
>         Created_Time?: string | null,
>         id?: string | null,
>         Created_By?: {
>           name?: string | null,
>           id?: string | null
>         } | null
>       } | null,
>       code?: string | null,
>       message?: string | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       details?: {
>         id?: string | null
>       } | null,
>       message?: string | null,
>       status?: string | null
>     }
>   )[] | null
> }
> ```

***

### get

`services.get`

Retrieve a specific service record by ID. To retrieve the full details of a single service record from your Zoho CRM organization using its unique ID, including its availability configuration, members, pricing, tax details, and subform data.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.services.get({ id: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Specify the unique ID of the service record to be retrieved, updated, or deleted. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data?: {
>     Job_Sheet_Required?: string | null,
>     Owner?: {
>       name?: string | null,
>       id?: string | null,
>       email?: string | null
>     } | null,
>     Description?: string | null | null,
>     $currency_symbol?: string | null,
>     $field_states?: null | null,
>     $photo_id?: null | null,
>     Available_Days?: any[] | null,
>     Tax?: any[] | null,
>     $sharing_permission?: string | null,
>     Unavailable_From?: string | null | null,
>     Last_Activity_Time?: string | null,
>     Record_Image?: null | null,
>     Modified_By?: {
>       name?: string | null,
>       id?: string | null,
>       email?: string | null
>     } | null,
>     id?: string | null,
>     Available_Dates?: any[] | null,
>     Status?: string | null,
>     Modified_Time?: string | null,
>     Available_Timings?: {
>       From?: string | null,
>       To?: string | null
>     }[] | null | null,
>     Service_Name?: string | null,
>     Available_From?: string | null,
>     $data_source_details?: {
>     } | null,
>     Created_Time?: string | null,
>     Available_Till?: string | null | null,
>     $editable?: boolean | null,
>     Duration?: number | null,
>     Job_Sheet_Section__s?: null | null,
>     Record_Status__s?: string | null,
>     Price?: number | null,
>     $status?: string | null,
>     Created_By?: {
>       name?: string | null,
>       id?: string | null,
>       email?: string | null
>     } | null,
>     Tag?: string[] | null | null,
>     Availability_Type?: string | null,
>     Members?: {
>       id?: string | null,
>       Members?: {
>         module?: string | null,
>         name?: string | null,
>         id?: string | null
>       } | null
>     }[] | null,
>     Location?: string | null,
>     Unavailable_Till?: null | null,
>     $has_more?: {
>       Members?: boolean | null
>     } | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### list

`services.list`

Get services. To retrieve the list of service records in your Zoho CRM organization that match the specified filter criteria. Supports pagination using either the page or page\_token parameter and can return up to 100,000 services across paginated requests.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.services.list({ fields: 'Last_Name,Email' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `fields` | `string` | Yes | Specify a comma-separated list of field API names to include in the response. Use the [Get Fields Metadata API](fields.yaml#\$.paths./settings/fields.get) to retrieve the field IDs and API names. |
| `cvid` | `string` | No | Specify the unique ID of the Custom View. Use the [Get Custom Views Metadata API](custom_views.yaml#\$.paths./settings/custom_views.get) to retrieve the Custom View IDs. |
| `page_token` | `string` | No | Specify the page token to retrieve records beyond the first 2,000 results. Use the **next\_page\_token** value from a previous response to access the next page of results. |
| `page` | `number \| string` | No | Specify the page number to retrieve. Starts at 1. |
| `per_page` | `number \| string` | No | Specify the number of records to return per page. Maximum is 200. |
| `sort_order` | `desc \| asc` | No | Specify the sort order for the records.\<br/> \<b>Possible values:\</b> \<br/>desc - Returns records in descending order.\<br/> asc - Returns records in ascending order. |
| `sort_by` | `id \| Created_Time \| Modified_Time` | No | Specify the field to sort records by. Possible values:**id** - Sorts by record ID. **Created\_Time** - Sorts by creation timestamp. **Modified\_Time** - Sorts by last modification timestamp. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data?: {
>     Job_Sheet_Required?: string | null,
>     Owner?: {
>       name?: string | null,
>       id?: string | null,
>       email?: string | null
>     } | null,
>     Description?: string | null | null,
>     $currency_symbol?: string | null,
>     $field_states?: null | null,
>     $photo_id?: null | null,
>     Available_Days?: any[] | null,
>     Tax?: any[] | null,
>     $sharing_permission?: string | null,
>     Unavailable_From?: string | null | null,
>     Last_Activity_Time?: string | null,
>     Record_Image?: null | null,
>     Modified_By?: {
>       name?: string | null,
>       id?: string | null,
>       email?: string | null
>     } | null,
>     id?: string | null,
>     Available_Dates?: any[] | null,
>     Status?: string | null,
>     Modified_Time?: string | null,
>     Available_Timings?: {
>       From?: string | null,
>       To?: string | null
>     }[] | null | null,
>     Service_Name?: string | null,
>     Available_From?: string | null,
>     $data_source_details?: {
>     } | null,
>     Created_Time?: string | null,
>     Available_Till?: string | null | null,
>     $editable?: boolean | null,
>     Duration?: number | null,
>     Job_Sheet_Section__s?: null | null,
>     Record_Status__s?: string | null,
>     Price?: number | null,
>     $status?: string | null,
>     Created_By?: {
>       name?: string | null,
>       id?: string | null,
>       email?: string | null
>     } | null,
>     Tag?: string[] | null | null,
>     Availability_Type?: string | null,
>     Members?: {
>       id?: string | null,
>       Members?: {
>         module?: string | null,
>         name?: string | null,
>         id?: string | null
>       } | null
>     }[] | null,
>     Location?: string | null,
>     Unavailable_Till?: null | null,
>     $has_more?: {
>       Members?: boolean | null
>     } | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### update

`services.update`

Update a specific service record by ID. To update a single service record in your Zoho CRM organization, identified by its unique ID. Only the fields supplied in the request payload are modified on the targeted service.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.services.update({
	id: '4876876000000333001',
	data: [{}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `affected_data` | `boolean` | No | Specify whether to include the affected\_data details in the response. Set to true to receive the IDs of records whose process flows were affected by the update. |
| `id` | `string` | Yes | Specify the unique ID of the service record to be retrieved, updated, or deleted. |
| `data` | `object[]` | Yes | Specify the array containing the single service object to be updated. |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   Job_Sheet_Required?: Yes | No | null,
>   Status?: Available | Temporarily Unavailable | Not in Use | Scheduled | null,
>   Owner?: {
>     name?: (string | null)& (string | null),
>     id?: (string | null)& (string | null),
>     email: (string | null)& (string | null)
>   },
>   Description?: string | null,
>   Available_Timings?: string | null,
>   Service_Name?: string | null,
>   Available_From?: string | null,
>   Available_Till?: 2026-01-13 | 2026-01-29 | null,
>   Available_Days?: string[] | null,
>   Tax?: string[] | null,
>   Duration?: number | string | null,
>   Job_Sheet_Section__s?: string | null,
>   Unavailable_From?: string | null,
>   Record_Image?: string | null,
>   Price?: number | string | null,
>   id?: string | null,
>   Tag?: string[] | null,
>   Availability_Type?: Specific Day(s) | Specific Date Range | Every Business Days | Specific Date(s) | null,
>   Available_Dates?: string[] | null,
>   Members?: {
>     id?: string | null,
>     Members?: {
>       module?: string | null,
>       name?: string | null,
>       id?: string | null
>     }
>   }[] | null,
>   Location?: Business Address | Business Address and Client Address | Client Address | null,
>   Unavailable_Till?: string | null
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | Represents the per-record status array containing the result for the updated service record. |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     Modified_Time?: string | null,
>     Modified_By?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     Created_Time?: string | null,
>     id?: string | null,
>     Created_By?: {
>       name?: string | null,
>       id?: string | null
>     } | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### updateMany

`services.updateMany`

Update service records. To update one or more existing service records in your Zoho CRM organization. Each request can include up to 100 service objects identified by their record IDs; only the fields supplied in the payload are modified.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.services.updateMany({
	data: [{}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `affected_data` | `boolean` | No | Specify whether to include the affected\_data details in the response. Set to true to receive the IDs of records whose process flows were affected by the update. |
| `data` | `object[]` | Yes | Specify the array of service objects to be updated. You can include up to 100 objects. |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   Job_Sheet_Required?: Yes | No | null,
>   Status?: Available | Temporarily Unavailable | Not in Use | Scheduled | null,
>   Owner?: {
>     name?: (string | null)& (string | null),
>     id?: (string | null)& (string | null),
>     email: (string | null)& (string | null)
>   },
>   Description?: string | null,
>   Available_Timings?: string | null,
>   Service_Name?: string | null,
>   Available_From?: string | null,
>   Available_Till?: 2026-01-13 | 2026-01-29 | null,
>   Available_Days?: string[] | null,
>   Tax?: string[] | null,
>   Duration?: number | string | null,
>   Job_Sheet_Section__s?: string | null,
>   Unavailable_From?: string | null,
>   Record_Image?: string | null,
>   Price?: number | string | null,
>   id?: string | null,
>   Tag?: string[] | null,
>   Availability_Type?: Specific Day(s) | Specific Date Range | Every Business Days | Specific Date(s) | null,
>   Available_Dates?: string[] | null,
>   Members?: {
>     id?: string | null,
>     Members?: {
>       module?: string | null,
>       name?: string | null,
>       id?: string | null
>     }
>   }[] | null,
>   Location?: Business Address | Business Address and Client Address | Client Address | null,
>   Unavailable_Till?: string | null
> }[]
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data?: {
>     code?: string | null,
>     details?: {
>       Modified_Time?: string | null,
>       Modified_By?: {
>         name?: string | null,
>         id?: string | null
>       } | null,
>       Created_Time?: string | null,
>       id?: string | null,
>       Created_By?: {
>         name?: string | null,
>         id?: string | null
>       } | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   data?: (
>     {
>       details?: {
>         Modified_Time?: string | null,
>         Modified_By?: {
>           name?: string | null,
>           id?: string | null
>         } | null,
>         Created_Time?: string | null,
>         id?: string | null,
>         Created_By?: {
>           name?: string | null,
>           id?: string | null
>         } | null
>       } | null,
>       code?: string | null,
>       message?: string | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       details?: {
>         api_name?: string | null,
>         json_path?: string | null
>       } | null,
>       message?: string | null,
>       status?: string | null
>     }
>   )[] | null
> }
> ```

***

## Shift Hours

### create

`shiftHours.create`

Add shift hours. Creates one or more shift hour configurations for the organization. Each shift hour specifies the name, time zone, active days, timing, optional break windows, optional holidays, and optional user assignments.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.shiftHours.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `shift_hours` | `object[]` | No | Lists the shift hour configurations to be created or updated in the request. Each entry specifies a shift hour with its timing, break hours, holidays, and assigned users. |

> [accordion] shift\_hours full type
>
> ```ts theme={null}
> {
>   break_hours?: {
>     break_days?: (Monday | Thursday | Friday | Sunday | Wednesday | Tuesday | Saturday)[],
>     daily_timing?: string[],
>     custom_timing?: {
>       break_timing: string[],
>       days: Monday | Thursday | Friday | Sunday | Wednesday | Tuesday | Saturday
>     }[],
>     same_as_everyday: string
>   }[],
>   daily_timing?: string[],
>   shift_days?: (Monday | Thursday | Friday | Sunday | Wednesday | Tuesday | Saturday)[],
>   custom_timing?: {
>     shift_timing: string[],
>     days: Monday | Thursday | Friday | Sunday | Wednesday | Tuesday | Saturday
>   }[],
>   timezone: string,
>   name: string,
>   same_as_everyday: boolean,
>   holidays?: {
>     date: string,
>     name: string
>   }[],
>   users?: {
>     id: string
>   }[]
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `shift_hours` | `object[] \| null` | No | Lists the shift hour configurations in the request or response. |

> [accordion] shift\_hours full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   message?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   status?: string | null
> }[] | null
> ```

***

### delete

`shiftHours.delete`

Delete a shift hour. Deletes the shift hour identified by the shift path parameter. Once deleted, the shift hour configuration and all of its user assignments are removed. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.shiftHours.delete({ shift: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `shift` | `string` | Yes | Represents the unique identifier of the shift hour to retrieve, update, or delete. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `shift_hours` | `object[] \| null` | No | Lists the shift hour configurations in the request or response. |

> [accordion] shift\_hours full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   message?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   status?: string | null
> }[] | null
> ```

***

### get

`shiftHours.get`

Get a shift hour. Retrieves the configuration of the shift hour identified by the shift path parameter, including its timing, break hours, holidays, time zone, and the users assigned to it.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.shiftHours.get({ shift: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `shift` | `string` | Yes | Represents the unique identifier of the shift hour to retrieve, update, or delete. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   shift_hours?: {
>     same_as_everyday?: boolean | null,
>     shift_days?: string[] | null,
>     daily_timing?: string[] | null | null,
>     custom_timing?: {
>       days?: string | null,
>       shift_timing?: string[] | null
>     }[] | null | null,
>     id?: string | null,
>     break_hours?: {
>       same_as_everyday?: boolean | null,
>       break_days?: string[] | null,
>       daily_timing?: string[] | null,
>       custom_timing?: {
>         days?: string | null,
>         break_timing?: string[] | null
>       }[] | null | null,
>       id?: string | null
>     }[] | null | null,
>     users?: {
>       role?: {
>         name?: string | null,
>         id?: string | null
>       } | null,
>       name?: string | null,
>       id?: string | null,
>       email?: string | null,
>       zuid?: string | null,
>       effective_from?: string | null
>     }[] | null | null,
>     holidays?: {
>       date?: string | null,
>       year?: {
>       } | null,
>       name?: string | null,
>       id?: string | null,
>       userFmt?: string | null
>     }[] | null | null,
>     users_count?: number | null,
>     timezone?: string | null,
>     name?: string | null
>   }[] | null,
>   shift_count?: {
>     total_shift_with_user?: number | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### list

`shiftHours.list`

Get shift hours. Retrieves every shift hour configured for the organization, along with the timing, break hours, holidays, time zone, and assigned users of each shift, and an aggregate count of shifts that have at least one user assigned.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.shiftHours.list({});
```

**Input:** *empty object*

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   shift_count?: {
>     total_shift_with_user?: number | null
>   } | null,
>   shift_hours?: {
>     custom_timing?: {
>       days?: string | null,
>       shift_timing?: string[] | null
>     }[] | null | null,
>     users_count?: number | null,
>     holidays?: {
>       date?: string | null,
>       year?: string | null,
>       name?: string | null,
>       userFmt?: string | null,
>       id?: string | null
>     }[] | null | null,
>     daily_timing?: string[] | null | null,
>     timezone?: string | null,
>     name?: string | null,
>     break_hours?: {
>       custom_timing?: {
>         break_timing?: string[] | null,
>         days?: string | null
>       }[] | null | null,
>       daily_timing?: string[] | null | null,
>       same_as_everyday?: boolean | null,
>       id?: string | null,
>       break_days?: string[] | null
>     }[] | null | null,
>     shift_days?: string[] | null,
>     same_as_everyday?: boolean | null,
>     id?: string | null,
>     users?: {
>       role?: {
>         name?: string | null,
>         id?: string | null
>       } | null,
>       name?: string | null,
>       id?: string | null,
>       email?: string | null,
>       zuid?: string | null,
>       effective_from?: string | null
>     }[] | null | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### update

`shiftHours.update`

Update a shift hour. Updates the configuration of the shift hour identified by the shift path parameter. The request body specifies the fields to change, such as the time zone, active days, timing, break windows, holidays, or user assignments. The updated timing must fall within the configured business hours.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.shiftHours.update({ shift: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `shift` | `string` | Yes | Represents the unique identifier of the shift hour to retrieve, update, or delete. |
| `shift_hours` | `object[]` | No | Lists the shift hour configurations to be created or updated in the request. |

> [accordion] shift\_hours full type
>
> ```ts theme={null}
> {
>   break_hours?: {
>     break_days?: (Monday | Thursday | Friday | Sunday | Wednesday | Tuesday | Saturday)[],
>     daily_timing?: string[],
>     custom_timing?: {
>       break_timing?: string[],
>       days?: Monday | Thursday | Friday | Sunday | Wednesday | Tuesday | Saturday
>     }[],
>     same_as_everyday?: string
>   }[],
>   daily_timing?: string[],
>   shift_days?: (Monday | Thursday | Friday | Sunday | Wednesday | Tuesday | Saturday)[],
>   custom_timing?: {
>     shift_timing?: string[],
>     days?: Monday | Thursday | Friday | Sunday | Wednesday | Tuesday | Saturday
>   }[],
>   timezone?: string,
>   name?: string,
>   same_as_everyday?: boolean,
>   holidays?: {
>     date?: string,
>     name?: string
>   }[],
>   users?: {
>     id?: string
>   }[]
> }[]
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   shift_hours?: {
>     code?: string | null,
>     message?: string | null,
>     details?: {
>       id?: string | null
>     } | null,
>     status?: string | null
>   }[] | null
> } | {
>   shift_hours?: {
>     code?: string | null,
>     message?: string | null,
>     details?: {
>       id?: string | null
>     } | null,
>     status?: string | null
>   }[] | null
> }
> ```

***

### updateMany

`shiftHours.updateMany`

Update shift hours. Updates one or more shift hour configurations for the organization. Each entry in shift\_hours identifies the shift hour to update and the fields to change, such as the time zone, active days, timing, break windows, holidays, or user assignments.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.shiftHours.updateMany({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `shift_hours` | `object[]` | No | Lists the shift hour configurations to be created or updated in the request. |

> [accordion] shift\_hours full type
>
> ```ts theme={null}
> {
>   break_hours?: {
>     break_days?: (Monday | Thursday | Friday | Sunday | Wednesday | Tuesday | Saturday)[],
>     daily_timing?: string[],
>     custom_timing?: {
>       break_timing?: string[],
>       days?: Monday | Thursday | Friday | Sunday | Wednesday | Tuesday | Saturday
>     }[],
>     same_as_everyday?: string
>   }[],
>   daily_timing?: string[],
>   shift_days?: (Monday | Thursday | Friday | Sunday | Wednesday | Tuesday | Saturday)[],
>   custom_timing?: {
>     shift_timing?: string[],
>     days?: Monday | Thursday | Friday | Sunday | Wednesday | Tuesday | Saturday
>   }[],
>   timezone?: string,
>   name?: string,
>   same_as_everyday?: boolean,
>   holidays?: {
>     date?: string,
>     name?: string
>   }[],
>   users?: {
>     id?: string
>   }[],
>   id?: string
> }[]
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   shift_hours?: {
>     code?: string | null,
>     message?: string | null,
>     details?: {
>       id?: string | null
>     } | null,
>     status?: string | null
>   }[] | null
> } | {
>   shift_hours?: {
>     code?: string | null,
>     message?: string | null,
>     details?: {
>       id?: string | null
>     } | null,
>     status?: string | null
>   }[] | null
> }
> ```

***

## Tags

### addToRecord

`tags.addToRecord`

Add Tags to a Record. Adds tags to a specific record in the specified module.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.tags.addToRecord({
	module: 'Leads',
	id: '4876876000000333001',
	tags: [{}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | The API name of the module to perform the operation on. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve the module API names. |
| `id` | `string` | Yes | Unique identifier of the record or tag. Use the [Get Tags API](tags.yaml#\$.paths./settings/tags.get) to retrieve tag IDs. |
| `ids` | `string[]` | No | The ids of the records to tag (up to 500). |
| `over_write` | `boolean \| null` | No | If true, replaces all existing tags. If false, appends tags to existing ones. |
| `tags` | `object[]` | Yes | Array of tags to associate with the records (Required) |

> [accordion] tags full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   modified_time?: string | null,
>   color_code?: string | null,
>   conflict_id?: string | null
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `ids` | `string \| null` | No | Record IDs that were processed |
| `over_write` | `boolean \| null` | No | Indicates whether tags were replaced or appended |
| `data` | `object[] \| null` | No | Array of operation results for each record |
| `locked_count` | `string \| null` | No | Number of records that were locked and could not be updated |
| `success_count` | `string \| null` | No | Number of records that were successfully updated |
| `tags` | `string \| null` | No | Root key for tags |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     modifiedTime?: string | null,
>     id?: string | null,
>     affected_data?: null | null,
>     tags?: {
>       name?: string | null,
>       id?: string | null,
>       color_code?: string | null | null,
>       rid?: string | null
>     }[] | null,
>     not_added_tags?: {
>       name?: string | null,
>       id?: string | null,
>       color_code?: string | null | null,
>       rid?: string | null
>     }[] | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### addToRecords

`tags.addToRecords`

Add Tags to Records. Associates tags to one or more records in the specified module.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.tags.addToRecords({
	module: 'Leads',
	tags: [{}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | The API name of the module to perform the operation on. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve the module API names. |
| `ids` | `string[]` | No | The ids of the records to tag (up to 500). |
| `over_write` | `boolean \| null` | No | If true, replaces all existing tags. If false, appends tags to existing ones. |
| `tags` | `object[]` | Yes | Array of tags to associate with the records (Required) |

> [accordion] tags full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   modified_time?: string | null,
>   color_code?: string | null,
>   conflict_id?: string | null
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `ids` | `string \| null` | No | Record IDs that were processed |
| `over_write` | `boolean \| null` | No | Indicates whether tags were replaced or appended |
| `data` | `object[] \| null` | No | Array of operation results for each record |
| `locked_count` | `string \| null` | No | Number of records that were locked and could not be updated |
| `success_count` | `string \| null` | No | Number of records that were successfully updated |
| `tags` | `string \| null` | No | Root key for tags |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     modifiedTime?: string | null,
>     id?: string | null,
>     affected_data?: null | null,
>     tags?: {
>       name?: string | null,
>       id?: string | null,
>       color_code?: string | null | null,
>       rid?: string | null
>     }[] | null,
>     not_added_tags?: {
>       name?: string | null,
>       id?: string | null,
>       color_code?: string | null | null,
>       rid?: string | null
>     }[] | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### create

`tags.create`

Tags. To create tags for a module in your Zoho CRM organization.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.tags.create({
	module: 'Leads',
	tags: [{ name: 'example' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the API name of the module. Refer to the [Get Modules](https://www.zoho.com/crm/developer/docs/api/v8/modules-api.html) resource for valid values. |
| `tags` | `object[]` | Yes | Represents an array of tag objects to create. The array can contain a maximum of one item. |

> [accordion] tags full type
>
> ```ts theme={null}
> {
>   name: string,
>   color_code?: string | null
> }[]
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   tags?: {
>     code?: string | null,
>     details?: {
>       created_time?: string | null,
>       modified_time?: string | null,
>       name?: string | null,
>       modified_by?: {
>         name?: string | null,
>         id?: string | null
>       } | null,
>       id?: string | null,
>       created_by?: {
>         name?: string | null,
>         id?: string | null
>       } | null,
>       color_code?: string | null | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   tags?: (
>     {
>       code?: string | null,
>       details?: {
>         created_time?: string | null,
>         modified_time?: string | null,
>         name?: string | null,
>         modified_by?: {
>           name?: string | null,
>           id?: string | null
>         } | null,
>         id?: string | null,
>         created_by?: {
>           name?: string | null,
>           id?: string | null
>         } | null,
>         color_code?: string | null | null
>       } | null,
>       message?: string | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       details?: {
>         api_name?: string | null,
>         json_path?: string | null,
>         id?: string | null
>       } | null,
>       message?: string | null,
>       status?: string | null
>     }
>   )[] | null
> }
> ```

***

### delete

`tags.delete`

Delete tag by ID. To delete a tag by its ID from your Zoho CRM organization. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.tags.delete({ id: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Specify the unique ID of the tag. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tags` | `object[] \| null` | No | Represents an array containing the result of the tag deletion operation. |

> [accordion] tags full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     created_time?: string | null,
>     modified_time?: string | null,
>     name?: string | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     id?: string | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     color_code?: string | null | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### getRecordsCount

`tags.getRecordsCount`

Get Tag Records Count. Retrieves the number of records associated with a specific tag, including workflow, blueprint, and orchestration usage details.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.tags.getRecordsCount({ module: 'Leads', id: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | The API name of the module to retrieve the tag records count for. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve the module API names. |
| `id` | `string` | Yes | Unique identifier of the record or tag. Use the [Get Tags API](tags.yaml#\$.paths./settings/tags.get) to retrieve tag IDs. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   configured_areas?: {
>     workflow_tagActionRecords?: {
>       Orchestration?: {
>         3060320000000666022?: {
>           RemoveTags?: {
>             name?: string | null,
>             rules?: {
>               subtype_name?: string | null,
>               subtype?: string | null,
>               module?: string | null,
>               name?: string | null,
>               execution_type?: string | null,
>               id?: string | null,
>               source?: number | null,
>               subtype_id?: string | null,
>               status?: string | null
>             }[] | null,
>             id?: string | null
>           }[] | null,
>           AddTags?: {
>             name?: string | null,
>             rules?: {
>               subtype_name?: string | null,
>               subtype?: string | null,
>               module?: string | null,
>               name?: string | null,
>               execution_type?: string | null,
>               id?: string | null,
>               source?: number | null,
>               subtype_id?: string | null,
>               status?: string | null
>             }[] | null,
>             id?: string | null
>           }[] | null
>         } | null
>       } | null,
>       Blueprint?: {
>         3060320000000666022?: {
>           RemoveTags?: {
>             name?: string | null,
>             rules?: {
>               subtype_name?: string | null,
>               subtype?: string | null,
>               module?: string | null,
>               name?: string | null,
>               execution_type?: string | null,
>               id?: string | null,
>               source?: number | null,
>               subtype_id?: string | null
>             }[] | null,
>             id?: string | null
>           }[] | null,
>           AddTags?: {
>             name?: string | null,
>             rules?: {
>               subtype_name?: string | null,
>               subtype?: string | null,
>               module?: string | null,
>               name?: string | null,
>               execution_type?: string | null,
>               id?: string | null,
>               source?: number | null,
>               subtype_id?: string | null
>             }[] | null,
>             id?: string | null
>           }[] | null
>         } | null
>       } | null,
>       Workflow?: {
>         3060320000000666022?: {
>           RemoveTags?: {
>             name?: string | null,
>             rules?: {
>               subtype?: string | null,
>               module?: string | null,
>               name?: string | null,
>               execution_type?: string | null,
>               id?: string | null,
>               source?: number | null,
>               subtype_id?: string | null
>             }[] | null,
>             id?: string | null
>           }[] | null,
>           AddTags?: {
>             name?: string | null,
>             rules?: {
>               subtype?: string | null,
>               module?: string | null,
>               name?: string | null,
>               execution_type?: string | null,
>               id?: string | null,
>               source?: number | null,
>               subtype_id?: string | null
>             }[] | null,
>             id?: string | null
>           }[] | null
>         } | null
>       } | null
>     } | null,
>     custom_view?: {
>       cvnames?: any[] | null,
>       inaccessible_custom_view_present?: boolean | null,
>       cvmodules?: any[] | null,
>       cvids?: any[] | null
>     } | null
>   } | null,
>   count?: string | null
> } | {
>   success: true
> }
> ```

***

### list

`tags.list`

Tags. To retrieve all tags associated with a module in your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.tags.list({ module: 'Leads' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the API name of the module. Refer to the [Get Modules](https://www.zoho.com/crm/developer/docs/api/v8/modules-api.html) resource for valid values. |
| `include` | `type \| associated_record_count \| last_accessed_time` | No | Specify the additional tag properties to include in the response. Possible values: **type**, **associated\_record\_count**, **last\_accessed\_time**. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   tags?: {
>     created_time?: string | null,
>     modified_time?: string | null,
>     name?: string | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     id?: string | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     color_code?: string | null | null
>   }[] | null,
>   info?: {
>     record_limit?: number | null,
>     count?: number | null,
>     allowed_count?: number | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### merge

`tags.merge`

Merge Tags. Merges two tags into one, combining their associated records and metadata. The tag specified in the path parameter (id) is the master tag that will remain after the merge. The conflict\_id in the request body specifies the tag to be merged into the master tag.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.tags.merge({
	id: '4876876000000333001',
	tags: [{}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Unique identifier of the record or tag. Use the [Get Tags API](tags.yaml#\$.paths./settings/tags.get) to retrieve tag IDs. |
| `tags` | `object[]` | Yes | Array containing the tag to merge (Required) |

> [accordion] tags full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   modified_time?: string | null,
>   color_code?: string | null,
>   conflict_id?: string | null
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tags` | `object[] \| null` | No | Array containing the merged tag details |

> [accordion] tags full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     created_time?: string | null,
>     modified_time?: string | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     id?: string | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     color_code?: string | null | null,
>     rid?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### removeFromRecord

`tags.removeFromRecord`

Remove Tags from a Record. Removes tags from a specific record in the specified module.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.tags.removeFromRecord({
	module: 'Leads',
	id: '4876876000000333001',
	tags: [{}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | The API name of the module to perform the operation on. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve the module API names. |
| `id` | `string` | Yes | Unique identifier of the record or tag. Use the [Get Tags API](tags.yaml#\$.paths./settings/tags.get) to retrieve tag IDs. |
| `ids` | `string[]` | No | The ids of the records to tag (up to 500). |
| `tags` | `object[]` | Yes | Array of tags to remove from the records (Required) |

> [accordion] tags full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   modified_time?: string | null,
>   color_code?: string | null,
>   conflict_id?: string | null
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | Array of operation results for each record |
| `locked_count` | `string \| null` | No | Number of records that were locked and could not be updated |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     modifiedTime?: string | null,
>     id?: string | null,
>     affected_data?: null | null,
>     tags?: {
>       name?: string | null,
>       id?: string | null,
>       color_code?: string | null | null,
>       rid?: string | null
>     }[] | null,
>     not_added_tags?: {
>       name?: string | null,
>       id?: string | null,
>       color_code?: string | null | null,
>       rid?: string | null
>     }[] | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### removeFromRecords

`tags.removeFromRecords`

Remove Tags from Records. Removes tags from one or more records in the specified module.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.tags.removeFromRecords({
	module: 'Leads',
	tags: [{}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | The API name of the module to perform the operation on. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve the module API names. |
| `ids` | `string[]` | No | The ids of the records to tag (up to 500). |
| `tags` | `object[]` | Yes | Array of tags to remove from the records (Required) |

> [accordion] tags full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   modified_time?: string | null,
>   color_code?: string | null,
>   conflict_id?: string | null
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | Array of operation results for each record |
| `locked_count` | `string \| null` | No | Number of records that were locked and could not be updated |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     modifiedTime?: string | null,
>     id?: string | null,
>     affected_data?: null | null,
>     tags?: {
>       name?: string | null,
>       id?: string | null,
>       color_code?: string | null | null,
>       rid?: string | null
>     }[] | null,
>     not_added_tags?: {
>       name?: string | null,
>       id?: string | null,
>       color_code?: string | null | null,
>       rid?: string | null
>     }[] | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### update

`tags.update`

Update tag by ID. To update the details of a specific tag by its ID in your Zoho CRM organization.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.tags.update({
	module: 'Leads',
	id: '4876876000000333001',
	tags: [{ name: 'example' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the API name of the module. Refer to the [Get Modules](https://www.zoho.com/crm/developer/docs/api/v8/modules-api.html) resource for valid values. |
| `id` | `string` | Yes | Specify the unique ID of the tag. |
| `tags` | `object[]` | Yes | Represents an array of tag objects to update. The array can contain a maximum of one item. |

> [accordion] tags full type
>
> ```ts theme={null}
> {
>   name: string,
>   color_code?: string | null
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tags` | `object[] \| null` | No | Represents an array containing the result of the tag update operation. |

> [accordion] tags full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     created_time?: string | null,
>     modified_time?: string | null,
>     name?: string | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     id?: string | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     color_code?: string | null | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### updateMany

`tags.updateMany`

Tags. To update an existing tag in your Zoho CRM organization.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.tags.updateMany({
	module: 'Leads',
	tags: [{ name: 'example' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the API name of the module. Refer to the [Get Modules](https://www.zoho.com/crm/developer/docs/api/v8/modules-api.html) resource for valid values. |
| `tags` | `object[]` | Yes | Represents an array of tag objects to update. The array can contain a maximum of one item. |

> [accordion] tags full type
>
> ```ts theme={null}
> {
>   name: string,
>   color_code?: string | null
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tags` | `object[] \| null` | No | Represents an array containing the result of the tag update operation. |

> [accordion] tags full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     created_time?: string | null,
>     modified_time?: string | null,
>     name?: string | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     id?: string | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     color_code?: string | null | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

## Territories

### assignToRecord

`territories.assignToRecord`

Assign territories to a record. To assign one or more territories to a single record in your Zoho CRM organization.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.territories.assignToRecord({
	record: '4876876000000333001',
	module: 'Leads',
	data: [{
		Territories: [{ id: '4876876000000333001' }],
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `record` | `string` | Yes | Represents the record path parameter, which specifies the unique identifier of the record for the territory operation. |
| `module` | `string` | Yes | Represents the module path parameter, which specifies the API name of the module for the territory operation. |
| `data` | `object[]` | Yes | Specify the list of records and their associated territories to assign. Each object must include a record ID and a **Territories** array. |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   id?: string,
>   Territories: {
>     id: string
>   }[]
> }[]
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data?: {
>     code?: string | null,
>     details?: {
>       id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   data?: {
>     code?: string | null,
>     details?: {
>       id?: string | null,
>       job_id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   data?: {
>     code?: string | null,
>     details?: {
>       id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> }
> ```

***

### assignToRecords

`territories.assignToRecords`

Assign territories to multiple records. To assign one or more territories to multiple records in your Zoho CRM organization.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.territories.assignToRecords({
	module: 'Leads',
	data: [{
		id: '4876876000000333001',
		Territories: [{ id: '4876876000000333001' }],
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Represents the module path parameter, which specifies the API name of the module for the territory operation. |
| `data` | `object[]` | Yes | Specify the list of records and their associated territories to assign. |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   id: string,
>   Territories: {
>     id: string
>   }[]
> }[]
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data?: {
>     code?: string | null,
>     details?: {
>       id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   data?: {
>     code?: string | null,
>     details?: {
>       id?: string | null,
>       job_id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   data?: {
>     code?: string | null,
>     details?: {
>       id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> }
> ```

***

### create

`territories.create`

Create Territories. To create one or more territories in your Zoho CRM organization.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.territories.create({
	territories: [{
		reporting_to: { id: '4876876000000333001' },
		permission_type: 'read_write_delete',
		name: 'example',
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `territories` | `object[]` | Yes | Specify the list of territories to create. |

> [accordion] territories full type
>
> ```ts theme={null}
> {
>   manager?: {
>     id: string
>   } | null,
>   reporting_to: {
>     id: string
>   } | null,
>   permission_type: read_write_delete | read_only,
>   description?: string | null,
>   account_rule_criteria?: {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: string,
>     value: (string | number | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     })[] | string | number | boolean | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     } | ${
>       EMPTY
>     } | ${
>       NOTEMPTY
>     } | ${
>       TODAY
>     } | ${
>       TOMORROW
>     } | ${
>       TOMORROWPLUS
>     } | ${
>       YESTERDAY
>     } | ${
>       YESTERDAYMINUS
>     } | ${
>       LASTMONTH
>     } | ${
>       THISMONTH
>     } | ${
>       NEXTMONTH
>     } | ${
>       LASTWEEK
>     } | ${
>       THISWEEK
>     } | ${
>       NEXTWEEK
>     } | ${
>       THISYEAR
>     } | ${
>       THISFY
>     } | ${
>       THISFQ
>     } | ${
>       LASTYEAR
>     } | ${
>       PREVFY
>     } | ${
>       PREVFQ
>     } | ${
>       NEXTYEAR
>     } | ${
>       NEXTFY
>     } | ${
>       NEXTFQ
>     } | ${
>       EMPTY
>     } | ${
>       NOTEMPTY
>     } | string | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: string,
>     value: (string | number | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     })[] | string | number | boolean | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     } | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>     value: string[] | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: less_than | less_equal | greater_than | greater_equal,
>     value: string | number | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: between | not_between,
>     value: (string | number)[],
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: in | not_in,
>     value: (string | number)[],
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: include_all | include_any | exclude_all | exclude_any,
>     value: {
>       id: string & any,
>       name?: string
>     }[],
>     type?: merge_field | pre_defined | value | field
>   } | {
>     group: (
>       {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: string,
>         value: (string | number | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         })[] | string | number | boolean | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         } | ${
>           EMPTY
>         } | ${
>           NOTEMPTY
>         } | ${
>           TODAY
>         } | ${
>           TOMORROW
>         } | ${
>           TOMORROWPLUS
>         } | ${
>           YESTERDAY
>         } | ${
>           YESTERDAYMINUS
>         } | ${
>           LASTMONTH
>         } | ${
>           THISMONTH
>         } | ${
>           NEXTMONTH
>         } | ${
>           LASTWEEK
>         } | ${
>           THISWEEK
>         } | ${
>           NEXTWEEK
>         } | ${
>           THISYEAR
>         } | ${
>           THISFY
>         } | ${
>           THISFQ
>         } | ${
>           LASTYEAR
>         } | ${
>           PREVFY
>         } | ${
>           PREVFQ
>         } | ${
>           NEXTYEAR
>         } | ${
>           NEXTFY
>         } | ${
>           NEXTFQ
>         } | ${
>           EMPTY
>         } | ${
>           NOTEMPTY
>         } | string | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: string,
>         value: (string | number | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         })[] | string | number | boolean | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         } | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>         value: string[] | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: less_than | less_equal | greater_than | greater_equal,
>         value: string | number | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: between | not_between,
>         value: (string | number)[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: in | not_in,
>         value: (string | number)[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: include_all | include_any | exclude_all | exclude_any,
>         value: {
>           id: string & any,
>           name?: string
>         }[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         group: (
>           {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: string,
>             value: (string | number | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             })[] | string | number | boolean | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             } | ${
>               EMPTY
>             } | ${
>               NOTEMPTY
>             } | ${
>               TODAY
>             } | ${
>               TOMORROW
>             } | ${
>               TOMORROWPLUS
>             } | ${
>               YESTERDAY
>             } | ${
>               YESTERDAYMINUS
>             } | ${
>               LASTMONTH
>             } | ${
>               THISMONTH
>             } | ${
>               NEXTMONTH
>             } | ${
>               LASTWEEK
>             } | ${
>               THISWEEK
>             } | ${
>               NEXTWEEK
>             } | ${
>               THISYEAR
>             } | ${
>               THISFY
>             } | ${
>               THISFQ
>             } | ${
>               LASTYEAR
>             } | ${
>               PREVFY
>             } | ${
>               PREVFQ
>             } | ${
>               NEXTYEAR
>             } | ${
>               NEXTFY
>             } | ${
>               NEXTFQ
>             } | ${
>               EMPTY
>             } | ${
>               NOTEMPTY
>             } | string | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: string,
>             value: (string | number | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             })[] | string | number | boolean | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             } | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>             value: string[] | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: less_than | less_equal | greater_than | greater_equal,
>             value: string | number | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: between | not_between,
>             value: (string | number)[],
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: in | not_in,
>             value: (string | number)[],
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: include_all | include_any | exclude_all | exclude_any,
>             value: {
>               id: string & any,
>               name?: string
>             }[],
>             type?: merge_field | pre_defined | value | field
>           } | (recursive)
>         )[],
>         group_operator: AND | OR | and | or
>       }
>     )[],
>     group_operator: AND | OR | and | or
>   } | null,
>   deal_rule_criteria?: {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: string,
>     value: (string | number | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     })[] | string | number | boolean | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     } | ${
>       EMPTY
>     } | ${
>       NOTEMPTY
>     } | ${
>       TODAY
>     } | ${
>       TOMORROW
>     } | ${
>       TOMORROWPLUS
>     } | ${
>       YESTERDAY
>     } | ${
>       YESTERDAYMINUS
>     } | ${
>       LASTMONTH
>     } | ${
>       THISMONTH
>     } | ${
>       NEXTMONTH
>     } | ${
>       LASTWEEK
>     } | ${
>       THISWEEK
>     } | ${
>       NEXTWEEK
>     } | ${
>       THISYEAR
>     } | ${
>       THISFY
>     } | ${
>       THISFQ
>     } | ${
>       LASTYEAR
>     } | ${
>       PREVFY
>     } | ${
>       PREVFQ
>     } | ${
>       NEXTYEAR
>     } | ${
>       NEXTFY
>     } | ${
>       NEXTFQ
>     } | ${
>       EMPTY
>     } | ${
>       NOTEMPTY
>     } | string | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: string,
>     value: (string | number | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     })[] | string | number | boolean | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     } | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>     value: string[] | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: less_than | less_equal | greater_than | greater_equal,
>     value: string | number | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: between | not_between,
>     value: (string | number)[],
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: in | not_in,
>     value: (string | number)[],
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: include_all | include_any | exclude_all | exclude_any,
>     value: {
>       id: string & any,
>       name?: string
>     }[],
>     type?: merge_field | pre_defined | value | field
>   } | {
>     group: (
>       {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: string,
>         value: (string | number | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         })[] | string | number | boolean | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         } | ${
>           EMPTY
>         } | ${
>           NOTEMPTY
>         } | ${
>           TODAY
>         } | ${
>           TOMORROW
>         } | ${
>           TOMORROWPLUS
>         } | ${
>           YESTERDAY
>         } | ${
>           YESTERDAYMINUS
>         } | ${
>           LASTMONTH
>         } | ${
>           THISMONTH
>         } | ${
>           NEXTMONTH
>         } | ${
>           LASTWEEK
>         } | ${
>           THISWEEK
>         } | ${
>           NEXTWEEK
>         } | ${
>           THISYEAR
>         } | ${
>           THISFY
>         } | ${
>           THISFQ
>         } | ${
>           LASTYEAR
>         } | ${
>           PREVFY
>         } | ${
>           PREVFQ
>         } | ${
>           NEXTYEAR
>         } | ${
>           NEXTFY
>         } | ${
>           NEXTFQ
>         } | ${
>           EMPTY
>         } | ${
>           NOTEMPTY
>         } | string | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: string,
>         value: (string | number | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         })[] | string | number | boolean | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         } | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>         value: string[] | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: less_than | less_equal | greater_than | greater_equal,
>         value: string | number | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: between | not_between,
>         value: (string | number)[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: in | not_in,
>         value: (string | number)[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: include_all | include_any | exclude_all | exclude_any,
>         value: {
>           id: string & any,
>           name?: string
>         }[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         group: (
>           {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: string,
>             value: (string | number | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             })[] | string | number | boolean | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             } | ${
>               EMPTY
>             } | ${
>               NOTEMPTY
>             } | ${
>               TODAY
>             } | ${
>               TOMORROW
>             } | ${
>               TOMORROWPLUS
>             } | ${
>               YESTERDAY
>             } | ${
>               YESTERDAYMINUS
>             } | ${
>               LASTMONTH
>             } | ${
>               THISMONTH
>             } | ${
>               NEXTMONTH
>             } | ${
>               LASTWEEK
>             } | ${
>               THISWEEK
>             } | ${
>               NEXTWEEK
>             } | ${
>               THISYEAR
>             } | ${
>               THISFY
>             } | ${
>               THISFQ
>             } | ${
>               LASTYEAR
>             } | ${
>               PREVFY
>             } | ${
>               PREVFQ
>             } | ${
>               NEXTYEAR
>             } | ${
>               NEXTFY
>             } | ${
>               NEXTFQ
>             } | ${
>               EMPTY
>             } | ${
>               NOTEMPTY
>             } | string | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: string,
>             value: (string | number | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             })[] | string | number | boolean | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             } | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>             value: string[] | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: less_than | less_equal | greater_than | greater_equal,
>             value: string | number | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: between | not_between,
>             value: (string | number)[],
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: in | not_in,
>             value: (string | number)[],
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: include_all | include_any | exclude_all | exclude_any,
>             value: {
>               id: string & any,
>               name?: string
>             }[],
>             type?: merge_field | pre_defined | value | field
>           } | (recursive)
>         )[],
>         group_operator: AND | OR | and | or
>       }
>     )[],
>     group_operator: AND | OR | and | or
>   } | null,
>   lead_rule_criteria?: {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: string,
>     value: (string | number | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     })[] | string | number | boolean | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     } | ${
>       EMPTY
>     } | ${
>       NOTEMPTY
>     } | ${
>       TODAY
>     } | ${
>       TOMORROW
>     } | ${
>       TOMORROWPLUS
>     } | ${
>       YESTERDAY
>     } | ${
>       YESTERDAYMINUS
>     } | ${
>       LASTMONTH
>     } | ${
>       THISMONTH
>     } | ${
>       NEXTMONTH
>     } | ${
>       LASTWEEK
>     } | ${
>       THISWEEK
>     } | ${
>       NEXTWEEK
>     } | ${
>       THISYEAR
>     } | ${
>       THISFY
>     } | ${
>       THISFQ
>     } | ${
>       LASTYEAR
>     } | ${
>       PREVFY
>     } | ${
>       PREVFQ
>     } | ${
>       NEXTYEAR
>     } | ${
>       NEXTFY
>     } | ${
>       NEXTFQ
>     } | ${
>       EMPTY
>     } | ${
>       NOTEMPTY
>     } | string | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: string,
>     value: (string | number | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     })[] | string | number | boolean | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     } | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>     value: string[] | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: less_than | less_equal | greater_than | greater_equal,
>     value: string | number | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: between | not_between,
>     value: (string | number)[],
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: in | not_in,
>     value: (string | number)[],
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: include_all | include_any | exclude_all | exclude_any,
>     value: {
>       id: string & any,
>       name?: string
>     }[],
>     type?: merge_field | pre_defined | value | field
>   } | {
>     group: (
>       {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: string,
>         value: (string | number | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         })[] | string | number | boolean | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         } | ${
>           EMPTY
>         } | ${
>           NOTEMPTY
>         } | ${
>           TODAY
>         } | ${
>           TOMORROW
>         } | ${
>           TOMORROWPLUS
>         } | ${
>           YESTERDAY
>         } | ${
>           YESTERDAYMINUS
>         } | ${
>           LASTMONTH
>         } | ${
>           THISMONTH
>         } | ${
>           NEXTMONTH
>         } | ${
>           LASTWEEK
>         } | ${
>           THISWEEK
>         } | ${
>           NEXTWEEK
>         } | ${
>           THISYEAR
>         } | ${
>           THISFY
>         } | ${
>           THISFQ
>         } | ${
>           LASTYEAR
>         } | ${
>           PREVFY
>         } | ${
>           PREVFQ
>         } | ${
>           NEXTYEAR
>         } | ${
>           NEXTFY
>         } | ${
>           NEXTFQ
>         } | ${
>           EMPTY
>         } | ${
>           NOTEMPTY
>         } | string | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: string,
>         value: (string | number | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         })[] | string | number | boolean | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         } | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>         value: string[] | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: less_than | less_equal | greater_than | greater_equal,
>         value: string | number | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: between | not_between,
>         value: (string | number)[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: in | not_in,
>         value: (string | number)[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: include_all | include_any | exclude_all | exclude_any,
>         value: {
>           id: string & any,
>           name?: string
>         }[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         group: (
>           {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: string,
>             value: (string | number | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             })[] | string | number | boolean | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             } | ${
>               EMPTY
>             } | ${
>               NOTEMPTY
>             } | ${
>               TODAY
>             } | ${
>               TOMORROW
>             } | ${
>               TOMORROWPLUS
>             } | ${
>               YESTERDAY
>             } | ${
>               YESTERDAYMINUS
>             } | ${
>               LASTMONTH
>             } | ${
>               THISMONTH
>             } | ${
>               NEXTMONTH
>             } | ${
>               LASTWEEK
>             } | ${
>               THISWEEK
>             } | ${
>               NEXTWEEK
>             } | ${
>               THISYEAR
>             } | ${
>               THISFY
>             } | ${
>               THISFQ
>             } | ${
>               LASTYEAR
>             } | ${
>               PREVFY
>             } | ${
>               PREVFQ
>             } | ${
>               NEXTYEAR
>             } | ${
>               NEXTFY
>             } | ${
>               NEXTFQ
>             } | ${
>               EMPTY
>             } | ${
>               NOTEMPTY
>             } | string | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: string,
>             value: (string | number | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             })[] | string | number | boolean | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             } | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>             value: string[] | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: less_than | less_equal | greater_than | greater_equal,
>             value: string | number | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: between | not_between,
>             value: (string | number)[],
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: in | not_in,
>             value: (string | number)[],
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: include_all | include_any | exclude_all | exclude_any,
>             value: {
>               id: string & any,
>               name?: string
>             }[],
>             type?: merge_field | pre_defined | value | field
>           } | (recursive)
>         )[],
>         group_operator: AND | OR | and | or
>       }
>     )[],
>     group_operator: AND | OR | and | or
>   } | null,
>   name: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `territories` | `object[] \| null` | No | Represents the list of territory objects created by the request. |

> [accordion] territories full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### delete

`territories.delete`

Delete a territory by ID. To delete a specific territory from your Zoho CRM organization using its unique ID. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.territories.delete({ id: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Represents the ID path parameter, which specifies the unique identifier of the territory. |
| `delete_previous_forecasts` | `boolean` | No | Represents the delete\_previous\_forecasts query parameter, which specifies whether to delete previous forecast data when transferring and deleting a territory. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `territories` | `object[] \| null` | No | Represents the list of territory objects deleted by the request. |

> [accordion] territories full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### deleteMany

`territories.deleteMany`

Delete territories. To delete one or more territories from your Zoho CRM organization. The territories to delete are specified using the ids query parameter. Deleting a territory is irreversible; child territories must be transferred before a parent territory can be deleted. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.territories.deleteMany({
	ids: ['4876876000000333001'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `ids` | `string[]` | Yes | Specify the unique IDs of the territories you want to delete. Accepts comma-separated territory IDs. |
| `delete_previous_forecasts` | `boolean` | No | Represents the delete\_previous\_forecasts query parameter, which specifies whether to delete previous forecast data when transferring and deleting a territory. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `territories` | `object[] \| null` | No | Represents the list of territory objects deleted by the request. |

> [accordion] territories full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### get

`territories.get`

Get territory by ID. To retrieve the details of a specific territory in your Zoho CRM organization using its unique ID.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.territories.get({ id: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Represents the ID path parameter, which specifies the unique identifier of the territory. |
| `include` | `account_rule_criteria \| lead_rule_criteria \| deal_rule_criteria \| account_rule_criteria,lead_rule_criteria \| account_rule_criteria,deal_rule_criteria \| lead_rule_criteria,deal_rule_criteria \| account_rule_criteria,lead_rule_criteria,deal_rule_criteria` | No | Represents the include query parameter, which specifies the rule criteria to include in the response. Possible values: **account\_rule\_criteria**, **lead\_rule\_criteria**, **deal\_rule\_criteria**, **account\_rule\_criteria,lead\_rule\_criteria**, **account\_rule\_criteria,deal\_rule\_criteria**, **lead\_rule\_criteria,deal\_rule\_criteria**, **account\_rule\_criteria,lead\_rule\_criteria,deal\_rule\_criteria**. |
| `include_inner_details` | `manager.zuid,manager.status \| manager.zuid \| manager.status` | No | Represents the include\_inner\_details query parameter, which specifies the additional manager fields to include in the response. Possible values: **manager.zuid,manager.status**, **manager.zuid**, **manager.status**. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   territories?: {
>     created_time?: string | null,
>     modified_time?: string | null,
>     manager?: {
>       name?: string | null,
>       id?: string | null,
>       zuid?: string | null,
>       status?: string | null
>     } | null | null,
>     reporting_to?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     permission_type?: string | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     description?: string | null | null,
>     id?: string | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     account_rule_criteria?: {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: (string | number | {
>         id?: string & any | null,
>         name?: string & any | null
>       } | {
>         name?: string | null
>       } | {
>         id?: string | null,
>         name?: string | null
>       })[] | string | number | boolean | {
>         id?: string & any | null,
>         name?: string & any | null
>       } | {
>         name?: string | null
>       } | {
>         id?: string | null,
>         name?: string | null
>       } | string | string | string | string | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: (string | number | {
>         id?: string & any | null,
>         name?: string & any | null
>       } | {
>         name?: string | null
>       } | {
>         id?: string | null,
>         name?: string | null
>       })[] | string | number | boolean | {
>         id?: string & any | null,
>         name?: string & any | null
>       } | {
>         name?: string | null
>       } | {
>         id?: string | null,
>         name?: string | null
>       } | string | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: string[] | string | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: string | number | string | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: (string | number)[] | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: (string | number)[] | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: {
>         id?: string & any | null,
>         name?: string & any | null
>       }[] | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       group?: (
>         {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           })[] | string | number | boolean | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           } | string | string | string | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           })[] | string | number | boolean | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           } | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: string[] | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: string | number | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number)[] | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number)[] | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: {
>             id?: string & any | null,
>             name?: string & any | null
>           }[] | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           group?: (
>             {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               })[] | string | number | boolean | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               } | string | string | string | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               })[] | string | number | boolean | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               } | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: string[] | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: string | number | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number)[] | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number)[] | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: {
>                 id?: string & any | null,
>                 name?: string & any | null
>               }[] | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | (recursive)
>           )[] | null,
>           group_operator?: string | null,
>           $disrupted?: boolean | null
>         }
>       )[] | null,
>       group_operator?: string | null,
>       $disrupted?: boolean | null
>     } | null | null,
>     deal_rule_criteria?: {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: (string | number | {
>         id?: string & any | null,
>         name?: string & any | null
>       } | {
>         name?: string | null
>       } | {
>         id?: string | null,
>         name?: string | null
>       })[] | string | number | boolean | {
>         id?: string & any | null,
>         name?: string & any | null
>       } | {
>         name?: string | null
>       } | {
>         id?: string | null,
>         name?: string | null
>       } | string | string | string | string | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: (string | number | {
>         id?: string & any | null,
>         name?: string & any | null
>       } | {
>         name?: string | null
>       } | {
>         id?: string | null,
>         name?: string | null
>       })[] | string | number | boolean | {
>         id?: string & any | null,
>         name?: string & any | null
>       } | {
>         name?: string | null
>       } | {
>         id?: string | null,
>         name?: string | null
>       } | string | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: string[] | string | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: string | number | string | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: (string | number)[] | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: (string | number)[] | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: {
>         id?: string & any | null,
>         name?: string & any | null
>       }[] | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       group?: (
>         {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           })[] | string | number | boolean | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           } | string | string | string | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           })[] | string | number | boolean | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           } | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: string[] | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: string | number | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number)[] | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number)[] | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: {
>             id?: string & any | null,
>             name?: string & any | null
>           }[] | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           group?: (
>             {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               })[] | string | number | boolean | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               } | string | string | string | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               })[] | string | number | boolean | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               } | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: string[] | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: string | number | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number)[] | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number)[] | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: {
>                 id?: string & any | null,
>                 name?: string & any | null
>               }[] | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | (recursive)
>           )[] | null,
>           group_operator?: string | null,
>           $disrupted?: boolean | null
>         }
>       )[] | null,
>       group_operator?: string | null,
>       $disrupted?: boolean | null
>     } | null | null,
>     lead_rule_criteria?: {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: (string | number | {
>         id?: string & any | null,
>         name?: string & any | null
>       } | {
>         name?: string | null
>       } | {
>         id?: string | null,
>         name?: string | null
>       })[] | string | number | boolean | {
>         id?: string & any | null,
>         name?: string & any | null
>       } | {
>         name?: string | null
>       } | {
>         id?: string | null,
>         name?: string | null
>       } | string | string | string | string | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: (string | number | {
>         id?: string & any | null,
>         name?: string & any | null
>       } | {
>         name?: string | null
>       } | {
>         id?: string | null,
>         name?: string | null
>       })[] | string | number | boolean | {
>         id?: string & any | null,
>         name?: string & any | null
>       } | {
>         name?: string | null
>       } | {
>         id?: string | null,
>         name?: string | null
>       } | string | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: string[] | string | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: string | number | string | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: (string | number)[] | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: (string | number)[] | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: {
>         id?: string & any | null,
>         name?: string & any | null
>       }[] | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       group?: (
>         {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           })[] | string | number | boolean | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           } | string | string | string | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           })[] | string | number | boolean | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           } | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: string[] | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: string | number | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number)[] | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number)[] | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: {
>             id?: string & any | null,
>             name?: string & any | null
>           }[] | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           group?: (
>             {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               })[] | string | number | boolean | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               } | string | string | string | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               })[] | string | number | boolean | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               } | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: string[] | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: string | number | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number)[] | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number)[] | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: {
>                 id?: string & any | null,
>                 name?: string & any | null
>               }[] | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | (recursive)
>           )[] | null,
>           group_operator?: string | null,
>           $disrupted?: boolean | null
>         }
>       )[] | null,
>       group_operator?: string | null,
>       $disrupted?: boolean | null
>     } | null | null,
>     name?: string | null,
>     api_name?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### getAssociatedUsersCount

`territories.getAssociatedUsersCount`

Get territory-associated user counts. To retrieve the number of users associated with each territory in your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.territories.getAssociatedUsersCount({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `page` | `number \| string` | No | Represents the page query parameter, which specifies the page number for paginated results. |
| `per_page` | `number \| string` | No | Represents the per\_page query parameter, which specifies the number of records to return per page. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   associated_users_count?: {
>     count?: number | null,
>     territory?: {
>       id?: string | null,
>       name?: string | null
>     } | null
>   }[] | null,
>   info?: {
>     per_page?: number | null,
>     count?: number | null,
>     page?: number | null,
>     more_records?: boolean | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### getScheduledRunRuleJobs

`territories.getScheduledRunRuleJobs`

Get scheduled territory run rule job status. To retrieve the status of a scheduled territory rule execution job in your Zoho CRM organization by specifying the job\_id parameter.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.territories.getScheduledRunRuleJobs({ job_id: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `job_id` | `string` | Yes | Represents the job\_id query parameter, which specifies the unique identifier of the scheduled run rule job. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   scheduled_run_rule_jobs?: {
>     status?: string | null,
>     job_id?: string | null,
>     scheduled_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     scheduled_time?: string | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### list

`territories.list`

Get all territories. To retrieve the list of territories enabled for your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.territories.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `include` | `account_rule_criteria \| lead_rule_criteria \| deal_rule_criteria \| account_rule_criteria,lead_rule_criteria \| account_rule_criteria,deal_rule_criteria \| lead_rule_criteria,deal_rule_criteria \| account_rule_criteria,lead_rule_criteria,deal_rule_criteria` | No | Represents the include query parameter, which specifies the rule criteria to include in the response. Possible values: **account\_rule\_criteria**, **lead\_rule\_criteria**, **deal\_rule\_criteria**, **account\_rule\_criteria,lead\_rule\_criteria**, **account\_rule\_criteria,deal\_rule\_criteria**, **lead\_rule\_criteria,deal\_rule\_criteria**, **account\_rule\_criteria,lead\_rule\_criteria,deal\_rule\_criteria**. |
| `ids` | `string[]` | No | Represents the ids query parameter, which specifies the unique identifiers of the territories to retrieve. |
| `page` | `number \| string` | No | Represents the page query parameter, which specifies the page number for paginated results. |
| `per_page` | `number \| string` | No | Represents the per\_page query parameter, which specifies the number of records to return per page. |
| `filters` | `object` | No | Represents the top-level filter criterion for data selection, supporting both simple field-based filters and complex grouped filters with logical operators. |
| `include_inner_details` | `manager.zuid,manager.status \| manager.zuid \| manager.status` | No | Represents the include\_inner\_details query parameter, which specifies the additional manager fields to include in the response. Possible values: **manager.zuid,manager.status**, **manager.zuid**, **manager.status**. |

> [accordion] filters full type
>
> ```ts theme={null}
> {
>   field: {
>     id?: string,
>     api_name: string
>   },
>   comparator: string,
>   value: (string | number | {
>     id: string & any,
>     name?: string
>   } | {
>     name: string
>   } | {
>     id: string,
>     name?: string
>   })[] | string | number | boolean | {
>     id: string & any,
>     name?: string
>   } | {
>     name: string
>   } | {
>     id: string,
>     name?: string
>   } | ${
>     EMPTY
>   } | ${
>     NOTEMPTY
>   } | ${
>     TODAY
>   } | ${
>     TOMORROW
>   } | ${
>     TOMORROWPLUS
>   } | ${
>     YESTERDAY
>   } | ${
>     YESTERDAYMINUS
>   } | ${
>     LASTMONTH
>   } | ${
>     THISMONTH
>   } | ${
>     NEXTMONTH
>   } | ${
>     LASTWEEK
>   } | ${
>     THISWEEK
>   } | ${
>     NEXTWEEK
>   } | ${
>     THISYEAR
>   } | ${
>     THISFY
>   } | ${
>     THISFQ
>   } | ${
>     LASTYEAR
>   } | ${
>     PREVFY
>   } | ${
>     PREVFQ
>   } | ${
>     NEXTYEAR
>   } | ${
>     NEXTFY
>   } | ${
>     NEXTFQ
>   } | ${
>     EMPTY
>   } | ${
>     NOTEMPTY
>   } | string | string,
>   type?: merge_field | pre_defined | value | field
> } | {
>   field: {
>     id?: string,
>     api_name: string
>   },
>   comparator: string,
>   value: (string | number | {
>     id: string & any,
>     name?: string
>   } | {
>     name: string
>   } | {
>     id: string,
>     name?: string
>   })[] | string | number | boolean | {
>     id: string & any,
>     name?: string
>   } | {
>     name: string
>   } | {
>     id: string,
>     name?: string
>   } | string,
>   type?: merge_field | pre_defined | value | field
> } | {
>   field: {
>     id?: string,
>     api_name: string
>   },
>   comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>   value: string[] | string,
>   type?: merge_field | pre_defined | value | field
> } | {
>   field: {
>     id?: string,
>     api_name: string
>   },
>   comparator: less_than | less_equal | greater_than | greater_equal,
>   value: string | number | string,
>   type?: merge_field | pre_defined | value | field
> } | {
>   field: {
>     id?: string,
>     api_name: string
>   },
>   comparator: between | not_between,
>   value: (string | number)[],
>   type?: merge_field | pre_defined | value | field
> } | {
>   field: {
>     id?: string,
>     api_name: string
>   },
>   comparator: in | not_in,
>   value: (string | number)[],
>   type?: merge_field | pre_defined | value | field
> } | {
>   field: {
>     id?: string,
>     api_name: string
>   },
>   comparator: include_all | include_any | exclude_all | exclude_any,
>   value: {
>     id: string & any,
>     name?: string
>   }[],
>   type?: merge_field | pre_defined | value | field
> } | {
>   group: (
>     {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: string,
>       value: (string | number | {
>         id: string & any,
>         name?: string
>       } | {
>         name: string
>       } | {
>         id: string,
>         name?: string
>       })[] | string | number | boolean | {
>         id: string & any,
>         name?: string
>       } | {
>         name: string
>       } | {
>         id: string,
>         name?: string
>       } | ${
>         EMPTY
>       } | ${
>         NOTEMPTY
>       } | ${
>         TODAY
>       } | ${
>         TOMORROW
>       } | ${
>         TOMORROWPLUS
>       } | ${
>         YESTERDAY
>       } | ${
>         YESTERDAYMINUS
>       } | ${
>         LASTMONTH
>       } | ${
>         THISMONTH
>       } | ${
>         NEXTMONTH
>       } | ${
>         LASTWEEK
>       } | ${
>         THISWEEK
>       } | ${
>         NEXTWEEK
>       } | ${
>         THISYEAR
>       } | ${
>         THISFY
>       } | ${
>         THISFQ
>       } | ${
>         LASTYEAR
>       } | ${
>         PREVFY
>       } | ${
>         PREVFQ
>       } | ${
>         NEXTYEAR
>       } | ${
>         NEXTFY
>       } | ${
>         NEXTFQ
>       } | ${
>         EMPTY
>       } | ${
>         NOTEMPTY
>       } | string | string,
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: string,
>       value: (string | number | {
>         id: string & any,
>         name?: string
>       } | {
>         name: string
>       } | {
>         id: string,
>         name?: string
>       })[] | string | number | boolean | {
>         id: string & any,
>         name?: string
>       } | {
>         name: string
>       } | {
>         id: string,
>         name?: string
>       } | string,
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>       value: string[] | string,
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: less_than | less_equal | greater_than | greater_equal,
>       value: string | number | string,
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: between | not_between,
>       value: (string | number)[],
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: in | not_in,
>       value: (string | number)[],
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: include_all | include_any | exclude_all | exclude_any,
>       value: {
>         id: string & any,
>         name?: string
>       }[],
>       type?: merge_field | pre_defined | value | field
>     } | {
>       group: (
>         {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: string,
>           value: (string | number | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           })[] | string | number | boolean | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           } | ${
>             EMPTY
>           } | ${
>             NOTEMPTY
>           } | ${
>             TODAY
>           } | ${
>             TOMORROW
>           } | ${
>             TOMORROWPLUS
>           } | ${
>             YESTERDAY
>           } | ${
>             YESTERDAYMINUS
>           } | ${
>             LASTMONTH
>           } | ${
>             THISMONTH
>           } | ${
>             NEXTMONTH
>           } | ${
>             LASTWEEK
>           } | ${
>             THISWEEK
>           } | ${
>             NEXTWEEK
>           } | ${
>             THISYEAR
>           } | ${
>             THISFY
>           } | ${
>             THISFQ
>           } | ${
>             LASTYEAR
>           } | ${
>             PREVFY
>           } | ${
>             PREVFQ
>           } | ${
>             NEXTYEAR
>           } | ${
>             NEXTFY
>           } | ${
>             NEXTFQ
>           } | ${
>             EMPTY
>           } | ${
>             NOTEMPTY
>           } | string | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: string,
>           value: (string | number | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           })[] | string | number | boolean | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           } | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>           value: string[] | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: less_than | less_equal | greater_than | greater_equal,
>           value: string | number | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: between | not_between,
>           value: (string | number)[],
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: in | not_in,
>           value: (string | number)[],
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: include_all | include_any | exclude_all | exclude_any,
>           value: {
>             id: string & any,
>             name?: string
>           }[],
>           type?: merge_field | pre_defined | value | field
>         } | (recursive)
>       )[],
>       group_operator: AND | OR | and | or
>     }
>   )[],
>   group_operator: AND | OR | and | or
> }
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   territories?: {
>     created_time?: string | null,
>     modified_time?: string | null,
>     manager?: {
>       name?: string | null,
>       id?: string | null,
>       zuid?: string | null,
>       status?: string | null
>     } | null | null,
>     reporting_to?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     permission_type?: string | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     description?: string | null | null,
>     id?: string | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     account_rule_criteria?: {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: (string | number | {
>         id?: string & any | null,
>         name?: string & any | null
>       } | {
>         name?: string | null
>       } | {
>         id?: string | null,
>         name?: string | null
>       })[] | string | number | boolean | {
>         id?: string & any | null,
>         name?: string & any | null
>       } | {
>         name?: string | null
>       } | {
>         id?: string | null,
>         name?: string | null
>       } | string | string | string | string | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: (string | number | {
>         id?: string & any | null,
>         name?: string & any | null
>       } | {
>         name?: string | null
>       } | {
>         id?: string | null,
>         name?: string | null
>       })[] | string | number | boolean | {
>         id?: string & any | null,
>         name?: string & any | null
>       } | {
>         name?: string | null
>       } | {
>         id?: string | null,
>         name?: string | null
>       } | string | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: string[] | string | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: string | number | string | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: (string | number)[] | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: (string | number)[] | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: {
>         id?: string & any | null,
>         name?: string & any | null
>       }[] | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       group?: (
>         {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           })[] | string | number | boolean | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           } | string | string | string | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           })[] | string | number | boolean | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           } | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: string[] | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: string | number | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number)[] | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number)[] | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: {
>             id?: string & any | null,
>             name?: string & any | null
>           }[] | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           group?: (
>             {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               })[] | string | number | boolean | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               } | string | string | string | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               })[] | string | number | boolean | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               } | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: string[] | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: string | number | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number)[] | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number)[] | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: {
>                 id?: string & any | null,
>                 name?: string & any | null
>               }[] | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | (recursive)
>           )[] | null,
>           group_operator?: string | null,
>           $disrupted?: boolean | null
>         }
>       )[] | null,
>       group_operator?: string | null,
>       $disrupted?: boolean | null
>     } | null | null,
>     deal_rule_criteria?: {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: (string | number | {
>         id?: string & any | null,
>         name?: string & any | null
>       } | {
>         name?: string | null
>       } | {
>         id?: string | null,
>         name?: string | null
>       })[] | string | number | boolean | {
>         id?: string & any | null,
>         name?: string & any | null
>       } | {
>         name?: string | null
>       } | {
>         id?: string | null,
>         name?: string | null
>       } | string | string | string | string | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: (string | number | {
>         id?: string & any | null,
>         name?: string & any | null
>       } | {
>         name?: string | null
>       } | {
>         id?: string | null,
>         name?: string | null
>       })[] | string | number | boolean | {
>         id?: string & any | null,
>         name?: string & any | null
>       } | {
>         name?: string | null
>       } | {
>         id?: string | null,
>         name?: string | null
>       } | string | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: string[] | string | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: string | number | string | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: (string | number)[] | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: (string | number)[] | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: {
>         id?: string & any | null,
>         name?: string & any | null
>       }[] | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       group?: (
>         {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           })[] | string | number | boolean | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           } | string | string | string | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           })[] | string | number | boolean | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           } | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: string[] | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: string | number | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number)[] | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number)[] | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: {
>             id?: string & any | null,
>             name?: string & any | null
>           }[] | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           group?: (
>             {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               })[] | string | number | boolean | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               } | string | string | string | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               })[] | string | number | boolean | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               } | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: string[] | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: string | number | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number)[] | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number)[] | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: {
>                 id?: string & any | null,
>                 name?: string & any | null
>               }[] | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | (recursive)
>           )[] | null,
>           group_operator?: string | null,
>           $disrupted?: boolean | null
>         }
>       )[] | null,
>       group_operator?: string | null,
>       $disrupted?: boolean | null
>     } | null | null,
>     lead_rule_criteria?: {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: (string | number | {
>         id?: string & any | null,
>         name?: string & any | null
>       } | {
>         name?: string | null
>       } | {
>         id?: string | null,
>         name?: string | null
>       })[] | string | number | boolean | {
>         id?: string & any | null,
>         name?: string & any | null
>       } | {
>         name?: string | null
>       } | {
>         id?: string | null,
>         name?: string | null
>       } | string | string | string | string | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: (string | number | {
>         id?: string & any | null,
>         name?: string & any | null
>       } | {
>         name?: string | null
>       } | {
>         id?: string | null,
>         name?: string | null
>       })[] | string | number | boolean | {
>         id?: string & any | null,
>         name?: string & any | null
>       } | {
>         name?: string | null
>       } | {
>         id?: string | null,
>         name?: string | null
>       } | string | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: string[] | string | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: string | number | string | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: (string | number)[] | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: (string | number)[] | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: {
>         id?: string & any | null,
>         name?: string & any | null
>       }[] | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       group?: (
>         {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           })[] | string | number | boolean | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           } | string | string | string | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           })[] | string | number | boolean | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           } | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: string[] | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: string | number | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number)[] | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number)[] | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: {
>             id?: string & any | null,
>             name?: string & any | null
>           }[] | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           group?: (
>             {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               })[] | string | number | boolean | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               } | string | string | string | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               })[] | string | number | boolean | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               } | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: string[] | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: string | number | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number)[] | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number)[] | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: {
>                 id?: string & any | null,
>                 name?: string & any | null
>               }[] | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | (recursive)
>           )[] | null,
>           group_operator?: string | null,
>           $disrupted?: boolean | null
>         }
>       )[] | null,
>       group_operator?: string | null,
>       $disrupted?: boolean | null
>     } | null | null,
>     name?: string | null,
>     api_name?: string | null
>   }[] | null,
>   info?: {
>     per_page?: number | null,
>     count?: number | null,
>     page?: number | null,
>     more_records?: boolean | null
>   } | null
> } | {
>   territories?: {
>     created_time?: string | null,
>     modified_time?: string | null,
>     manager?: {
>       name?: string | null,
>       id?: string | null,
>       zuid?: string | null,
>       status?: string | null
>     } | null | null,
>     reporting_to?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     permission_type?: string | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     description?: string | null | null,
>     id?: string | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     account_rule_criteria?: {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: (string | number | {
>         id?: string & any | null,
>         name?: string & any | null
>       } | {
>         name?: string | null
>       } | {
>         id?: string | null,
>         name?: string | null
>       })[] | string | number | boolean | {
>         id?: string & any | null,
>         name?: string & any | null
>       } | {
>         name?: string | null
>       } | {
>         id?: string | null,
>         name?: string | null
>       } | string | string | string | string | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: (string | number | {
>         id?: string & any | null,
>         name?: string & any | null
>       } | {
>         name?: string | null
>       } | {
>         id?: string | null,
>         name?: string | null
>       })[] | string | number | boolean | {
>         id?: string & any | null,
>         name?: string & any | null
>       } | {
>         name?: string | null
>       } | {
>         id?: string | null,
>         name?: string | null
>       } | string | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: string[] | string | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: string | number | string | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: (string | number)[] | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: (string | number)[] | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: {
>         id?: string & any | null,
>         name?: string & any | null
>       }[] | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       group?: (
>         {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           })[] | string | number | boolean | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           } | string | string | string | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           })[] | string | number | boolean | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           } | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: string[] | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: string | number | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number)[] | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number)[] | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: {
>             id?: string & any | null,
>             name?: string & any | null
>           }[] | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           group?: (
>             {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               })[] | string | number | boolean | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               } | string | string | string | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               })[] | string | number | boolean | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               } | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: string[] | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: string | number | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number)[] | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number)[] | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: {
>                 id?: string & any | null,
>                 name?: string & any | null
>               }[] | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | (recursive)
>           )[] | null,
>           group_operator?: string | null,
>           $disrupted?: boolean | null
>         }
>       )[] | null,
>       group_operator?: string | null,
>       $disrupted?: boolean | null
>     } | null | null,
>     deal_rule_criteria?: {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: (string | number | {
>         id?: string & any | null,
>         name?: string & any | null
>       } | {
>         name?: string | null
>       } | {
>         id?: string | null,
>         name?: string | null
>       })[] | string | number | boolean | {
>         id?: string & any | null,
>         name?: string & any | null
>       } | {
>         name?: string | null
>       } | {
>         id?: string | null,
>         name?: string | null
>       } | string | string | string | string | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: (string | number | {
>         id?: string & any | null,
>         name?: string & any | null
>       } | {
>         name?: string | null
>       } | {
>         id?: string | null,
>         name?: string | null
>       })[] | string | number | boolean | {
>         id?: string & any | null,
>         name?: string & any | null
>       } | {
>         name?: string | null
>       } | {
>         id?: string | null,
>         name?: string | null
>       } | string | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: string[] | string | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: string | number | string | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: (string | number)[] | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: (string | number)[] | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: {
>         id?: string & any | null,
>         name?: string & any | null
>       }[] | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       group?: (
>         {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           })[] | string | number | boolean | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           } | string | string | string | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           })[] | string | number | boolean | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           } | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: string[] | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: string | number | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number)[] | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number)[] | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: {
>             id?: string & any | null,
>             name?: string & any | null
>           }[] | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           group?: (
>             {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               })[] | string | number | boolean | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               } | string | string | string | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               })[] | string | number | boolean | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               } | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: string[] | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: string | number | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number)[] | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number)[] | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: {
>                 id?: string & any | null,
>                 name?: string & any | null
>               }[] | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | (recursive)
>           )[] | null,
>           group_operator?: string | null,
>           $disrupted?: boolean | null
>         }
>       )[] | null,
>       group_operator?: string | null,
>       $disrupted?: boolean | null
>     } | null | null,
>     lead_rule_criteria?: {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: (string | number | {
>         id?: string & any | null,
>         name?: string & any | null
>       } | {
>         name?: string | null
>       } | {
>         id?: string | null,
>         name?: string | null
>       })[] | string | number | boolean | {
>         id?: string & any | null,
>         name?: string & any | null
>       } | {
>         name?: string | null
>       } | {
>         id?: string | null,
>         name?: string | null
>       } | string | string | string | string | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: (string | number | {
>         id?: string & any | null,
>         name?: string & any | null
>       } | {
>         name?: string | null
>       } | {
>         id?: string | null,
>         name?: string | null
>       })[] | string | number | boolean | {
>         id?: string & any | null,
>         name?: string & any | null
>       } | {
>         name?: string | null
>       } | {
>         id?: string | null,
>         name?: string | null
>       } | string | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: string[] | string | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: string | number | string | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: (string | number)[] | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: (string | number)[] | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: {
>         id?: string & any | null,
>         name?: string & any | null
>       }[] | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       group?: (
>         {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           })[] | string | number | boolean | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           } | string | string | string | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           })[] | string | number | boolean | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           } | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: string[] | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: string | number | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number)[] | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number)[] | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: {
>             id?: string & any | null,
>             name?: string & any | null
>           }[] | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           group?: (
>             {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               })[] | string | number | boolean | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               } | string | string | string | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               })[] | string | number | boolean | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               } | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: string[] | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: string | number | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number)[] | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number)[] | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: {
>                 id?: string & any | null,
>                 name?: string & any | null
>               }[] | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | (recursive)
>           )[] | null,
>           group_operator?: string | null,
>           $disrupted?: boolean | null
>         }
>       )[] | null,
>       group_operator?: string | null,
>       $disrupted?: boolean | null
>     } | null | null,
>     name?: string | null,
>     api_name?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### listChildren

`territories.listChildren`

Get child territories by parent territory ID. To retrieve the list of child territories for a specific parent territory in your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.territories.listChildren({ id: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `include` | `account_rule_criteria \| lead_rule_criteria \| deal_rule_criteria \| account_rule_criteria,lead_rule_criteria \| account_rule_criteria,deal_rule_criteria \| lead_rule_criteria,deal_rule_criteria \| account_rule_criteria,lead_rule_criteria,deal_rule_criteria` | No | Represents the include query parameter, which specifies the rule criteria to include in the response. Possible values: **account\_rule\_criteria**, **lead\_rule\_criteria**, **deal\_rule\_criteria**, **account\_rule\_criteria,lead\_rule\_criteria**, **account\_rule\_criteria,deal\_rule\_criteria**, **lead\_rule\_criteria,deal\_rule\_criteria**, **account\_rule\_criteria,lead\_rule\_criteria,deal\_rule\_criteria**. |
| `id` | `string` | Yes | Represents the ID path parameter, which specifies the unique identifier of the territory. |
| `page` | `number \| string` | No | Represents the page query parameter, which specifies the page number for paginated results. |
| `per_page` | `number \| string` | No | Represents the per\_page query parameter, which specifies the number of records to return per page. |
| `filters` | `object` | No | Represents the top-level filter criterion for data selection, supporting both simple field-based filters and complex grouped filters with logical operators. |
| `include_inner_details` | `manager.zuid,manager.status \| manager.zuid \| manager.status` | No | Represents the include\_inner\_details query parameter, which specifies the additional manager fields to include in the response. Possible values: **manager.zuid,manager.status**, **manager.zuid**, **manager.status**. |

> [accordion] filters full type
>
> ```ts theme={null}
> {
>   field: {
>     id?: string,
>     api_name: string
>   },
>   comparator: string,
>   value: (string | number | {
>     id: string & any,
>     name?: string
>   } | {
>     name: string
>   } | {
>     id: string,
>     name?: string
>   })[] | string | number | boolean | {
>     id: string & any,
>     name?: string
>   } | {
>     name: string
>   } | {
>     id: string,
>     name?: string
>   } | ${
>     EMPTY
>   } | ${
>     NOTEMPTY
>   } | ${
>     TODAY
>   } | ${
>     TOMORROW
>   } | ${
>     TOMORROWPLUS
>   } | ${
>     YESTERDAY
>   } | ${
>     YESTERDAYMINUS
>   } | ${
>     LASTMONTH
>   } | ${
>     THISMONTH
>   } | ${
>     NEXTMONTH
>   } | ${
>     LASTWEEK
>   } | ${
>     THISWEEK
>   } | ${
>     NEXTWEEK
>   } | ${
>     THISYEAR
>   } | ${
>     THISFY
>   } | ${
>     THISFQ
>   } | ${
>     LASTYEAR
>   } | ${
>     PREVFY
>   } | ${
>     PREVFQ
>   } | ${
>     NEXTYEAR
>   } | ${
>     NEXTFY
>   } | ${
>     NEXTFQ
>   } | ${
>     EMPTY
>   } | ${
>     NOTEMPTY
>   } | string | string,
>   type?: merge_field | pre_defined | value | field
> } | {
>   field: {
>     id?: string,
>     api_name: string
>   },
>   comparator: string,
>   value: (string | number | {
>     id: string & any,
>     name?: string
>   } | {
>     name: string
>   } | {
>     id: string,
>     name?: string
>   })[] | string | number | boolean | {
>     id: string & any,
>     name?: string
>   } | {
>     name: string
>   } | {
>     id: string,
>     name?: string
>   } | string,
>   type?: merge_field | pre_defined | value | field
> } | {
>   field: {
>     id?: string,
>     api_name: string
>   },
>   comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>   value: string[] | string,
>   type?: merge_field | pre_defined | value | field
> } | {
>   field: {
>     id?: string,
>     api_name: string
>   },
>   comparator: less_than | less_equal | greater_than | greater_equal,
>   value: string | number | string,
>   type?: merge_field | pre_defined | value | field
> } | {
>   field: {
>     id?: string,
>     api_name: string
>   },
>   comparator: between | not_between,
>   value: (string | number)[],
>   type?: merge_field | pre_defined | value | field
> } | {
>   field: {
>     id?: string,
>     api_name: string
>   },
>   comparator: in | not_in,
>   value: (string | number)[],
>   type?: merge_field | pre_defined | value | field
> } | {
>   field: {
>     id?: string,
>     api_name: string
>   },
>   comparator: include_all | include_any | exclude_all | exclude_any,
>   value: {
>     id: string & any,
>     name?: string
>   }[],
>   type?: merge_field | pre_defined | value | field
> } | {
>   group: (
>     {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: string,
>       value: (string | number | {
>         id: string & any,
>         name?: string
>       } | {
>         name: string
>       } | {
>         id: string,
>         name?: string
>       })[] | string | number | boolean | {
>         id: string & any,
>         name?: string
>       } | {
>         name: string
>       } | {
>         id: string,
>         name?: string
>       } | ${
>         EMPTY
>       } | ${
>         NOTEMPTY
>       } | ${
>         TODAY
>       } | ${
>         TOMORROW
>       } | ${
>         TOMORROWPLUS
>       } | ${
>         YESTERDAY
>       } | ${
>         YESTERDAYMINUS
>       } | ${
>         LASTMONTH
>       } | ${
>         THISMONTH
>       } | ${
>         NEXTMONTH
>       } | ${
>         LASTWEEK
>       } | ${
>         THISWEEK
>       } | ${
>         NEXTWEEK
>       } | ${
>         THISYEAR
>       } | ${
>         THISFY
>       } | ${
>         THISFQ
>       } | ${
>         LASTYEAR
>       } | ${
>         PREVFY
>       } | ${
>         PREVFQ
>       } | ${
>         NEXTYEAR
>       } | ${
>         NEXTFY
>       } | ${
>         NEXTFQ
>       } | ${
>         EMPTY
>       } | ${
>         NOTEMPTY
>       } | string | string,
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: string,
>       value: (string | number | {
>         id: string & any,
>         name?: string
>       } | {
>         name: string
>       } | {
>         id: string,
>         name?: string
>       })[] | string | number | boolean | {
>         id: string & any,
>         name?: string
>       } | {
>         name: string
>       } | {
>         id: string,
>         name?: string
>       } | string,
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>       value: string[] | string,
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: less_than | less_equal | greater_than | greater_equal,
>       value: string | number | string,
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: between | not_between,
>       value: (string | number)[],
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: in | not_in,
>       value: (string | number)[],
>       type?: merge_field | pre_defined | value | field
>     } | {
>       field: {
>         id?: string,
>         api_name: string
>       },
>       comparator: include_all | include_any | exclude_all | exclude_any,
>       value: {
>         id: string & any,
>         name?: string
>       }[],
>       type?: merge_field | pre_defined | value | field
>     } | {
>       group: (
>         {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: string,
>           value: (string | number | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           })[] | string | number | boolean | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           } | ${
>             EMPTY
>           } | ${
>             NOTEMPTY
>           } | ${
>             TODAY
>           } | ${
>             TOMORROW
>           } | ${
>             TOMORROWPLUS
>           } | ${
>             YESTERDAY
>           } | ${
>             YESTERDAYMINUS
>           } | ${
>             LASTMONTH
>           } | ${
>             THISMONTH
>           } | ${
>             NEXTMONTH
>           } | ${
>             LASTWEEK
>           } | ${
>             THISWEEK
>           } | ${
>             NEXTWEEK
>           } | ${
>             THISYEAR
>           } | ${
>             THISFY
>           } | ${
>             THISFQ
>           } | ${
>             LASTYEAR
>           } | ${
>             PREVFY
>           } | ${
>             PREVFQ
>           } | ${
>             NEXTYEAR
>           } | ${
>             NEXTFY
>           } | ${
>             NEXTFQ
>           } | ${
>             EMPTY
>           } | ${
>             NOTEMPTY
>           } | string | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: string,
>           value: (string | number | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           })[] | string | number | boolean | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           } | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>           value: string[] | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: less_than | less_equal | greater_than | greater_equal,
>           value: string | number | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: between | not_between,
>           value: (string | number)[],
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: in | not_in,
>           value: (string | number)[],
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: include_all | include_any | exclude_all | exclude_any,
>           value: {
>             id: string & any,
>             name?: string
>           }[],
>           type?: merge_field | pre_defined | value | field
>         } | (recursive)
>       )[],
>       group_operator: AND | OR | and | or
>     }
>   )[],
>   group_operator: AND | OR | and | or
> }
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   territories?: {
>     created_time?: string | null,
>     modified_time?: string | null,
>     manager?: {
>       name?: string | null,
>       id?: string | null,
>       zuid?: string | null,
>       status?: string | null
>     } | null | null,
>     reporting_to?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     permission_type?: string | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     description?: string | null | null,
>     id?: string | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     account_rule_criteria?: {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: (string | number | {
>         id?: string & any | null,
>         name?: string & any | null
>       } | {
>         name?: string | null
>       } | {
>         id?: string | null,
>         name?: string | null
>       })[] | string | number | boolean | {
>         id?: string & any | null,
>         name?: string & any | null
>       } | {
>         name?: string | null
>       } | {
>         id?: string | null,
>         name?: string | null
>       } | string | string | string | string | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: (string | number | {
>         id?: string & any | null,
>         name?: string & any | null
>       } | {
>         name?: string | null
>       } | {
>         id?: string | null,
>         name?: string | null
>       })[] | string | number | boolean | {
>         id?: string & any | null,
>         name?: string & any | null
>       } | {
>         name?: string | null
>       } | {
>         id?: string | null,
>         name?: string | null
>       } | string | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: string[] | string | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: string | number | string | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: (string | number)[] | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: (string | number)[] | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: {
>         id?: string & any | null,
>         name?: string & any | null
>       }[] | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       group?: (
>         {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           })[] | string | number | boolean | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           } | string | string | string | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           })[] | string | number | boolean | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           } | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: string[] | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: string | number | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number)[] | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number)[] | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: {
>             id?: string & any | null,
>             name?: string & any | null
>           }[] | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           group?: (
>             {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               })[] | string | number | boolean | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               } | string | string | string | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               })[] | string | number | boolean | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               } | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: string[] | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: string | number | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number)[] | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number)[] | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: {
>                 id?: string & any | null,
>                 name?: string & any | null
>               }[] | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | (recursive)
>           )[] | null,
>           group_operator?: string | null,
>           $disrupted?: boolean | null
>         }
>       )[] | null,
>       group_operator?: string | null,
>       $disrupted?: boolean | null
>     } | null | null,
>     deal_rule_criteria?: {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: (string | number | {
>         id?: string & any | null,
>         name?: string & any | null
>       } | {
>         name?: string | null
>       } | {
>         id?: string | null,
>         name?: string | null
>       })[] | string | number | boolean | {
>         id?: string & any | null,
>         name?: string & any | null
>       } | {
>         name?: string | null
>       } | {
>         id?: string | null,
>         name?: string | null
>       } | string | string | string | string | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: (string | number | {
>         id?: string & any | null,
>         name?: string & any | null
>       } | {
>         name?: string | null
>       } | {
>         id?: string | null,
>         name?: string | null
>       })[] | string | number | boolean | {
>         id?: string & any | null,
>         name?: string & any | null
>       } | {
>         name?: string | null
>       } | {
>         id?: string | null,
>         name?: string | null
>       } | string | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: string[] | string | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: string | number | string | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: (string | number)[] | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: (string | number)[] | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: {
>         id?: string & any | null,
>         name?: string & any | null
>       }[] | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       group?: (
>         {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           })[] | string | number | boolean | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           } | string | string | string | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           })[] | string | number | boolean | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           } | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: string[] | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: string | number | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number)[] | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number)[] | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: {
>             id?: string & any | null,
>             name?: string & any | null
>           }[] | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           group?: (
>             {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               })[] | string | number | boolean | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               } | string | string | string | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               })[] | string | number | boolean | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               } | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: string[] | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: string | number | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number)[] | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number)[] | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: {
>                 id?: string & any | null,
>                 name?: string & any | null
>               }[] | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | (recursive)
>           )[] | null,
>           group_operator?: string | null,
>           $disrupted?: boolean | null
>         }
>       )[] | null,
>       group_operator?: string | null,
>       $disrupted?: boolean | null
>     } | null | null,
>     lead_rule_criteria?: {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: (string | number | {
>         id?: string & any | null,
>         name?: string & any | null
>       } | {
>         name?: string | null
>       } | {
>         id?: string | null,
>         name?: string | null
>       })[] | string | number | boolean | {
>         id?: string & any | null,
>         name?: string & any | null
>       } | {
>         name?: string | null
>       } | {
>         id?: string | null,
>         name?: string | null
>       } | string | string | string | string | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: (string | number | {
>         id?: string & any | null,
>         name?: string & any | null
>       } | {
>         name?: string | null
>       } | {
>         id?: string | null,
>         name?: string | null
>       })[] | string | number | boolean | {
>         id?: string & any | null,
>         name?: string & any | null
>       } | {
>         name?: string | null
>       } | {
>         id?: string | null,
>         name?: string | null
>       } | string | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: string[] | string | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: string | number | string | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: (string | number)[] | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: (string | number)[] | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       field?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       comparator?: string | null,
>       value?: {
>         id?: string & any | null,
>         name?: string & any | null
>       }[] | null,
>       type?: string | null,
>       $disrupted?: boolean | null
>     } | {
>       group?: (
>         {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           })[] | string | number | boolean | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           } | string | string | string | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           })[] | string | number | boolean | {
>             id?: string & any | null,
>             name?: string & any | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           } | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: string[] | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: string | number | string | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number)[] | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number)[] | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: {
>             id?: string & any | null,
>             name?: string & any | null
>           }[] | null,
>           type?: string | null,
>           $disrupted?: boolean | null
>         } | {
>           group?: (
>             {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               })[] | string | number | boolean | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               } | string | string | string | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               })[] | string | number | boolean | {
>                 id?: string & any | null,
>                 name?: string & any | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               } | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: string[] | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: string | number | string | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number)[] | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number)[] | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: {
>                 id?: string & any | null,
>                 name?: string & any | null
>               }[] | null,
>               type?: string | null,
>               $disrupted?: boolean | null
>             } | (recursive)
>           )[] | null,
>           group_operator?: string | null,
>           $disrupted?: boolean | null
>         }
>       )[] | null,
>       group_operator?: string | null,
>       $disrupted?: boolean | null
>     } | null | null,
>     name?: string | null,
>     api_name?: string | null
>   }[] | null,
>   info?: {
>     per_page?: number | null,
>     count?: number | null,
>     page?: number | null,
>     more_records?: boolean | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### removeFromRecord

`territories.removeFromRecord`

Remove territories from a record. To remove one or more territories from a single record in your Zoho CRM organization. This operation is supported for records in the Leads, Accounts, Contacts, and Deals modules.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.territories.removeFromRecord({
	record: '4876876000000333001',
	module: 'Leads',
	data: [{
		Territories: [{ id: '4876876000000333001' }],
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `record` | `string` | Yes | Represents the record path parameter, which specifies the unique identifier of the record for the territory operation. |
| `module` | `string` | Yes | Represents the module path parameter, which specifies the API name of the module for the territory operation. |
| `data` | `object[]` | Yes | Specify the list of records and their associated territories to remove from the record. |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   id?: string,
>   Territories: {
>     id: string
>   }[]
> }[]
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data?: {
>     code?: string | null,
>     details?: {
>       id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   data?: {
>     code?: string | null,
>     details?: {
>       id?: string | null,
>       job_id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   data?: {
>     code?: string | null,
>     details?: {
>       id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> }
> ```

***

### removeFromRecords

`territories.removeFromRecords`

Remove territories from multiple records. To remove one or more territories from multiple records in your Zoho CRM organization. Supported modules are Leads, Accounts, Contacts, and Deals. The removal can be processed synchronously or scheduled as a background job, depending on the number of records.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.territories.removeFromRecords({
	module: 'Leads',
	data: [{
		id: '4876876000000333001',
		Territories: [{ id: '4876876000000333001' }],
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Represents the module path parameter, which specifies the API name of the module for the territory operation. |
| `data` | `object[]` | Yes | Specify the list of records and their associated territories to remove. |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   id: string,
>   Territories: {
>     id: string
>   }[]
> }[]
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data?: {
>     code?: string | null,
>     details?: {
>       id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   data?: {
>     code?: string | null,
>     details?: {
>       id?: string | null,
>       job_id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   data?: {
>     code?: string | null,
>     details?: {
>       id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> }
> ```

***

### runRules

`territories.runRules`

Run territory assignment rules. To schedule territory assignment rules to run against records in a specified module in your Zoho CRM organization. The rules can be applied based on filter criteria, a Custom View, or specific territories, and the execution is queued as a background job.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.territories.runRules({
	run_rules: {
		module: 'Leads',
		based_on: 'example',
		criteria: {
			field: { api_name: 'example' },
			comparator: 'example',
			value: 'example',
		},
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `run_rules` | `object` | Yes | Specify the configuration for territory rule execution. The **run\_rules** object must match one of three execution methods: criteria-based, Custom View-based, or territory-based. |

> [accordion] run\_rules full type
>
> ```ts theme={null}
> {
>   module: any | any,
>   based_on: string,
>   criteria: {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: string,
>     value: (string | number | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     })[] | string | number | boolean | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     } | ${
>       EMPTY
>     } | ${
>       NOTEMPTY
>     } | ${
>       TODAY
>     } | ${
>       TOMORROW
>     } | ${
>       TOMORROWPLUS
>     } | ${
>       YESTERDAY
>     } | ${
>       YESTERDAYMINUS
>     } | ${
>       LASTMONTH
>     } | ${
>       THISMONTH
>     } | ${
>       NEXTMONTH
>     } | ${
>       LASTWEEK
>     } | ${
>       THISWEEK
>     } | ${
>       NEXTWEEK
>     } | ${
>       THISYEAR
>     } | ${
>       THISFY
>     } | ${
>       THISFQ
>     } | ${
>       LASTYEAR
>     } | ${
>       PREVFY
>     } | ${
>       PREVFQ
>     } | ${
>       NEXTYEAR
>     } | ${
>       NEXTFY
>     } | ${
>       NEXTFQ
>     } | ${
>       EMPTY
>     } | ${
>       NOTEMPTY
>     } | string | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: string,
>     value: (string | number | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     })[] | string | number | boolean | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     } | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>     value: string[] | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: less_than | less_equal | greater_than | greater_equal,
>     value: string | number | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: between | not_between,
>     value: (string | number)[],
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: in | not_in,
>     value: (string | number)[],
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: include_all | include_any | exclude_all | exclude_any,
>     value: {
>       id: string & any,
>       name?: string
>     }[],
>     type?: merge_field | pre_defined | value | field
>   } | {
>     group: (
>       {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: string,
>         value: (string | number | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         })[] | string | number | boolean | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         } | ${
>           EMPTY
>         } | ${
>           NOTEMPTY
>         } | ${
>           TODAY
>         } | ${
>           TOMORROW
>         } | ${
>           TOMORROWPLUS
>         } | ${
>           YESTERDAY
>         } | ${
>           YESTERDAYMINUS
>         } | ${
>           LASTMONTH
>         } | ${
>           THISMONTH
>         } | ${
>           NEXTMONTH
>         } | ${
>           LASTWEEK
>         } | ${
>           THISWEEK
>         } | ${
>           NEXTWEEK
>         } | ${
>           THISYEAR
>         } | ${
>           THISFY
>         } | ${
>           THISFQ
>         } | ${
>           LASTYEAR
>         } | ${
>           PREVFY
>         } | ${
>           PREVFQ
>         } | ${
>           NEXTYEAR
>         } | ${
>           NEXTFY
>         } | ${
>           NEXTFQ
>         } | ${
>           EMPTY
>         } | ${
>           NOTEMPTY
>         } | string | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: string,
>         value: (string | number | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         })[] | string | number | boolean | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         } | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>         value: string[] | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: less_than | less_equal | greater_than | greater_equal,
>         value: string | number | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: between | not_between,
>         value: (string | number)[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: in | not_in,
>         value: (string | number)[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: include_all | include_any | exclude_all | exclude_any,
>         value: {
>           id: string & any,
>           name?: string
>         }[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         group: (
>           {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: string,
>             value: (string | number | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             })[] | string | number | boolean | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             } | ${
>               EMPTY
>             } | ${
>               NOTEMPTY
>             } | ${
>               TODAY
>             } | ${
>               TOMORROW
>             } | ${
>               TOMORROWPLUS
>             } | ${
>               YESTERDAY
>             } | ${
>               YESTERDAYMINUS
>             } | ${
>               LASTMONTH
>             } | ${
>               THISMONTH
>             } | ${
>               NEXTMONTH
>             } | ${
>               LASTWEEK
>             } | ${
>               THISWEEK
>             } | ${
>               NEXTWEEK
>             } | ${
>               THISYEAR
>             } | ${
>               THISFY
>             } | ${
>               THISFQ
>             } | ${
>               LASTYEAR
>             } | ${
>               PREVFY
>             } | ${
>               PREVFQ
>             } | ${
>               NEXTYEAR
>             } | ${
>               NEXTFY
>             } | ${
>               NEXTFQ
>             } | ${
>               EMPTY
>             } | ${
>               NOTEMPTY
>             } | string | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: string,
>             value: (string | number | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             })[] | string | number | boolean | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             } | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>             value: string[] | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: less_than | less_equal | greater_than | greater_equal,
>             value: string | number | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: between | not_between,
>             value: (string | number)[],
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: in | not_in,
>             value: (string | number)[],
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: include_all | include_any | exclude_all | exclude_any,
>             value: {
>               id: string & any,
>               name?: string
>             }[],
>             type?: merge_field | pre_defined | value | field
>           } | (recursive)
>         )[],
>         group_operator: AND | OR | and | or
>       }
>     )[],
>     group_operator: AND | OR | and | or
>   }
> } | {
>   module: any | any,
>   based_on: string,
>   custom_view: any | any
> } | {
>   module: any | any,
>   based_on: string,
>   territories: {
>     id: string
>   }[],
>   include_child?: boolean
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `run_rules` | `object \| null` | No | Represents the result of the scheduled territory rules execution. |

> [accordion] run\_rules full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     job_id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> } | null
> ```

***

### transferAndDelete

`territories.transferAndDelete`

Transfer and delete a specific territory by ID. To transfer child territories to a target parent territory and then delete a specific territory from your Zoho CRM organization. This operation is required for territories that have child territories, as they cannot be directly deleted using the Delete Territories API.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.territories.transferAndDelete({
	id: '4876876000000333001',
	territories: [{ transfer_to_id: 'example' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Represents the ID path parameter, which specifies the unique identifier of the territory. |
| `territories` | `object[]` | Yes | Specify the transfer details for the territory to delete. |

> [accordion] territories full type
>
> ```ts theme={null}
> {
>   id?: string,
>   transfer_to_id: string,
>   delete_previous_forecasts?: boolean
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `territories` | `object[] \| null` | No | Represents the list of territory objects transferred and deleted by the request. |

> [accordion] territories full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### transferAndDeleteMany

`territories.transferAndDeleteMany`

Transfer and delete territories. To transfer records from one or more territories to a target territory and then delete those territories in your Zoho CRM organization.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.territories.transferAndDeleteMany({
	territories: [{ id: '4876876000000333001' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `territories` | `object[]` | Yes | Specify the list of territories to transfer records from and delete. |

> [accordion] territories full type
>
> ```ts theme={null}
> {
>   id: string,
>   transfer_to_id?: string,
>   delete_previous_forecasts?: boolean
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `territories` | `object[] \| null` | No | Represents the list of territory objects transferred and deleted by the request. |

> [accordion] territories full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### update

`territories.update`

Update a specific territory by its ID. To update the details of a specific territory by its unique ID in your Zoho CRM organization.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.territories.update({
	id: '4876876000000333001',
	territories: [{}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Represents the ID path parameter, which specifies the unique identifier of the territory. |
| `territories` | `object[]` | Yes | Specify the list containing the territory to update. |

> [accordion] territories full type
>
> ```ts theme={null}
> {
>   manager?: {
>     id: string
>   } | null,
>   reporting_to?: {
>     id: string
>   } | null,
>   permission_type?: read_write_delete | read_only,
>   description?: string | null,
>   id?: string,
>   name?: string,
>   account_rule_criteria?: {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: string,
>     value: (string | number | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     })[] | string | number | boolean | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     } | ${
>       EMPTY
>     } | ${
>       NOTEMPTY
>     } | ${
>       TODAY
>     } | ${
>       TOMORROW
>     } | ${
>       TOMORROWPLUS
>     } | ${
>       YESTERDAY
>     } | ${
>       YESTERDAYMINUS
>     } | ${
>       LASTMONTH
>     } | ${
>       THISMONTH
>     } | ${
>       NEXTMONTH
>     } | ${
>       LASTWEEK
>     } | ${
>       THISWEEK
>     } | ${
>       NEXTWEEK
>     } | ${
>       THISYEAR
>     } | ${
>       THISFY
>     } | ${
>       THISFQ
>     } | ${
>       LASTYEAR
>     } | ${
>       PREVFY
>     } | ${
>       PREVFQ
>     } | ${
>       NEXTYEAR
>     } | ${
>       NEXTFY
>     } | ${
>       NEXTFQ
>     } | ${
>       EMPTY
>     } | ${
>       NOTEMPTY
>     } | string | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: string,
>     value: (string | number | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     })[] | string | number | boolean | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     } | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>     value: string[] | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: less_than | less_equal | greater_than | greater_equal,
>     value: string | number | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: between | not_between,
>     value: (string | number)[],
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: in | not_in,
>     value: (string | number)[],
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: include_all | include_any | exclude_all | exclude_any,
>     value: {
>       id: string & any,
>       name?: string
>     }[],
>     type?: merge_field | pre_defined | value | field
>   } | {
>     group: (
>       {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: string,
>         value: (string | number | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         })[] | string | number | boolean | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         } | ${
>           EMPTY
>         } | ${
>           NOTEMPTY
>         } | ${
>           TODAY
>         } | ${
>           TOMORROW
>         } | ${
>           TOMORROWPLUS
>         } | ${
>           YESTERDAY
>         } | ${
>           YESTERDAYMINUS
>         } | ${
>           LASTMONTH
>         } | ${
>           THISMONTH
>         } | ${
>           NEXTMONTH
>         } | ${
>           LASTWEEK
>         } | ${
>           THISWEEK
>         } | ${
>           NEXTWEEK
>         } | ${
>           THISYEAR
>         } | ${
>           THISFY
>         } | ${
>           THISFQ
>         } | ${
>           LASTYEAR
>         } | ${
>           PREVFY
>         } | ${
>           PREVFQ
>         } | ${
>           NEXTYEAR
>         } | ${
>           NEXTFY
>         } | ${
>           NEXTFQ
>         } | ${
>           EMPTY
>         } | ${
>           NOTEMPTY
>         } | string | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: string,
>         value: (string | number | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         })[] | string | number | boolean | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         } | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>         value: string[] | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: less_than | less_equal | greater_than | greater_equal,
>         value: string | number | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: between | not_between,
>         value: (string | number)[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: in | not_in,
>         value: (string | number)[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: include_all | include_any | exclude_all | exclude_any,
>         value: {
>           id: string & any,
>           name?: string
>         }[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         group: (
>           {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: string,
>             value: (string | number | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             })[] | string | number | boolean | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             } | ${
>               EMPTY
>             } | ${
>               NOTEMPTY
>             } | ${
>               TODAY
>             } | ${
>               TOMORROW
>             } | ${
>               TOMORROWPLUS
>             } | ${
>               YESTERDAY
>             } | ${
>               YESTERDAYMINUS
>             } | ${
>               LASTMONTH
>             } | ${
>               THISMONTH
>             } | ${
>               NEXTMONTH
>             } | ${
>               LASTWEEK
>             } | ${
>               THISWEEK
>             } | ${
>               NEXTWEEK
>             } | ${
>               THISYEAR
>             } | ${
>               THISFY
>             } | ${
>               THISFQ
>             } | ${
>               LASTYEAR
>             } | ${
>               PREVFY
>             } | ${
>               PREVFQ
>             } | ${
>               NEXTYEAR
>             } | ${
>               NEXTFY
>             } | ${
>               NEXTFQ
>             } | ${
>               EMPTY
>             } | ${
>               NOTEMPTY
>             } | string | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: string,
>             value: (string | number | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             })[] | string | number | boolean | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             } | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>             value: string[] | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: less_than | less_equal | greater_than | greater_equal,
>             value: string | number | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: between | not_between,
>             value: (string | number)[],
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: in | not_in,
>             value: (string | number)[],
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: include_all | include_any | exclude_all | exclude_any,
>             value: {
>               id: string & any,
>               name?: string
>             }[],
>             type?: merge_field | pre_defined | value | field
>           } | (recursive)
>         )[],
>         group_operator: AND | OR | and | or
>       }
>     )[],
>     group_operator: AND | OR | and | or
>   } | null,
>   deal_rule_criteria?: {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: string,
>     value: (string | number | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     })[] | string | number | boolean | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     } | ${
>       EMPTY
>     } | ${
>       NOTEMPTY
>     } | ${
>       TODAY
>     } | ${
>       TOMORROW
>     } | ${
>       TOMORROWPLUS
>     } | ${
>       YESTERDAY
>     } | ${
>       YESTERDAYMINUS
>     } | ${
>       LASTMONTH
>     } | ${
>       THISMONTH
>     } | ${
>       NEXTMONTH
>     } | ${
>       LASTWEEK
>     } | ${
>       THISWEEK
>     } | ${
>       NEXTWEEK
>     } | ${
>       THISYEAR
>     } | ${
>       THISFY
>     } | ${
>       THISFQ
>     } | ${
>       LASTYEAR
>     } | ${
>       PREVFY
>     } | ${
>       PREVFQ
>     } | ${
>       NEXTYEAR
>     } | ${
>       NEXTFY
>     } | ${
>       NEXTFQ
>     } | ${
>       EMPTY
>     } | ${
>       NOTEMPTY
>     } | string | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: string,
>     value: (string | number | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     })[] | string | number | boolean | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     } | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>     value: string[] | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: less_than | less_equal | greater_than | greater_equal,
>     value: string | number | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: between | not_between,
>     value: (string | number)[],
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: in | not_in,
>     value: (string | number)[],
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: include_all | include_any | exclude_all | exclude_any,
>     value: {
>       id: string & any,
>       name?: string
>     }[],
>     type?: merge_field | pre_defined | value | field
>   } | {
>     group: (
>       {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: string,
>         value: (string | number | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         })[] | string | number | boolean | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         } | ${
>           EMPTY
>         } | ${
>           NOTEMPTY
>         } | ${
>           TODAY
>         } | ${
>           TOMORROW
>         } | ${
>           TOMORROWPLUS
>         } | ${
>           YESTERDAY
>         } | ${
>           YESTERDAYMINUS
>         } | ${
>           LASTMONTH
>         } | ${
>           THISMONTH
>         } | ${
>           NEXTMONTH
>         } | ${
>           LASTWEEK
>         } | ${
>           THISWEEK
>         } | ${
>           NEXTWEEK
>         } | ${
>           THISYEAR
>         } | ${
>           THISFY
>         } | ${
>           THISFQ
>         } | ${
>           LASTYEAR
>         } | ${
>           PREVFY
>         } | ${
>           PREVFQ
>         } | ${
>           NEXTYEAR
>         } | ${
>           NEXTFY
>         } | ${
>           NEXTFQ
>         } | ${
>           EMPTY
>         } | ${
>           NOTEMPTY
>         } | string | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: string,
>         value: (string | number | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         })[] | string | number | boolean | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         } | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>         value: string[] | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: less_than | less_equal | greater_than | greater_equal,
>         value: string | number | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: between | not_between,
>         value: (string | number)[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: in | not_in,
>         value: (string | number)[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: include_all | include_any | exclude_all | exclude_any,
>         value: {
>           id: string & any,
>           name?: string
>         }[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         group: (
>           {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: string,
>             value: (string | number | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             })[] | string | number | boolean | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             } | ${
>               EMPTY
>             } | ${
>               NOTEMPTY
>             } | ${
>               TODAY
>             } | ${
>               TOMORROW
>             } | ${
>               TOMORROWPLUS
>             } | ${
>               YESTERDAY
>             } | ${
>               YESTERDAYMINUS
>             } | ${
>               LASTMONTH
>             } | ${
>               THISMONTH
>             } | ${
>               NEXTMONTH
>             } | ${
>               LASTWEEK
>             } | ${
>               THISWEEK
>             } | ${
>               NEXTWEEK
>             } | ${
>               THISYEAR
>             } | ${
>               THISFY
>             } | ${
>               THISFQ
>             } | ${
>               LASTYEAR
>             } | ${
>               PREVFY
>             } | ${
>               PREVFQ
>             } | ${
>               NEXTYEAR
>             } | ${
>               NEXTFY
>             } | ${
>               NEXTFQ
>             } | ${
>               EMPTY
>             } | ${
>               NOTEMPTY
>             } | string | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: string,
>             value: (string | number | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             })[] | string | number | boolean | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             } | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>             value: string[] | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: less_than | less_equal | greater_than | greater_equal,
>             value: string | number | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: between | not_between,
>             value: (string | number)[],
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: in | not_in,
>             value: (string | number)[],
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: include_all | include_any | exclude_all | exclude_any,
>             value: {
>               id: string & any,
>               name?: string
>             }[],
>             type?: merge_field | pre_defined | value | field
>           } | (recursive)
>         )[],
>         group_operator: AND | OR | and | or
>       }
>     )[],
>     group_operator: AND | OR | and | or
>   } | null,
>   lead_rule_criteria?: {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: string,
>     value: (string | number | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     })[] | string | number | boolean | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     } | ${
>       EMPTY
>     } | ${
>       NOTEMPTY
>     } | ${
>       TODAY
>     } | ${
>       TOMORROW
>     } | ${
>       TOMORROWPLUS
>     } | ${
>       YESTERDAY
>     } | ${
>       YESTERDAYMINUS
>     } | ${
>       LASTMONTH
>     } | ${
>       THISMONTH
>     } | ${
>       NEXTMONTH
>     } | ${
>       LASTWEEK
>     } | ${
>       THISWEEK
>     } | ${
>       NEXTWEEK
>     } | ${
>       THISYEAR
>     } | ${
>       THISFY
>     } | ${
>       THISFQ
>     } | ${
>       LASTYEAR
>     } | ${
>       PREVFY
>     } | ${
>       PREVFQ
>     } | ${
>       NEXTYEAR
>     } | ${
>       NEXTFY
>     } | ${
>       NEXTFQ
>     } | ${
>       EMPTY
>     } | ${
>       NOTEMPTY
>     } | string | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: string,
>     value: (string | number | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     })[] | string | number | boolean | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     } | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>     value: string[] | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: less_than | less_equal | greater_than | greater_equal,
>     value: string | number | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: between | not_between,
>     value: (string | number)[],
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: in | not_in,
>     value: (string | number)[],
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: include_all | include_any | exclude_all | exclude_any,
>     value: {
>       id: string & any,
>       name?: string
>     }[],
>     type?: merge_field | pre_defined | value | field
>   } | {
>     group: (
>       {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: string,
>         value: (string | number | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         })[] | string | number | boolean | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         } | ${
>           EMPTY
>         } | ${
>           NOTEMPTY
>         } | ${
>           TODAY
>         } | ${
>           TOMORROW
>         } | ${
>           TOMORROWPLUS
>         } | ${
>           YESTERDAY
>         } | ${
>           YESTERDAYMINUS
>         } | ${
>           LASTMONTH
>         } | ${
>           THISMONTH
>         } | ${
>           NEXTMONTH
>         } | ${
>           LASTWEEK
>         } | ${
>           THISWEEK
>         } | ${
>           NEXTWEEK
>         } | ${
>           THISYEAR
>         } | ${
>           THISFY
>         } | ${
>           THISFQ
>         } | ${
>           LASTYEAR
>         } | ${
>           PREVFY
>         } | ${
>           PREVFQ
>         } | ${
>           NEXTYEAR
>         } | ${
>           NEXTFY
>         } | ${
>           NEXTFQ
>         } | ${
>           EMPTY
>         } | ${
>           NOTEMPTY
>         } | string | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: string,
>         value: (string | number | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         })[] | string | number | boolean | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         } | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>         value: string[] | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: less_than | less_equal | greater_than | greater_equal,
>         value: string | number | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: between | not_between,
>         value: (string | number)[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: in | not_in,
>         value: (string | number)[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: include_all | include_any | exclude_all | exclude_any,
>         value: {
>           id: string & any,
>           name?: string
>         }[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         group: (
>           {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: string,
>             value: (string | number | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             })[] | string | number | boolean | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             } | ${
>               EMPTY
>             } | ${
>               NOTEMPTY
>             } | ${
>               TODAY
>             } | ${
>               TOMORROW
>             } | ${
>               TOMORROWPLUS
>             } | ${
>               YESTERDAY
>             } | ${
>               YESTERDAYMINUS
>             } | ${
>               LASTMONTH
>             } | ${
>               THISMONTH
>             } | ${
>               NEXTMONTH
>             } | ${
>               LASTWEEK
>             } | ${
>               THISWEEK
>             } | ${
>               NEXTWEEK
>             } | ${
>               THISYEAR
>             } | ${
>               THISFY
>             } | ${
>               THISFQ
>             } | ${
>               LASTYEAR
>             } | ${
>               PREVFY
>             } | ${
>               PREVFQ
>             } | ${
>               NEXTYEAR
>             } | ${
>               NEXTFY
>             } | ${
>               NEXTFQ
>             } | ${
>               EMPTY
>             } | ${
>               NOTEMPTY
>             } | string | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: string,
>             value: (string | number | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             })[] | string | number | boolean | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             } | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>             value: string[] | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: less_than | less_equal | greater_than | greater_equal,
>             value: string | number | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: between | not_between,
>             value: (string | number)[],
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: in | not_in,
>             value: (string | number)[],
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: include_all | include_any | exclude_all | exclude_any,
>             value: {
>               id: string & any,
>               name?: string
>             }[],
>             type?: merge_field | pre_defined | value | field
>           } | (recursive)
>         )[],
>         group_operator: AND | OR | and | or
>       }
>     )[],
>     group_operator: AND | OR | and | or
>   } | null
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `territories` | `object[] \| null` | No | Represents the list of territory objects updated by the request. |

> [accordion] territories full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### updateMany

`territories.updateMany`

Update territories. To update the details of one or more territories in your Zoho CRM organization.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.territories.updateMany({
	territories: [{ id: '4876876000000333001' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `territories` | `object[]` | Yes | Specify the list of territories to update. |

> [accordion] territories full type
>
> ```ts theme={null}
> {
>   manager?: {
>     id: string
>   } | null,
>   reporting_to?: {
>     id: string
>   } | null,
>   permission_type?: read_write_delete | read_only,
>   description?: string | null,
>   id: string,
>   name?: string,
>   account_rule_criteria?: {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: string,
>     value: (string | number | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     })[] | string | number | boolean | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     } | ${
>       EMPTY
>     } | ${
>       NOTEMPTY
>     } | ${
>       TODAY
>     } | ${
>       TOMORROW
>     } | ${
>       TOMORROWPLUS
>     } | ${
>       YESTERDAY
>     } | ${
>       YESTERDAYMINUS
>     } | ${
>       LASTMONTH
>     } | ${
>       THISMONTH
>     } | ${
>       NEXTMONTH
>     } | ${
>       LASTWEEK
>     } | ${
>       THISWEEK
>     } | ${
>       NEXTWEEK
>     } | ${
>       THISYEAR
>     } | ${
>       THISFY
>     } | ${
>       THISFQ
>     } | ${
>       LASTYEAR
>     } | ${
>       PREVFY
>     } | ${
>       PREVFQ
>     } | ${
>       NEXTYEAR
>     } | ${
>       NEXTFY
>     } | ${
>       NEXTFQ
>     } | ${
>       EMPTY
>     } | ${
>       NOTEMPTY
>     } | string | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: string,
>     value: (string | number | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     })[] | string | number | boolean | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     } | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>     value: string[] | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: less_than | less_equal | greater_than | greater_equal,
>     value: string | number | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: between | not_between,
>     value: (string | number)[],
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: in | not_in,
>     value: (string | number)[],
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: include_all | include_any | exclude_all | exclude_any,
>     value: {
>       id: string & any,
>       name?: string
>     }[],
>     type?: merge_field | pre_defined | value | field
>   } | {
>     group: (
>       {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: string,
>         value: (string | number | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         })[] | string | number | boolean | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         } | ${
>           EMPTY
>         } | ${
>           NOTEMPTY
>         } | ${
>           TODAY
>         } | ${
>           TOMORROW
>         } | ${
>           TOMORROWPLUS
>         } | ${
>           YESTERDAY
>         } | ${
>           YESTERDAYMINUS
>         } | ${
>           LASTMONTH
>         } | ${
>           THISMONTH
>         } | ${
>           NEXTMONTH
>         } | ${
>           LASTWEEK
>         } | ${
>           THISWEEK
>         } | ${
>           NEXTWEEK
>         } | ${
>           THISYEAR
>         } | ${
>           THISFY
>         } | ${
>           THISFQ
>         } | ${
>           LASTYEAR
>         } | ${
>           PREVFY
>         } | ${
>           PREVFQ
>         } | ${
>           NEXTYEAR
>         } | ${
>           NEXTFY
>         } | ${
>           NEXTFQ
>         } | ${
>           EMPTY
>         } | ${
>           NOTEMPTY
>         } | string | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: string,
>         value: (string | number | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         })[] | string | number | boolean | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         } | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>         value: string[] | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: less_than | less_equal | greater_than | greater_equal,
>         value: string | number | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: between | not_between,
>         value: (string | number)[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: in | not_in,
>         value: (string | number)[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: include_all | include_any | exclude_all | exclude_any,
>         value: {
>           id: string & any,
>           name?: string
>         }[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         group: (
>           {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: string,
>             value: (string | number | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             })[] | string | number | boolean | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             } | ${
>               EMPTY
>             } | ${
>               NOTEMPTY
>             } | ${
>               TODAY
>             } | ${
>               TOMORROW
>             } | ${
>               TOMORROWPLUS
>             } | ${
>               YESTERDAY
>             } | ${
>               YESTERDAYMINUS
>             } | ${
>               LASTMONTH
>             } | ${
>               THISMONTH
>             } | ${
>               NEXTMONTH
>             } | ${
>               LASTWEEK
>             } | ${
>               THISWEEK
>             } | ${
>               NEXTWEEK
>             } | ${
>               THISYEAR
>             } | ${
>               THISFY
>             } | ${
>               THISFQ
>             } | ${
>               LASTYEAR
>             } | ${
>               PREVFY
>             } | ${
>               PREVFQ
>             } | ${
>               NEXTYEAR
>             } | ${
>               NEXTFY
>             } | ${
>               NEXTFQ
>             } | ${
>               EMPTY
>             } | ${
>               NOTEMPTY
>             } | string | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: string,
>             value: (string | number | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             })[] | string | number | boolean | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             } | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>             value: string[] | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: less_than | less_equal | greater_than | greater_equal,
>             value: string | number | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: between | not_between,
>             value: (string | number)[],
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: in | not_in,
>             value: (string | number)[],
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: include_all | include_any | exclude_all | exclude_any,
>             value: {
>               id: string & any,
>               name?: string
>             }[],
>             type?: merge_field | pre_defined | value | field
>           } | (recursive)
>         )[],
>         group_operator: AND | OR | and | or
>       }
>     )[],
>     group_operator: AND | OR | and | or
>   } | null,
>   deal_rule_criteria?: {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: string,
>     value: (string | number | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     })[] | string | number | boolean | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     } | ${
>       EMPTY
>     } | ${
>       NOTEMPTY
>     } | ${
>       TODAY
>     } | ${
>       TOMORROW
>     } | ${
>       TOMORROWPLUS
>     } | ${
>       YESTERDAY
>     } | ${
>       YESTERDAYMINUS
>     } | ${
>       LASTMONTH
>     } | ${
>       THISMONTH
>     } | ${
>       NEXTMONTH
>     } | ${
>       LASTWEEK
>     } | ${
>       THISWEEK
>     } | ${
>       NEXTWEEK
>     } | ${
>       THISYEAR
>     } | ${
>       THISFY
>     } | ${
>       THISFQ
>     } | ${
>       LASTYEAR
>     } | ${
>       PREVFY
>     } | ${
>       PREVFQ
>     } | ${
>       NEXTYEAR
>     } | ${
>       NEXTFY
>     } | ${
>       NEXTFQ
>     } | ${
>       EMPTY
>     } | ${
>       NOTEMPTY
>     } | string | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: string,
>     value: (string | number | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     })[] | string | number | boolean | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     } | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>     value: string[] | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: less_than | less_equal | greater_than | greater_equal,
>     value: string | number | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: between | not_between,
>     value: (string | number)[],
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: in | not_in,
>     value: (string | number)[],
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: include_all | include_any | exclude_all | exclude_any,
>     value: {
>       id: string & any,
>       name?: string
>     }[],
>     type?: merge_field | pre_defined | value | field
>   } | {
>     group: (
>       {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: string,
>         value: (string | number | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         })[] | string | number | boolean | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         } | ${
>           EMPTY
>         } | ${
>           NOTEMPTY
>         } | ${
>           TODAY
>         } | ${
>           TOMORROW
>         } | ${
>           TOMORROWPLUS
>         } | ${
>           YESTERDAY
>         } | ${
>           YESTERDAYMINUS
>         } | ${
>           LASTMONTH
>         } | ${
>           THISMONTH
>         } | ${
>           NEXTMONTH
>         } | ${
>           LASTWEEK
>         } | ${
>           THISWEEK
>         } | ${
>           NEXTWEEK
>         } | ${
>           THISYEAR
>         } | ${
>           THISFY
>         } | ${
>           THISFQ
>         } | ${
>           LASTYEAR
>         } | ${
>           PREVFY
>         } | ${
>           PREVFQ
>         } | ${
>           NEXTYEAR
>         } | ${
>           NEXTFY
>         } | ${
>           NEXTFQ
>         } | ${
>           EMPTY
>         } | ${
>           NOTEMPTY
>         } | string | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: string,
>         value: (string | number | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         })[] | string | number | boolean | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         } | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>         value: string[] | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: less_than | less_equal | greater_than | greater_equal,
>         value: string | number | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: between | not_between,
>         value: (string | number)[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: in | not_in,
>         value: (string | number)[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: include_all | include_any | exclude_all | exclude_any,
>         value: {
>           id: string & any,
>           name?: string
>         }[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         group: (
>           {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: string,
>             value: (string | number | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             })[] | string | number | boolean | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             } | ${
>               EMPTY
>             } | ${
>               NOTEMPTY
>             } | ${
>               TODAY
>             } | ${
>               TOMORROW
>             } | ${
>               TOMORROWPLUS
>             } | ${
>               YESTERDAY
>             } | ${
>               YESTERDAYMINUS
>             } | ${
>               LASTMONTH
>             } | ${
>               THISMONTH
>             } | ${
>               NEXTMONTH
>             } | ${
>               LASTWEEK
>             } | ${
>               THISWEEK
>             } | ${
>               NEXTWEEK
>             } | ${
>               THISYEAR
>             } | ${
>               THISFY
>             } | ${
>               THISFQ
>             } | ${
>               LASTYEAR
>             } | ${
>               PREVFY
>             } | ${
>               PREVFQ
>             } | ${
>               NEXTYEAR
>             } | ${
>               NEXTFY
>             } | ${
>               NEXTFQ
>             } | ${
>               EMPTY
>             } | ${
>               NOTEMPTY
>             } | string | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: string,
>             value: (string | number | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             })[] | string | number | boolean | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             } | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>             value: string[] | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: less_than | less_equal | greater_than | greater_equal,
>             value: string | number | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: between | not_between,
>             value: (string | number)[],
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: in | not_in,
>             value: (string | number)[],
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: include_all | include_any | exclude_all | exclude_any,
>             value: {
>               id: string & any,
>               name?: string
>             }[],
>             type?: merge_field | pre_defined | value | field
>           } | (recursive)
>         )[],
>         group_operator: AND | OR | and | or
>       }
>     )[],
>     group_operator: AND | OR | and | or
>   } | null,
>   lead_rule_criteria?: {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: string,
>     value: (string | number | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     })[] | string | number | boolean | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     } | ${
>       EMPTY
>     } | ${
>       NOTEMPTY
>     } | ${
>       TODAY
>     } | ${
>       TOMORROW
>     } | ${
>       TOMORROWPLUS
>     } | ${
>       YESTERDAY
>     } | ${
>       YESTERDAYMINUS
>     } | ${
>       LASTMONTH
>     } | ${
>       THISMONTH
>     } | ${
>       NEXTMONTH
>     } | ${
>       LASTWEEK
>     } | ${
>       THISWEEK
>     } | ${
>       NEXTWEEK
>     } | ${
>       THISYEAR
>     } | ${
>       THISFY
>     } | ${
>       THISFQ
>     } | ${
>       LASTYEAR
>     } | ${
>       PREVFY
>     } | ${
>       PREVFQ
>     } | ${
>       NEXTYEAR
>     } | ${
>       NEXTFY
>     } | ${
>       NEXTFQ
>     } | ${
>       EMPTY
>     } | ${
>       NOTEMPTY
>     } | string | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: string,
>     value: (string | number | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     })[] | string | number | boolean | {
>       id: string & any,
>       name?: string
>     } | {
>       name: string
>     } | {
>       id: string,
>       name?: string
>     } | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>     value: string[] | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: less_than | less_equal | greater_than | greater_equal,
>     value: string | number | string,
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: between | not_between,
>     value: (string | number)[],
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: in | not_in,
>     value: (string | number)[],
>     type?: merge_field | pre_defined | value | field
>   } | {
>     field: {
>       id?: string,
>       api_name: string
>     },
>     comparator: include_all | include_any | exclude_all | exclude_any,
>     value: {
>       id: string & any,
>       name?: string
>     }[],
>     type?: merge_field | pre_defined | value | field
>   } | {
>     group: (
>       {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: string,
>         value: (string | number | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         })[] | string | number | boolean | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         } | ${
>           EMPTY
>         } | ${
>           NOTEMPTY
>         } | ${
>           TODAY
>         } | ${
>           TOMORROW
>         } | ${
>           TOMORROWPLUS
>         } | ${
>           YESTERDAY
>         } | ${
>           YESTERDAYMINUS
>         } | ${
>           LASTMONTH
>         } | ${
>           THISMONTH
>         } | ${
>           NEXTMONTH
>         } | ${
>           LASTWEEK
>         } | ${
>           THISWEEK
>         } | ${
>           NEXTWEEK
>         } | ${
>           THISYEAR
>         } | ${
>           THISFY
>         } | ${
>           THISFQ
>         } | ${
>           LASTYEAR
>         } | ${
>           PREVFY
>         } | ${
>           PREVFQ
>         } | ${
>           NEXTYEAR
>         } | ${
>           NEXTFY
>         } | ${
>           NEXTFQ
>         } | ${
>           EMPTY
>         } | ${
>           NOTEMPTY
>         } | string | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: string,
>         value: (string | number | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         })[] | string | number | boolean | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         } | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>         value: string[] | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: less_than | less_equal | greater_than | greater_equal,
>         value: string | number | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: between | not_between,
>         value: (string | number)[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: in | not_in,
>         value: (string | number)[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: include_all | include_any | exclude_all | exclude_any,
>         value: {
>           id: string & any,
>           name?: string
>         }[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         group: (
>           {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: string,
>             value: (string | number | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             })[] | string | number | boolean | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             } | ${
>               EMPTY
>             } | ${
>               NOTEMPTY
>             } | ${
>               TODAY
>             } | ${
>               TOMORROW
>             } | ${
>               TOMORROWPLUS
>             } | ${
>               YESTERDAY
>             } | ${
>               YESTERDAYMINUS
>             } | ${
>               LASTMONTH
>             } | ${
>               THISMONTH
>             } | ${
>               NEXTMONTH
>             } | ${
>               LASTWEEK
>             } | ${
>               THISWEEK
>             } | ${
>               NEXTWEEK
>             } | ${
>               THISYEAR
>             } | ${
>               THISFY
>             } | ${
>               THISFQ
>             } | ${
>               LASTYEAR
>             } | ${
>               PREVFY
>             } | ${
>               PREVFQ
>             } | ${
>               NEXTYEAR
>             } | ${
>               NEXTFY
>             } | ${
>               NEXTFQ
>             } | ${
>               EMPTY
>             } | ${
>               NOTEMPTY
>             } | string | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: string,
>             value: (string | number | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             })[] | string | number | boolean | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             } | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>             value: string[] | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: less_than | less_equal | greater_than | greater_equal,
>             value: string | number | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: between | not_between,
>             value: (string | number)[],
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: in | not_in,
>             value: (string | number)[],
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: include_all | include_any | exclude_all | exclude_any,
>             value: {
>               id: string & any,
>               name?: string
>             }[],
>             type?: merge_field | pre_defined | value | field
>           } | (recursive)
>         )[],
>         group_operator: AND | OR | and | or
>       }
>     )[],
>     group_operator: AND | OR | and | or
>   } | null
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `territories` | `object[] \| null` | No | Represents the list of territory objects updated by the request. |

> [accordion] territories full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### users.associate

`territories.users.associate`

Territory User. To associate a specific user with a territory in your Zoho CRM organization.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.territories.users.associate({ territory: 'example', user: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `territory` | `string` | Yes | Specify the unique ID of the territory. |
| `user` | `string` | Yes | Specify the unique ID of the user. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `users` | `object[] \| null` | No | Represents the list of user-territory association results. |

> [accordion] users full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[][] | null
> ```

***

### users.associateMany

`territories.users.associateMany`

Territory Users. To associate one or more users with a territory in your Zoho CRM organization.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.territories.users.associateMany({
	territory: 'example',
	users: [{ id: '4876876000000333001' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `territory` | `string` | Yes | Specify the unique ID of the territory for which you want to add users. |
| `users` | `object[]` | Yes | Specify the list of users to associate with the territory. |

> [accordion] users full type
>
> ```ts theme={null}
> {
>   id: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `users` | `object[] \| null` | No | Represents the list of user-territory association results. |

> [accordion] users full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### users.deassociate

`territories.users.deassociate`

Territory User. To disassociate a specific user from a territory in your Zoho CRM organization. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.territories.users.deassociate({ territory: 'example', user: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `territory` | `string` | Yes | Specify the unique ID of the territory. |
| `user` | `string` | Yes | Specify the unique ID of the user. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `users` | `object[] \| null` | No | Represents the list of user-territory disassociation results. |

> [accordion] users full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[][] | null
> ```

***

### users.deassociateMany

`territories.users.deassociateMany`

Territory Users. To disassociate one or more users from a territory in your Zoho CRM organization. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.territories.users.deassociateMany({ territory: 'example', ids: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `territory` | `string` | Yes | Specify the unique ID of the territory. |
| `ids` | `string` | Yes | Specify the unique IDs of the users to disassociate from the territory as a comma-separated list. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `users` | `object[] \| null` | No | Represents the list of user-territory disassociation results. |

> [accordion] users full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[][] | null
> ```

***

### users.get

`territories.users.get`

Specific Territory User. To retrieve the details of a specific user associated with a territory in your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.territories.users.get({ territory: 'example', user: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `territory` | `string` | Yes | Specify the unique ID of the territory. |
| `user` | `string` | Yes | Specify the unique ID of the user. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   users?: {
>     id?: string | null,
>     first_name?: string | null,
>     last_name?: string | null | null,
>     full_name?: string | null,
>     country?: string | null | null,
>     state?: string | null | null,
>     city?: string | null | null,
>     zip?: string | null | null,
>     fax?: string | null | null,
>     street?: string | null | null,
>     status?: string | null,
>     category?: string | null,
>     profile?: {
>       id?: string | null,
>       name?: string | null
>     } | null,
>     role?: {
>       id?: string | null,
>       name?: string | null
>     } | null,
>     created_by?: {
>       id?: string | null,
>       name?: string | null
>     } | null,
>     created_time?: string | null,
>     Modified_By?: {
>       id?: string | null,
>       name?: string | null
>     } | null,
>     Modified_Time?: string | null,
>     language?: string | null,
>     locale?: string | null,
>     time_zone?: string | null,
>     time_format?: string | null,
>     date_format?: string | null,
>     decimal_separator?: string | null,
>     number_separator?: string | null,
>     country_locale?: string | null,
>     microsoft?: boolean | null,
>     sandboxDeveloper?: boolean | null,
>     personal_account?: boolean | null,
>     Isonline?: boolean | null,
>     confirm?: boolean | null,
>     offset?: number | null,
>     zuid?: string | null,
>     alias?: string | null | null,
>     dob?: string | null | null,
>     website?: string | null | null,
>     signature?: string | null | null,
>     name_format__s?: string | null,
>     sort_order_preference__s?: string | null,
>     status_reason__s?: string | null | null,
>     default_tab_group?: string | null,
>     $shift_effective_from?: {
>     } | null | null,
>     $current_shift?: {
>     } | null | null,
>     $next_shift?: {
>     } | null | null,
>     customize_info?: {
>       notes_desc?: {
>       } | null | null,
>       show_right_panel?: boolean | null | null,
>       show_left_panel?: boolean | null | null,
>       bc_view?: {
>       } | null | null,
>       show_home?: boolean | null,
>       show_detail_view?: boolean | null,
>       unpin_recent_item?: {
>       } | null | null
>     } | null,
>     theme?: {
>       normal_tab?: {
>         font_color?: string | null,
>         background?: string | null
>       } | null,
>       selected_tab?: {
>         font_color?: string | null,
>         background?: string | null
>       } | null,
>       new_background?: string | null | null,
>       background?: string | null,
>       screen?: string | null,
>       type?: string | null
>     } | null
>   }[] | null,
>   info?: {
>     per_page?: number | null,
>     count?: number | null,
>     page?: number | null,
>     more_records?: boolean | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### users.list

`territories.users.list`

Territory Users. To retrieve the list of users associated with a territory in your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.territories.users.list({ territory: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `territory` | `string` | Yes | Specify the unique ID of the territory for which you want to retrieve the list of users. Use the [Get Territories API](territories.yaml#\$.paths./settings/territories.get) to retrieve the territory ID. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   users?: {
>     id?: string | null,
>     first_name?: string | null,
>     last_name?: string | null | null,
>     full_name?: string | null,
>     country?: string | null | null,
>     state?: string | null | null,
>     city?: string | null | null,
>     zip?: string | null | null,
>     fax?: string | null | null,
>     street?: string | null | null,
>     status?: string | null,
>     category?: string | null,
>     profile?: {
>       id?: string | null,
>       name?: string | null
>     } | null,
>     role?: {
>       id?: string | null,
>       name?: string | null
>     } | null,
>     created_by?: {
>       id?: string | null,
>       name?: string | null
>     } | null,
>     created_time?: string | null,
>     Modified_By?: {
>       id?: string | null,
>       name?: string | null
>     } | null,
>     Modified_Time?: string | null,
>     language?: string | null,
>     locale?: string | null,
>     time_zone?: string | null,
>     time_format?: string | null,
>     date_format?: string | null,
>     decimal_separator?: string | null,
>     number_separator?: string | null,
>     country_locale?: string | null,
>     microsoft?: boolean | null,
>     sandboxDeveloper?: boolean | null,
>     personal_account?: boolean | null,
>     Isonline?: boolean | null,
>     confirm?: boolean | null,
>     offset?: number | null,
>     zuid?: string | null,
>     alias?: string | null | null,
>     dob?: string | null | null,
>     website?: string | null | null,
>     signature?: string | null | null,
>     name_format__s?: string | null,
>     sort_order_preference__s?: string | null,
>     status_reason__s?: string | null | null,
>     default_tab_group?: string | null,
>     $shift_effective_from?: {
>     } | null | null,
>     $current_shift?: {
>     } | null | null,
>     $next_shift?: {
>     } | null | null,
>     customize_info?: {
>       notes_desc?: {
>       } | null | null,
>       show_right_panel?: boolean | null | null,
>       show_left_panel?: boolean | null | null,
>       bc_view?: {
>       } | null | null,
>       show_home?: boolean | null,
>       show_detail_view?: boolean | null,
>       unpin_recent_item?: {
>       } | null | null
>     } | null,
>     theme?: {
>       normal_tab?: {
>         font_color?: string | null,
>         background?: string | null
>       } | null,
>       selected_tab?: {
>         font_color?: string | null,
>         background?: string | null
>       } | null,
>       new_background?: string | null | null,
>       background?: string | null,
>       screen?: string | null,
>       type?: string | null
>     } | null
>   }[] | null,
>   info?: {
>     per_page?: number | null,
>     count?: number | null,
>     page?: number | null,
>     more_records?: boolean | null
>   } | null
> } | {
>   success: true
> }
> ```

***

## Timelines

### list

`timelines.list`

Get Timelines. To retrieve a paginated list of timeline entries for a specific record in your Zoho CRM organization. Each timeline entry captures an audited event such as field changes, ownership transfers, workflow actions, Approval Process progressions, Scoring Rule updates, and signal events from extensions.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.timelines.list({ module: 'Leads', recordId: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specifies the API name of the CRM module to retrieve timeline entries from. Use the value from the **api\_name** field returned by [Get Modules](https://www.zoho.com/crm/developer/docs/api/v8/modules-api.html). |
| `recordId` | `string` | Yes | Specifies the unique ID of the CRM record to retrieve timeline entries for. |
| `include_inner_details` | `string` | No | Use this parameter if you want to retrieve additional details about updates made to a record in the `field_history` object of the response. **Possible Values** - field\_history.data\_type : Gives the data type of the field that was updated. - `field_history.field_label` : Gives the label details of the fields that were updated. - field\_history.pick\_list\_values : Represents the list of values available for a picklist field. - `field_history.enable_colour_code` : Indicates whether colour coding is enabled for the picklist values. - `done_by.profile` : Provides details of the user's profile who updated the record. - `done_by.type__s` : Indicates the type of user (for example, portal user or regular user) who modified the record. |
| `page_token` | `string` | No | Specify the **next\_page\_token** or the **previous\_page\_token** after you have paginated and retrieved 200 records. Note that you cannot give **per\_page** parameter if you give **page\_token** in the request. |
| `page` | `number \| string` | No | Specifies the page number for retrieving timeline entries in paginated results. |
| `per_page` | `number \| string` | No | Specifies the number of timeline entries to return per page. The value must be **3**. |
| `filters` | `string` | No | **`filters` Parameter** The `filters` parameter is used to filter responses from the Timeline API based on specific conditions. Each filter condition consists of the following components: - field`-`comparator`-`value`**Supported`field.api\_name`Values** The following values are supported for`field.api\_name`: - `record.module.api\_name`-`source`-`audited\_time`-`done\_by.id` **`record.module.api\_name`** Use this field to filter timeline details related to the following record types: - `Notes`-`Attachments`-`Tasks`-`Calls`-`Events`-`Emails`**Allowed Comparators** -`equal`-`in`**Allowed Values** -`Notes`-`Attachments`-`Tasks`-`Calls`-`Events`-`Emails` **Example: Filter Notes** ```json { "field": { "api_name": "record.module.api_name" }, "comparator": "equal", "value": "Notes" } ``` **Example: Filter Notes and Tasks** ```json { "field": { "api_name": "record.module.api_name" }, "comparator": "in", "value": ["Notes", "Tasks"] } ``` **`done\_by.id`** Use this field to filter timeline details performed by a specific user. **Allowed Comparators** - `equal`-`in` **Allowed Values** - User IDs **Example** ```json { "field": { "api_name": "done_by.id" }, "comparator": "in", "value": ["5843104000000424001"] } ``` **`audited\_time`** Use this field to filter timeline data based on the audit timestamp. **Allowed Comparator** - `between` **Allowed Values** - Time in ISO 8601 format **Example: Filter Timeline Details Between Two Dates** ```json { "field": { "api_name": "audited_time" }, "comparator": "between", "value": [ "2023-10-25T00:00:00+12:00", "2023-10-30T23:59:59+12:00" ] } ``` **`source`** Use this field to filter timeline data based on its source. **Allowed Comparators** - `equal`-`in`**Allowed Values** -`crm\_api`-`mass\_delete\_via\_crm\_api`-`bulkapi`-`approval\_process`-`assignment\_rules`-`blueprint`-`mass\_update\_via\_blueprint`-`orchestration`-`convert`-`massconvert`-`custom\_function`-`macro`-`crm\_ui`-`mass\_update`-`mass\_update\_via\_scheduler`-`mass\_delete\_via\_clean\_up`-`bulk\_action`-`change\_owner`-`mass\_change\_owner\_via\_scheduler`-`review\_process`-`scoringrule`-`wizard`-`workflow`**Example: Filter by a Single Source** ```json { "field": { "api_name": "source" }, "comparator": "equal", "value": "crm_ui" } ``` **Example: Filter by Multiple Sources** ```json { "field": { "api_name": "source" }, "comparator": "in", "value": ["crm_api", "crm_ui"] } ``` --- **Combining Multiple Conditions** Use`group\_operator`and`group`to combine multiple filter conditions. **Example** ```json { "group_operator": "AND", "group": [ { "field": { "api_name": "record.module.api_name" }, "comparator": "in", "value": ["Notes"] }, { "field": { "api_name": "source" }, "comparator": "in", "value": ["crm_ui", "crm_api"] } ] } ``` You can also refer to the sample request for the complete structure. > **Note:** The value of the`filters\` parameter must be URL-encoded before sending the request. **URL Encoding Example** The following filter: `json { "comparator": "between", "field": { "api_name": "audited_time" }, "value": [ "2023-06-07T00:00:00+05:30", "2023-06-07T12:59:59+05:30" ] } ` is encoded as: `text filters=%7B%22comparator%22%3A%22between%22%2C%22field%22%3A%7B%22api_name%22%3A%22audited_time%22%7D%2C%22value%22%3A%5B%222023-06-07T00%3A00%3A00%2B05%3A30%22%2C%222023-06-07T12%3A59%3A59%2B05%3A30%22%5D%7D ` You can use the **Encode URL** and **Decode URL** options in the [URL Encoder/Decoder tool](https://www.zoho.com/toolkit/encode-decode.html) to encode or decode this value. |
| `sort_by` | `string` | No | Specifies the field to sort timeline entries by. The only supported value is **audited\_time**. |
| `sort_order` | `asc \| desc` | No | Specifies the sort order for timeline entries. Possible values: **asc**, **desc**. |
| `include_timeline_types` | `string` | No | To include extra types in the "timeline" object. You can get "signals" data through this to get signals-related timeline entries. |
| `include` | `string` | No | Use this parameter if you want to view the details of updates to the record through signals or any other means. The possible values are extension and type. For example, if the record was updated through a signal, then the response will have details of the extension as email insights, while the type of update will be signals. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   __timeline?: {
>     audited_time?: string | null,
>     action?: string | null | null,
>     id?: string | null,
>     source?: string | null,
>     extension?: {
>       namespace?: string | null,
>       id?: string | null,
>       signal?: {
>         display_label?: string | null,
>         action?: string | null,
>         id?: string | null,
>         medium?: string | null
>       } | null
>     } | null | null,
>     done_by?: {
>       name?: string | null,
>       id?: string | null,
>       profile?: {
>         name?: string | null,
>         id?: string | null
>       } | null,
>       type__s?: string | null
>     } | null | null,
>     related_record?: {
>       name?: string | null | null,
>       id?: string | null | null,
>       module?: {
>         name?: string | null,
>         id?: string | null,
>         api_name?: string | null
>       } | null | null
>     } | null | null,
>     automation_details?: {
>       type?: string | null,
>       rule?: {
>         name?: string | null,
>         id?: string | null
>       } | null,
>       pathfinder?: {
>         process_entry?: boolean | null,
>         process_exit?: boolean | null,
>         state?: {
>           trigger_type?: string | null,
>           name?: string | null,
>           is_last_state?: boolean | null,
>           id?: string | null
>         } | null
>       } | null,
>       workflow?: {
>         field_update_action?: {
>           name?: string | null,
>           id?: string | null
>         }[] | null
>       } | null,
>       approval_process?: {
>         next_approver?: {
>           name?: string | null,
>           id?: string | null
>         }[] | null,
>         comments?: string | null,
>         takeover_reason?: string | null,
>         current_stage?: number | null,
>         takeover_stage?: string | null,
>         rejected_details?: {
>           stage?: {
>             from?: string | null,
>             to?: string | null
>           } | null,
>           name?: string | null,
>           id?: string | null
>         } | null,
>         delegate_details?: {
>           from?: {
>             name?: string | null,
>             id?: string | null
>           } | null,
>           to?: {
>             name?: string | null,
>             id?: string | null
>           } | null
>         } | null,
>         approver_details?: {
>           name?: string | null,
>           id?: string | null
>         } | null
>       } | null,
>       assigned_to?: {
>         name?: string | null,
>         id?: string | null
>       } | null,
>       scoring_rule?: {
>         zia_type?: boolean | null,
>         negative_score?: {
>           new?: string | null | null,
>           old?: string | null | null
>         } | null,
>         positive_score?: {
>           new?: string | null | null,
>           old?: string | null | null
>         } | null,
>         touch_point?: {
>           negative_score?: {
>             new?: string | null | null,
>             old?: string | null | null
>           } | null,
>           positive_score?: {
>             new?: string | null | null,
>             old?: string | null | null
>           } | null,
>           score?: {
>             new?: string | null | null,
>             old?: string | null | null
>           } | null
>         } | null
>       } | null,
>       owner?: {
>         name?: string | null,
>         id?: string | null,
>         new?: {
>           name?: string | null,
>           id?: string | null
>         } | null,
>         old?: {
>           name?: string | null,
>           id?: string | null
>         } | null
>       } | null,
>       review_process?: {
>         deluge?: {
>           name?: string | null,
>           id?: string | null
>         } | null,
>         deactivated_process?: {
>           name?: string | null,
>           id?: string | null | null
>         } | null,
>         rejection?: {
>           reason?: string | null,
>           comment?: string | null
>         } | null
>       } | null,
>       group_id?: string | null | null,
>       module?: {
>         api_name?: string | null,
>         name?: string | null,
>         id?: string | null
>       } | null | null
>     } | null | null,
>     record?: {
>       name?: string | null | null,
>       id?: string | null | null,
>       count?: string | null | null,
>       module?: {
>         api_name?: string | null,
>         id?: string | null
>       } | null | null
>     } | null,
>     converted_record?: {
>       name?: string | null | null,
>       id?: string | null | null,
>       module?: {
>         api_name?: string | null,
>         id?: string | null
>       } | null | null
>     } | null | null,
>     field_history?: {
>       data_type?: string | null,
>       enable_colour_code?: boolean | null,
>       pick_list_values?: {
>         display_value?: string | null,
>         sequence_number?: number | null,
>         reference_value?: string | null,
>         colour_code?: string | null | null,
>         actual_value?: string | null,
>         id?: string | null,
>         type?: string | null
>       }[] | null,
>       field_label?: string | null,
>       api_name?: string | null,
>       id?: string | null,
>       _value?: {
>         new?: string | null | null,
>         old?: string | null | null
>       } | null
>     }[] | null | null,
>     type?: string | null
>   }[] | null,
>   info?: {
>     next_page_token?: string | null | null,
>     previous_page_token?: string | null | null,
>     count?: number | null,
>     more_records?: boolean | null,
>     page?: number | null,
>     per_page?: number | null
>   } | null
> } | {
>   success: true
> }
> ```

***

## Unsubscribe Links

### create

`unsubscribeLinks.create`

Create Unsubscribe Link. To create an unsubscribe link that can be used in email templates or email footers. You can configure the link to display a standard Zoho CRM unsubscribe page or redirect to a custom webpage.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.unsubscribeLinks.create({
	unsubscribe_links: [{ name: 'example', page_type: 'example', submission_action_type: 'example' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `unsubscribe_links` | `object[]` | Yes | Array containing the unsubscribe link configuration to create (required) |

> [accordion] unsubscribe\_links full type
>
> ```ts theme={null}
> {
>   submission_message?: string,
>   submission_redirect_url?: string,
>   page_type: string,
>   custom_location_url?: string,
>   name: string,
>   id?: string,
>   standard_page_message?: string,
>   submission_action_type: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `unsubscribe_links` | `object[] \| null` | No | Array containing the status of the creation operation for each link |

> [accordion] unsubscribe\_links full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### delete

`unsubscribeLinks.delete`

Delete Unsubscribe Link by ID. To delete a specific unsubscribe link. Note that the default unsubscribe link cannot be deleted. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.unsubscribeLinks.delete({ id: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The unique ID of the unsubscribe link to retrieve, update, or delete. This ID is returned in the response when creating or fetching unsubscribe links. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `unsubscribe_links` | `object[] \| null` | No | Array containing the status of the delete operation for each link |

> [accordion] unsubscribe\_links full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### get

`unsubscribeLinks.get`

Get Unsubscribe Link by ID. To retrieve the complete configuration details of a specific unsubscribe link using its ID. This includes page settings, submission behavior, timestamps, and creator information.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.unsubscribeLinks.get({ id: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The unique ID of the unsubscribe link to retrieve, update, or delete. This ID is returned in the response when creating or fetching unsubscribe links. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   unsubscribe_links?: {
>     created_time?: string | null,
>     submission_message?: string | null,
>     modified_time?: string | null,
>     submission_redirect_url?: null | null,
>     page_type?: string | null,
>     custom_location_url?: null | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     name?: string | null,
>     id?: string | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     standard_page_message?: string | null,
>     submission_action_type?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### getAssociations

`unsubscribeLinks.getAssociations`

Get Unsubscribe Link Associations. To retrieve information about where unsubscribe links are being used (associated places) in your CRM account, such as in email templates.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.unsubscribeLinks.getAssociations({});
```

**Input:** *empty object*

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   associations?: {
>     id?: string | null,
>     associated_places?: {
>       resource?: {
>         name?: string | null,
>         id?: string | null
>       } | null,
>       details?: {
>         module?: {
>           api_name?: string | null,
>           id?: string | null
>         } | null
>       } | null,
>       type?: string | null
>     }[] | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### list

`unsubscribeLinks.list`

Get Unsubscribe Links. To retrieve the details of all unsubscribe links configured in your CRM account. This API returns a list of unsubscribe links with their complete configuration, including page type, submission behavior, timestamps, and creator information.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.unsubscribeLinks.list({});
```

**Input:** *empty object*

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   unsubscribe_links?: {
>     created_time?: string | null,
>     submission_message?: string | null | null,
>     modified_time?: string | null,
>     submission_redirect_url?: string | null | null,
>     page_type?: string | null | null,
>     custom_location_url?: string | null | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     name?: string | null,
>     id?: string | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     standard_page_message?: string | null | null,
>     submission_action_type?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### update

`unsubscribeLinks.update`

Update Unsubscribe Link by ID. To update a specific unsubscribe link. You can modify the link's name, page type, custom URL, standard page message, submission action type, redirect URL, or submission message.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.unsubscribeLinks.update({
	id: '4876876000000333001',
	unsubscribe_links: [{ id: '4876876000000333001' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The unique ID of the unsubscribe link to retrieve, update, or delete. This ID is returned in the response when creating or fetching unsubscribe links. |
| `unsubscribe_links` | `object[]` | Yes | Array containing the unsubscribe link configuration to update (required) |

> [accordion] unsubscribe\_links full type
>
> ```ts theme={null}
> {
>   submission_message?: string,
>   submission_redirect_url?: string,
>   page_type?: string,
>   custom_location_url?: string,
>   name?: string,
>   id: string,
>   standard_page_message?: string,
>   submission_action_type?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `unsubscribe_links` | `object[] \| null` | No | Array containing the status of the update operation for each link |

> [accordion] unsubscribe\_links full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### updateMany

`unsubscribeLinks.updateMany`

Update Unsubscribe Links. To update one or more unsubscribe links in bulk. You can modify the link's name, page type, custom URL, standard page message, submission action type, redirect URL, or submission message.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.unsubscribeLinks.updateMany({
	unsubscribe_links: [{ id: '4876876000000333001' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `unsubscribe_links` | `object[]` | Yes | Root key containing the unsubscribe links to update (required) |

> [accordion] unsubscribe\_links full type
>
> ```ts theme={null}
> {
>   submission_message?: string,
>   submission_redirect_url?: string,
>   page_type?: string,
>   custom_location_url?: string,
>   name?: string,
>   id: string,
>   standard_page_message?: string,
>   submission_action_type?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `unsubscribe_links` | `object[] \| null` | No | Array containing the status of the modification operation for each link |

> [accordion] unsubscribe\_links full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

## User Groups

### create

`userGroups.create`

Create a user group. To create a new user group in your Zoho CRM organization with a specified name, optional description, and member sources (users, roles, or territories).

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.userGroups.create({
	user_groups: [{
		name: 'example',
		sources: [{
			type: 'territories',
			source: { id: '4876876000000333001' },
		}],
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `user_groups` | `object[]` | Yes | Specify an array containing up to 10 user group objects to create. |

> [accordion] user\_groups full type
>
> ```ts theme={null}
> {
>   description?: string | null,
>   name: string,
>   sources: {
>     type: territories | roles | users,
>     source: {
>       id: string
>     },
>     subordinates?: boolean | null,
>     sub_territories?: boolean | null
>   }[]
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `user_groups` | `object[] \| null` | No | Represents the array containing the result of the user group creation operation. |

> [accordion] user\_groups full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   message?: string | null,
>   status?: string | null,
>   details?: {
>     id?: string | null
>   } | null
> }[] | null
> ```

***

### delete

`userGroups.delete`

Delete a user group. To delete an existing user group from your Zoho CRM organization. The deletion may be immediate or scheduled for background processing, depending on group size and active references. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.userGroups.delete({ group: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `group` | `string` | Yes | Specify the unique ID of the user group to operate on. From API v9 onwards, UUID format is also accepted. Example: `1234567890`. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `user_groups` | `object[] \| null` | No | Represents the array containing the result of the user group deletion operation. |

> [accordion] user\_groups full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   message?: string | null,
>   status?: string | null,
>   details?: {
>     id?: string | null
>   } | {
>     job_id?: string | null
>   } | null
> }[] | null
> ```

***

### get

`userGroups.get`

Get a user group. To retrieve the details of a specific user group in your Zoho CRM organization by its unique ID, with optional inclusion of member source counts.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.userGroups.get({ group: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `group` | `string` | Yes | Specify the unique ID of the user group to operate on. From API v9 onwards, UUID format is also accepted. Example: `1234567890`. |
| `include` | `sources_count \| sources` | No | Specify additional related data to include in the response. Possible values: **sources** - Include the list of sources for each group. **sources\_count** - Include the count of sources for each group. |
| `filters` | `string` | No | Filter criteria to narrow the results. Specify conditions as a structured filter expression. Maximum 250 characters. |
| `ids` | `string` | No | Specify a comma-separated list of unique user group IDs to filter the results by. |
| `name` | `string` | No | Specify the name of the user group to filter the results by. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   user_groups?: {
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     modified_time?: string | null | null,
>     created_time?: string | null,
>     description?: string | null | null,
>     id?: string | null,
>     name?: string | null,
>     sources_count?: {
>       territories?: number | null,
>       roles?: number | null,
>       groups?: number | null,
>       users?: number | null
>     } | null
>   }[] | null,
>   info?: {
>     per_page?: number | null,
>     count?: number | null,
>     page?: number | null,
>     more_records?: boolean | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### getAssociatedUsersCount

`userGroups.getAssociatedUsersCount`

Get associated users count per user group. To retrieve the count of users associated with user groups in your Zoho CRM organization, optionally filtered by group criteria.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.userGroups.getAssociatedUsersCount({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `filters` | `string` | No | Filter criteria to narrow the results. Specify conditions as a structured filter expression. Maximum 250 characters. |
| `page` | `number \| string` | No | Specify the page number to retrieve paginated results. Default is 1. Minimum value is 1. |
| `per_page` | `number \| string` | No | Specify the number of records to return per page. Default is 200. Maximum value is 200. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   associated_users_count?: {
>     user_group?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     count?: number | null
>   }[] | null,
>   info?: {
>     per_page?: number | null,
>     count?: number | null,
>     page?: number | null,
>     more_records?: boolean | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### getAssociations

`userGroups.getAssociations`

Get associations for a user group. To retrieve the list of CRM resources, such as sharing rules, workflows, assignment rules, and approval processes, that are associated with a specific user group in your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.userGroups.getAssociations({ group: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `group` | `string` | Yes | Specify the unique ID of the user group to operate on. From API v9 onwards, UUID format is also accepted. Example: `1234567890`. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   associations?: {
>     resource?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     details?: {
>       module?: {
>         api_name?: string | null,
>         id?: string | null
>       } | null
>     } | null | null,
>     type?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### getSources

`userGroups.getSources`

Get sources for a user group. To retrieve the paginated list of member sources configured for a specific user group in your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.userGroups.getSources({ group: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `group` | `string` | Yes | Specify the unique ID of the user group to operate on. From API v9 onwards, UUID format is also accepted. Example: `1234567890`. |
| `filters` | `string` | No | Filter criteria to narrow the results. Specify conditions as a structured filter expression. Maximum 250 characters. |
| `include` | `sources_count \| sources` | No | Specify additional related data to include in the response. Possible values: **sources** - Include the list of sources for each group. **sources\_count** - Include the count of sources for each group. |
| `type` | `users \| roles \| territories \| groups` | No | Filter sources by source type. Possible values: **users** - Return only user-type sources. **roles** - Return only role-type sources. **territories** - Return only territory-type sources. **groups** - Return only group-type sources. |
| `user_type` | `string` | No | Filter user-type sources by the user's status or type classification. |
| `page` | `number \| string` | No | Specify the page number to retrieve paginated results. Default is 1. Minimum value is 1. |
| `per_page` | `number \| string` | No | Specify the number of records to return per page. Default is 200. Maximum value is 200. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   sources?: {
>     source?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     type?: string | null,
>     subordinates?: boolean | null,
>     sub_territories?: boolean | null
>   }[] | null,
>   info?: {
>     per_page?: number | null,
>     count?: number | null,
>     page?: number | null,
>     more_records?: boolean | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### getSourcesCount

`userGroups.getSourcesCount`

Get source counts for a user group. To retrieve the count of member sources by type (users, roles, territories, and groups) for a specific user group in your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.userGroups.getSourcesCount({ group: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `group` | `string` | Yes | Specify the unique ID of the user group to operate on. From API v9 onwards, UUID format is also accepted. Example: `1234567890`. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   sources_count?: {
>     territories?: number | null,
>     roles?: number | null,
>     groups?: number | null,
>     users?: {
>       inactive?: number | null,
>       deleted?: number | null,
>       active?: number | null
>     } | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### list

`userGroups.list`

Get user groups. To retrieve a paginated list of user groups configured in your Zoho CRM organization, with optional filtering by name or criteria, and optional inclusion of member source counts.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.userGroups.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `filters` | `string` | No | Filter criteria to narrow the results. Specify conditions as a structured filter expression. Maximum 250 characters. |
| `include` | `sources_count \| sources` | No | Specify additional related data to include in the response. Possible values: **sources** - Include the list of sources for each group. **sources\_count** - Include the count of sources for each group. |
| `ids` | `string` | No | Specify a comma-separated list of unique user group IDs to filter the results by. |
| `name` | `string` | No | Specify the name of the user group to filter the results by. |
| `page` | `number \| string` | No | Specify the page number to retrieve paginated results. Default is 1. Minimum value is 1. |
| `per_page` | `number \| string` | No | Specify the number of records to return per page. Default is 200. Maximum value is 200. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   user_groups?: {
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     modified_time?: string | null | null,
>     created_time?: string | null,
>     description?: string | null | null,
>     id?: string | null,
>     name?: string | null,
>     sources_count?: {
>       territories?: number | null,
>       roles?: number | null,
>       groups?: number | null,
>       users?: number | null
>     } | null
>   }[] | null,
>   info?: {
>     per_page?: number | null,
>     count?: number | null,
>     page?: number | null,
>     more_records?: boolean | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### listForUser

`userGroups.listForUser`

Get associated groups for a user. To retrieve the paginated list of user groups associated with a specific user in your Zoho CRM organization, with optional inclusion of member sources and source counts.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.userGroups.listForUser({ user: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `user` | `string` | Yes | Specifies the unique ID of the user whose associated groups you want to retrieve. Use the [Get Users](users#\$.paths./users.get) API to obtain user IDs. From API v9 onwards, UUID format is also accepted. |
| `include` | `sources_count \| sources` | No | Specify additional related data to include in the response. Possible values: **sources** - Include the list of sources for each group. **sources\_count** - Include the count of sources for each group. |
| `page` | `number \| string` | No | Specify the page number to retrieve paginated results. Default is 1. Minimum value is 1. |
| `per_page` | `number \| string` | No | Specify the number of records to return per page. Default is 200. Maximum value is 200. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   user_groups?: {
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     modified_time?: string | null | null,
>     created_time?: string | null,
>     description?: string | null | null,
>     id?: string | null,
>     name?: string | null,
>     sources?: {
>       source?: {
>         name?: string | null,
>         id?: string | null
>       } | null,
>       type?: string | null,
>       subordinates?: boolean | null,
>       sub_territories?: boolean | null
>     }[] | null
>   }[] | null,
>   info?: {
>     per_page?: number | null,
>     count?: number | null,
>     page?: number | null,
>     more_records?: boolean | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### update

`userGroups.update`

Update a user group. To update the name, description, and member sources of an existing user group in your Zoho CRM organization.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.userGroups.update({
	group: 'example',
	user_groups: [{
		name: 'example',
		sources: [{
			type: 'territories',
			source: { id: '4876876000000333001' },
		}],
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `group` | `string` | Yes | Specify the unique ID of the user group to operate on. From API v9 onwards, UUID format is also accepted. Example: `1234567890`. |
| `user_groups` | `object[]` | Yes | Specify an array containing one user group object to update. |

> [accordion] user\_groups full type
>
> ```ts theme={null}
> {
>   description?: string | null,
>   name: string,
>   sources: {
>     type: territories | roles | users,
>     source: {
>       id: string
>     },
>     subordinates?: boolean | null,
>     sub_territories?: boolean | null
>   }[]
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `user_groups` | `object[] \| null` | No | Represents the array containing the result of the user group update operation. |

> [accordion] user\_groups full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   message?: string | null,
>   status?: string | null,
>   details?: {
>     id?: string | null
>   } | null
> }[] | null
> ```

***

## Users

### create

`users.create`

Create User. To create a new user record in your Zoho CRM organization. The request body must contain a users array with one user object including the required fields such as email, role, profile, and first name. Each active user takes one of the org's user licences (the Free edition has 3).

**Risk:** `destructive`

```ts theme={null}
await corsair.zohocrm.api.users.create({
	users: [{}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `users` | `object[]` | Yes | The request body must contain a `users` array. You can include a maximum of one object per request. |

> [accordion] users full type
>
> ```ts theme={null}
> {
>   $next_shift?: {
>     name: string,
>     id: string
>   } | null,
>   $current_shift?: {
>     name: string,
>     id: string
>   } | null,
>   $shift_effective_from?: string | null,
>   date_format?: dd-MM-yyyy | dd/MM/yyyy | dd.MM.yyyy | dd MM yyyy | dd-MM-yy | dd/MM/yy | dd.MM.yy | d.MM.yy | d-M-yy | d/M/yy | d.M.yy | d.M.yy. | d-M-yyyy | d/M/yyyy | d.M.yyyy | d. M. yyyy. | d. M. yyyy | d MMM,
>   yyyy | dd MMM,
>   yyyy | d. MMMM yyyy | dd.MM.yyyy. | dd.MM.yy. | yyyy-MM-dd | yyyy/MM/dd | yyyy.MM.dd | yyyy MM dd | yy/MM/dd | yy-MM-dd | yy.M.d | yy-M-d | yy. M. d | yyyy/M/d | yyyy年MM月dd日 | yy年M月d日 | yyyy.MM.dd. | yyyy. MM. dd | MM-dd-yyyy | MM/dd/yyyy | MM.dd.yyyy | MM dd yyyy | MM-dd-yy | MM/dd/yy | M/dd/yy | MMM-dd-yyyy | MMM dd,
>   yyyy | MMM d,
>   yyyy | MMMM d,
>   yyyy | yyyy.dd.MM | yy.d.M,
>   decimal_separator?: Comma | Period,
>   email?: string,
>   first_name?: string,
>   last_name?: string | null,
>   profile?: {
>     name: string,
>     id: string
>   },
>   role?: {
>     name: string,
>     id: string
>   },
>   status?: active | inactive,
>   alias?: string | null,
>   locale?: in_ID | zh_CN | zh_TW | da_DK | de_DE | en_GB | en_US | es_ES | fr_FR | iw_IL | hr_HR | it_IT | hu_HU | nl_NL | pl_PL | pt_BR | pt_PT | sv_SE | vi_VN | tr_TR | cs_CZ | bg_BG | ru_RU | ar_EG | hi_IN | th_TH | ja_JP | ko_KR,
>   phone?: string | null,
>   mobile?: string | null,
>   city?: string | null,
>   country?: string | null,
>   dob?: string | null,
>   fax?: string | null,
>   number_separator?: Comma | Period | Space | comma | period | space,
>   state?: string | null,
>   street?: string | null,
>   time_format?: HH:mm | hh:mm a,
>   website?: string | null,
>   zip?: string | null,
>   name_format__s?: Salutation,
>   First Name,
>   Last Name | Salutation,
>   Last Name,
>   First Name | First Name,
>   Salutation,
>   Last Name | First Name,
>   Last Name,
>   Salutation | Last Name,
>   Salutation,
>   First Name | Last Name,
>   First Name,
>   Salutation,
>   language?: af_NA | af_ZA | ak_GH | su_ID | cy_GB | de_CH | de_AT | en_AU | en_CA | en_IE | en_NZ | en_SG | en_ZA | ee_GH | ee_TG | fy_NL | ga_GB | ga_IE | gv_IM | ki_KE | gd_GB | ha_GH | ha_NG | ha_NE | ig_NG | rn_BI | jv_ID | rw_RW | sw_CD | sw_KE | sw_TZ | sw_UG | lg_UG | lb_LU | mg_MG | mt_MT | ms_BN | ms_ID | ms_MY | ms_SG | nl_BE | nl_BQ | om_ET | om_KE | ff_GN | ff_SN | qu_BO | qu_EC | qu_PE | so_ET | so_DJ | so_KE | so_SO | sg_CF | vi_VN | lu_CD | tr_CY | tr_TR | wo_SN | az_AZ | bm_ML | bs_BA | br_FR | ca_AD | ca_ES | ca_FR | ca_IT | sn_ZW | da_DK | da_GL | se_NO | se_SE | se_FI | et_EE | es_AR | es_BO | es_CL | es_CO | es_CR | es_EC | es_SV | es_GT | es_HN | es_NI | es_PA | es_PY | es_PE | es_PR | es_DO | es_UY | es_VE | eu_ES | fr_BE | fr_CA | fr_CH | fo_DK | fo_FO | gl_ES | hr_BA | hr_HR | nd_ZW | xh_ZA | zu_ZA | it_VA | it_IT | it_SM | it_CH | kl_GL | kw_GB | ku_TR | lv_LV | to_TO | lt_LT | ln_AO | ln_CG | ln_CF | ln_CD | hu_HU | nn_NO | no_NO | nb_NO | nb_SJ | uz_AF | uz_UZ | pl_PL | ro_MD | ro_RO | rm_CH | sq_XK | sq_MK | sq_AL | sk_SK | sl_SI | fi_FI | sv_FI | sv_SE | sv_AX | mi_NZ | tk_TM | yo_BJ | yo_NG | is_IS | cs_CZ | el_GR | el_CY | be_BY | bg_BG | os_GE | os_RU | ky_KG | mk_MK | mn_MN | ce_RU | sr_BA | sr_CS | sr_RS | sr_ME | tt_RU | tg_TJ | uk_UA | kk_KZ | hy_AM | ug_CN | ur_IN | ur_PK | ar_JO | ar_AE | ar_BH | ar_DZ | ar_SD | ar_IQ | ar_KW | ar_MA | ar_SA | ar_YE | ar_TN | ar_SY | ar_OM | ar_QA | ar_LB | ar_LY | sd_PK | sd_IN | fa_AF | fa_IR | ps_AF | ps_PK | ks_IN | ne_NP | ne_IN | mr_IN | sa_IN | hi_IN | as_IN | bn_BD | bn_IN | pa_PK | pa_IN | gu_IN | or_IN | ta_IN | ta_LK | ta_SG | ta_MY | te_IN | kn_IN | ml_IN | si_LK | th_TH | lo_LA | bo_IN | bo_CN | dz_BT | my_MM | ka_GE | ti_ET | ti_ER | am_ET | km_KH | zh_MO | zh_HK | zh_SG | zh_CN | zh_TW | ja_JP | ii_CN | ko_KR | ko_KP,
>   country_locale?: ps_AF | sv_AX | sq_AL | ar_DZ | en_AS | ca_AD | pt_AO | en_AI | en_AQ | en_AG | es_AR | hy_AM | nl_AW | en_AU | de_AT | az_AZ | en_BS | ar_BH | bn_BD | en_BB | be_BY | nl_BE | fr_BE | en_BZ | fr_BJ | en_BM | en_BT | es_BO | bs_BA | en_BW | no_BV | pt_BR | en_IO | en_VG | ms_BN | bg_BG | fr_BF | fr_BI | km_KH | fr_CM | en_CA | fr_CA | pt_CV | en_KY | fr_CF | ar_TD | es_CL | zh_CN | en_CX | en_CC | es_CO | fr_KM | en_CK | es_CR | hr_HR | es_CU | el_CY | cs_CZ | fr_CD | da_DK | ar_DJ | en_DM | es_DO | es_EC | ar_EG | es_SV | es_GQ | en_ER | et_EE | en_SZ | am_ET | en_FK | fo_FO | fj_FJ | fi_FI | fr_FR | fr_GF | fr_PF | fr_TF | fr_GA | en_GM | ka_GE | de_DE | en_GH | en_GI | el_GR | kl_GL | en_GD | fr_GP | en_GU | es_GT | fr_GN | pt_GW | en_GY | fr_HT | en_HM | es_HN | zh_HK | hu_HU | is_IS | en_IN | id_ID | fa_IR | ar_IQ | en_IE | iw_IL | it_IT | en_JM | ja_JP | ar_JO | ru_KZ | sw_KE | en_KI | ar_KW | uz_KG | lo_LA | lv_LV | ar_LB | en_LS | en_LR | ar_LY | de_LI | lt_LT | fr_LU | de_LU | zh_MO | en_MG | en_MW | ms_MY | dv_MV | fr_ML | mt_MT | en_MH | fr_MQ | ar_MR | en_MU | fr_YT | es_MX | en_FM | ro_MD | fr_MC | mn_MN | sr_ME | en_MS | ar_MA | pt_MZ | my_MM | en_NA | en_NR | ne_NP | nl_NL | nl_AN | fr_NC | en_NZ | es_NI | fr_NE | en_NG | en_NU | en_NF | ko_KP | mk_MK | en_MP | no_NO | ar_OM | en_PK | en_PW | ar_PS | es_PA | en_PG | es_PY | es_PE | en_PH | en_PN | pl_PL | pt_PT | es_PR | ar_QA | fr_CG | fr_RE | ro_RO | ru_RU | rw_RW | en_SH | en_KN | en_LC | fr_PM | en_VC | en_WS | it_SM | pt_ST | ar_SA | fr_SN | sr_RS | sr_CS | en_SC | en_SL | en_SG | sk_SK | sl_SI | en_SB | so_SO | en_ZA | en_GS | ko_KR | es_ES | si_LK | ar_SD | nl_SR | no_SJ | sv_SE | fr_CH | de_CH | it_CH | ar_SY | zh_TW | fa_TJ | sw_TZ | th_TH | pt_TL | fr_TG | en_TK | to_TO | en_TT | ar_TN | tr_TR | tk_TM | en_TC | en_TV | en_UG | uk_UA | ar_AE | en_GB | en_US | en_UM | es_UY | uz_UZ | bi_VU | it_VA | es_VE | vi_VN | en_VI | fr_WF | ar_EH | ar_YE | en_ZM | en_ZW | fr_CI,
>   image_link?: string,
>   sort_order_preference__s?: First Name,
>   Last Name | Last Name,
>   First Name,
>   Reporting_To?: {
>     name: string,
>     id: string
>   } | null,
>   share_among_subordinates?: boolean,
>   time_zone?: string,
>   distance_preference__s?: Kilometers | Miles,
>   default_tab_group?: number | string,
>   signature?: string | null,
>   customize_info?: {
>     notes_desc?: boolean,
>     show_left_panel?: boolean,
>     show_detail_view?: boolean
>   }
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `users` | `object[] \| null` | No | Contains the result of the user creation request, including the status, response code, confirmation message, and the unique ID of the newly created user. |

> [accordion] users full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### delete

`users.delete`

Delete a user from the organization. To delete a specific user from your Zoho CRM organization, submit a DELETE request with the target user ID. Only one user can be removed per request, and certain protected user types — including support, system, Digital Employee, and primary contact users — cannot be deleted. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.users.delete({ user: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `user` | `string` | Yes | Specify the unique ID of the user to retrieve, update, or delete. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `users` | `object[] \| null` | No | Represents the list of deletion results for the requested user. |

> [accordion] users full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### get

`users.get`

Get a specific user. To retrieve the details of a specific user in Zoho CRM, use the unique user ID as the path parameter.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.users.get({ user: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `user` | `string` | Yes | Specify the unique ID of the user to retrieve, update, or delete. |
| `fields` | `string` | No | Specify the comma-separated list of field API names to include in the response. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   users?: {
>     $next_shift?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     $current_shift?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     $shift_effective_from?: string | null | null,
>     confirm?: boolean | null,
>     date_format?: string | null,
>     decimal_separator?: string | null,
>     email?: string | null,
>     first_name?: string | null | null,
>     full_name?: string | null,
>     id?: string | null,
>     last_name?: string | null | null,
>     type__s?: string | null,
>     profile?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     role?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     status?: string | string | null,
>     zuid?: string | null | null,
>     alias?: string | null | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     created_time?: string | null | null,
>     locale?: string | null,
>     microsoft?: boolean | null,
>     Modified_By?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     Modified_Time?: string | null | null,
>     phone?: string | null | null,
>     mobile?: string | null | null,
>     city?: string | null | null,
>     country?: string | null | null,
>     dob?: string | null | null,
>     fax?: string | null | null,
>     number_separator?: string | null,
>     state?: string | null | null,
>     street?: string | null | null,
>     time_format?: string | null,
>     website?: string | null | null,
>     zip?: string | null | null,
>     sandboxDeveloper?: boolean | null,
>     name_format__s?: string | null,
>     language?: string | null,
>     status_reason__s?: string | null | null,
>     country_locale?: string | null,
>     ezuid?: string | null,
>     image_link?: string | null,
>     sort_order_preference__s?: string | null,
>     Reporting_To?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     share_among_subordinates?: boolean | null,
>     imap_status?: boolean | null,
>     time_zone?: string | null,
>     distance_preference__s?: string | null,
>     default_tab_group?: string | null,
>     signature?: string | null | null,
>     personal_account?: boolean | null,
>     customize_info?: {
>       notes_desc?: boolean | null | null,
>       show_left_panel?: boolean | null | null,
>       show_right_panel?: string | null | null,
>       show_detail_view?: boolean | null,
>       unpin_recent_item?: boolean | null | null,
>       bc_view?: boolean | null | null,
>       show_home?: boolean | null
>     } | null,
>     theme?: {
>       normal_tab?: {
>         background?: string | null,
>         font_color?: string | null
>       } | null,
>       selected_tab?: {
>         background?: string | null,
>         font_color?: string | null
>       } | null,
>       header?: {
>         background?: string | null,
>         font_color?: string | null
>       } | null,
>       new_background?: string | null | null,
>       background?: string | null,
>       screen?: string | null,
>       type?: string | null
>     } | null,
>     offset?: number | null,
>     Status_Updated_By__s?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     Confirmed_Time__s?: string | null | null,
>     Status_Updated_Time__s?: string | null,
>     Invited_Time__s?: string | null | null,
>     Invited_By__s?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     ntc_notification_type?: number[] | null,
>     ntc_enabled?: boolean | null,
>     rtl_enabled?: boolean | null,
>     telephony_enabled?: boolean | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### getTransferAndDeleteStatus

`users.getTransferAndDeleteStatus`

Get transfer and delete status. Retrieves the current status of a transfer and delete operation using the job ID returned by the POST request. The response indicates whether the job is scheduled, in progress, completed, or failed.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.users.getTransferAndDeleteStatus({ job_id: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `job_id` | `string` | Yes | Indicates the ID of the job scheduled previously through the [Transfer Records and Delete User API](users_transfer.yaml#\$.paths./users/\{userId}/actions/transfer_and_delete.post). |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   transfer_and_delete?: {
>     status?: string | null,
>     reason?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### getTransferStatus

`users.getTransferStatus`

Get user transfer status. Retrieves the current status of a user transfer operation using the job ID returned by the transfer request. The response indicates whether the transfer job is scheduled, in progress, completed, or failed.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.users.getTransferStatus({ job_id: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `job_id` | `string` | Yes | Indicates the ID of the job scheduled previously through the [Transfer Records and Delete User API](users_transfer.yaml#\$.paths./users/\{userId}/actions/transfer_and_delete.post). |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   transfer?: {
>     status?: string | null,
>     reason?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### list

`users.list`

Get users. To retrieve all users in your Zoho CRM organization based on the specified filter parameters, including type, role, query criteria, and field selection.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.users.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `type` | `CurrentUser \| DeletedUsers \| DeactiveUsers \| NotConfirmedUsers \| ConfirmedUsers \| ActiveUsers \| AdminUsers \| ActiveConfirmedAdmins \| ActiveConfirmedUsers \| DeveloperUsers \| AllUsers \| AllActiveUsers \| ActiveLiteUser \| ActiveAndDeactive \| ChildRoleUsers \| ParentRoleUsers \| SubordinateRoleUsers \| ConfirmedReportingUsers` | No | Specify the type of users to retrieve. Possible values: CurrentUser - Retrieves the currently authenticated user. DeletedUsers - Retrieves only deleted users. DeactiveUsers - Retrieves only deactivated users. NotConfirmedUsers - Retrieves only unconfirmed users. ConfirmedUsers - Retrieves only confirmed users. ActiveUsers - Retrieves only active users. AdminUsers - Retrieves only administrator users. ActiveConfirmedAdmins - Retrieves active, confirmed, and administrator users. ActiveConfirmedUsers - Retrieves active and confirmed users. DeveloperUsers - Retrieves only developer users. AllUsers - Retrieves all users. AllActiveUsers - Retrieves all active users. ActiveLiteUser - Retrieves active lite users. ActiveAndDeactive - Retrieves both active and deactivated users. ChildRoleUsers - Retrieves users belonging to child roles. ParentRoleUsers - Retrieves users belonging to the parent role. SubordinateRoleUsers - Retrieves users in subordinate roles. ConfirmedReportingUsers - Retrieves confirmed users who have reporting relationships. |
| `page` | `number \| string` | No | Specify the page number to retrieve in the paginated response. |
| `per_page` | `number \| string` | No | Specify the number of user records to return per page. |
| `include_lite_users` | `boolean` | No | Specify whether to include lite users in the result set.\n\nPossible values:\ntrue - Lite users are included.\nfalse - Lite users are not included. |
| `role_id` | `string` | No | Specify the role ID to filter users. The API retrieves users with the specified role and higher or lower roles based on the value of the **type** parameter. Applicable only for **ParentRoleUsers**, **ChildRoleUsers**, and **SubordinateRoleUsers** types. |
| `query_id` | `string` | No | Specify the query ID of the user lookup field. Used to retrieve users based on the filter criteria of the lookup field. |
| `child_data` | `object` | No | Specify the child data object containing the record ID of the module with a user lookup field. This is required only if the user lookup field has criteria based on the dynamic value of a record. The **query\_id** parameter is required when this parameter is provided. |
| `ids` | `string[]` | No | Specify a comma-separated list of user IDs to retrieve. If not provided, the API retrieves all users based on the other parameters. |
| `fields` | `string` | No | Specify the comma-separated list of field API names to include in the response. |
| `type__s` | `Regular User \| Sandbox Developer User \| Team User \| Digital Employee \| Support User \| Client Portal User` | No | Filter users by their account type. Possible values: **Regular User** - Standard CRM user with full access to the organization. **Sandbox Developer User** - User with access to the sandbox environment for development and testing. **Team User** - User operating as part of a team account. **Digital Employee** - Automated or bot-type user representing a digital workforce entity. **Support User** - User with access granted for support purposes. **Client Portal User** - User with limited access via the client-facing portal. |

> [accordion] child\_data full type
>
> ```ts theme={null}
> {
>   id: string
> }
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   users?: {
>     $next_shift?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     $current_shift?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     $shift_effective_from?: string | null | null,
>     confirm?: boolean | null,
>     date_format?: string | null,
>     decimal_separator?: string | null,
>     email?: string | null,
>     first_name?: string | null | null,
>     full_name?: string | null,
>     id?: string | null,
>     last_name?: string | null | null,
>     type__s?: string | null,
>     profile?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     role?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     status?: string | string | null,
>     zuid?: string | null | null,
>     alias?: string | null | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     created_time?: string | null | null,
>     locale?: string | null,
>     microsoft?: boolean | null,
>     Modified_By?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     Modified_Time?: string | null | null,
>     phone?: string | null | null,
>     mobile?: string | null | null,
>     city?: string | null | null,
>     country?: string | null | null,
>     dob?: string | null | null,
>     fax?: string | null | null,
>     number_separator?: string | null,
>     state?: string | null | null,
>     street?: string | null | null,
>     time_format?: string | null,
>     website?: string | null | null,
>     zip?: string | null | null,
>     sandboxDeveloper?: boolean | null,
>     name_format__s?: string | null,
>     language?: string | null,
>     status_reason__s?: string | null | null,
>     country_locale?: string | null,
>     ezuid?: string | null,
>     image_link?: string | null,
>     sort_order_preference__s?: string | null,
>     Reporting_To?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     share_among_subordinates?: boolean | null,
>     imap_status?: boolean | null,
>     time_zone?: string | null,
>     distance_preference__s?: string | null,
>     default_tab_group?: string | null,
>     signature?: string | null | null,
>     personal_account?: boolean | null,
>     customize_info?: {
>       notes_desc?: boolean | null | null,
>       show_left_panel?: boolean | null | null,
>       show_right_panel?: string | null | null,
>       show_detail_view?: boolean | null,
>       unpin_recent_item?: boolean | null | null,
>       bc_view?: boolean | null | null,
>       show_home?: boolean | null
>     } | null,
>     theme?: {
>       normal_tab?: {
>         background?: string | null,
>         font_color?: string | null
>       } | null,
>       selected_tab?: {
>         background?: string | null,
>         font_color?: string | null
>       } | null,
>       header?: {
>         background?: string | null,
>         font_color?: string | null
>       } | null,
>       new_background?: string | null | null,
>       background?: string | null,
>       screen?: string | null,
>       type?: string | null
>     } | null,
>     offset?: number | null,
>     Status_Updated_By__s?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     Confirmed_Time__s?: string | null | null,
>     Status_Updated_Time__s?: string | null,
>     Invited_Time__s?: string | null | null,
>     Invited_By__s?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     ntc_notification_type?: number[] | null,
>     ntc_enabled?: boolean | null,
>     rtl_enabled?: boolean | null,
>     telephony_enabled?: boolean | null
>   }[] | null,
>   info?: {
>     per_page?: number | null,
>     count?: number | null,
>     page?: number | null,
>     more_records?: boolean | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### territories.associateMany

`users.territories.associateMany`

Add territories to a user. To associate one or more territories with a specific user in your Zoho CRM organization.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.users.territories.associateMany({
	user: 'example',
	territories: [{ id: '4876876000000333001' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `user` | `string` | Yes | Specify the unique ID of the user. Valid user IDs can be retrieved using the [Get Users](users.json#\$.paths./\{users}.get) API. |
| `territories` | `object[]` | Yes | JSON array specifying the territories to associate with the user. |

> [accordion] territories full type
>
> ```ts theme={null}
> {
>   id: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `territories` | `object[] \| null` | No | Represents the list of per-territory operation results. |

> [accordion] territories full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### territories.get

`users.territories.get`

Specific territory of a user. To retrieve a specific territory assigned to a user in your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.users.territories.get({ user: 'example', territory: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `user` | `string` | Yes | Specify the unique ID of the user. Valid user IDs can be retrieved using the [Get Users](users.json#\$.paths./\{users}.get) API. |
| `territory` | `string` | Yes | Specify the unique ID of the territory. Valid territory IDs can be retrieved using the [Get Territories](user_territories.json#\$.paths./\{users}/\{user}/territories.get) API. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   territories?: {
>     id?: string | null,
>     Manager?: {
>       Name?: string | null,
>       id?: string | null
>     } | null,
>     Reporting_To?: {
>       Name?: string | null,
>       id?: string | null
>     } | null,
>     Name?: string | null
>   }[] | null,
>   info?: {
>     count?: number | null,
>     page?: number | null,
>     per_page?: number | null,
>     more_records?: boolean | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### territories.list

`users.territories.list`

Get territories of a user. To retrieve all territories assigned to a specific user in your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.users.territories.list({ user: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `user` | `string` | Yes | Specify the unique ID of the user. Valid user IDs can be retrieved using the [Get Users](users.json#\$.paths./\{users}.get) API. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   territories?: {
>     id?: string | null,
>     Manager?: {
>       Name?: string | null,
>       id?: string | null
>     } | null,
>     Reporting_To?: {
>       Name?: string | null,
>       id?: string | null
>     } | null,
>     Name?: string | null
>   }[] | null,
>   info?: {
>     count?: number | null,
>     page?: number | null,
>     per_page?: number | null,
>     more_records?: boolean | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### territories.remove

`users.territories.remove`

Remove territory from a user. To remove a specific territory from a user in your Zoho CRM organization. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.users.territories.remove({ user: 'example', territory: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `user` | `string` | Yes | Specify the unique ID of the user. Valid user IDs can be retrieved using the [Get Users](users.json#\$.paths./\{users}.get) API. |
| `territory` | `string` | Yes | Specify the unique ID of the territory. Valid territory IDs can be retrieved using the [Get Territories](user_territories.json#\$.paths./\{users}/\{user}/territories.get) API. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `territories` | `object[] \| null` | No | Represents the list of per-territory operation results. |

> [accordion] territories full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### territories.removeMany

`users.territories.removeMany`

Remove territories from a user. To remove one or more territories from a user in your Zoho CRM organization. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.users.territories.removeMany({ user: 'example', ids: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `user` | `string` | Yes | Specify the unique ID of the user. Valid user IDs can be retrieved using the [Get Users](users.json#\$.paths./\{users}.get) API. |
| `ids` | `string` | Yes | Specify the territory IDs to remove from the user. Accepts comma-separated values. Maximum: 100. Valid territory IDs can be retrieved using the [Get Territories](user_territories.json#\$.paths./\{users}/\{user}/territories.get) API. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `territories` | `object[] \| null` | No | Represents the list of per-territory operation results. |

> [accordion] territories full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### transfer

`users.transfer`

Transfer a user. Transfer user records, assignments, and criteria to another user.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.users.transfer({
	userId: '4876876000000333001',
	transfer: [{
		move_subordinate: { id: '4876876000000333001' },
		transfer: { id: '4876876000000333001' },
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `userId` | `string` | Yes | Represents the unique identifier of the user whose data is to be transferred and whose account is to be deleted. Use the [Get Users API](users.yaml#\$.paths./users.get) API to get the valid values. |
| `transfer` | `object[]` | Yes | Specify the list of transfer operations to perform for the user. Only one transfer operation is allowed per request. |

> [accordion] transfer full type
>
> ```ts theme={null}
> {
>   move_subordinate: {
>     id: string
>   },
>   transfer: {
>     records?: boolean,
>     assignment?: boolean,
>     criteria?: boolean,
>     id: string
>   }
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `transfer` | `object[] \| null` | No | Represents an array containing transfer operation results. |

> [accordion] transfer full type
>
> ```ts theme={null}
> {
>   status?: string | null,
>   code?: string | null,
>   message?: string | null,
>   details?: {
>     job_id?: string | null
>   } | null
> }[] | null
> ```

***

### transferAndDelete

`users.transferAndDelete`

Transfer and delete a user. Transfer user records, assignments, and criteria to another user.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.users.transferAndDelete({
	userId: '4876876000000333001',
	transfer_and_delete: [{
		move_subordinate: { id: '4876876000000333001' },
		transfer: { id: '4876876000000333001' },
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `userId` | `string` | Yes | Represents the unique identifier of the user whose data is to be transferred and whose account is to be deleted. Use the [Get Users API](users.yaml#\$.paths./users.get) API to get the valid values. |
| `transfer_and_delete` | `object[]` | Yes | Specify the list of transfer and delete operations. The array accepts a maximum of one object. |

> [accordion] transfer\_and\_delete full type
>
> ```ts theme={null}
> {
>   move_subordinate: {
>     id: string
>   },
>   transfer: {
>     records?: boolean,
>     assignment?: boolean,
>     criteria?: boolean,
>     id: string
>   }
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `transfer_and_delete` | `object[] \| null` | No | Represents the list of transfer and delete operation results. The array contains a maximum of one object. |

> [accordion] transfer\_and\_delete full type
>
> ```ts theme={null}
> {
>   status?: string | null,
>   code?: string | null,
>   message?: string | null,
>   details?: {
>     job_id?: string | null
>   } | null
> }[] | null
> ```

***

### transferAndDeleteMany

`users.transferAndDeleteMany`

Transfer and delete a user. Transfer user records, assignments, and criteria to another user.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.users.transferAndDeleteMany({
	transfer_and_delete: [{
		id: '4876876000000333001',
		move_subordinate: { id: '4876876000000333001' },
		transfer: { id: '4876876000000333001' },
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `transfer_and_delete` | `object[]` | Yes | Specify the list of user transfer and delete operations to perform. The array accepts a maximum of one entry. |

> [accordion] transfer\_and\_delete full type
>
> ```ts theme={null}
> {
>   id: string,
>   move_subordinate: {
>     id: string
>   },
>   transfer: {
>     records?: boolean,
>     assignment?: boolean,
>     criteria?: boolean,
>     id: string
>   }
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `transfer_and_delete` | `object[] \| null` | No | Represents an array containing transfer and delete operation results. |

> [accordion] transfer\_and\_delete full type
>
> ```ts theme={null}
> {
>   status?: string | null,
>   code?: string | null,
>   message?: string | null,
>   details?: {
>     job_id?: string | null,
>     id?: string | null
>   } | null
> }[] | null
> ```

***

### update

`users.update`

Update a single user by user ID. To update the details of a specific user in your Zoho CRM organization by user ID.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.users.update({
	user: 'example',
	users: [{}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `user` | `string` | Yes | Specify the unique ID of the user to retrieve, update, or delete. |
| `users` | `object[]` | Yes | Specify the user details to update. Only one user record can be submitted per request. |

> [accordion] users full type
>
> ```ts theme={null}
> {
>   $next_shift?: {
>     name: string,
>     id: string
>   } | null,
>   $current_shift?: {
>     name: string,
>     id: string
>   } | null,
>   $shift_effective_from?: string | null,
>   date_format?: dd-MM-yyyy | dd/MM/yyyy | dd.MM.yyyy | dd MM yyyy | dd-MM-yy | dd/MM/yy | dd.MM.yy | d.MM.yy | d-M-yy | d/M/yy | d.M.yy | d.M.yy. | d-M-yyyy | d/M/yyyy | d.M.yyyy | d. M. yyyy. | d. M. yyyy | d MMM,
>   yyyy | dd MMM,
>   yyyy | d. MMMM yyyy | dd.MM.yyyy. | dd.MM.yy. | yyyy-MM-dd | yyyy/MM/dd | yyyy.MM.dd | yyyy MM dd | yy/MM/dd | yy-MM-dd | yy.M.d | yy-M-d | yy. M. d | yyyy/M/d | yyyy年MM月dd日 | yy年M月d日 | yyyy.MM.dd. | yyyy. MM. dd | MM-dd-yyyy | MM/dd/yyyy | MM.dd.yyyy | MM dd yyyy | MM-dd-yy | MM/dd/yy | M/dd/yy | MMM-dd-yyyy | MMM dd,
>   yyyy | MMM d,
>   yyyy | MMMM d,
>   yyyy | yyyy.dd.MM | yy.d.M,
>   decimal_separator?: Comma | Period,
>   email?: string,
>   first_name?: string,
>   last_name?: string | null,
>   profile?: {
>     name: string,
>     id: string
>   },
>   role?: {
>     name: string,
>     id: string
>   },
>   status?: active | inactive,
>   alias?: string | null,
>   locale?: in_ID | zh_CN | zh_TW | da_DK | de_DE | en_GB | en_US | es_ES | fr_FR | iw_IL | hr_HR | it_IT | hu_HU | nl_NL | pl_PL | pt_BR | pt_PT | sv_SE | vi_VN | tr_TR | cs_CZ | bg_BG | ru_RU | ar_EG | hi_IN | th_TH | ja_JP | ko_KR,
>   phone?: string | null,
>   mobile?: string | null,
>   city?: string | null,
>   country?: string | null,
>   dob?: string | null,
>   fax?: string | null,
>   number_separator?: Comma | Period | Space | comma | period | space,
>   state?: string | null,
>   street?: string | null,
>   time_format?: HH:mm | hh:mm a,
>   website?: string | null,
>   zip?: string | null,
>   name_format__s?: Salutation,
>   First Name,
>   Last Name | Salutation,
>   Last Name,
>   First Name | First Name,
>   Salutation,
>   Last Name | First Name,
>   Last Name,
>   Salutation | Last Name,
>   Salutation,
>   First Name | Last Name,
>   First Name,
>   Salutation,
>   language?: af_NA | af_ZA | ak_GH | su_ID | cy_GB | de_CH | de_AT | en_AU | en_CA | en_IE | en_NZ | en_SG | en_ZA | ee_GH | ee_TG | fy_NL | ga_GB | ga_IE | gv_IM | ki_KE | gd_GB | ha_GH | ha_NG | ha_NE | ig_NG | rn_BI | jv_ID | rw_RW | sw_CD | sw_KE | sw_TZ | sw_UG | lg_UG | lb_LU | mg_MG | mt_MT | ms_BN | ms_ID | ms_MY | ms_SG | nl_BE | nl_BQ | om_ET | om_KE | ff_GN | ff_SN | qu_BO | qu_EC | qu_PE | so_ET | so_DJ | so_KE | so_SO | sg_CF | vi_VN | lu_CD | tr_CY | tr_TR | wo_SN | az_AZ | bm_ML | bs_BA | br_FR | ca_AD | ca_ES | ca_FR | ca_IT | sn_ZW | da_DK | da_GL | se_NO | se_SE | se_FI | et_EE | es_AR | es_BO | es_CL | es_CO | es_CR | es_EC | es_SV | es_GT | es_HN | es_NI | es_PA | es_PY | es_PE | es_PR | es_DO | es_UY | es_VE | eu_ES | fr_BE | fr_CA | fr_CH | fo_DK | fo_FO | gl_ES | hr_BA | hr_HR | nd_ZW | xh_ZA | zu_ZA | it_VA | it_IT | it_SM | it_CH | kl_GL | kw_GB | ku_TR | lv_LV | to_TO | lt_LT | ln_AO | ln_CG | ln_CF | ln_CD | hu_HU | nn_NO | no_NO | nb_NO | nb_SJ | uz_AF | uz_UZ | pl_PL | ro_MD | ro_RO | rm_CH | sq_XK | sq_MK | sq_AL | sk_SK | sl_SI | fi_FI | sv_FI | sv_SE | sv_AX | mi_NZ | tk_TM | yo_BJ | yo_NG | is_IS | cs_CZ | el_GR | el_CY | be_BY | bg_BG | os_GE | os_RU | ky_KG | mk_MK | mn_MN | ce_RU | sr_BA | sr_CS | sr_RS | sr_ME | tt_RU | tg_TJ | uk_UA | kk_KZ | hy_AM | ug_CN | ur_IN | ur_PK | ar_JO | ar_AE | ar_BH | ar_DZ | ar_SD | ar_IQ | ar_KW | ar_MA | ar_SA | ar_YE | ar_TN | ar_SY | ar_OM | ar_QA | ar_LB | ar_LY | sd_PK | sd_IN | fa_AF | fa_IR | ps_AF | ps_PK | ks_IN | ne_NP | ne_IN | mr_IN | sa_IN | hi_IN | as_IN | bn_BD | bn_IN | pa_PK | pa_IN | gu_IN | or_IN | ta_IN | ta_LK | ta_SG | ta_MY | te_IN | kn_IN | ml_IN | si_LK | th_TH | lo_LA | bo_IN | bo_CN | dz_BT | my_MM | ka_GE | ti_ET | ti_ER | am_ET | km_KH | zh_MO | zh_HK | zh_SG | zh_CN | zh_TW | ja_JP | ii_CN | ko_KR | ko_KP,
>   country_locale?: ps_AF | sv_AX | sq_AL | ar_DZ | en_AS | ca_AD | pt_AO | en_AI | en_AQ | en_AG | es_AR | hy_AM | nl_AW | en_AU | de_AT | az_AZ | en_BS | ar_BH | bn_BD | en_BB | be_BY | nl_BE | fr_BE | en_BZ | fr_BJ | en_BM | en_BT | es_BO | bs_BA | en_BW | no_BV | pt_BR | en_IO | en_VG | ms_BN | bg_BG | fr_BF | fr_BI | km_KH | fr_CM | en_CA | fr_CA | pt_CV | en_KY | fr_CF | ar_TD | es_CL | zh_CN | en_CX | en_CC | es_CO | fr_KM | en_CK | es_CR | hr_HR | es_CU | el_CY | cs_CZ | fr_CD | da_DK | ar_DJ | en_DM | es_DO | es_EC | ar_EG | es_SV | es_GQ | en_ER | et_EE | en_SZ | am_ET | en_FK | fo_FO | fj_FJ | fi_FI | fr_FR | fr_GF | fr_PF | fr_TF | fr_GA | en_GM | ka_GE | de_DE | en_GH | en_GI | el_GR | kl_GL | en_GD | fr_GP | en_GU | es_GT | fr_GN | pt_GW | en_GY | fr_HT | en_HM | es_HN | zh_HK | hu_HU | is_IS | en_IN | id_ID | fa_IR | ar_IQ | en_IE | iw_IL | it_IT | en_JM | ja_JP | ar_JO | ru_KZ | sw_KE | en_KI | ar_KW | uz_KG | lo_LA | lv_LV | ar_LB | en_LS | en_LR | ar_LY | de_LI | lt_LT | fr_LU | de_LU | zh_MO | en_MG | en_MW | ms_MY | dv_MV | fr_ML | mt_MT | en_MH | fr_MQ | ar_MR | en_MU | fr_YT | es_MX | en_FM | ro_MD | fr_MC | mn_MN | sr_ME | en_MS | ar_MA | pt_MZ | my_MM | en_NA | en_NR | ne_NP | nl_NL | nl_AN | fr_NC | en_NZ | es_NI | fr_NE | en_NG | en_NU | en_NF | ko_KP | mk_MK | en_MP | no_NO | ar_OM | en_PK | en_PW | ar_PS | es_PA | en_PG | es_PY | es_PE | en_PH | en_PN | pl_PL | pt_PT | es_PR | ar_QA | fr_CG | fr_RE | ro_RO | ru_RU | rw_RW | en_SH | en_KN | en_LC | fr_PM | en_VC | en_WS | it_SM | pt_ST | ar_SA | fr_SN | sr_RS | sr_CS | en_SC | en_SL | en_SG | sk_SK | sl_SI | en_SB | so_SO | en_ZA | en_GS | ko_KR | es_ES | si_LK | ar_SD | nl_SR | no_SJ | sv_SE | fr_CH | de_CH | it_CH | ar_SY | zh_TW | fa_TJ | sw_TZ | th_TH | pt_TL | fr_TG | en_TK | to_TO | en_TT | ar_TN | tr_TR | tk_TM | en_TC | en_TV | en_UG | uk_UA | ar_AE | en_GB | en_US | en_UM | es_UY | uz_UZ | bi_VU | it_VA | es_VE | vi_VN | en_VI | fr_WF | ar_EH | ar_YE | en_ZM | en_ZW | fr_CI,
>   image_link?: string,
>   sort_order_preference__s?: First Name,
>   Last Name | Last Name,
>   First Name,
>   Reporting_To?: {
>     name: string,
>     id: string
>   } | null,
>   share_among_subordinates?: boolean,
>   time_zone?: string,
>   distance_preference__s?: Kilometers | Miles,
>   default_tab_group?: number | string,
>   signature?: string | null,
>   customize_info?: {
>     notes_desc?: boolean,
>     show_left_panel?: boolean,
>     show_detail_view?: boolean
>   }
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `users` | `object[] \| null` | No | Represents the list of outcome objects returned after processing the user update request. Each element reports the result status for the updated user record. |

> [accordion] users full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### updateMany

`users.updateMany`

Update users. To update the details of one or more users in your Zoho CRM organization. The request must include a users array with up to 10 user records, each identified by a unique user ID. You can update user profile settings, role assignments, locale preferences, and other account details.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.users.updateMany({
	users: [{}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `users` | `object[]` | Yes | Specify the list of user records to update. Each object in the array represents a single user whose details you want to modify. |

> [accordion] users full type
>
> ```ts theme={null}
> {
>   $next_shift?: {
>     name: string,
>     id: string
>   } | null,
>   $current_shift?: {
>     name: string,
>     id: string
>   } | null,
>   $shift_effective_from?: string | null,
>   date_format?: dd-MM-yyyy | dd/MM/yyyy | dd.MM.yyyy | dd MM yyyy | dd-MM-yy | dd/MM/yy | dd.MM.yy | d.MM.yy | d-M-yy | d/M/yy | d.M.yy | d.M.yy. | d-M-yyyy | d/M/yyyy | d.M.yyyy | d. M. yyyy. | d. M. yyyy | d MMM,
>   yyyy | dd MMM,
>   yyyy | d. MMMM yyyy | dd.MM.yyyy. | dd.MM.yy. | yyyy-MM-dd | yyyy/MM/dd | yyyy.MM.dd | yyyy MM dd | yy/MM/dd | yy-MM-dd | yy.M.d | yy-M-d | yy. M. d | yyyy/M/d | yyyy年MM月dd日 | yy年M月d日 | yyyy.MM.dd. | yyyy. MM. dd | MM-dd-yyyy | MM/dd/yyyy | MM.dd.yyyy | MM dd yyyy | MM-dd-yy | MM/dd/yy | M/dd/yy | MMM-dd-yyyy | MMM dd,
>   yyyy | MMM d,
>   yyyy | MMMM d,
>   yyyy | yyyy.dd.MM | yy.d.M,
>   decimal_separator?: Comma | Period,
>   email?: string,
>   first_name?: string,
>   last_name?: string | null,
>   profile?: {
>     name: string,
>     id: string
>   },
>   role?: {
>     name: string,
>     id: string
>   },
>   status?: active | inactive,
>   alias?: string | null,
>   locale?: in_ID | zh_CN | zh_TW | da_DK | de_DE | en_GB | en_US | es_ES | fr_FR | iw_IL | hr_HR | it_IT | hu_HU | nl_NL | pl_PL | pt_BR | pt_PT | sv_SE | vi_VN | tr_TR | cs_CZ | bg_BG | ru_RU | ar_EG | hi_IN | th_TH | ja_JP | ko_KR,
>   phone?: string | null,
>   mobile?: string | null,
>   city?: string | null,
>   country?: string | null,
>   dob?: string | null,
>   fax?: string | null,
>   number_separator?: Comma | Period | Space | comma | period | space,
>   state?: string | null,
>   street?: string | null,
>   time_format?: HH:mm | hh:mm a,
>   website?: string | null,
>   zip?: string | null,
>   name_format__s?: Salutation,
>   First Name,
>   Last Name | Salutation,
>   Last Name,
>   First Name | First Name,
>   Salutation,
>   Last Name | First Name,
>   Last Name,
>   Salutation | Last Name,
>   Salutation,
>   First Name | Last Name,
>   First Name,
>   Salutation,
>   language?: af_NA | af_ZA | ak_GH | su_ID | cy_GB | de_CH | de_AT | en_AU | en_CA | en_IE | en_NZ | en_SG | en_ZA | ee_GH | ee_TG | fy_NL | ga_GB | ga_IE | gv_IM | ki_KE | gd_GB | ha_GH | ha_NG | ha_NE | ig_NG | rn_BI | jv_ID | rw_RW | sw_CD | sw_KE | sw_TZ | sw_UG | lg_UG | lb_LU | mg_MG | mt_MT | ms_BN | ms_ID | ms_MY | ms_SG | nl_BE | nl_BQ | om_ET | om_KE | ff_GN | ff_SN | qu_BO | qu_EC | qu_PE | so_ET | so_DJ | so_KE | so_SO | sg_CF | vi_VN | lu_CD | tr_CY | tr_TR | wo_SN | az_AZ | bm_ML | bs_BA | br_FR | ca_AD | ca_ES | ca_FR | ca_IT | sn_ZW | da_DK | da_GL | se_NO | se_SE | se_FI | et_EE | es_AR | es_BO | es_CL | es_CO | es_CR | es_EC | es_SV | es_GT | es_HN | es_NI | es_PA | es_PY | es_PE | es_PR | es_DO | es_UY | es_VE | eu_ES | fr_BE | fr_CA | fr_CH | fo_DK | fo_FO | gl_ES | hr_BA | hr_HR | nd_ZW | xh_ZA | zu_ZA | it_VA | it_IT | it_SM | it_CH | kl_GL | kw_GB | ku_TR | lv_LV | to_TO | lt_LT | ln_AO | ln_CG | ln_CF | ln_CD | hu_HU | nn_NO | no_NO | nb_NO | nb_SJ | uz_AF | uz_UZ | pl_PL | ro_MD | ro_RO | rm_CH | sq_XK | sq_MK | sq_AL | sk_SK | sl_SI | fi_FI | sv_FI | sv_SE | sv_AX | mi_NZ | tk_TM | yo_BJ | yo_NG | is_IS | cs_CZ | el_GR | el_CY | be_BY | bg_BG | os_GE | os_RU | ky_KG | mk_MK | mn_MN | ce_RU | sr_BA | sr_CS | sr_RS | sr_ME | tt_RU | tg_TJ | uk_UA | kk_KZ | hy_AM | ug_CN | ur_IN | ur_PK | ar_JO | ar_AE | ar_BH | ar_DZ | ar_SD | ar_IQ | ar_KW | ar_MA | ar_SA | ar_YE | ar_TN | ar_SY | ar_OM | ar_QA | ar_LB | ar_LY | sd_PK | sd_IN | fa_AF | fa_IR | ps_AF | ps_PK | ks_IN | ne_NP | ne_IN | mr_IN | sa_IN | hi_IN | as_IN | bn_BD | bn_IN | pa_PK | pa_IN | gu_IN | or_IN | ta_IN | ta_LK | ta_SG | ta_MY | te_IN | kn_IN | ml_IN | si_LK | th_TH | lo_LA | bo_IN | bo_CN | dz_BT | my_MM | ka_GE | ti_ET | ti_ER | am_ET | km_KH | zh_MO | zh_HK | zh_SG | zh_CN | zh_TW | ja_JP | ii_CN | ko_KR | ko_KP,
>   country_locale?: ps_AF | sv_AX | sq_AL | ar_DZ | en_AS | ca_AD | pt_AO | en_AI | en_AQ | en_AG | es_AR | hy_AM | nl_AW | en_AU | de_AT | az_AZ | en_BS | ar_BH | bn_BD | en_BB | be_BY | nl_BE | fr_BE | en_BZ | fr_BJ | en_BM | en_BT | es_BO | bs_BA | en_BW | no_BV | pt_BR | en_IO | en_VG | ms_BN | bg_BG | fr_BF | fr_BI | km_KH | fr_CM | en_CA | fr_CA | pt_CV | en_KY | fr_CF | ar_TD | es_CL | zh_CN | en_CX | en_CC | es_CO | fr_KM | en_CK | es_CR | hr_HR | es_CU | el_CY | cs_CZ | fr_CD | da_DK | ar_DJ | en_DM | es_DO | es_EC | ar_EG | es_SV | es_GQ | en_ER | et_EE | en_SZ | am_ET | en_FK | fo_FO | fj_FJ | fi_FI | fr_FR | fr_GF | fr_PF | fr_TF | fr_GA | en_GM | ka_GE | de_DE | en_GH | en_GI | el_GR | kl_GL | en_GD | fr_GP | en_GU | es_GT | fr_GN | pt_GW | en_GY | fr_HT | en_HM | es_HN | zh_HK | hu_HU | is_IS | en_IN | id_ID | fa_IR | ar_IQ | en_IE | iw_IL | it_IT | en_JM | ja_JP | ar_JO | ru_KZ | sw_KE | en_KI | ar_KW | uz_KG | lo_LA | lv_LV | ar_LB | en_LS | en_LR | ar_LY | de_LI | lt_LT | fr_LU | de_LU | zh_MO | en_MG | en_MW | ms_MY | dv_MV | fr_ML | mt_MT | en_MH | fr_MQ | ar_MR | en_MU | fr_YT | es_MX | en_FM | ro_MD | fr_MC | mn_MN | sr_ME | en_MS | ar_MA | pt_MZ | my_MM | en_NA | en_NR | ne_NP | nl_NL | nl_AN | fr_NC | en_NZ | es_NI | fr_NE | en_NG | en_NU | en_NF | ko_KP | mk_MK | en_MP | no_NO | ar_OM | en_PK | en_PW | ar_PS | es_PA | en_PG | es_PY | es_PE | en_PH | en_PN | pl_PL | pt_PT | es_PR | ar_QA | fr_CG | fr_RE | ro_RO | ru_RU | rw_RW | en_SH | en_KN | en_LC | fr_PM | en_VC | en_WS | it_SM | pt_ST | ar_SA | fr_SN | sr_RS | sr_CS | en_SC | en_SL | en_SG | sk_SK | sl_SI | en_SB | so_SO | en_ZA | en_GS | ko_KR | es_ES | si_LK | ar_SD | nl_SR | no_SJ | sv_SE | fr_CH | de_CH | it_CH | ar_SY | zh_TW | fa_TJ | sw_TZ | th_TH | pt_TL | fr_TG | en_TK | to_TO | en_TT | ar_TN | tr_TR | tk_TM | en_TC | en_TV | en_UG | uk_UA | ar_AE | en_GB | en_US | en_UM | es_UY | uz_UZ | bi_VU | it_VA | es_VE | vi_VN | en_VI | fr_WF | ar_EH | ar_YE | en_ZM | en_ZW | fr_CI,
>   image_link?: string,
>   sort_order_preference__s?: First Name,
>   Last Name | Last Name,
>   First Name,
>   Reporting_To?: {
>     name: string,
>     id: string
>   } | null,
>   share_among_subordinates?: boolean,
>   time_zone?: string,
>   distance_preference__s?: Kilometers | Miles,
>   default_tab_group?: number | string,
>   signature?: string | null,
>   customize_info?: {
>     notes_desc?: boolean,
>     show_left_panel?: boolean,
>     show_detail_view?: boolean
>   }
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `users` | `object[] \| null` | No | Represents the list of user update result objects returned after a successful request. |

> [accordion] users full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### validateBeforeTransfer

`users.validateBeforeTransfer`

Validate user before transfer. Validates whether the specified user has open records, assignments, criteria configurations, subordinates, or alerts before transferring the user's data. Use this operation to check the user's dependencies before initiating a transfer.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.users.validateBeforeTransfer({ userId: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `userId` | `string` | Yes | Represents the unique identifier of the user whose data is to be transferred and whose account is to be deleted. Use the [Get Users API](users.yaml#\$.paths./users.get) API to get the valid values. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   validate_before_transfer?: {
>     id?: string | null,
>     name?: string | null,
>     assignment?: boolean | null,
>     criteria?: boolean | null,
>     subordinates?: boolean | null,
>     alert?: boolean | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

## Variable Groups

### generateApiName

`variableGroups.generateApiName`

Generate API Name. To generate an available API name for a new variable group in your Zoho CRM organization. Submit the proposed display name in the request, and the API returns a suggested api\_name that complies with the naming requirements.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.variableGroups.generateApiName({
	variable_groups: [{ name: 'example' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `variable_groups` | `object[]` | Yes | Represents an array containing a single variable group item submitted for API name generation. |

> [accordion] variable\_groups full type
>
> ```ts theme={null}
> {
>   name: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `variable_groups` | `object[] \| null` | No | Represents an array of per-item results containing the generated API names for each submitted variable group. |

> [accordion] variable\_groups full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null,
>     api_name?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### get

`variableGroups.get`

Get variable group by ID. To retrieve the details of a specific variable group by its ID in your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.variableGroups.get({ id: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Specifies the unique ID of the variable group to retrieve or update. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   variable_groups?: {
>     display_label?: string | null,
>     api_name?: string | null,
>     name?: string | null,
>     description?: string | null | null,
>     id?: string | null,
>     source?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### list

`variableGroups.list`

Variable Groups. To retrieve a list of all variable groups in your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.variableGroups.list({});
```

**Input:** *empty object*

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   variable_groups?: {
>     display_label?: string | null,
>     api_name?: string | null,
>     name?: string | null,
>     description?: string | null | null,
>     id?: string | null,
>     source?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### update

`variableGroups.update`

Update variable group by ID. To update the details of a specific variable group by its ID in your Zoho CRM organization.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.variableGroups.update({
	id: '4876876000000333001',
	variable_groups: [{}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Specifies the unique ID of the variable group to retrieve or update. |
| `variable_groups` | `object[]` | Yes | Represents an array containing a single variable group definition item for the update by ID operation. |

> [accordion] variable\_groups full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   description?: string | null,
>   api_name?: string | null
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `variable_groups` | `object[] \| null` | No | Represents an array containing the per-item operation status for the updated variable group. |

> [accordion] variable\_groups full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null,
>     api_name?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### updateMany

`variableGroups.updateMany`

Variable Groups. To update the details of one or more variable groups in your Zoho CRM organization. The request accepts a maximum of 10 variable group items. When individual items succeed or fail independently, the API returns a 207 multi-status response with per-item results.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.variableGroups.updateMany({
	variable_groups: [{ id: '487687600000033300' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `variable_groups` | `object[]` | Yes | Represents an array of variable group update items for batch processing. The array accepts 1 to 10 items. |

> [accordion] variable\_groups full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   description?: string | null,
>   id: string,
>   api_name?: string | null
> }[]
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   variable_groups?: {
>     code?: string | null,
>     details?: {
>       id?: string | null,
>       api_name?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   variable_groups?: (
>     {
>       code?: string | null,
>       details?: {
>         id?: string | null,
>         api_name?: string | null
>       } | null,
>       message?: string | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       details?: {
>         api_name?: string | null,
>         json_path?: string | null
>       } | null,
>       message?: string | null,
>       status?: string | null
>     }
>   )[] | null
> }
> ```

***

## Variables

### create

`variables.create`

Create variables. Creates one or more CRM variables. The name, api\_name, and variable\_group keys are mandatory. The type key specifies the data type of the variable. Possible types: integer, text, percent, decimal, currency, date, datetime, email, phone, url, checkbox, textarea, long.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.variables.create({
	variables: [{
		api_name: 'example',
		name: 'example',
		type: 'text',
		variable_group: { id: '4876876000000333001' },
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `variables` | `object[]` | Yes | Array of variable definitions to create. Maximum: 25 items. |

> [accordion] variables full type
>
> ```ts theme={null}
> {
>   api_name: string,
>   name: string,
>   description?: string | null,
>   type: text | integer | boolean | date | float,
>   variable_group: {
>     id: string
>   },
>   value?: string | number | boolean | null
> }[]
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   variables?: {
>     code?: string | null,
>     details?: {
>       id?: string | null,
>       api_name?: string | null,
>       json_path?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   variables?: {
>     code?: string | null,
>     details?: {
>       id?: string | null,
>       api_name?: string | null,
>       json_path?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> }
> ```

***

### delete

`variables.delete`

Specific variable. Deletes a specific CRM variable identified by its ID. A variable that is associated with other features such as email templates, webhooks, or functions cannot be deleted until the association is removed. Requires the ZohoCRM.settings.variables.DELETE scope. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.variables.delete({ id: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The unique ID of the variable. Mandatory. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `variables` | `object[] \| null` | No | Array of operation results for each deleted variable. |

> [accordion] variables full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null,
>     api_name?: string | null,
>     json_path?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### deleteMany

`variables.deleteMany`

Delete variables. Deletes one or more CRM variables by their IDs. Pass variable IDs as a comma-separated list in the ids query parameter, or pass rids in the rids query parameter. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.variables.deleteMany({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `ids` | `string[]` | No | Comma-separated list of variable IDs to delete. Mandatory when deleting multiple variables. Maximum: 100 IDs. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `variables` | `object[] \| null` | No | Array of operation results for each deleted variable. |

> [accordion] variables full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null,
>     api_name?: string | null,
>     json_path?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### generateApiName

`variables.generateApiName`

Generate API Name. generates api name. (POST /crm/v8/settings/variables/actions/generate\_api\_name)

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.variables.generateApiName({
	variables: [{
		name: 'example',
		variable_group: {},
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `variables` | `object[]` | Yes | Array of variable definitions. Mandatory. |

> [accordion] variables full type
>
> ```ts theme={null}
> {
>   name: string,
>   variable_group: {
>     api_name?: string,
>     name?: string,
>     id?: string
>   }
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `variables` | `object[] \| null` | No | Array of results for the API name generation operation. |

> [accordion] variables full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null,
>     api_name?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### get

`variables.get`

specific variable. Retrieves the details of a specific CRM variable by its ID. The group query parameter, specifying the variable group ID or API name, is mandatory when retrieving a specific variable. Requires the ZohoCRM.settings.variables.READ scope.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.variables.get({ id: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The unique ID of the variable. Mandatory. |
| `group` | `string` | No | The unique ID or API name of the variable group to which the variable belongs. Mandatory when retrieving a specific variable by ID. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   variables?: {
>     read_only?: boolean | null,
>     api_name?: string | null,
>     name?: string | null,
>     description?: string | null | null,
>     id?: string | null,
>     source?: string | null,
>     type?: string | null,
>     variable_group?: {
>       api_name?: string | null,
>       name?: string | null,
>       id?: string | null
>     } | null,
>     value?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### getAssociations

`variables.getAssociations`

Variable Associations. Get associated variables.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.variables.getAssociations({ id: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The unique ID of the variable. Mandatory. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   variables_associations?: {
>     name?: string | null,
>     resources?: {
>       name?: string | null,
>       details?: {
>         module?: {
>           api_name?: string | null,
>           id?: string | null
>         } | null
>       } | null,
>       id?: string | null
>     }[] | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### list

`variables.list`

Retrieve all variables. Retrieves all available CRM variables. Returns the API name, display name, description, type, value, and variable group for each variable. Requires the ZohoCRM.settings.variables.READ scope.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.variables.list({});
```

**Input:** *empty object*

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   variables?: {
>     read_only?: boolean | null,
>     api_name?: string | null,
>     name?: string | null,
>     description?: string | null | null,
>     id?: string | null,
>     source?: string | null,
>     type?: string | null,
>     variable_group?: {
>       api_name?: string | null,
>       name?: string | null,
>       id?: string | null
>     } | null,
>     value?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### update

`variables.update`

Specific variable. Updates a specific CRM variable identified by its ID or API name. You cannot update the type or variable group of the variable. For the list of updatable input keys, refer to the Create Variables operation. Requires the ZohoCRM.settings.variables.UPDATE scope.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.variables.update({
	id: '4876876000000333001',
	variables: [{ id: '4876876000000333001', value: 'example' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The unique ID of the variable. Mandatory. |
| `variables` | `object[]` | Yes | Array of variable update items to process. Mandatory. |

> [accordion] variables full type
>
> ```ts theme={null}
> {
>   id: string,
>   value: string | number | boolean | null
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `variables` | `object[] \| null` | No | Array of variable update items to process. |

> [accordion] variables full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null,
>     api_name?: string | null,
>     json_path?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### updateMany

`variables.updateMany`

Update variables. Updates one or more CRM variables in a single request. The id key is mandatory in the request body to identify each variable. You cannot update the type or variable group of a variable. Requires the ZohoCRM.settings.variables.UPDATE scope.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.variables.updateMany({
	variables: [{ id: '4876876000000333001', value: 'example' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `variables` | `object[]` | Yes | Array of variable update items to process. Mandatory. |

> [accordion] variables full type
>
> ```ts theme={null}
> {
>   id: string,
>   value: string | number | boolean | null
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `variables` | `object[] \| null` | No | Array of operation results for each updated variable. |

> [accordion] variables full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null,
>     api_name?: string | null,
>     json_path?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

## Webforms

### create

`webforms.create`

Create a new webform in Zoho CRM. To create a new webform in Zoho CRM with full configuration, including module assignment, layout, form fields, button attributes, analytics settings, double opt-in, spam control, visitor tracking, and portal form support. A single webform may be submitted per request.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.webforms.create({
	module: 'Leads',
	webforms: [{
		action_on_submit: 'splash_message',
		form_fields: [{ type: 'general' }],
		layout: {},
		location_url: ['https://example.com/callback'],
		module: { api_name: 'example', id: '4876876000000333001' },
		name: 'example',
		type: 'webform',
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the module API name of the CRM module for which the webform is being created or updated. Refer to the [Get Modules](modules.yaml#\$.paths./settings/modules.get) resource for valid values. |
| `webforms` | `object[]` | Yes | Contains the list of webform configuration objects included in the request body. |

> [accordion] webforms full type
>
> ```ts theme={null}
> {
>   id?: string,
>   owner?: {
>     id?: string
>   },
>   double_optin_details?: {
>     confirm_page_content: string,
>     email_template: {
>       subject: string,
>       from_address: {
>         api_name?: string,
>         name?: string,
>         id?: string,
>         type: string,
>         email?: string
>       },
>       content: string
>     }
>   } | null,
>   analytics_data?: {
>     analytics_enabled?: boolean | null,
>     url_analytics_enabled?: boolean | null
>   },
>   module: {
>     api_name: string,
>     id: string
>   },
>   acknowledge_visitor?: {
>     reply_to_address: {
>       id: string,
>       type: string,
>       email?: string,
>       api_name?: string
>     },
>     template_name: string,
>     auto_response_rule: {
>       name?: string | null,
>       id: string
>     },
>     template_id: string,
>     from_address: {
>       api_name?: string,
>       name?: string,
>       id?: string,
>       type: string,
>       email?: string
>     },
>     email_meta?: {
>       userLookupEmailsObj: {
>       },
>       otherEmailsObj: {
>       },
>       orgEmailsArr: {
>         email_id?: string,
>         isaccessible?: boolean,
>         name?: string,
>         id?: string
>       }[]
>     }
>   } | null,
>   button_attributes?: {
>     color: string,
>     name: string
>   }[] | null,
>   notify_owner?: {
>     name?: string,
>     id?: string,
>     system_mail?: boolean | null
>   } | null,
>   type: webform | portalform,
>   form_attributes?: {
>     color: string,
>     width: number | string,
>     font_attributes: {
>       size: number | string,
>       color: string,
>       family: string
>     },
>     display_form_name?: boolean,
>     align: string
>   },
>   action_on_submit: splash_message | thank_you_message | redirect_url,
>   location_url: string[],
>   tags?: {
>     name: string,
>     id: string
>   }[] | null,
>   double_optin_enabled?: boolean | null,
>   layout: {
>     display_label?: string,
>     name?: string,
>     id?: string
>   },
>   form_fields: {
>     type: general | advanced | portal,
>     help?: {
>     } | null,
>     field?: {
>       api_name: string,
>       field_label?: string,
>       id: string
>     },
>     hidden?: boolean | null,
>     date_format?: string | null,
>     required?: boolean | null,
>     field_name?: string | null,
>     site_key?: string | null,
>     secret_key?: string | null,
>     recaptcha_label?: string | null,
>     theme?: dark | light | null,
>     privacy_value?: string | null,
>     default_value?: string | null,
>     field_info?: {
>       type: string,
>       field_label?: string
>     } | null
>   }[],
>   user_type?: {
>     name?: string | null,
>     active?: boolean | null,
>     id: string
>   },
>   assignment_rule?: {
>     name?: string,
>     id?: string
>   } | null,
>   create_contact?: boolean | null,
>   approval_request?: boolean | null,
>   name: string,
>   action_value?: string | null,
>   spam_control?: {
>     spam_possibility_threshold: number | string
>   },
>   visitor_tracking?: {
>     portal_name: string,
>     tracking_code?: string | null
>   }
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `code` | `string \| null` | No | Represents the status code of the API response. Example: "SUCCESS". |
| `details` | `object \| null` | No | Represents additional details about the API response, such as the ID of the created or modified resource. |
| `message` | `string \| null` | No | Represents the response message describing the outcome of the operation. |
| `status` | `string \| null` | No | Represents the status of the API response. Possible values: success - The operation was successful. Example: "success". |

> [accordion] details full type
>
> ```ts theme={null}
> {
> } | null
> ```

***

### delete

`webforms.delete`

Delete a webform by ID. To delete a specific webform from your Zoho CRM organization, send a DELETE request with the webform ID. The webform is permanently removed and the operation cannot be undone. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.webforms.delete({ id: '4876876000000333001', module: 'Leads' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Specify the unique [Webform ID](webforms.yaml#\$.paths./settings/webforms.get). |
| `module` | `string` | Yes | Specify the module API name of the CRM module for which the webform is being created or updated. Refer to the [Get Modules](modules.yaml#\$.paths./settings/modules.get) resource for valid values. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `code` | `string \| null` | No | Represents the status code of the API response. Example: "SUCCESS". |
| `details` | `object \| null` | No | Represents additional details about the API response, such as the ID of the created or modified resource. |
| `message` | `string \| null` | No | Represents the response message describing the outcome of the operation. |
| `status` | `string \| null` | No | Represents the status of the API response. Possible values: success - The operation was successful. Example: "success". |

> [accordion] details full type
>
> ```ts theme={null}
> {
> } | null
> ```

***

### deleteMany

`webforms.deleteMany`

Delete webforms by IDs. To delete multiple webforms from Zoho CRM, specify the IDs of the webforms to be removed. Note: - When multiple Webform IDs are passed, if some deletions succeed and others fail, the API responds with 207 Multi-Status. Check the status key in each response item to see the result of each deletion. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.webforms.deleteMany({ ids: 1 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `ids` | `number` | Yes | Specify the comma-separated list of webform IDs for bulk delete or other bulk operations. Use the [Get Webforms API](webforms.yaml#\$.paths./settings/webforms.get) to retrieve the webform IDs. |
| `trigger_source` | `string` | No | Specify the source that triggered the webform deletion. |
| `module` | `string` | No | Specify the module API name to filter webforms by the target CRM module. Refer to the [Get Modules](modules.yaml#\$.paths./settings/modules.get) resource for valid values. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   webforms?: {
>     code?: string | null,
>     details?: {
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   webforms?: (
>     {
>       code?: string | null,
>       details?: {
>       } | null,
>       message?: string | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       details?: {
>       } | null,
>       message?: string | null,
>       status?: string | null
>     }
>   )[] | null
> }
> ```

***

### get

`webforms.get`

Retrieve a webform by ID. To retrieve a specific webform by its ID, use this endpoint in Zoho CRM. The operation returns the configuration and details of a single webform record identified by the required path parameter.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.webforms.get({ id: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Specify the unique [Webform ID](webforms.yaml#\$.paths./settings/webforms.get). |
| `module` | `string` | No | Specify the module API name to filter webforms by the target CRM module. Refer to the [Get Modules](modules.yaml#\$.paths./settings/modules.get) resource for valid values. |
| `include_inner_details` | `string` | No | Specify whether to include inner details such as portal information in the webforms response. Possible values: true - Include inner details. false - Exclude inner details. |
| `from_time` | `string` | No | Specify the start date and time for the analytics data period in ISO 8601 format. |
| `to_time` | `string` | No | Specify the end date and time for the analytics data period in ISO 8601 format. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   webforms?: {
>     google_site?: null | null,
>     encrypted_form_id?: string | null,
>     acknowledge_visitor?: {
>       reply_to_address?: {
>         id?: string | null,
>         type?: string | null,
>         email?: string | null,
>         api_name?: string | null
>       } | null,
>       template_name?: string | null,
>       auto_response_rule?: {
>         name?: string | null | null,
>         id?: string | null
>       } | null,
>       template_id?: string | null,
>       from_address?: {
>         api_name?: string | null,
>         name?: string | null,
>         id?: string | null,
>         type?: string | null,
>         email?: string | null
>       } | null,
>       email_meta?: {
>         userLookupEmailsObj?: {
>         } | null,
>         otherEmailsObj?: {
>         } | null,
>         orgEmailsArr?: {
>           email_id?: string | null,
>           isaccessible?: boolean | null,
>           name?: string | null,
>           id?: string | null
>         }[] | null
>       } | null
>     } | null | null,
>     button_attributes?: {
>       color?: string | null,
>       name?: string | null
>     }[] | null | null,
>     type?: string | null,
>     action_on_submit?: string | null,
>     form_fields?: {
>       type?: string | null,
>       help?: {
>       } | null | null,
>       field?: {
>         api_name?: string | null,
>         field_label?: string | null,
>         id?: string | null
>       } | null,
>       hidden?: boolean | null | null,
>       date_format?: string | null | null,
>       required?: boolean | null | null,
>       field_name?: string | null | null,
>       site_key?: string | null | null,
>       secret_key?: string | null | null,
>       recaptcha_label?: string | null | null,
>       theme?: string | null | null,
>       privacy_value?: string | null | null,
>       default_value?: string | null | null,
>       field_info?: {
>         type?: string | null,
>         field_label?: string | null
>       } | null | null
>     }[] | null,
>     encrypted_zgid?: string | null,
>     action_value?: string | null,
>     id?: string | null,
>     owner?: {
>     } | null | null,
>     created_time?: string | null,
>     double_optin_details?: {
>       confirm_page_content?: string | null,
>       email_template?: {
>         subject?: string | null,
>         from_address?: {
>           api_name?: string | null,
>           name?: string | null,
>           id?: string | null,
>           type?: string | null,
>           email?: string | null
>         } | null,
>         content?: string | null
>       } | null
>     } | null | null,
>     analytics_data?: {
>       iframe_url_tracking_code?: string | null,
>       url_analytics_enabled?: boolean | null,
>       analytics_enabled?: boolean | null,
>       analytics_enabled_time?: string | null,
>       tracking_code?: string | null
>     } | null,
>     module?: {
>       api_name?: string | null,
>       id?: string | null
>     } | null,
>     suggestion?: null | null,
>     encrypted_module?: string | null,
>     active?: boolean | null,
>     adword_enabled?: boolean | null,
>     notify_owner?: {
>       name?: string | null,
>       id?: string | null,
>       system_mail?: boolean | null | null
>     } | null | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     form_attributes?: {
>       color?: string | null,
>       width?: number | null,
>       font_attributes?: {
>         size?: number | null,
>         color?: string | null,
>         family?: string | null
>       } | null,
>       display_form_name?: boolean | null,
>       align?: string | null
>     } | null,
>     location_url?: string[] | null,
>     double_optin_enabled?: boolean | null,
>     tags?: {
>       name?: string | null,
>       id?: string | null
>     }[] | null,
>     layout?: {
>       display_label?: string | null,
>       name?: string | null,
>       id?: string | null
>     } | null,
>     approval_request?: boolean | null,
>     create_contact?: boolean | null,
>     assignment_rule?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     name?: string | null,
>     visitor_tracking?: null | null,
>     spam_control?: {
>       spam_possibility_threshold?: number | null
>     } | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### getAssociated

`webforms.getAssociated`

Get webform associations. To retrieve association details for a specific webform in Zoho CRM, including linked records, orchestration entries, and transition rules tied to the webform.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.webforms.getAssociated({ id: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Specify the unique [Webform ID](webforms.yaml#\$.paths./settings/webforms.get). |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   webform_associations?: {
>     records_associated?: boolean | null,
>     associated?: {
>       name?: string | null,
>       details?: {
>         Transition?: {
>           name?: string | null,
>           id?: string | null
>         } | null
>       } | null,
>       id?: string | null,
>       type?: string | null
>     }[] | null,
>     id?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### getDiff

`webforms.getDiff`

Get webform diff. Retrieves the field-level differences between two webforms in the CRM organization. The base\_form and variant\_form query parameters identify the two forms to compare. The response lists all fields that differ between the two forms, including added, removed, and modified fields.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.webforms.getDiff({ base_form: 1, variant_form: 1 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `base_form` | `number` | Yes | Specify the ID of the base webform for comparison in an A/B testing diff request. Use the [Get Webforms API](webforms.yaml#\$.paths./settings/webforms.get) to retrieve the webform ID. |
| `variant_form` | `number` | Yes | Specify the ID of the variant webform for comparison in an A/B testing diff request. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   diff?: {
>     modified_fields?: {
>       help?: {
>         text?: string | null,
>         url?: string | null,
>         status?: string | null
>       } | null | null,
>       display_label?: string | null,
>       type?: string | null,
>       field?: {
>         api_name?: string | null,
>         field_label?: string | null,
>         id?: string | null
>       } | null,
>       field_info?: {
>         field_label?: string | null,
>         type?: string | null
>       } | null,
>       required?: boolean | null,
>       hidden?: boolean | null
>     }[] | null | null,
>     added_fields?: {
>       help?: {
>         text?: string | null,
>         url?: string | null,
>         status?: string | null
>       } | null | null,
>       display_label?: string | null,
>       type?: string | null,
>       field?: {
>         api_name?: string | null,
>         field_label?: string | null,
>         id?: string | null
>       } | null,
>       field_info?: {
>         field_label?: string | null,
>         type?: string | null
>       } | null,
>       required?: boolean | null,
>       hidden?: boolean | null
>     }[] | null | null,
>     button_attributes?: {
>       name?: string | null,
>       label?: string | null
>     }[] | null | null,
>     form_attributes?: {
>       color?: string | null,
>       width?: string | null,
>       align?: string | null,
>       font_attributes?: {
>         color?: string | null,
>         size?: string | null,
>         family?: string | null
>       } | null
>     } | null | null,
>     removed_fields?: {
>       help?: {
>         text?: string | null,
>         url?: string | null,
>         status?: string | null
>       } | null | null,
>       display_label?: string | null,
>       type?: string | null,
>       field?: {
>         api_name?: string | null,
>         field_label?: string | null,
>         id?: string | null
>       } | null,
>       field_info?: {
>         field_label?: string | null,
>         type?: string | null
>       } | null,
>       required?: boolean | null,
>       hidden?: boolean | null
>     }[] | null | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### getPreview

`webforms.getPreview`

Retrieve webform source code and embed options. To retrieve the HTML source code and embed options for a specific webform configured in your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.webforms.getPreview({ id: '4876876000000333001', module: 'Leads' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Specify the unique [Webform ID](webforms.yaml#\$.paths./settings/webforms.get). |
| `module` | `string` | Yes | Specify the module API name of the CRM module for which the webform is being created or updated. Refer to the [Get Modules](modules.yaml#\$.paths./settings/modules.get) resource for valid values. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   webforms?: {
>     embed_code?: string | null,
>     code_formats?: string[] | null,
>     module?: {
>       api_name?: string | null,
>       id?: string | null
>     } | null,
>     name?: string | null,
>     active?: boolean | null,
>     id?: string | null,
>     smart_url?: string | null,
>     type?: string | null,
>     source_code?: string | null,
>     iframe_code?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### getSuggestions

`webforms.getSuggestions`

Get optimization suggestions for a webform. To retrieve AI-powered optimization suggestions for a specific webform in Zoho CRM, including recommended fields, format improvements, and variant configurations based on the webform performance data.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.webforms.getSuggestions({ id: '487687600000033300' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Specify the unique [Webform ID](webforms.yaml#\$.paths./settings/webforms.get). |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   webform_suggestions?: {
>     suggestion_details?: {
>       reason?: {
>         low_filled_rate_fields?: {
>           api_name?: string | null,
>           field_label?: string | null,
>           id?: string | null
>         }[] | null,
>         conversion_rate?: string | null
>       } | null,
>       suggested_variant_info?: {
>         button_attributes?: {
>           color?: string | null,
>           name?: string | null
>         }[] | null,
>         fields?: {
>           help?: {
>             text?: string | null,
>             url?: null | null
>           } | null | null,
>           hidden?: boolean | null,
>           advanced?: boolean | null,
>           api_name?: string | null,
>           field_label?: string | null,
>           id?: string | null,
>           required?: boolean | null,
>           field_name?: string | null
>         }[] | null,
>         form_attributes?: {
>           color?: string | null,
>           width?: number | null,
>           font_attributes?: {
>             size?: number | null,
>             color?: string | null,
>             family?: string | null
>           } | null,
>           align?: string | null
>         } | null
>       } | null
>     } | null,
>     type?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### list

`webforms.list`

Get webforms. To retrieve all webforms from your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.webforms.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | No | Specify the module API name to filter webforms by the target CRM module. Refer to the [Get Modules](modules.yaml#\$.paths./settings/modules.get) resource for valid values. |
| `include_inner_details` | `string` | No | Specify whether to include inner details such as portal information in the webforms response. Possible values: true - Include inner details. false - Exclude inner details. |
| `feature_name` | `string` | No | Specify the feature name to check whether the required permission is granted for the feature. |
| `active` | `true \| false` | No | Specify the active status of the webforms to filter. Possible values: true - Return only active webforms. false - Return only inactive webforms. |
| `layout_id` | `number` | No | Specify the layout ID to filter the webforms list by layout. Refer to the [Get Layouts](layouts.yaml#\$.paths./settings/layouts.get) resource for valid values. |
| `filters` | `object` | No | Specify the filter criteria for the webforms list. The value must be a JSON object with group and group\_operator fields. |

> [accordion] filters full type
>
> ```ts theme={null}
> {
>   "group_operator":"and" | "group":[
>     {
>       "field":{
>         "api_name":"isenabled" | "field_label":"Status" | "data_type":"picklist"
>       } | "comparator":"equal" | "value":"true" | "type":"value"
>     } | {
>       "field":{
>         "api_name":"isenabled" | "value":"false" | {
>           "field":{
>             "api_name":"last_submitted_time" | "field_label":"Last Submission" | "data_type":"datetime"
>           } | "comparator":"between" | "value":[
>             "2025-11-18T19:30:00+00:00" | "2025-11-18T19:30:59+00:00"
>           ] | {
>             "field":{
>               "api_name":"formname" | "field_label":"Form Name" | "data_type":"text"
>             } | "comparator":"ends_with" | "value":"new" | "comparator":"starts_with" | "comparator":"not_contains" | "comparator":"contains" | "comparator":"not_equal" | {
>               "field":{
>                 "api_name":"created_time" | "field_label":"Created Time" | "value":[
>                   "2025-10-31T18:30:00+00:00" | "2025-11-26T10:17:25+00:00"
>                 ] | "value":[
>                   "2025-11-24T18:30:00+00:00" | "2025-11-25T18:29:59+00:00"
>                 ] | "comparator":"not_between" | "2025-11-25T19:31:00+00:00"
>               ] | "value":[
>                 "2025-11-25T19:30:00+00:00" | "2025-11-25T19:30:59+00:00"
>               ] | "comparator":"greater_than" | "value":"2025-11-25T19:30:59+00:00" | "comparator":"less_than" | "value":"2025-11-10T19:30:00+00:00" | {
>                 "field":{
>                   "api_name":"created_by" | "field_label":"Created By" | "data_type":"userlookup"
>                 } | "value":[
>                   "4149211000000605001"
>                 ] | "type":"value"
>               }
>             ]
>           }
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   webforms?: {
>     layout?: {
>       display_label?: string | null,
>       name?: string | null,
>       id?: string | null
>     } | null,
>     created_time?: string | null,
>     analytics_data?: {
>       analytics_enabled?: boolean | null,
>       analytics_enabled_time?: string | null
>     } | null,
>     module?: {
>       api_name?: string | null,
>       id?: string | null
>     } | null,
>     suggestion?: null | null,
>     name?: string | null,
>     type?: string | null,
>     active?: boolean | null,
>     id?: string | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     last_submitted_time?: null | null,
>     user_type?: {
>       name?: string | null | null,
>       active?: boolean | null | null,
>       id?: string | null
>     } | null
>   }[] | null,
>   info?: {
>     per_page?: number | null,
>     count?: number | null,
>     page?: number | null,
>     sort_by?: string | null,
>     sort_order?: string | null,
>     more_records?: boolean | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### update

`webforms.update`

Update a specific webform by ID. To update a specific webform in Zoho CRM by its ID, send a PUT request with a webforms array containing one webform object and the required module query parameter (for example, Leads).

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.webforms.update({
	id: '4876876000000333001',
	module: 'Leads',
	webforms: [{
		action_on_submit: 'splash_message',
		form_fields: [{ type: 'general' }],
		layout: {},
		location_url: ['https://example.com/callback'],
		module: { api_name: 'example', id: '4876876000000333001' },
		name: 'example',
		type: 'webform',
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Specify the unique [Webform ID](webforms.yaml#\$.paths./settings/webforms.get). |
| `module` | `string` | Yes | Specify the module API name of the CRM module for which the webform is being created or updated. Refer to the [Get Modules](modules.yaml#\$.paths./settings/modules.get) resource for valid values. |
| `webforms` | `object[]` | Yes | Contains the list of webform configuration objects included in the request body. |

> [accordion] webforms full type
>
> ```ts theme={null}
> {
>   id?: string,
>   owner?: {
>     id?: string
>   },
>   double_optin_details?: {
>     confirm_page_content: string,
>     email_template: {
>       subject: string,
>       from_address: {
>         api_name?: string,
>         name?: string,
>         id?: string,
>         type: string,
>         email?: string
>       },
>       content: string
>     }
>   } | null,
>   analytics_data?: {
>     analytics_enabled?: boolean | null,
>     url_analytics_enabled?: boolean | null
>   },
>   module: {
>     api_name: string,
>     id: string
>   },
>   acknowledge_visitor?: {
>     reply_to_address: {
>       id: string,
>       type: string,
>       email?: string,
>       api_name?: string
>     },
>     template_name: string,
>     auto_response_rule: {
>       name?: string | null,
>       id: string
>     },
>     template_id: string,
>     from_address: {
>       api_name?: string,
>       name?: string,
>       id?: string,
>       type: string,
>       email?: string
>     },
>     email_meta?: {
>       userLookupEmailsObj: {
>       },
>       otherEmailsObj: {
>       },
>       orgEmailsArr: {
>         email_id?: string,
>         isaccessible?: boolean,
>         name?: string,
>         id?: string
>       }[]
>     }
>   } | null,
>   button_attributes?: {
>     color: string,
>     name: string
>   }[] | null,
>   notify_owner?: {
>     name?: string,
>     id?: string,
>     system_mail?: boolean | null
>   } | null,
>   type: webform | portalform,
>   form_attributes?: {
>     color: string,
>     width: number | string,
>     font_attributes: {
>       size: number | string,
>       color: string,
>       family: string
>     },
>     display_form_name?: boolean,
>     align: string
>   },
>   action_on_submit: splash_message | thank_you_message | redirect_url,
>   location_url: string[],
>   tags?: {
>     name: string,
>     id: string
>   }[] | null,
>   double_optin_enabled?: boolean | null,
>   layout: {
>     display_label?: string,
>     name?: string,
>     id?: string
>   },
>   form_fields: {
>     type: general | advanced | portal,
>     help?: {
>     } | null,
>     field?: {
>       api_name: string,
>       field_label?: string,
>       id: string
>     },
>     hidden?: boolean | null,
>     date_format?: string | null,
>     required?: boolean | null,
>     field_name?: string | null,
>     site_key?: string | null,
>     secret_key?: string | null,
>     recaptcha_label?: string | null,
>     theme?: dark | light | null,
>     privacy_value?: string | null,
>     default_value?: string | null,
>     field_info?: {
>       type: string,
>       field_label?: string
>     } | null
>   }[],
>   user_type?: {
>     name?: string | null,
>     active?: boolean | null,
>     id: string
>   },
>   assignment_rule?: {
>     name?: string,
>     id?: string
>   } | null,
>   create_contact?: boolean | null,
>   approval_request?: boolean | null,
>   name: string,
>   action_value?: string | null,
>   spam_control?: {
>     spam_possibility_threshold: number | string
>   },
>   visitor_tracking?: {
>     portal_name: string,
>     tracking_code?: string | null
>   }
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `code` | `string \| null` | No | Represents the status code of the API response. Example: "SUCCESS". |
| `details` | `object \| null` | No | Represents additional details about the API response, such as the ID of the created or modified resource. |
| `message` | `string \| null` | No | Represents the response message describing the outcome of the operation. |
| `status` | `string \| null` | No | Represents the status of the API response. Possible values: success - The operation was successful. Example: "success". |

> [accordion] details full type
>
> ```ts theme={null}
> {
> } | null
> ```

***

### updateMany

`webforms.updateMany`

Update webforms in Zoho CRM. To update the settings of a webform in Zoho CRM, including its name, module, layout, form fields, double opt-in configuration, analytics settings, visitor tracking, spam control, and action on submit.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.webforms.updateMany({
	module: 'Leads',
	webforms: [{
		action_on_submit: 'splash_message',
		form_fields: [{ type: 'general' }],
		layout: {},
		location_url: ['https://example.com/callback'],
		module: { api_name: 'example', id: '4876876000000333001' },
		name: 'example',
		type: 'webform',
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the module API name of the CRM module for which the webform is being created or updated. Refer to the [Get Modules](modules.yaml#\$.paths./settings/modules.get) resource for valid values. |
| `webforms` | `object[]` | Yes | Contains the list of webform configuration objects included in the request body. |

> [accordion] webforms full type
>
> ```ts theme={null}
> {
>   id?: string,
>   owner?: {
>     id?: string
>   },
>   double_optin_details?: {
>     confirm_page_content: string,
>     email_template: {
>       subject: string,
>       from_address: {
>         api_name?: string,
>         name?: string,
>         id?: string,
>         type: string,
>         email?: string
>       },
>       content: string
>     }
>   } | null,
>   analytics_data?: {
>     analytics_enabled?: boolean | null,
>     url_analytics_enabled?: boolean | null
>   },
>   module: {
>     api_name: string,
>     id: string
>   },
>   acknowledge_visitor?: {
>     reply_to_address: {
>       id: string,
>       type: string,
>       email?: string,
>       api_name?: string
>     },
>     template_name: string,
>     auto_response_rule: {
>       name?: string | null,
>       id: string
>     },
>     template_id: string,
>     from_address: {
>       api_name?: string,
>       name?: string,
>       id?: string,
>       type: string,
>       email?: string
>     },
>     email_meta?: {
>       userLookupEmailsObj: {
>       },
>       otherEmailsObj: {
>       },
>       orgEmailsArr: {
>         email_id?: string,
>         isaccessible?: boolean,
>         name?: string,
>         id?: string
>       }[]
>     }
>   } | null,
>   button_attributes?: {
>     color: string,
>     name: string
>   }[] | null,
>   notify_owner?: {
>     name?: string,
>     id?: string,
>     system_mail?: boolean | null
>   } | null,
>   type: webform | portalform,
>   form_attributes?: {
>     color: string,
>     width: number | string,
>     font_attributes: {
>       size: number | string,
>       color: string,
>       family: string
>     },
>     display_form_name?: boolean,
>     align: string
>   },
>   action_on_submit: splash_message | thank_you_message | redirect_url,
>   location_url: string[],
>   tags?: {
>     name: string,
>     id: string
>   }[] | null,
>   double_optin_enabled?: boolean | null,
>   layout: {
>     display_label?: string,
>     name?: string,
>     id?: string
>   },
>   form_fields: {
>     type: general | advanced | portal,
>     help?: {
>     } | null,
>     field?: {
>       api_name: string,
>       field_label?: string,
>       id: string
>     },
>     hidden?: boolean | null,
>     date_format?: string | null,
>     required?: boolean | null,
>     field_name?: string | null,
>     site_key?: string | null,
>     secret_key?: string | null,
>     recaptcha_label?: string | null,
>     theme?: dark | light | null,
>     privacy_value?: string | null,
>     default_value?: string | null,
>     field_info?: {
>       type: string,
>       field_label?: string
>     } | null
>   }[],
>   user_type?: {
>     name?: string | null,
>     active?: boolean | null,
>     id: string
>   },
>   assignment_rule?: {
>     name?: string,
>     id?: string
>   } | null,
>   create_contact?: boolean | null,
>   approval_request?: boolean | null,
>   name: string,
>   action_value?: string | null,
>   spam_control?: {
>     spam_possibility_threshold: number | string
>   },
>   visitor_tracking?: {
>     portal_name: string,
>     tracking_code?: string | null
>   }
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `code` | `string \| null` | No | Represents the status code of the API response. Example: "SUCCESS". |
| `details` | `object \| null` | No | Represents additional details about the API response, such as the ID of the created or modified resource. |
| `message` | `string \| null` | No | Represents the response message describing the outcome of the operation. |
| `status` | `string \| null` | No | Represents the status of the API response. Possible values: success - The operation was successful. Example: "success". |

> [accordion] details full type
>
> ```ts theme={null}
> {
> } | null
> ```

***

## Webhooks

### create

`webhooks.create`

Webhooks. To create a webhook action that fires an HTTP request to an external URL in your Zoho CRM organization when an automation trigger fires. The http\_method value controls which optional request fields are accepted.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.webhooks.create({
	webhooks: [{
		name: 'example',
		module: { api_name: 'example', id: '4876876000000333001' },
		url: 'https://example.com/article',
		http_method: 'POST',
		authentication: { type: 'general' },
		feature_type: 'workflow',
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `webhooks` | `object[]` | Yes | Represents the list containing exactly one webhook object to create. |

> [accordion] webhooks full type
>
> ```ts theme={null}
> {
>   name: string,
>   module: {
>     api_name: string,
>     id: string
>   },
>   url: string,
>   http_method: POST | GET | PUT | DELETE,
>   authentication: {
>     connection_name?: string | null,
>     type: general | connection
>   },
>   description?: string | null,
>   related_module?: {
>     api_name?: string,
>     id?: string
>   } | null,
>   feature_type: workflow | approval_process | blueprint_transition | blueprint_state | assignment_rules | kiosk | commandcenter_service,
>   headers?: {
>     custom_parameters?: {
>       name?: string,
>       value?: string
>     }[] | null,
>     module_parameters?: {
>       name?: string,
>       value?: string
>     }[] | null
>   },
>   url_parameters?: {
>     custom_parameters?: {
>       name?: string,
>       value?: string
>     }[],
>     module_parameters?: {
>       name?: string,
>       value?: string
>     }[],
>     user_defined_parameters?: {
>       name?: string,
>       value?: string
>     }
>   } | null,
>   body?: {
>     format: JSON | XML | Text | HTML | null,
>     raw_data_content?: string | null,
>     type: form_data | raw | none,
>     form_data_content?: {
>       module_parameters?: {
>         name?: string,
>         value?: string
>       }[],
>       user_defined_parameter?: {
>         name?: string,
>         value?: string
>       },
>       custom_parameters?: {
>         name?: string,
>         value?: string
>       }[]
>     }
>   },
>   date_time_format?: {
>     datetime_format?: string,
>     date_format?: string,
>     time_zone?: string
>   } | null
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `webhooks` | `object[] \| null` | No | Represents the list containing the operation result for the created webhook, including the new webhook ID. |

> [accordion] webhooks full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### delete

`webhooks.delete`

Delete a webhook by ID. To delete a specific webhook configured in your Zoho CRM organization using its unique ID. Read-only webhooks created by Marketplace extensions cannot be deleted. Webhooks associated with active Workflow Rules, Approval Processes, Blueprints, or Command Center also cannot be deleted. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.webhooks.delete({ webhookId: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `webhookId` | `string` | Yes | Specify the unique ID of the webhook to delete. Refer to the [Get Webhooks](webhooks.yaml#\$.paths./settings/automation/webhooks.get) resource for valid values. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `webhooks` | `object[] \| null` | No | Represents the list containing the operation result for the deleted webhook. |

> [accordion] webhooks full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### deleteMany

`webhooks.deleteMany`

Delete one or more webhooks. To delete one or more webhook actions configured in your Zoho CRM account. Up to 10 webhooks can be deleted in a single API call using the ids query parameter. Read-only webhooks created by Zoho extensions cannot be deleted. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.webhooks.deleteMany({ ids: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `ids` | `string` | Yes | Specify the comma-separated list of webhook IDs to delete. Accepts comma-separated values. Refer to the [Get Webhooks](webhooks.yaml#\$.paths./settings/automation/webhooks.get) resource for valid values. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   webhooks?: {
>     code?: string | null,
>     details?: {
>       id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   webhooks?: {
>     code?: string | null,
>     details?: {
>       id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> }
> ```

***

### get

`webhooks.get`

Get webhook by ID. To retrieve the configuration of a specific webhook in your Zoho CRM organization using its ID. Use the Get Webhooks API first to discover webhook IDs.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.webhooks.get({ webhookId: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `webhookId` | `string` | Yes | Specify the ID of the webhook to retrieve. Refer to the [Get Webhooks](webhooks.yaml#\$.paths./settings/automation/webhooks.get) resource for valid values. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   webhooks?: {
>     created_time?: string | null,
>     headers?: {
>       custom_parameters?: {
>         name?: string | null,
>         value?: string | null
>       }[] | null | null,
>       module_parameters?: {
>         name?: string | null,
>         value?: string | null
>       }[] | null | null
>     } | null,
>     lock_status?: {
>       locked?: boolean | null,
>       message?: string | null | null
>     } | null,
>     editable?: boolean | null,
>     module?: {
>       api_name?: string | null,
>       id?: string | null
>     } | null,
>     related_module?: {
>       api_name?: string | null,
>       id?: string | null
>     } | null | null,
>     url_parameters?: {
>       custom_parameters?: {
>         name?: string | null,
>         value?: string | null
>       }[] | null,
>       module_parameters?: {
>         name?: string | null,
>         value?: string | null
>       }[] | null,
>       user_defined_parameters?: {
>         name?: string | null,
>         value?: string | null
>       } | null
>     } | null | null,
>     deletable?: boolean | null,
>     description?: string | null | null,
>     source?: string | null | null,
>     body?: {
>       format?: string | null | null,
>       raw_data_content?: string | null | null,
>       type?: string | null,
>       form_data_content?: {
>         module_parameters?: {
>           name?: string | null,
>           value?: string | null
>         }[] | null,
>         user_defined_parameter?: {
>           name?: string | null,
>           value?: string | null
>         } | null,
>         custom_parameters?: {
>           name?: string | null,
>           value?: string | null
>         }[] | null
>       } | null
>     } | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     url?: string | null,
>     feature_type?: string | null,
>     http_method?: string | null,
>     modified_time?: string | null,
>     associated?: boolean | null,
>     name?: string | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     id?: string | null,
>     date_time_format?: {
>       datetime_format?: string | null,
>       date_format?: string | null,
>       time_zone?: string | null
>     } | null | null,
>     authentication?: {
>       connection_name?: string | null | null,
>       type?: string | null
>     } | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### getAssociatedModules

`webhooks.getAssociatedModules`

Get webhook-associated modules. To retrieve the list of CRM modules that have at least one webhook currently associated in your Zoho CRM organization. Results are filtered based on the requesting user's module access permissions. Use these module API names as valid values for the module filter when querying webhook failures.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.webhooks.getAssociatedModules({});
```

**Input:** *empty object*

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   associated_modules?: {
>     api_name?: string | null,
>     id?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### getFailures

`webhooks.getFailures`

Get webhook execution failure records. To retrieve detailed information about webhook execution failures in your Zoho CRM organization. Optionally filter results by module, webhook ID, and date range. If the from and to parameters are not specified, the API returns webhook failures from the last 30 days by default.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.webhooks.getFailures({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `webhook_id` | `string` | No | Specify the unique identifier of the webhook whose failure records to retrieve. Refer to the [Get Webhooks](webhooks.yaml#\$.paths./settings/automation/webhooks.get) resource for valid values. When omitted, failure records for all webhooks are returned. |
| `module` | `string` | No | Specify the API name of the parent CRM module to filter webhooks. When omitted, webhooks across all modules are returned. Refer to the [Get Modules](modules.yaml#\$.paths./settings/modules.get) resource for valid values. |
| `from` | `string` | No | Specify the start date (inclusive) for the query window in YYYY-MM-DD format, evaluated in the organization's time zone. For webhook\_failures, defaults to 30 days before **to**; earlier dates are clamped to that 30-day window. For usage\_reports, defaults to 30 days before **to**. Future dates return 400 INVALID\_DATA. |
| `to` | `string` | No | Specify the end date (inclusive) for the query window in YYYY-MM-DD format, evaluated in the organization's time zone. Defaults to the current date at 23:59:59 when omitted. Must be on or after the **from** date. Future dates are rejected. |
| `page` | `number \| string` | No | Specify the page number for paginated results. Defaults to 1 when omitted. Use together with per\_page to navigate large result sets. |
| `per_page` | `number \| string` | No | Specify the number of records to return per page. Default and maximum is **200**. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   webhook_failures?: {
>     webhook?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     entity_details?: {
>       module?: {
>         api_name?: string | null,
>         id?: string | null
>       } | null,
>       name?: string | null,
>       id?: string | null
>     } | null,
>     failure_time?: string | null,
>     failure_reason?: string | null,
>     id?: string | null,
>     workflow_rule?: {
>       name?: string | null,
>       id?: string | null
>     } | null
>   }[] | null,
>   info?: {
>     max_limit?: number | null,
>     per_page?: number | null,
>     count?: number | null,
>     page?: number | null,
>     more_records?: boolean | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### getUsageReports

`webhooks.getUsageReports`

Get webhook action usage reports. To retrieve usage statistics for webhook actions executed in your Zoho CRM organization. Specify the group\_by parameter to control the granularity of results; optionally filter by automation feature type and date range.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.webhooks.getUsageReports({ group_by: 'date' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `group_by` | `date \| date,resource \| date,resource,type` | Yes | Specify the grouping criteria for usage data. Must include date. Possible values: **date** - Returns daily totals; the resource object is omitted from each row. **date,resource** - Returns per-action rows including resource.id and resource.name. **date,resource,type** - Returns per-action rows grouped by resource and type. |
| `type` | `workflow_rules \| approval_process \| blueprint \| orchestrations \| wizards \| modules \| webhooks \| kiosks` | No | Specify the automation feature type to filter usage data. When omitted, usage across all supported feature types is returned. Possible values: **workflow\_rules** - Workflow Rules. **approval\_process** - Approval Process. **blueprint** - Blueprint. **orchestrations** - Orchestrations. **wizards** - Wizards. **modules** - Modules. **webhooks** - Webhooks. **kiosks** - Kiosks. |
| `from` | `string` | No | Specify the start date (inclusive) for the query window in YYYY-MM-DD format, evaluated in the organization's time zone. For webhook\_failures, defaults to 30 days before **to**; earlier dates are clamped to that 30-day window. For usage\_reports, defaults to 30 days before **to**. Future dates return 400 INVALID\_DATA. |
| `to` | `string` | No | Specify the end date (inclusive) for the query window in YYYY-MM-DD format, evaluated in the organization's time zone. Defaults to the current date at 23:59:59 when omitted. Must be on or after the **from** date. Future dates are rejected. |
| `page` | `number \| string` | No | Specify the page number for paginated results. Defaults to 1 when omitted. Use together with per\_page to navigate large result sets. |
| `per_page` | `number \| string` | No | Specify the number of records to return per page. Default and maximum is **200**. |
| `sort_order` | `asc \| desc` | No | Specify the sort direction for list results. Defaults to desc when omitted. Possible values: **asc** - Ascending order. **desc** - Descending order. |
| `include_inner_details` | `string` | No | Specify to request additional nested fields within usage report resource objects. Currently, only resource.layout\_id is recognized; it adds layout\_id inside the resource object when available, primarily for wizard usage rows. Other values are silently ignored. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data_usage?: {
>     date?: string | null,
>     resource?: {
>       id?: string | null,
>       name?: string | null,
>       layout_id?: string | null
>     } | null,
>     count?: number | null,
>     type?: string | null
>   }[] | null,
>   info?: {
>     per_page?: number | null,
>     count?: number | null,
>     page?: number | null,
>     more_records?: boolean | null,
>     max_limit?: number | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### list

`webhooks.list`

Get webhooks. To retrieve the list of all webhook action configurations available in your Zoho CRM organization. The response contains summary-level data for each webhook, including the module, URL, HTTP method, feature type, and audit metadata.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.webhooks.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | No | Specify the API name of the parent CRM module to filter webhooks. When omitted, webhooks across all modules are returned. Refer to the [Get Modules](modules.yaml#\$.paths./settings/modules.get) resource for valid values. |
| `page` | `number \| string` | No | Specify the page number for paginated results. Defaults to 1 when omitted. Use together with per\_page to navigate large result sets. |
| `per_page` | `number \| string` | No | Specify the number of records to return per page. Default and maximum is **200**. |
| `sort_by` | `string` | No | Specify the field used to sort the webhook list. Currently only Modified\_Time is accepted. Possible values: **Modified\_Time** - Sort by the last modified timestamp. |
| `sort_order` | `asc \| desc` | No | Specify the sort direction for list results. Defaults to desc when omitted. Possible values: **asc** - Ascending order. **desc** - Descending order. |
| `feature_type` | `workflow \| approval_process \| blueprint_transition \| blueprint_state \| assignment_rules \| kiosk \| commandcenter_service` | No | Specify the automation feature type to filter webhooks. When omitted, webhooks of all feature types are returned. Possible values: **workflow** - Workflow Rule. **approval\_process** - Approval Process. **blueprint\_transition** - Blueprint transition. **blueprint\_state** - Blueprint state. **assignment\_rules** - Assignment Rules. **kiosk** - Kiosk feature. **commandcenter\_service** - CommandCenter service. |
| `related_module` | `string` | No | Specify the API name of a child or dependent module linked to the parent module (for example, Notes or Attachments). When omitted, webhooks across all related modules are returned. |
| `filters` | `string` | No | Specify the JSON filter expression to narrow webhook results by name. The object must include field (with api\_name), comparator, and value keys. The only supported comparator is contains, which performs a case-insensitive partial match on the webhook name. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   webhooks?: {
>     created_time?: string | null,
>     headers?: {
>       custom_parameters?: {
>         name?: string | null,
>         value?: string | null
>       }[] | null | null,
>       module_parameters?: {
>         name?: string | null,
>         value?: string | null
>       }[] | null | null
>     } | null,
>     lock_status?: {
>       locked?: boolean | null,
>       message?: string | null | null
>     } | null,
>     editable?: boolean | null,
>     module?: {
>       api_name?: string | null,
>       id?: string | null
>     } | null,
>     related_module?: {
>       api_name?: string | null,
>       id?: string | null
>     } | null | null,
>     url_parameters?: {
>       custom_parameters?: {
>         name?: string | null,
>         value?: string | null
>       }[] | null,
>       module_parameters?: {
>         name?: string | null,
>         value?: string | null
>       }[] | null,
>       user_defined_parameters?: {
>         name?: string | null,
>         value?: string | null
>       } | null
>     } | null | null,
>     deletable?: boolean | null,
>     description?: string | null | null,
>     source?: string | null | null,
>     body?: {
>       format?: string | null | null,
>       raw_data_content?: string | null | null,
>       type?: string | null,
>       form_data_content?: {
>         module_parameters?: {
>           name?: string | null,
>           value?: string | null
>         }[] | null,
>         user_defined_parameter?: {
>           name?: string | null,
>           value?: string | null
>         } | null,
>         custom_parameters?: {
>           name?: string | null,
>           value?: string | null
>         }[] | null
>       } | null
>     } | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     url?: string | null,
>     feature_type?: string | null,
>     http_method?: string | null,
>     modified_time?: string | null,
>     associated?: boolean | null,
>     name?: string | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     id?: string | null,
>     date_time_format?: {
>       datetime_format?: string | null,
>       date_format?: string | null,
>       time_zone?: string | null
>     } | null | null,
>     authentication?: {
>       connection_name?: string | null | null,
>       type?: string | null
>     } | null
>   }[] | null,
>   info?: {
>     max_limit?: number | null,
>     per_page?: number | null,
>     count?: number | null,
>     page?: number | null,
>     more_records?: boolean | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### update

`webhooks.update`

Update webhook by ID. To update the configuration of a specific webhook in your Zoho CRM organization using its ID. The module field cannot be changed after webhook creation. Read-only webhooks created by Marketplace extensions cannot be updated.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.webhooks.update({
	webhookId: 'example',
	webhooks: [{
		name: 'example',
		module: { api_name: 'example', id: '4876876000000333001' },
		url: 'https://example.com/article',
		http_method: 'POST',
		authentication: { type: 'general' },
		feature_type: 'workflow',
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `webhookId` | `string` | Yes | Specify the unique ID of the webhook to update. Refer to the [Get Webhooks](webhooks.yaml#\$.paths./settings/automation/webhooks.get) resource for valid values. |
| `webhooks` | `object[]` | Yes | Represents the list containing exactly one webhook object with the full replacement configuration. |

> [accordion] webhooks full type
>
> ```ts theme={null}
> {
>   id?: string,
>   name: string,
>   module: {
>     api_name: string,
>     id: string
>   },
>   url: string,
>   http_method: POST | GET | PUT | DELETE,
>   authentication: {
>     connection_name?: string | null,
>     type: general | connection
>   },
>   description?: string | null,
>   related_module?: {
>     api_name?: string,
>     id?: string
>   } | null,
>   feature_type: workflow | approval_process | blueprint_transition | blueprint_state | assignment_rules | kiosk | commandcenter_service,
>   headers?: {
>     custom_parameters?: {
>       name?: string,
>       value?: string
>     }[] | null,
>     module_parameters?: {
>       name?: string,
>       value?: string
>     }[] | null
>   },
>   url_parameters?: {
>     custom_parameters?: {
>       name?: string,
>       value?: string
>     }[],
>     module_parameters?: {
>       name?: string,
>       value?: string
>     }[],
>     user_defined_parameters?: {
>       name?: string,
>       value?: string
>     }
>   } | null,
>   body?: {
>     format: JSON | XML | Text | HTML | null,
>     raw_data_content?: string | null,
>     type: form_data | raw | none,
>     form_data_content?: {
>       module_parameters?: {
>         name?: string,
>         value?: string
>       }[],
>       user_defined_parameter?: {
>         name?: string,
>         value?: string
>       },
>       custom_parameters?: {
>         name?: string,
>         value?: string
>       }[]
>     }
>   },
>   date_time_format?: {
>     datetime_format?: string,
>     date_format?: string,
>     time_zone?: string
>   } | null
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `webhooks` | `object[] \| null` | No | Represents the list containing the operation result for the updated webhook. |

> [accordion] webhooks full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### updateMany

`webhooks.updateMany`

Update webhooks. To update the configuration of an existing webhook in your Zoho CRM organization. The module field cannot be changed after creation. The request body must contain a webhooks array with exactly one webhook object. To retrieve valid module API names, refer to the Get Modules resource.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.webhooks.updateMany({
	webhooks: [{
		name: 'example',
		module: { api_name: 'example', id: '4876876000000333001' },
		url: 'https://example.com/article',
		http_method: 'POST',
		authentication: { type: 'general' },
		feature_type: 'workflow',
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `webhooks` | `object[]` | Yes | Represents the list containing exactly one webhook object with the full replacement configuration. |

> [accordion] webhooks full type
>
> ```ts theme={null}
> {
>   id?: string,
>   name: string,
>   module: {
>     api_name: string,
>     id: string
>   },
>   url: string,
>   http_method: POST | GET | PUT | DELETE,
>   authentication: {
>     connection_name?: string | null,
>     type: general | connection
>   },
>   description?: string | null,
>   related_module?: {
>     api_name?: string,
>     id?: string
>   } | null,
>   feature_type: workflow | approval_process | blueprint_transition | blueprint_state | assignment_rules | kiosk | commandcenter_service,
>   headers?: {
>     custom_parameters?: {
>       name?: string,
>       value?: string
>     }[] | null,
>     module_parameters?: {
>       name?: string,
>       value?: string
>     }[] | null
>   },
>   url_parameters?: {
>     custom_parameters?: {
>       name?: string,
>       value?: string
>     }[],
>     module_parameters?: {
>       name?: string,
>       value?: string
>     }[],
>     user_defined_parameters?: {
>       name?: string,
>       value?: string
>     }
>   } | null,
>   body?: {
>     format: JSON | XML | Text | HTML | null,
>     raw_data_content?: string | null,
>     type: form_data | raw | none,
>     form_data_content?: {
>       module_parameters?: {
>         name?: string,
>         value?: string
>       }[],
>       user_defined_parameter?: {
>         name?: string,
>         value?: string
>       },
>       custom_parameters?: {
>         name?: string,
>         value?: string
>       }[]
>     }
>   },
>   date_time_format?: {
>     datetime_format?: string,
>     date_format?: string,
>     time_zone?: string
>   } | null
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `webhooks` | `object[] \| null` | No | Represents the list containing the operation result for the updated webhook. |

> [accordion] webhooks full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

## Wizards

### create

`wizards.create`

Wizards. Creates a wizard configuration for a specified module.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.wizards.create({
	wizards: [{ profiles: 'example' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `wizards` | `object[]` | Yes | The definition of the wizard structure. |

> [accordion] wizards full type
>
> ```ts theme={null}
> (
>   {
>   } | {
>   }
> )[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `wizards` | `object[] \| null` | No | The wizards that have been created. |

> [accordion] wizards full type
>
> ```ts theme={null}
> {
>   status?: string | null,
>   code?: string | null,
>   message?: string | null,
>   details?: {
>     id?: string | null
>   } | null
> }[] | null
> ```

***

### delete

`wizards.delete`

Wizard. Deletes the specified wizard configuration. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.wizards.delete({ id: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Specify the unique ID of the wizard to retrieve or delete. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `wizards` | `object[] \| null` | No | List of delete operation results, one entry per wizard in the request. |

> [accordion] wizards full type
>
> ```ts theme={null}
> {
>   status?: string | null,
>   code?: string | null,
>   message?: string | null,
>   details?: {
>     id?: string | null
>   } | null
> }[] | null
> ```

***

### get

`wizards.get`

Get wizard details. To retrieve the complete configuration of a single wizard in your Zoho CRM organization, including its containers, screens, segments, buttons, and conditional rules.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.wizards.get({ id: '4876876000000333001', layout_id: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Specify the unique ID of the wizard to retrieve or delete. |
| `layout_id` | `string` | Yes | Specify the unique ID of the layout associated with the wizard. Refer to the [Get Layouts](layouts.yaml#\$.paths./settings/layouts.get) resource for valid values. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   wizards?: {
>     created_time?: string | null,
>     modified_time?: string | null,
>     display_label?: string | null,
>     portal_user_types?: {
>       display_label?: string | null,
>       name?: string | null,
>       id?: string | null
>     }[] | null | null,
>     module?: {
>       api_name?: string | null,
>       id?: string | null
>     } | null,
>     name?: string | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     profiles?: {
>       display_label?: string | null,
>       name?: string | null,
>       id?: string | null
>     }[] | null | null,
>     active?: boolean | null,
>     source?: string | null,
>     containers?: {
>       layout?: {
>         display_label?: string | null,
>         name?: string | null,
>         id?: string | null
>       } | null,
>       chart_data?: {
>         nodes?: {
>           pos_x?: number | null,
>           pos_y?: number | null,
>           start_node?: boolean | null,
>           screen?: {
>             display_label?: string | null,
>             id?: string | null
>           } | null
>         }[] | null,
>         connections?: {
>           source_screen?: {
>             display_label?: string | null,
>             id?: string | null
>           } | null,
>           target_screen?: {
>             display_label?: string | null,
>             id?: string | null
>           } | null,
>           id?: string | null
>         }[] | null | null,
>         color_palette?: {
>           button_background?: string[] | null
>         } | null
>       } | null,
>       screens?: {
>         display_label?: string | null,
>         api_name?: string | null,
>         id?: string | null,
>         conditional_rules?: {
>           query_id?: string | null,
>           execute_on?: string | null,
>           criteria?: {
>             comparator?: string | null,
>             field?: {
>               api_name?: string | null,
>               id?: string | null
>             } | null,
>             type?: string | null,
>             value?: string | null
>           } | null | null,
>           actions?: {
>             id?: string | null,
>             type?: string | null,
>             field?: {
>               api_name?: string | null,
>               id?: string | null
>             } | null,
>             segment?: {
>               id?: string | null,
>               display_label?: string | null
>             } | null,
>             value?: string | null,
>             exempted_profiles?: {
>               id?: string | null,
>               name?: string | null
>             }[] | null,
>             exempted_portal_user_types?: {
>               id?: string | null,
>               name?: string | null
>             }[] | null
>           }[] | null
>         }[] | null | null,
>         segments?: {
>           sequence_number?: number | null,
>           display_label?: string | null,
>           column_count?: number | null,
>           id?: string | null,
>           type?: string | null,
>           tab_traversal?: string | null,
>           elements?: {
>             sequence_number?: number | null,
>             type?: string | null,
>             resource?: {
>               name?: string | null,
>               id?: string | null
>             } | null
>           }[] | null,
>           name?: string | null,
>           content?: string | null,
>           buttons?: {
>             color?: string | null,
>             shape?: string | null,
>             visibility?: string | null,
>             resource?: {
>               id?: string | null,
>               name?: string | null
>             } | null | null,
>             criteria?: {
>               comparator?: string | null,
>               field?: {
>               } | null,
>               type?: string | null,
>               value?: string | null
>             } | null | null,
>             profiles?: {
>               id?: string | null,
>               name?: string | null,
>               display_label?: string | null
>             }[] | null | null,
>             target_screen?: {
>               name?: string | null,
>               id?: string | null
>             } | null | null,
>             type?: string | null | null,
>             message?: {
>               title?: string | null,
>               content?: string | null
>             } | null | null,
>             transition?: {
>               id?: string | null
>             } | null | null,
>             sequence_number?: number | null,
>             display_label?: string | null,
>             background_color?: string | null,
>             name?: string | null,
>             id?: string | null,
>             category?: string | null,
>             show_summary_on?: string | null | null
>           }[] | null,
>           widget?: {
>             id?: string | null,
>             name?: string | null
>           } | null
>         }[] | null
>       }[] | null,
>       id?: string | null
>     }[] | null,
>     id?: string | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### list

`wizards.list`

Get all wizard configurations. To retrieve the wizard configurations available in your Zoho CRM organization. The response can be filtered by module using the module query parameter.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.wizards.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | No | Specify the API name of the module for which you want to retrieve wizards. Refer to the [Get Modules](modules.yaml#\$.paths./settings/modules.get) resource for valid values. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   wizards?: {
>     created_time?: string | null,
>     modified_time?: string | null,
>     display_label?: string | null,
>     portal_user_types?: {
>       display_label?: string | null,
>       name?: string | null,
>       id?: string | null
>     }[] | null | null,
>     module?: {
>       api_name?: string | null,
>       id?: string | null
>     } | null,
>     name?: string | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null,
>     profiles?: {
>       name?: string | null,
>       id?: string | null,
>       display_label?: string | null
>     }[] | null | null,
>     active?: boolean | null,
>     source?: string | null,
>     containers?: {
>       layout?: {
>         name?: string | null,
>         display_label?: string | null,
>         id?: string | null
>       } | null,
>       screens?: {
>         api_name?: string | null,
>         id?: string | null,
>         display_label?: string | null
>       }[] | null,
>       id?: string | null
>     }[] | null,
>     id?: string | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### update

`wizards.update`

Wizard. Updates the specified wizard including screens, containers, field configurations, and rules - based on the data provided in the request.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.wizards.update({
	id: '4876876000000333001',
	wizards: [{}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Specify the unique ID of the wizard to retrieve or delete. |
| `wizards` | `object[]` | Yes | List of wizard definitions to be updated. Only one wizard can be updated per request. |

> [accordion] wizards full type
>
> ```ts theme={null}
> {
>   module?: {
>   } | {
>   },
>   name?: string,
>   portal_user_types?: {
>     name?: string,
>     id: string,
>     _delete?: boolean
>   }[],
>   profiles?: {
>     name?: string,
>     id: string,
>     _delete?: boolean
>   }[],
>   active?: boolean,
>   containers?: {
>     _delete?: boolean,
>     layout: {
>       id: string,
>       name?: string,
>       _delete?: boolean
>     },
>     chart_data?: {
>       nodes: {
>         pos_x: number | string,
>         pos_y: number | string,
>         start_node: boolean,
>         screen: {
>         } | {
>         }
>       }[],
>       connections?: {
>         source_button: {
>         } | {
>         },
>         target_screen: {
>         } | {
>         }
>       }[],
>       color_palette?: {
>         button_background?: string[]
>       }
>     },
>     screens?: {
>       display_label?: string,
>       reference_id?: string,
>       id?: string,
>       _delete?: boolean,
>       segments?: {
>         _delete?: boolean,
>         sequence_number: number | string,
>         display_label?: string,
>         type: composite | fields | subforms | text_label | widget | buttons,
>         reference_id?: string,
>         name?: string,
>         content?: string,
>         tab_traversal?: left_to_right | top_to_bottom,
>         elements?: {
>           sequence_number?: number | string,
>           type: field | query_component | segment,
>           resource: {
>             name?: string,
>             id: string
>           }
>         }[],
>         fields?: (
>           {
>             id: string,
>             sequence_number?: number | string,
>             _delete?: boolean
>           } | {
>             id: string,
>             api_name?: string,
>             sequence_number?: number | string
>           }
>         )[],
>         buttons?: (
>           {
>           } | {
>           }
>         )[],
>         widget?: {
>           id: string,
>           name?: string
>         }
>       }[],
>       conditional_rules?: {
>         query_id?: string,
>         _delete?: boolean,
>         execute_on?: string,
>         criteria?: {
>           comparator: string,
>           field: {
>             api_name?: string,
>             id: string
>           },
>           type: string,
>           value: string
>         },
>         actions?: (
>           {
>           } | {
>           } | {
>           }
>         )[]
>       }[]
>     }[]
>   }[]
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `wizards` | `object[] \| null` | No | List of update results for each wizard. |

> [accordion] wizards full type
>
> ```ts theme={null}
> {
>   status?: string | null,
>   code?: string | null,
>   message?: string | null,
>   details?: {
>     id?: string | null
>   } | null
> }[] | null
> ```

***

## Workflow Rules

### create

`workflowRules.create`

Create a workflow rule for a module. To create a workflow rule for a specified module in your Zoho CRM organization. Each request accepts exactly one rule, defined within the workflow\_rules array.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.workflowRules.create({
	workflow_rules: [{
		conditions: [{ sequence_number: 1 }],
		execute_when: { type: 'create' },
		module: { api_name: 'example', id: '4876876000000333001' },
		name: 'example',
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workflow_rules` | `object[]` | Yes | Represents the array containing the workflow rule object to create. The array must contain exactly one object per request. |

> [accordion] workflow\_rules full type
>
> ```ts theme={null}
> {
>   name: string,
>   description?: string | null,
>   module: {
>     api_name: string,
>     id: string
>   },
>   execute_when: {
>     type: create | edit | create_or_edit | delete | cancel | reschedule | reassign | anyaction | deactivate | activate | marked_as_complete | incoming_call_ring | incoming_call_start | incoming_call_createedit | incoming_call_edit | outgoing_call_ring | outgoing_call_start | outgoing_call_edit | outgoing_call_createedit | missed_call | scheduled_call_createedit | scheduled_call_edit | email_received | mail_sent | mail_sent_clicked | mail_sent_replied | mail_sent_opened | mail_sent_bounced | fb_post_on_page | fb_comment_on_page | fb_like_on_post | fb_send_message | tw_mention_on | tw_retweet_on_tweet | tw_comment_on_tweet | tw_send_message | voc_incoming_signal,
>     details?: {
>       repeat?: boolean,
>       trigger_module?: {
>         api_name: string,
>         id: string
>       }
>     }
>   } | {
>     type: field_update | incoming_call_field_update | outgoing_call_field_update | scheduled_call_field_update | stage_automation_field_update | rollup_summary_update,
>     details: {
>       criteria: {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: equal | not_equal | like | not_like | starts_with | ends_with | contains | not_contains | greater_than | greater_equal | less_equal | less_than | in | not_in | between | ${
>           ANYVALUE
>         },
>         value: string | number | boolean | {
>           id: string & any,
>           name?: string
>         },
>         type?: merge_field | pre_defined | value | field
>       } | {
>         group: (
>           {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: equal | not_equal | like | not_like | starts_with | ends_with | contains | not_contains | greater_than | greater_equal | less_equal | less_than | in | not_in | between | ${
>               ANYVALUE
>             },
>             value: string | number | boolean | {
>               id: string & any,
>               name?: string
>             },
>             type?: merge_field | pre_defined | value | field
>           } | {
>             group: (
>               {
>                 field: {
>                   id?: string,
>                   api_name: string
>                 },
>                 comparator: equal | not_equal | like | not_like | starts_with | ends_with | contains | not_contains | greater_than | greater_equal | less_equal | less_than | in | not_in | between | ${
>                   ANYVALUE
>                 },
>                 value: string | number | boolean | {
>                   id: string & any,
>                   name?: string
>                 },
>                 type?: merge_field | pre_defined | value | field
>               } | (recursive)
>             )[],
>             group_operator: AND | OR
>           }
>         )[],
>         group_operator: AND | OR
>       },
>       match_all?: boolean,
>       repeat?: boolean,
>       trigger_module?: {
>         api_name: string,
>         id: string
>       }
>     }
>   } | {
>     type: section_update | incoming_call_section_update | outgoing_call_section_update | scheduled_call_section_update,
>     details: {
>       section_ids: string[],
>       repeat?: boolean,
>       trigger_module?: {
>         api_name: string,
>         id: string
>       }
>     }
>   } | {
>     type: string,
>     details: {
>       field: {
>         api_name: string,
>         id?: string
>       },
>       period: minutes | hours | days | weeks | months | years | b_hours | b_days,
>       unit: number | string,
>       execute_at?: string,
>       recur_cycle?: once | monthly | yearly,
>       repeat?: boolean,
>       trigger_module?: {
>         api_name: string,
>         id: string
>       }
>     }
>   } | {
>     type: overdue | email_received_notreplied | email_received_opened_notreplied | mail_sent_opened_notreplied | mail_sent_notreplied | mail_sent_notopened | recommendation_rebuy,
>     details: {
>       period: days | hours,
>       unit: number | string,
>       trigger_module?: {
>         api_name: string,
>         id: string
>       },
>       field?: {
>         id?: string
>       }
>     }
>   } | {
>     type: score_increase | score_decrease | score_update | zia_scoring_rule,
>     details: {
>       type: All_Rules | Selective_Rules,
>       rules?: {
>         id: string
>       }[],
>       repeat?: boolean,
>       trigger_module?: {
>         api_name: string,
>         id: string
>       }
>     }
>   } | {
>     type: string,
>     details: {
>       period: days | hours,
>       unit: number | string,
>       trigger_module?: {
>         api_name: string,
>         id: string
>       }
>     }
>   },
>   conditions: {
>     sequence_number: number | string,
>     instant_actions?: {
>       actions: (
>         {
>           name?: string,
>           type: assign_owner,
>           details: {
>             module: {
>               api_name?: string,
>               id?: string
>             },
>             assign_to: (
>               {
>                 type: user | role | group | assignment_rule | profile,
>                 resource: {
>                   id: string,
>                   name?: string,
>                   type?: user | role | group | assignment_rule | profile
>                 },
>                 allow_agent_user?: boolean,
>                 associated_to?: string | null,
>                 details?: null
>               } | {
>                 type: merge_field,
>                 details: {
>                   api_name: string
>                 },
>                 resource?: null,
>                 allow_agent_user?: boolean
>               } | {
>                 type: criteria,
>                 details: {
>                   criteria: {
>                     field: {
>                       id?: string,
>                       api_name: string
>                     },
>                     comparator: string,
>                     value: (string | number | {
>                       id: string & any,
>                       name?: string
>                     } | {
>                       name: string
>                     } | {
>                       id: string,
>                       name?: string
>                     })[] | string | number | boolean | {
>                       id: string & any,
>                       name?: string
>                     } | {
>                       name: string
>                     } | {
>                       id: string,
>                       name?: string
>                     } | ${
>                       EMPTY
>                     } | ${
>                       NOTEMPTY
>                     } | ${
>                       TODAY
>                     } | ${
>                       TOMORROW
>                     } | ${
>                       TOMORROWPLUS
>                     } | ${
>                       YESTERDAY
>                     } | ${
>                       YESTERDAYMINUS
>                     } | ${
>                       LASTMONTH
>                     } | ${
>                       THISMONTH
>                     } | ${
>                       NEXTMONTH
>                     } | ${
>                       LASTWEEK
>                     } | ${
>                       THISWEEK
>                     } | ${
>                       NEXTWEEK
>                     } | ${
>                       THISYEAR
>                     } | ${
>                       THISFY
>                     } | ${
>                       THISFQ
>                     } | ${
>                       LASTYEAR
>                     } | ${
>                       PREVFY
>                     } | ${
>                       PREVFQ
>                     } | ${
>                       NEXTYEAR
>                     } | ${
>                       NEXTFY
>                     } | ${
>                       NEXTFQ
>                     } | ${
>                       EMPTY
>                     } | ${
>                       NOTEMPTY
>                     } | string | string,
>                     type?: merge_field | pre_defined | value | field
>                   } | {
>                     field: {
>                       id?: string,
>                       api_name: string
>                     },
>                     comparator: string,
>                     value: (string | number | {
>                       id: string & any,
>                       name?: string
>                     } | {
>                       name: string
>                     } | {
>                       id: string,
>                       name?: string
>                     })[] | string | number | boolean | {
>                       id: string & any,
>                       name?: string
>                     } | {
>                       name: string
>                     } | {
>                       id: string,
>                       name?: string
>                     } | string,
>                     type?: merge_field | pre_defined | value | field
>                   } | {
>                     field: {
>                       id?: string,
>                       api_name: string
>                     },
>                     comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>                     value: string[] | string,
>                     type?: merge_field | pre_defined | value | field
>                   } | {
>                     field: {
>                       id?: string,
>                       api_name: string
>                     },
>                     comparator: less_than | less_equal | greater_than | greater_equal,
>                     value: string | number | string,
>                     type?: merge_field | pre_defined | value | field
>                   } | {
>                     field: {
>                       id?: string,
>                       api_name: string
>                     },
>                     comparator: between | not_between,
>                     value: (string | number)[],
>                     type?: merge_field | pre_defined | value | field
>                   } | {
>                     field: {
>                       id?: string,
>                       api_name: string
>                     },
>                     comparator: in | not_in,
>                     value: (string | number)[],
>                     type?: merge_field | pre_defined | value | field
>                   } | {
>                     field: {
>                       id?: string,
>                       api_name: string
>                     },
>                     comparator: include_all | include_any | exclude_all | exclude_any,
>                     value: {
>                       id: string & any,
>                       name?: string
>                     }[],
>                     type?: merge_field | pre_defined | value | field
>                   } | {
>                     group: (
>                       {
>                         field: {
>                           id?: string,
>                           api_name: string
>                         },
>                         comparator: string,
>                         value: (string | number | {
>                           id: string & any,
>                           name?: string
>                         } | {
>                           name: string
>                         } | {
>                           id: string,
>                           name?: string
>                         })[] | string | number | boolean | {
>                           id: string & any,
>                           name?: string
>                         } | {
>                           name: string
>                         } | {
>                           id: string,
>                           name?: string
>                         } | ${
>                           EMPTY
>                         } | ${
>                           NOTEMPTY
>                         } | ${
>                           TODAY
>                         } | ${
>                           TOMORROW
>                         } | ${
>                           TOMORROWPLUS
>                         } | ${
>                           YESTERDAY
>                         } | ${
>                           YESTERDAYMINUS
>                         } | ${
>                           LASTMONTH
>                         } | ${
>                           THISMONTH
>                         } | ${
>                           NEXTMONTH
>                         } | ${
>                           LASTWEEK
>                         } | ${
>                           THISWEEK
>                         } | ${
>                           NEXTWEEK
>                         } | ${
>                           THISYEAR
>                         } | ${
>                           THISFY
>                         } | ${
>                           THISFQ
>                         } | ${
>                           LASTYEAR
>                         } | ${
>                           PREVFY
>                         } | ${
>                           PREVFQ
>                         } | ${
>                           NEXTYEAR
>                         } | ${
>                           NEXTFY
>                         } | ${
>                           NEXTFQ
>                         } | ${
>                           EMPTY
>                         } | ${
>                           NOTEMPTY
>                         } | string | string,
>                         type?: merge_field | pre_defined | value | field
>                       } | {
>                         field: {
>                           id?: string,
>                           api_name: string
>                         },
>                         comparator: string,
>                         value: (string | number | {
>                           id: string & any,
>                           name?: string
>                         } | {
>                           name: string
>                         } | {
>                           id: string,
>                           name?: string
>                         })[] | string | number | boolean | {
>                           id: string & any,
>                           name?: string
>                         } | {
>                           name: string
>                         } | {
>                           id: string,
>                           name?: string
>                         } | string,
>                         type?: merge_field | pre_defined | value | field
>                       } | {
>                         field: {
>                           id?: string,
>                           api_name: string
>                         },
>                         comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>                         value: string[] | string,
>                         type?: merge_field | pre_defined | value | field
>                       } | {
>                         field: {
>                           id?: string,
>                           api_name: string
>                         },
>                         comparator: less_than | less_equal | greater_than | greater_equal,
>                         value: string | number | string,
>                         type?: merge_field | pre_defined | value | field
>                       } | {
>                         field: {
>                           id?: string,
>                           api_name: string
>                         },
>                         comparator: between | not_between,
>                         value: (string | number)[],
>                         type?: merge_field | pre_defined | value | field
>                       } | {
>                         field: {
>                           id?: string,
>                           api_name: string
>                         },
>                         comparator: in | not_in,
>                         value: (string | number)[],
>                         type?: merge_field | pre_defined | value | field
>                       } | {
>                         field: {
>                           id?: string,
>                           api_name: string
>                         },
>                         comparator: include_all | include_any | exclude_all | exclude_any,
>                         value: {
>                           id: string & any,
>                           name?: string
>                         }[],
>                         type?: merge_field | pre_defined | value | field
>                       } | {
>                         group: (
>                           {
>                             field: {
>                               id?: string,
>                               api_name: string
>                             },
>                             comparator: string,
>                             value: (string | number | {
>                               id: string & any,
>                               name?: string
>                             } | {
>                               name: string
>                             } | {
>                               id: string,
>                               name?: string
>                             })[] | string | number | boolean | {
>                               id: string & any,
>                               name?: string
>                             } | {
>                               name: string
>                             } | {
>                               id: string,
>                               name?: string
>                             } | ${
>                               EMPTY
>                             } | ${
>                               NOTEMPTY
>                             } | ${
>                               TODAY
>                             } | ${
>                               TOMORROW
>                             } | ${
>                               TOMORROWPLUS
>                             } | ${
>                               YESTERDAY
>                             } | ${
>                               YESTERDAYMINUS
>                             } | ${
>                               LASTMONTH
>                             } | ${
>                               THISMONTH
>                             } | ${
>                               NEXTMONTH
>                             } | ${
>                               LASTWEEK
>                             } | ${
>                               THISWEEK
>                             } | ${
>                               NEXTWEEK
>                             } | ${
>                               THISYEAR
>                             } | ${
>                               THISFY
>                             } | ${
>                               THISFQ
>                             } | ${
>                               LASTYEAR
>                             } | ${
>                               PREVFY
>                             } | ${
>                               PREVFQ
>                             } | ${
>                               NEXTYEAR
>                             } | ${
>                               NEXTFY
>                             } | ${
>                               NEXTFQ
>                             } | ${
>                               EMPTY
>                             } | ${
>                               NOTEMPTY
>                             } | string | string,
>                             type?: merge_field | pre_defined | value | field
>                           } | {
>                             field: {
>                               id?: string,
>                               api_name: string
>                             },
>                             comparator: string,
>                             value: (string | number | {
>                               id: string & any,
>                               name?: string
>                             } | {
>                               name: string
>                             } | {
>                               id: string,
>                               name?: string
>                             })[] | string | number | boolean | {
>                               id: string & any,
>                               name?: string
>                             } | {
>                               name: string
>                             } | {
>                               id: string,
>                               name?: string
>                             } | string,
>                             type?: merge_field | pre_defined | value | field
>                           } | {
>                             field: {
>                               id?: string,
>                               api_name: string
>                             },
>                             comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>                             value: string[] | string,
>                             type?: merge_field | pre_defined | value | field
>                           } | {
>                             field: {
>                               id?: string,
>                               api_name: string
>                             },
>                             comparator: less_than | less_equal | greater_than | greater_equal,
>                             value: string | number | string,
>                             type?: merge_field | pre_defined | value | field
>                           } | {
>                             field: {
>                               id?: string,
>                               api_name: string
>                             },
>                             comparator: between | not_between,
>                             value: (string | number)[],
>                             type?: merge_field | pre_defined | value | field
>                           } | {
>                             field: {
>                               id?: string,
>                               api_name: string
>                             },
>                             comparator: in | not_in,
>                             value: (string | number)[],
>                             type?: merge_field | pre_defined | value | field
>                           } | {
>                             field: {
>                               id?: string,
>                               api_name: string
>                             },
>                             comparator: include_all | include_any | exclude_all | exclude_any,
>                             value: {
>                               id: string & any,
>                               name?: string
>                             }[],
>                             type?: merge_field | pre_defined | value | field
>                           } | (recursive)
>                         )[],
>                         group_operator: AND | OR | and | or
>                       }
>                     )[],
>                     group_operator: AND | OR | and | or
>                   }
>                 },
>                 resource?: null,
>                 allow_agent_user?: boolean
>               }
>             )[],
>             related_records?: {
>               api_name: Events | Calls | Tasks | Contacts | Deals,
>               id?: string
>             }[] | null,
>             notify?: boolean,
>             apply_assignment_threshold?: boolean,
>             user_availability_based_on?: string[] | null,
>             lookup_field?: {
>               api_name?: string,
>               id?: string
>             },
>             id?: string
>           },
>           related_details?: {
>             best_time?: boolean
>           } | {
>             followup_details?: {
>               condition?: string,
>               unit?: number | string,
>               period?: string
>             }
>           } | {
>             lookup_field?: {
>               api_name: string,
>               id: string
>             }
>           } | null,
>           id?: string,
>           _delete?: null
>         } | {
>           name?: string,
>           type: create_record,
>           details: {
>             module: {
>               api_name?: string,
>               id?: string
>             },
>             layout: {
>               id: string,
>               name?: string | null,
>               display_label?: string
>             },
>             field_mappings: (
>               {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: static,
>                 value: string | string[] | {
>                   id: string,
>                   name?: string
>                 }
>               } | {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: merge_field,
>                 value: string,
>                 allow_agent_user?: boolean
>               } | {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: execution_time,
>                 value: {
>                   period: days | business_days | hours | minutes,
>                   unit: string,
>                   sign?: plus | minus,
>                   trigger_field: string,
>                   time?: string,
>                   notify_type?: popup | email | emailandpopup
>                 }
>               } | {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: composite,
>                 value: {
>                 }
>               }
>             )[],
>             apply_restriction?: boolean | null,
>             id?: string
>           },
>           related_details?: {
>             best_time?: boolean
>           } | {
>             followup_details?: {
>               condition?: string,
>               unit?: number | string,
>               period?: string
>             }
>           } | {
>             lookup_field?: {
>               api_name: string,
>               id: string
>             }
>           } | null,
>           id?: string,
>           _delete?: null
>         } | {
>           name?: string,
>           type: create_connected_record,
>           details: {
>             module: {
>               api_name: string,
>               id?: string
>             },
>             layout: {
>               id: string,
>               name?: string | null,
>               display_label?: string
>             },
>             field_mappings: (
>               {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: static,
>                 value: string | string[] | {
>                   id: string,
>                   name?: string
>                 }
>               } | {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: merge_field,
>                 value: string,
>                 allow_agent_user?: boolean
>               } | {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: execution_time,
>                 value: {
>                   period: days | business_days | hours | minutes,
>                   unit: string,
>                   sign?: plus | minus,
>                   trigger_field: string,
>                   time?: string,
>                   notify_type?: popup | email | emailandpopup
>                 }
>               } | {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: composite,
>                 value: {
>                 }
>               }
>             )[],
>             apply_restriction?: boolean,
>             id?: string
>           },
>           related_details?: {
>             best_time?: boolean
>           } | {
>             followup_details?: {
>               condition?: string,
>               unit?: number | string,
>               period?: string
>             }
>           } | {
>             lookup_field?: {
>               api_name: string,
>               id: string
>             }
>           } | null,
>           id?: string,
>           _delete?: null
>         } | {
>           name?: string,
>           type: add_meeting,
>           details: {
>             module: {
>               api_name?: string,
>               id?: string
>             },
>             layout: {
>               id: string,
>               name?: string | null,
>               display_label?: string
>             },
>             field_mappings: (
>               {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: static,
>                 value: string | string[] | {
>                   id: string,
>                   name?: string
>                 }
>               } | {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: merge_field,
>                 value: string,
>                 allow_agent_user?: boolean
>               } | {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: execution_time,
>                 value: {
>                   period: days | business_days | hours | minutes,
>                   unit: string,
>                   sign?: plus | minus,
>                   trigger_field: string,
>                   time?: string,
>                   notify_type?: popup | email | emailandpopup
>                 }
>               } | {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: composite,
>                 value: {
>                 }
>               }
>             )[],
>             meeting_duration: {
>               unit: number | string,
>               period: hours | minutes
>             },
>             host_unavailable?: {
>               assign_record_owner_as_host?: boolean,
>               assign_task?: {
>                 name?: string,
>                 id: string
>               } | null
>             },
>             apply_restriction?: boolean | null,
>             id?: string
>           },
>           related_details?: {
>             best_time?: boolean
>           } | {
>             followup_details?: {
>               condition?: string,
>               unit?: number | string,
>               period?: string
>             }
>           } | {
>             lookup_field?: {
>               api_name: string,
>               id: string
>             }
>           } | null,
>           id?: string,
>           _delete?: null
>         } | {
>           name?: string,
>           type: schedule_call,
>           details: {
>             module: {
>               api_name?: string,
>               id?: string
>             },
>             layout: {
>               id: string,
>               name?: string | null,
>               display_label?: string
>             },
>             field_mappings: (
>               {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: static,
>                 value: string | string[] | {
>                   id: string,
>                   name?: string
>                 }
>               } | {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: merge_field,
>                 value: string,
>                 allow_agent_user?: boolean
>               } | {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: execution_time,
>                 value: {
>                   period: days | business_days | hours | minutes,
>                   unit: string,
>                   sign?: plus | minus,
>                   trigger_field: string,
>                   time?: string,
>                   notify_type?: popup | email | emailandpopup
>                 }
>               } | {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: composite,
>                 value: {
>                 }
>               }
>             )[],
>             apply_restriction?: boolean | null,
>             id?: string
>           },
>           related_details?: {
>             best_time?: boolean
>           } | {
>             followup_details?: {
>               condition?: string,
>               unit?: number | string,
>               period?: string
>             }
>           } | {
>             lookup_field?: {
>               api_name: string,
>               id: string
>             }
>           } | null,
>           id?: string,
>           _delete?: null
>         } | {
>           name?: string,
>           type: add_tags,
>           details: {
>             over_write?: boolean,
>             tags: {
>               id: string,
>               name: string,
>               color_code?: string
>             }[],
>             module?: {
>               api_name?: string,
>               id?: string
>             },
>             id?: string
>           },
>           related_details?: {
>             best_time?: boolean
>           } | {
>             followup_details?: {
>               condition?: string,
>               unit?: number | string,
>               period?: string
>             }
>           } | {
>             lookup_field?: {
>               api_name: string,
>               id: string
>             }
>           } | null,
>           id?: string,
>           _delete?: null
>         } | {
>           name?: string,
>           type: remove_tags,
>           details: {
>             tags: {
>               id: string,
>               name: string,
>               color_code?: string
>             }[],
>             module?: {
>               api_name?: string,
>               id?: string
>             },
>             over_write?: boolean,
>             id?: string
>           },
>           related_details?: {
>             best_time?: boolean
>           } | {
>             followup_details?: {
>               condition?: string,
>               unit?: number | string,
>               period?: string
>             }
>           } | {
>             lookup_field?: {
>               api_name: string,
>               id: string
>             }
>           } | null,
>           id?: string,
>           _delete?: null
>         } | {
>           name?: string,
>           type: convert,
>           details: {
>             add_to_existing_contact?: boolean,
>             add_to_existing_account?: boolean,
>             move_attachment_to?: {
>               api_name?: string,
>               id?: string
>             },
>             carry_tags?: {
>               api_name?: string,
>               id?: string
>             }[],
>             field_mappings?: (
>               {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: static,
>                 value: string | string[] | {
>                   id: string,
>                   name?: string
>                 }
>               } | {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: merge_field,
>                 value: string,
>                 allow_agent_user?: boolean
>               } | {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: execution_time,
>                 value: {
>                   period: days | business_days | hours | minutes,
>                   unit: string,
>                   sign?: plus | minus,
>                   trigger_field: string,
>                   time?: string,
>                   notify_type?: popup | email | emailandpopup
>                 }
>               } | {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: composite,
>                 value: {
>                 }
>               }
>             )[],
>             create_deal?: boolean,
>             change_owner?: {
>               id: string,
>               name?: string,
>               related_modules?: {
>                 api_name: Events | Calls | Tasks | Contacts | Deals,
>                 id?: string
>               }[],
>               apply_assignment_threshold?: boolean
>             },
>             contact_role?: string,
>             convert_to?: {
>               api_name: string,
>               id: string
>             },
>             portal_user_type?: {
>               id: string,
>               name: string
>             },
>             apply_restriction?: boolean | null,
>             id?: string
>           },
>           related_details?: {
>             best_time?: boolean
>           } | {
>             followup_details?: {
>               condition?: string,
>               unit?: number | string,
>               period?: string
>             }
>           } | {
>             lookup_field?: {
>               api_name: string,
>               id: string
>             }
>           } | null,
>           id?: string,
>           _delete?: null
>         } | {
>           name: string,
>           type: slack_notifications | cliq_notifications | cisco_notifications | google_chat_notifications | microsoft_teams_notifications,
>           details: {
>             message: string,
>             notify_to: {
>               type: user | channel | fields,
>               id?: string,
>               name?: string,
>               module?: {
>                 id?: string,
>                 api_name?: string
>               },
>               notify_fields?: {
>                 fields?: {
>                   id?: string,
>                   api_name?: string
>                 }[],
>                 static_fields?: {
>                   id?: string,
>                   api_name?: string
>                 }[]
>               }
>             },
>             id?: string
>           },
>           id?: string,
>           _delete?: null
>         } | {
>           name: string,
>           type: circuits,
>           details: {
>             circuit_id: string,
>             id?: string
>           },
>           id?: string,
>           _delete?: null
>         } | {
>           name: string,
>           type: flow,
>           details: {
>             custom_action_id: string,
>             custom_action_name: string,
>             id?: string
>           },
>           id?: string,
>           _delete?: null
>         } | {
>           name?: string,
>           type: comment_to_post | reply_to_comment | like_to_comment | reply_to_message | retweet | reply_to_tweet,
>           details?: {
>             content?: string,
>             id?: string
>           },
>           id?: string,
>           _delete?: null
>         } | {
>           name?: string,
>           type: create_record_email,
>           details: {
>             module: {
>               api_name: Leads | Contacts
>             },
>             field_mappings: {
>               field: {
>                 api_name?: string,
>                 id?: string
>               },
>               value: {
>                 type: user | role | group | country,
>                 resource?: {
>                   id?: string
>                 }
>               }
>             }[],
>             id?: string
>           },
>           id?: string,
>           _delete?: null
>         } | {
>           id: string,
>           name?: string,
>           type: email_notifications,
>           details?: {
>             module?: {
>               api_name: string,
>               id: string
>             }
>           },
>           related_details?: {
>             best_time?: boolean
>           } | null,
>           _delete?: null
>         } | {
>           id: string,
>           name?: string,
>           type: field_updates,
>           details?: {
>             module?: {
>               api_name: string,
>               id: string
>             }
>           },
>           related_details?: {
>             lookup_field?: {
>               api_name: string,
>               id: string
>             }
>           } | null,
>           _delete?: null
>         } | {
>           id: string,
>           name?: string,
>           type: tasks,
>           details?: {
>             module?: {
>               api_name: string,
>               id: string
>             }
>           },
>           related_details?: {
>             followup_details?: {
>               condition?: string,
>               unit?: number | string,
>               period?: string
>             }
>           } | null,
>           _delete?: null
>         } | {
>           id: string,
>           name?: string,
>           type: webhooks | functions | sms | whatsapp,
>           details?: {
>             module?: {
>               api_name: string,
>               id: string
>             }
>           },
>           _delete?: null
>         }
>       )[]
>     },
>     scheduled_actions?: (
>       {
>         execute_after?: {
>           period: minutes | hours | days | weeks | months | years | business_hours | business_days,
>           unit: number | string
>         },
>         actions: (
>           {
>             name?: string,
>             type: assign_owner,
>             details: {
>               module: {
>                 api_name?: string,
>                 id?: string
>               },
>               assign_to: (
>                 {
>                   type: user | role | group | assignment_rule | profile,
>                   resource: {
>                     id: string,
>                     name?: string,
>                     type?: user | role | group | assignment_rule | profile
>                   },
>                   allow_agent_user?: boolean,
>                   associated_to?: string | null,
>                   details?: null
>                 } | {
>                   type: merge_field,
>                   details: {
>                     api_name: string
>                   },
>                   resource?: null,
>                   allow_agent_user?: boolean
>                 } | {
>                   type: criteria,
>                   details: {
>                     criteria: {
>                       field: {
>                         id?: string,
>                         api_name: string
>                       },
>                       comparator: string,
>                       value: (string | number | {
>                         id: string & any,
>                         name?: string
>                       } | {
>                         name: string
>                       } | {
>                         id: string,
>                         name?: string
>                       })[] | string | number | boolean | {
>                         id: string & any,
>                         name?: string
>                       } | {
>                         name: string
>                       } | {
>                         id: string,
>                         name?: string
>                       } | ${
>                         EMPTY
>                       } | ${
>                         NOTEMPTY
>                       } | ${
>                         TODAY
>                       } | ${
>                         TOMORROW
>                       } | ${
>                         TOMORROWPLUS
>                       } | ${
>                         YESTERDAY
>                       } | ${
>                         YESTERDAYMINUS
>                       } | ${
>                         LASTMONTH
>                       } | ${
>                         THISMONTH
>                       } | ${
>                         NEXTMONTH
>                       } | ${
>                         LASTWEEK
>                       } | ${
>                         THISWEEK
>                       } | ${
>                         NEXTWEEK
>                       } | ${
>                         THISYEAR
>                       } | ${
>                         THISFY
>                       } | ${
>                         THISFQ
>                       } | ${
>                         LASTYEAR
>                       } | ${
>                         PREVFY
>                       } | ${
>                         PREVFQ
>                       } | ${
>                         NEXTYEAR
>                       } | ${
>                         NEXTFY
>                       } | ${
>                         NEXTFQ
>                       } | ${
>                         EMPTY
>                       } | ${
>                         NOTEMPTY
>                       } | string | string,
>                       type?: merge_field | pre_defined | value | field
>                     } | {
>                       field: {
>                         id?: string,
>                         api_name: string
>                       },
>                       comparator: string,
>                       value: (string | number | {
>                         id: string & any,
>                         name?: string
>                       } | {
>                         name: string
>                       } | {
>                         id: string,
>                         name?: string
>                       })[] | string | number | boolean | {
>                         id: string & any,
>                         name?: string
>                       } | {
>                         name: string
>                       } | {
>                         id: string,
>                         name?: string
>                       } | string,
>                       type?: merge_field | pre_defined | value | field
>                     } | {
>                       field: {
>                         id?: string,
>                         api_name: string
>                       },
>                       comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>                       value: string[] | string,
>                       type?: merge_field | pre_defined | value | field
>                     } | {
>                       field: {
>                         id?: string,
>                         api_name: string
>                       },
>                       comparator: less_than | less_equal | greater_than | greater_equal,
>                       value: string | number | string,
>                       type?: merge_field | pre_defined | value | field
>                     } | {
>                       field: {
>                         id?: string,
>                         api_name: string
>                       },
>                       comparator: between | not_between,
>                       value: (string | number)[],
>                       type?: merge_field | pre_defined | value | field
>                     } | {
>                       field: {
>                         id?: string,
>                         api_name: string
>                       },
>                       comparator: in | not_in,
>                       value: (string | number)[],
>                       type?: merge_field | pre_defined | value | field
>                     } | {
>                       field: {
>                         id?: string,
>                         api_name: string
>                       },
>                       comparator: include_all | include_any | exclude_all | exclude_any,
>                       value: {
>                         id: string & any,
>                         name?: string
>                       }[],
>                       type?: merge_field | pre_defined | value | field
>                     } | {
>                       group: (
>                         {
>                           field: {
>                             id?: string,
>                             api_name: string
>                           },
>                           comparator: string,
>                           value: (string | number | {
>                             id: string & any,
>                             name?: string
>                           } | {
>                             name: string
>                           } | {
>                             id: string,
>                             name?: string
>                           })[] | string | number | boolean | {
>                             id: string & any,
>                             name?: string
>                           } | {
>                             name: string
>                           } | {
>                             id: string,
>                             name?: string
>                           } | ${
>                             EMPTY
>                           } | ${
>                             NOTEMPTY
>                           } | ${
>                             TODAY
>                           } | ${
>                             TOMORROW
>                           } | ${
>                             TOMORROWPLUS
>                           } | ${
>                             YESTERDAY
>                           } | ${
>                             YESTERDAYMINUS
>                           } | ${
>                             LASTMONTH
>                           } | ${
>                             THISMONTH
>                           } | ${
>                             NEXTMONTH
>                           } | ${
>                             LASTWEEK
>                           } | ${
>                             THISWEEK
>                           } | ${
>                             NEXTWEEK
>                           } | ${
>                             THISYEAR
>                           } | ${
>                             THISFY
>                           } | ${
>                             THISFQ
>                           } | ${
>                             LASTYEAR
>                           } | ${
>                             PREVFY
>                           } | ${
>                             PREVFQ
>                           } | ${
>                             NEXTYEAR
>                           } | ${
>                             NEXTFY
>                           } | ${
>                             NEXTFQ
>                           } | ${
>                             EMPTY
>                           } | ${
>                             NOTEMPTY
>                           } | string | string,
>                           type?: merge_field | pre_defined | value | field
>                         } | {
>                           field: {
>                             id?: string,
>                             api_name: string
>                           },
>                           comparator: string,
>                           value: (string | number | {
>                             id: string & any,
>                             name?: string
>                           } | {
>                             name: string
>                           } | {
>                             id: string,
>                             name?: string
>                           })[] | string | number | boolean | {
>                             id: string & any,
>                             name?: string
>                           } | {
>                             name: string
>                           } | {
>                             id: string,
>                             name?: string
>                           } | string,
>                           type?: merge_field | pre_defined | value | field
>                         } | {
>                           field: {
>                             id?: string,
>                             api_name: string
>                           },
>                           comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>                           value: string[] | string,
>                           type?: merge_field | pre_defined | value | field
>                         } | {
>                           field: {
>                             id?: string,
>                             api_name: string
>                           },
>                           comparator: less_than | less_equal | greater_than | greater_equal,
>                           value: string | number | string,
>                           type?: merge_field | pre_defined | value | field
>                         } | {
>                           field: {
>                             id?: string,
>                             api_name: string
>                           },
>                           comparator: between | not_between,
>                           value: (string | number)[],
>                           type?: merge_field | pre_defined | value | field
>                         } | {
>                           field: {
>                             id?: string,
>                             api_name: string
>                           },
>                           comparator: in | not_in,
>                           value: (string | number)[],
>                           type?: merge_field | pre_defined | value | field
>                         } | {
>                           field: {
>                             id?: string,
>                             api_name: string
>                           },
>                           comparator: include_all | include_any | exclude_all | exclude_any,
>                           value: {
>                             id: string & any,
>                             name?: string
>                           }[],
>                           type?: merge_field | pre_defined | value | field
>                         } | {
>                           group: (
>                             {
>                               field: {
>                                 id?: string,
>                                 api_name: string
>                               },
>                               comparator: string,
>                               value: (string | number | {
>                                 id: string & any,
>                                 name?: string
>                               } | {
>                                 name: string
>                               } | {
>                                 id: string,
>                                 name?: string
>                               })[] | string | number | boolean | {
>                                 id: string & any,
>                                 name?: string
>                               } | {
>                                 name: string
>                               } | {
>                                 id: string,
>                                 name?: string
>                               } | ${
>                                 EMPTY
>                               } | ${
>                                 NOTEMPTY
>                               } | ${
>                                 TODAY
>                               } | ${
>                                 TOMORROW
>                               } | ${
>                                 TOMORROWPLUS
>                               } | ${
>                                 YESTERDAY
>                               } | ${
>                                 YESTERDAYMINUS
>                               } | ${
>                                 LASTMONTH
>                               } | ${
>                                 THISMONTH
>                               } | ${
>                                 NEXTMONTH
>                               } | ${
>                                 LASTWEEK
>                               } | ${
>                                 THISWEEK
>                               } | ${
>                                 NEXTWEEK
>                               } | ${
>                                 THISYEAR
>                               } | ${
>                                 THISFY
>                               } | ${
>                                 THISFQ
>                               } | ${
>                                 LASTYEAR
>                               } | ${
>                                 PREVFY
>                               } | ${
>                                 PREVFQ
>                               } | ${
>                                 NEXTYEAR
>                               } | ${
>                                 NEXTFY
>                               } | ${
>                                 NEXTFQ
>                               } | ${
>                                 EMPTY
>                               } | ${
>                                 NOTEMPTY
>                               } | string | string,
>                               type?: merge_field | pre_defined | value | field
>                             } | {
>                               field: {
>                                 id?: string,
>                                 api_name: string
>                               },
>                               comparator: string,
>                               value: (string | number | {
>                                 id: string & any,
>                                 name?: string
>                               } | {
>                                 name: string
>                               } | {
>                                 id: string,
>                                 name?: string
>                               })[] | string | number | boolean | {
>                                 id: string & any,
>                                 name?: string
>                               } | {
>                                 name: string
>                               } | {
>                                 id: string,
>                                 name?: string
>                               } | string,
>                               type?: merge_field | pre_defined | value | field
>                             } | {
>                               field: {
>                                 id?: string,
>                                 api_name: string
>                               },
>                               comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>                               value: string[] | string,
>                               type?: merge_field | pre_defined | value | field
>                             } | {
>                               field: {
>                                 id?: string,
>                                 api_name: string
>                               },
>                               comparator: less_than | less_equal | greater_than | greater_equal,
>                               value: string | number | string,
>                               type?: merge_field | pre_defined | value | field
>                             } | {
>                               field: {
>                                 id?: string,
>                                 api_name: string
>                               },
>                               comparator: between | not_between,
>                               value: (string | number)[],
>                               type?: merge_field | pre_defined | value | field
>                             } | {
>                               field: {
>                                 id?: string,
>                                 api_name: string
>                               },
>                               comparator: in | not_in,
>                               value: (string | number)[],
>                               type?: merge_field | pre_defined | value | field
>                             } | {
>                               field: {
>                                 id?: string,
>                                 api_name: string
>                               },
>                               comparator: include_all | include_any | exclude_all | exclude_any,
>                               value: {
>                                 id: string & any,
>                                 name?: string
>                               }[],
>                               type?: merge_field | pre_defined | value | field
>                             } | (recursive)
>                           )[],
>                           group_operator: AND | OR | and | or
>                         }
>                       )[],
>                       group_operator: AND | OR | and | or
>                     }
>                   },
>                   resource?: null,
>                   allow_agent_user?: boolean
>                 }
>               )[],
>               related_records?: {
>                 api_name: Events | Calls | Tasks | Contacts | Deals,
>                 id?: string
>               }[] | null,
>               notify?: boolean,
>               apply_assignment_threshold?: boolean,
>               user_availability_based_on?: string[] | null,
>               lookup_field?: {
>                 api_name?: string,
>                 id?: string
>               },
>               id?: string
>             },
>             related_details?: {
>               best_time?: boolean
>             } | {
>               followup_details?: {
>                 condition?: string,
>                 unit?: number | string,
>                 period?: string
>               }
>             } | {
>               lookup_field?: {
>                 api_name: string,
>                 id: string
>               }
>             } | null,
>             id?: string,
>             _delete?: null
>           } | {
>             name?: string,
>             type: create_record,
>             details: {
>               module: {
>                 api_name?: string,
>                 id?: string
>               },
>               layout: {
>                 id: string,
>                 name?: string | null,
>                 display_label?: string
>               },
>               field_mappings: (
>                 {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: static,
>                   value: string | string[] | {
>                     id: string,
>                     name?: string
>                   }
>                 } | {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: merge_field,
>                   value: string,
>                   allow_agent_user?: boolean
>                 } | {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: execution_time,
>                   value: {
>                     period: days | business_days | hours | minutes,
>                     unit: string,
>                     sign?: plus | minus,
>                     trigger_field: string,
>                     time?: string,
>                     notify_type?: popup | email | emailandpopup
>                   }
>                 } | {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: composite,
>                   value: {
>                   }
>                 }
>               )[],
>               apply_restriction?: boolean | null,
>               id?: string
>             },
>             related_details?: {
>               best_time?: boolean
>             } | {
>               followup_details?: {
>                 condition?: string,
>                 unit?: number | string,
>                 period?: string
>               }
>             } | {
>               lookup_field?: {
>                 api_name: string,
>                 id: string
>               }
>             } | null,
>             id?: string,
>             _delete?: null
>           } | {
>             name?: string,
>             type: create_connected_record,
>             details: {
>               module: {
>                 api_name: string,
>                 id?: string
>               },
>               layout: {
>                 id: string,
>                 name?: string | null,
>                 display_label?: string
>               },
>               field_mappings: (
>                 {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: static,
>                   value: string | string[] | {
>                     id: string,
>                     name?: string
>                   }
>                 } | {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: merge_field,
>                   value: string,
>                   allow_agent_user?: boolean
>                 } | {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: execution_time,
>                   value: {
>                     period: days | business_days | hours | minutes,
>                     unit: string,
>                     sign?: plus | minus,
>                     trigger_field: string,
>                     time?: string,
>                     notify_type?: popup | email | emailandpopup
>                   }
>                 } | {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: composite,
>                   value: {
>                   }
>                 }
>               )[],
>               apply_restriction?: boolean,
>               id?: string
>             },
>             related_details?: {
>               best_time?: boolean
>             } | {
>               followup_details?: {
>                 condition?: string,
>                 unit?: number | string,
>                 period?: string
>               }
>             } | {
>               lookup_field?: {
>                 api_name: string,
>                 id: string
>               }
>             } | null,
>             id?: string,
>             _delete?: null
>           } | {
>             name?: string,
>             type: add_meeting,
>             details: {
>               module: {
>                 api_name?: string,
>                 id?: string
>               },
>               layout: {
>                 id: string,
>                 name?: string | null,
>                 display_label?: string
>               },
>               field_mappings: (
>                 {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: static,
>                   value: string | string[] | {
>                     id: string,
>                     name?: string
>                   }
>                 } | {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: merge_field,
>                   value: string,
>                   allow_agent_user?: boolean
>                 } | {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: execution_time,
>                   value: {
>                     period: days | business_days | hours | minutes,
>                     unit: string,
>                     sign?: plus | minus,
>                     trigger_field: string,
>                     time?: string,
>                     notify_type?: popup | email | emailandpopup
>                   }
>                 } | {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: composite,
>                   value: {
>                   }
>                 }
>               )[],
>               meeting_duration: {
>                 unit: number | string,
>                 period: hours | minutes
>               },
>               host_unavailable?: {
>                 assign_record_owner_as_host?: boolean,
>                 assign_task?: {
>                   name?: string,
>                   id: string
>                 } | null
>               },
>               apply_restriction?: boolean | null,
>               id?: string
>             },
>             related_details?: {
>               best_time?: boolean
>             } | {
>               followup_details?: {
>                 condition?: string,
>                 unit?: number | string,
>                 period?: string
>               }
>             } | {
>               lookup_field?: {
>                 api_name: string,
>                 id: string
>               }
>             } | null,
>             id?: string,
>             _delete?: null
>           } | {
>             name?: string,
>             type: schedule_call,
>             details: {
>               module: {
>                 api_name?: string,
>                 id?: string
>               },
>               layout: {
>                 id: string,
>                 name?: string | null,
>                 display_label?: string
>               },
>               field_mappings: (
>                 {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: static,
>                   value: string | string[] | {
>                     id: string,
>                     name?: string
>                   }
>                 } | {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: merge_field,
>                   value: string,
>                   allow_agent_user?: boolean
>                 } | {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: execution_time,
>                   value: {
>                     period: days | business_days | hours | minutes,
>                     unit: string,
>                     sign?: plus | minus,
>                     trigger_field: string,
>                     time?: string,
>                     notify_type?: popup | email | emailandpopup
>                   }
>                 } | {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: composite,
>                   value: {
>                   }
>                 }
>               )[],
>               apply_restriction?: boolean | null,
>               id?: string
>             },
>             related_details?: {
>               best_time?: boolean
>             } | {
>               followup_details?: {
>                 condition?: string,
>                 unit?: number | string,
>                 period?: string
>               }
>             } | {
>               lookup_field?: {
>                 api_name: string,
>                 id: string
>               }
>             } | null,
>             id?: string,
>             _delete?: null
>           } | {
>             name?: string,
>             type: add_tags,
>             details: {
>               over_write?: boolean,
>               tags: {
>                 id: string,
>                 name: string,
>                 color_code?: string
>               }[],
>               module?: {
>                 api_name?: string,
>                 id?: string
>               },
>               id?: string
>             },
>             related_details?: {
>               best_time?: boolean
>             } | {
>               followup_details?: {
>                 condition?: string,
>                 unit?: number | string,
>                 period?: string
>               }
>             } | {
>               lookup_field?: {
>                 api_name: string,
>                 id: string
>               }
>             } | null,
>             id?: string,
>             _delete?: null
>           } | {
>             name?: string,
>             type: remove_tags,
>             details: {
>               tags: {
>                 id: string,
>                 name: string,
>                 color_code?: string
>               }[],
>               module?: {
>                 api_name?: string,
>                 id?: string
>               },
>               over_write?: boolean,
>               id?: string
>             },
>             related_details?: {
>               best_time?: boolean
>             } | {
>               followup_details?: {
>                 condition?: string,
>                 unit?: number | string,
>                 period?: string
>               }
>             } | {
>               lookup_field?: {
>                 api_name: string,
>                 id: string
>               }
>             } | null,
>             id?: string,
>             _delete?: null
>           } | {
>             name?: string,
>             type: convert,
>             details: {
>               add_to_existing_contact?: boolean,
>               add_to_existing_account?: boolean,
>               move_attachment_to?: {
>                 api_name?: string,
>                 id?: string
>               },
>               carry_tags?: {
>                 api_name?: string,
>                 id?: string
>               }[],
>               field_mappings?: (
>                 {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: static,
>                   value: string | string[] | {
>                     id: string,
>                     name?: string
>                   }
>                 } | {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: merge_field,
>                   value: string,
>                   allow_agent_user?: boolean
>                 } | {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: execution_time,
>                   value: {
>                     period: days | business_days | hours | minutes,
>                     unit: string,
>                     sign?: plus | minus,
>                     trigger_field: string,
>                     time?: string,
>                     notify_type?: popup | email | emailandpopup
>                   }
>                 } | {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: composite,
>                   value: {
>                   }
>                 }
>               )[],
>               create_deal?: boolean,
>               change_owner?: {
>                 id: string,
>                 name?: string,
>                 related_modules?: {
>                   api_name: Events | Calls | Tasks | Contacts | Deals,
>                   id?: string
>                 }[],
>                 apply_assignment_threshold?: boolean
>               },
>               contact_role?: string,
>               convert_to?: {
>                 api_name: string,
>                 id: string
>               },
>               portal_user_type?: {
>                 id: string,
>                 name: string
>               },
>               apply_restriction?: boolean | null,
>               id?: string
>             },
>             related_details?: {
>               best_time?: boolean
>             } | {
>               followup_details?: {
>                 condition?: string,
>                 unit?: number | string,
>                 period?: string
>               }
>             } | {
>               lookup_field?: {
>                 api_name: string,
>                 id: string
>               }
>             } | null,
>             id?: string,
>             _delete?: null
>           } | {
>             name: string,
>             type: slack_notifications | cliq_notifications | cisco_notifications | google_chat_notifications | microsoft_teams_notifications,
>             details: {
>               message: string,
>               notify_to: {
>                 type: user | channel | fields,
>                 id?: string,
>                 name?: string,
>                 module?: {
>                   id?: string,
>                   api_name?: string
>                 },
>                 notify_fields?: {
>                   fields?: {
>                     id?: string,
>                     api_name?: string
>                   }[],
>                   static_fields?: {
>                     id?: string,
>                     api_name?: string
>                   }[]
>                 }
>               },
>               id?: string
>             },
>             id?: string,
>             _delete?: null
>           } | {
>             name: string,
>             type: circuits,
>             details: {
>               circuit_id: string,
>               id?: string
>             },
>             id?: string,
>             _delete?: null
>           } | {
>             name: string,
>             type: flow,
>             details: {
>               custom_action_id: string,
>               custom_action_name: string,
>               id?: string
>             },
>             id?: string,
>             _delete?: null
>           } | {
>             name?: string,
>             type: comment_to_post | reply_to_comment | like_to_comment | reply_to_message | retweet | reply_to_tweet,
>             details?: {
>               content?: string,
>               id?: string
>             },
>             id?: string,
>             _delete?: null
>           } | {
>             name?: string,
>             type: create_record_email,
>             details: {
>               module: {
>                 api_name: Leads | Contacts
>               },
>               field_mappings: {
>                 field: {
>                   api_name?: string,
>                   id?: string
>                 },
>                 value: {
>                   type: user | role | group | country,
>                   resource?: {
>                     id?: string
>                   }
>                 }
>               }[],
>               id?: string
>             },
>             id?: string,
>             _delete?: null
>           } | {
>             id: string,
>             name?: string,
>             type: email_notifications,
>             details?: {
>               module?: {
>                 api_name: string,
>                 id: string
>               }
>             },
>             related_details?: {
>               best_time?: boolean
>             } | null,
>             _delete?: null
>           } | {
>             id: string,
>             name?: string,
>             type: field_updates,
>             details?: {
>               module?: {
>                 api_name: string,
>                 id: string
>               }
>             },
>             related_details?: {
>               lookup_field?: {
>                 api_name: string,
>                 id: string
>               }
>             } | null,
>             _delete?: null
>           } | {
>             id: string,
>             name?: string,
>             type: tasks,
>             details?: {
>               module?: {
>                 api_name: string,
>                 id: string
>               }
>             },
>             related_details?: {
>               followup_details?: {
>                 condition?: string,
>                 unit?: number | string,
>                 period?: string
>               }
>             } | null,
>             _delete?: null
>           } | {
>             id: string,
>             name?: string,
>             type: webhooks | functions | sms | whatsapp,
>             details?: {
>               module?: {
>                 api_name: string,
>                 id: string
>               }
>             },
>             _delete?: null
>           }
>         )[],
>         id?: string
>       } | null
>     )[] | null,
>     criteria_details?: {
>       criteria?: {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: string,
>         value: (string | number | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         })[] | string | number | boolean | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         } | ${
>           EMPTY
>         } | ${
>           NOTEMPTY
>         } | ${
>           TODAY
>         } | ${
>           TOMORROW
>         } | ${
>           TOMORROWPLUS
>         } | ${
>           YESTERDAY
>         } | ${
>           YESTERDAYMINUS
>         } | ${
>           LASTMONTH
>         } | ${
>           THISMONTH
>         } | ${
>           NEXTMONTH
>         } | ${
>           LASTWEEK
>         } | ${
>           THISWEEK
>         } | ${
>           NEXTWEEK
>         } | ${
>           THISYEAR
>         } | ${
>           THISFY
>         } | ${
>           THISFQ
>         } | ${
>           LASTYEAR
>         } | ${
>           PREVFY
>         } | ${
>           PREVFQ
>         } | ${
>           NEXTYEAR
>         } | ${
>           NEXTFY
>         } | ${
>           NEXTFQ
>         } | ${
>           EMPTY
>         } | ${
>           NOTEMPTY
>         } | string | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: string,
>         value: (string | number | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         })[] | string | number | boolean | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         } | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>         value: string[] | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: less_than | less_equal | greater_than | greater_equal,
>         value: string | number | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: between | not_between,
>         value: (string | number)[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: in | not_in,
>         value: (string | number)[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: include_all | include_any | exclude_all | exclude_any,
>         value: {
>           id: string & any,
>           name?: string
>         }[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         group: (
>           {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: string,
>             value: (string | number | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             })[] | string | number | boolean | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             } | ${
>               EMPTY
>             } | ${
>               NOTEMPTY
>             } | ${
>               TODAY
>             } | ${
>               TOMORROW
>             } | ${
>               TOMORROWPLUS
>             } | ${
>               YESTERDAY
>             } | ${
>               YESTERDAYMINUS
>             } | ${
>               LASTMONTH
>             } | ${
>               THISMONTH
>             } | ${
>               NEXTMONTH
>             } | ${
>               LASTWEEK
>             } | ${
>               THISWEEK
>             } | ${
>               NEXTWEEK
>             } | ${
>               THISYEAR
>             } | ${
>               THISFY
>             } | ${
>               THISFQ
>             } | ${
>               LASTYEAR
>             } | ${
>               PREVFY
>             } | ${
>               PREVFQ
>             } | ${
>               NEXTYEAR
>             } | ${
>               NEXTFY
>             } | ${
>               NEXTFQ
>             } | ${
>               EMPTY
>             } | ${
>               NOTEMPTY
>             } | string | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: string,
>             value: (string | number | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             })[] | string | number | boolean | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             } | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>             value: string[] | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: less_than | less_equal | greater_than | greater_equal,
>             value: string | number | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: between | not_between,
>             value: (string | number)[],
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: in | not_in,
>             value: (string | number)[],
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: include_all | include_any | exclude_all | exclude_any,
>             value: {
>               id: string & any,
>               name?: string
>             }[],
>             type?: merge_field | pre_defined | value | field
>           } | {
>             group: (
>               {
>                 field: {
>                   id?: string,
>                   api_name: string
>                 },
>                 comparator: string,
>                 value: (string | number | {
>                   id: string & any,
>                   name?: string
>                 } | {
>                   name: string
>                 } | {
>                   id: string,
>                   name?: string
>                 })[] | string | number | boolean | {
>                   id: string & any,
>                   name?: string
>                 } | {
>                   name: string
>                 } | {
>                   id: string,
>                   name?: string
>                 } | ${
>                   EMPTY
>                 } | ${
>                   NOTEMPTY
>                 } | ${
>                   TODAY
>                 } | ${
>                   TOMORROW
>                 } | ${
>                   TOMORROWPLUS
>                 } | ${
>                   YESTERDAY
>                 } | ${
>                   YESTERDAYMINUS
>                 } | ${
>                   LASTMONTH
>                 } | ${
>                   THISMONTH
>                 } | ${
>                   NEXTMONTH
>                 } | ${
>                   LASTWEEK
>                 } | ${
>                   THISWEEK
>                 } | ${
>                   NEXTWEEK
>                 } | ${
>                   THISYEAR
>                 } | ${
>                   THISFY
>                 } | ${
>                   THISFQ
>                 } | ${
>                   LASTYEAR
>                 } | ${
>                   PREVFY
>                 } | ${
>                   PREVFQ
>                 } | ${
>                   NEXTYEAR
>                 } | ${
>                   NEXTFY
>                 } | ${
>                   NEXTFQ
>                 } | ${
>                   EMPTY
>                 } | ${
>                   NOTEMPTY
>                 } | string | string,
>                 type?: merge_field | pre_defined | value | field
>               } | {
>                 field: {
>                   id?: string,
>                   api_name: string
>                 },
>                 comparator: string,
>                 value: (string | number | {
>                   id: string & any,
>                   name?: string
>                 } | {
>                   name: string
>                 } | {
>                   id: string,
>                   name?: string
>                 })[] | string | number | boolean | {
>                   id: string & any,
>                   name?: string
>                 } | {
>                   name: string
>                 } | {
>                   id: string,
>                   name?: string
>                 } | string,
>                 type?: merge_field | pre_defined | value | field
>               } | {
>                 field: {
>                   id?: string,
>                   api_name: string
>                 },
>                 comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>                 value: string[] | string,
>                 type?: merge_field | pre_defined | value | field
>               } | {
>                 field: {
>                   id?: string,
>                   api_name: string
>                 },
>                 comparator: less_than | less_equal | greater_than | greater_equal,
>                 value: string | number | string,
>                 type?: merge_field | pre_defined | value | field
>               } | {
>                 field: {
>                   id?: string,
>                   api_name: string
>                 },
>                 comparator: between | not_between,
>                 value: (string | number)[],
>                 type?: merge_field | pre_defined | value | field
>               } | {
>                 field: {
>                   id?: string,
>                   api_name: string
>                 },
>                 comparator: in | not_in,
>                 value: (string | number)[],
>                 type?: merge_field | pre_defined | value | field
>               } | {
>                 field: {
>                   id?: string,
>                   api_name: string
>                 },
>                 comparator: include_all | include_any | exclude_all | exclude_any,
>                 value: {
>                   id: string & any,
>                   name?: string
>                 }[],
>                 type?: merge_field | pre_defined | value | field
>               } | (recursive)
>             )[],
>             group_operator: AND | OR | and | or
>           }
>         )[],
>         group_operator: AND | OR | and | or
>       } | null,
>       relational_criteria?: {
>         criteria?: {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: string,
>           value: (string | number | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           })[] | string | number | boolean | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           } | ${
>             EMPTY
>           } | ${
>             NOTEMPTY
>           } | ${
>             TODAY
>           } | ${
>             TOMORROW
>           } | ${
>             TOMORROWPLUS
>           } | ${
>             YESTERDAY
>           } | ${
>             YESTERDAYMINUS
>           } | ${
>             LASTMONTH
>           } | ${
>             THISMONTH
>           } | ${
>             NEXTMONTH
>           } | ${
>             LASTWEEK
>           } | ${
>             THISWEEK
>           } | ${
>             NEXTWEEK
>           } | ${
>             THISYEAR
>           } | ${
>             THISFY
>           } | ${
>             THISFQ
>           } | ${
>             LASTYEAR
>           } | ${
>             PREVFY
>           } | ${
>             PREVFQ
>           } | ${
>             NEXTYEAR
>           } | ${
>             NEXTFY
>           } | ${
>             NEXTFQ
>           } | ${
>             EMPTY
>           } | ${
>             NOTEMPTY
>           } | string | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: string,
>           value: (string | number | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           })[] | string | number | boolean | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           } | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>           value: string[] | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: less_than | less_equal | greater_than | greater_equal,
>           value: string | number | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: between | not_between,
>           value: (string | number)[],
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: in | not_in,
>           value: (string | number)[],
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: include_all | include_any | exclude_all | exclude_any,
>           value: {
>             id: string & any,
>             name?: string
>           }[],
>           type?: merge_field | pre_defined | value | field
>         } | {
>           group: (
>             {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: string,
>               value: (string | number | {
>                 id: string & any,
>                 name?: string
>               } | {
>                 name: string
>               } | {
>                 id: string,
>                 name?: string
>               })[] | string | number | boolean | {
>                 id: string & any,
>                 name?: string
>               } | {
>                 name: string
>               } | {
>                 id: string,
>                 name?: string
>               } | ${
>                 EMPTY
>               } | ${
>                 NOTEMPTY
>               } | ${
>                 TODAY
>               } | ${
>                 TOMORROW
>               } | ${
>                 TOMORROWPLUS
>               } | ${
>                 YESTERDAY
>               } | ${
>                 YESTERDAYMINUS
>               } | ${
>                 LASTMONTH
>               } | ${
>                 THISMONTH
>               } | ${
>                 NEXTMONTH
>               } | ${
>                 LASTWEEK
>               } | ${
>                 THISWEEK
>               } | ${
>                 NEXTWEEK
>               } | ${
>                 THISYEAR
>               } | ${
>                 THISFY
>               } | ${
>                 THISFQ
>               } | ${
>                 LASTYEAR
>               } | ${
>                 PREVFY
>               } | ${
>                 PREVFQ
>               } | ${
>                 NEXTYEAR
>               } | ${
>                 NEXTFY
>               } | ${
>                 NEXTFQ
>               } | ${
>                 EMPTY
>               } | ${
>                 NOTEMPTY
>               } | string | string,
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: string,
>               value: (string | number | {
>                 id: string & any,
>                 name?: string
>               } | {
>                 name: string
>               } | {
>                 id: string,
>                 name?: string
>               })[] | string | number | boolean | {
>                 id: string & any,
>                 name?: string
>               } | {
>                 name: string
>               } | {
>                 id: string,
>                 name?: string
>               } | string,
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>               value: string[] | string,
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: less_than | less_equal | greater_than | greater_equal,
>               value: string | number | string,
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: between | not_between,
>               value: (string | number)[],
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: in | not_in,
>               value: (string | number)[],
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: include_all | include_any | exclude_all | exclude_any,
>               value: {
>                 id: string & any,
>                 name?: string
>               }[],
>               type?: merge_field | pre_defined | value | field
>             } | {
>               group: (
>                 {
>                   field: {
>                     id?: string,
>                     api_name: string
>                   },
>                   comparator: string,
>                   value: (string | number | {
>                     id: string & any,
>                     name?: string
>                   } | {
>                     name: string
>                   } | {
>                     id: string,
>                     name?: string
>                   })[] | string | number | boolean | {
>                     id: string & any,
>                     name?: string
>                   } | {
>                     name: string
>                   } | {
>                     id: string,
>                     name?: string
>                   } | ${
>                     EMPTY
>                   } | ${
>                     NOTEMPTY
>                   } | ${
>                     TODAY
>                   } | ${
>                     TOMORROW
>                   } | ${
>                     TOMORROWPLUS
>                   } | ${
>                     YESTERDAY
>                   } | ${
>                     YESTERDAYMINUS
>                   } | ${
>                     LASTMONTH
>                   } | ${
>                     THISMONTH
>                   } | ${
>                     NEXTMONTH
>                   } | ${
>                     LASTWEEK
>                   } | ${
>                     THISWEEK
>                   } | ${
>                     NEXTWEEK
>                   } | ${
>                     THISYEAR
>                   } | ${
>                     THISFY
>                   } | ${
>                     THISFQ
>                   } | ${
>                     LASTYEAR
>                   } | ${
>                     PREVFY
>                   } | ${
>                     PREVFQ
>                   } | ${
>                     NEXTYEAR
>                   } | ${
>                     NEXTFY
>                   } | ${
>                     NEXTFQ
>                   } | ${
>                     EMPTY
>                   } | ${
>                     NOTEMPTY
>                   } | string | string,
>                   type?: merge_field | pre_defined | value | field
>                 } | {
>                   field: {
>                     id?: string,
>                     api_name: string
>                   },
>                   comparator: string,
>                   value: (string | number | {
>                     id: string & any,
>                     name?: string
>                   } | {
>                     name: string
>                   } | {
>                     id: string,
>                     name?: string
>                   })[] | string | number | boolean | {
>                     id: string & any,
>                     name?: string
>                   } | {
>                     name: string
>                   } | {
>                     id: string,
>                     name?: string
>                   } | string,
>                   type?: merge_field | pre_defined | value | field
>                 } | {
>                   field: {
>                     id?: string,
>                     api_name: string
>                   },
>                   comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>                   value: string[] | string,
>                   type?: merge_field | pre_defined | value | field
>                 } | {
>                   field: {
>                     id?: string,
>                     api_name: string
>                   },
>                   comparator: less_than | less_equal | greater_than | greater_equal,
>                   value: string | number | string,
>                   type?: merge_field | pre_defined | value | field
>                 } | {
>                   field: {
>                     id?: string,
>                     api_name: string
>                   },
>                   comparator: between | not_between,
>                   value: (string | number)[],
>                   type?: merge_field | pre_defined | value | field
>                 } | {
>                   field: {
>                     id?: string,
>                     api_name: string
>                   },
>                   comparator: in | not_in,
>                   value: (string | number)[],
>                   type?: merge_field | pre_defined | value | field
>                 } | {
>                   field: {
>                     id?: string,
>                     api_name: string
>                   },
>                   comparator: include_all | include_any | exclude_all | exclude_any,
>                   value: {
>                     id: string & any,
>                     name?: string
>                   }[],
>                   type?: merge_field | pre_defined | value | field
>                 } | (recursive)
>               )[],
>               group_operator: AND | OR | and | or
>             }
>           )[],
>           group_operator: AND | OR | and | or
>         } | null,
>         module_selection?: all | specific | unknown | null,
>         module?: {
>           api_name: string,
>           id: string
>         } | null
>       }
>     },
>     id?: string,
>     _delete?: null
>   }[],
>   lock?: {
>     message?: string,
>     status?: boolean
>   }
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `workflow_rules` | `object[] \| null` | No | Represents the array of workflow rule objects returned in the success response. |

> [accordion] workflow\_rules full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### delete

`workflowRules.delete`

Delete a workflow rule by ID. To delete a workflow rule from your Zoho CRM organization by its unique ID. Locked workflow rules cannot be deleted. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.workflowRules.delete({ id: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Represents the unique 19-digit numeric ID of the workflow rule. Obtain valid IDs from the List Workflow Rules endpoint. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `workflow_rules` | `object[] \| null` | No | Represents the array of workflow rule objects returned in the success response. |

> [accordion] workflow\_rules full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### deleteMany

`workflowRules.deleteMany`

Delete One or More Workflow Rules. To delete one or more workflow rules from your Zoho CRM organization. You can delete up to ten workflow rules in a single API call; when some deletions succeed and others fail, the API responds with a 207 Multi-Status. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.workflowRules.deleteMany({ ids: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `ids` | `string` | Yes | Specifies one or more workflow rule IDs to filter the results. Provide multiple IDs as comma-separated values. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   workflow_rules?: {
>     code?: string | null,
>     details?: {
>       id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   workflow_rules?: (
>     {
>       code?: string | null,
>       message?: string | null,
>       status?: string | null,
>       details?: {
>         param_name?: string | null,
>         maximum_length?: number | null,
>         id?: string | null,
>         expected_data_type?: string | null,
>         api_name?: string | null
>       } | null
>     } | {
>       code?: string | null,
>       details?: {
>         id?: string | null
>       } | null,
>       message?: string | null,
>       status?: string | null
>     }
>   )[] | null
> }
> ```

***

### get

`workflowRules.get`

Retrieve Workflow Rule by ID. To retrieve the complete configuration of a specific workflow rule in your Zoho CRM organization, including its trigger type, execution criteria, conditions, instant actions, scheduled actions, and lock status.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.workflowRules.get({ id: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Represents the unique 19-digit numeric ID of the workflow rule. Obtain valid IDs from the List Workflow Rules endpoint. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   workflow_rules?: {
>     created_time?: string | null,
>     execute_when?: {
>       type?: string | null,
>       details?: {
>         repeat?: boolean | null,
>         trigger_module?: {
>           api_name?: string | null,
>           id?: string | null
>         } | null
>       } | null
>     } | {
>       type?: string | null,
>       details?: {
>         criteria?: {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: string | number | boolean | {
>             id?: string & any | null,
>             name?: string | null
>           } | null,
>           type?: string | null
>         } | {
>           group?: (
>             {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: string | number | boolean | {
>                 id?: string & any | null,
>                 name?: string | null
>               } | null,
>               type?: string | null
>             } | {
>               group?: (
>                 {
>                   field?: {
>                     id?: string | null,
>                     api_name?: string | null
>                   } | null,
>                   comparator?: string | null,
>                   value?: string | number | boolean | {
>                     id?: string & any | null,
>                     name?: string | null
>                   } | null,
>                   type?: string | null
>                 } | (recursive)
>               )[] | null,
>               group_operator?: string | null
>             }
>           )[] | null,
>           group_operator?: string | null
>         } | null,
>         match_all?: boolean | null,
>         repeat?: boolean | null,
>         trigger_module?: {
>           api_name?: string | null,
>           id?: string | null
>         } | null
>       } | null
>     } | {
>       type?: string | null,
>       details?: {
>         section_ids?: string[] | null,
>         repeat?: boolean | null,
>         trigger_module?: {
>           api_name?: string | null,
>           id?: string | null
>         } | null
>       } | null
>     } | {
>       type?: string | null,
>       details?: {
>         field?: {
>           api_name?: string | null,
>           id?: string | null
>         } | null,
>         period?: string | null,
>         unit?: number | null,
>         execute_at?: string | null,
>         recur_cycle?: string | null,
>         repeat?: boolean | null,
>         trigger_module?: {
>           api_name?: string | null,
>           id?: string | null
>         } | null
>       } | null
>     } | {
>       type?: string | null,
>       details?: {
>         period?: string | null,
>         unit?: number | null,
>         trigger_module?: {
>           api_name?: string | null,
>           id?: string | null
>         } | null,
>         field?: {
>           id?: string | null
>         } | null
>       } | null
>     } | {
>       type?: string | null,
>       details?: {
>         type?: string | null,
>         rules?: {
>           id?: string | null,
>           name?: string | null
>         }[] | null,
>         repeat?: boolean | null,
>         trigger_module?: {
>           api_name?: string | null,
>           id?: string | null
>         } | null
>       } | null
>     } | {
>       type?: string | null,
>       details?: {
>         period?: string | null,
>         unit?: number | null,
>         trigger_module?: {
>           api_name?: string | null,
>           id?: string | null
>         } | null
>       } | null
>     } | null,
>     editable?: boolean | null,
>     module?: {
>       api_name?: string | null,
>       id?: string | null
>     } | null,
>     deprecated?: boolean | null,
>     deletable?: boolean | null,
>     description?: string | null | null,
>     source?: string | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     last_executed_time?: string | null | null,
>     modified_time?: string | null | null,
>     name?: string | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     lock?: {
>       locked_by?: {
>         name?: string | null,
>         id?: string | null
>       } | null | null,
>       message?: string | null | null,
>       status?: boolean | null
>     } | null,
>     id?: string | null,
>     category?: string | null,
>     conditions?: {
>       sequence_number?: number | null,
>       instant_actions?: {
>         actions?: (
>           {
>             name?: string | null,
>             type?: string | null,
>             details?: {
>               module?: {
>                 api_name?: string | null,
>                 id?: string | null
>               } | null,
>               assign_to?: (
>                 {
>                   type?: string | null,
>                   resource?: {
>                     id?: string | null,
>                     name?: string | null,
>                     type?: string | null
>                   } | null,
>                   allow_agent_user?: boolean | null,
>                   associated_to?: string | null | null,
>                   details?: null | null
>                 } | {
>                   type?: string | null,
>                   details?: {
>                     api_name?: string | null
>                   } | null,
>                   resource?: null | null,
>                   allow_agent_user?: boolean | null
>                 } | {
>                   type?: string | null,
>                   details?: {
>                     criteria?: {
>                       field?: {
>                         id?: string | null,
>                         api_name?: string | null
>                       } | null,
>                       comparator?: string | null,
>                       value?: (string | number | {
>                         id?: string & any | null,
>                         name?: string | null
>                       } | {
>                         name?: string | null
>                       } | {
>                         id?: string | null,
>                         name?: string | null
>                       })[] | string | number | boolean | {
>                         id?: string & any | null,
>                         name?: string | null
>                       } | {
>                         name?: string | null
>                       } | {
>                         id?: string | null,
>                         name?: string | null
>                       } | string | string | string | string | null,
>                       type?: string | null
>                     } | {
>                       field?: {
>                         id?: string | null,
>                         api_name?: string | null
>                       } | null,
>                       comparator?: string | null,
>                       value?: (string | number | {
>                         id?: string & any | null,
>                         name?: string | null
>                       } | {
>                         name?: string | null
>                       } | {
>                         id?: string | null,
>                         name?: string | null
>                       })[] | string | number | boolean | {
>                         id?: string & any | null,
>                         name?: string | null
>                       } | {
>                         name?: string | null
>                       } | {
>                         id?: string | null,
>                         name?: string | null
>                       } | string | null,
>                       type?: string | null
>                     } | {
>                       field?: {
>                         id?: string | null,
>                         api_name?: string | null
>                       } | null,
>                       comparator?: string | null,
>                       value?: string[] | string | null,
>                       type?: string | null
>                     } | {
>                       field?: {
>                         id?: string | null,
>                         api_name?: string | null
>                       } | null,
>                       comparator?: string | null,
>                       value?: string | number | string | null,
>                       type?: string | null
>                     } | {
>                       field?: {
>                         id?: string | null,
>                         api_name?: string | null
>                       } | null,
>                       comparator?: string | null,
>                       value?: (string | number)[] | null,
>                       type?: string | null
>                     } | {
>                       field?: {
>                         id?: string | null,
>                         api_name?: string | null
>                       } | null,
>                       comparator?: string | null,
>                       value?: (string | number)[] | null,
>                       type?: string | null
>                     } | {
>                       field?: {
>                         id?: string | null,
>                         api_name?: string | null
>                       } | null,
>                       comparator?: string | null,
>                       value?: {
>                         id?: string & any | null,
>                         name?: string | null
>                       }[] | null,
>                       type?: string | null
>                     } | {
>                       group?: (
>                         {
>                           field?: {
>                             id?: string | null,
>                             api_name?: string | null
>                           } | null,
>                           comparator?: string | null,
>                           value?: (string | number | {
>                             id?: string & any | null,
>                             name?: string | null
>                           } | {
>                             name?: string | null
>                           } | {
>                             id?: string | null,
>                             name?: string | null
>                           })[] | string | number | boolean | {
>                             id?: string & any | null,
>                             name?: string | null
>                           } | {
>                             name?: string | null
>                           } | {
>                             id?: string | null,
>                             name?: string | null
>                           } | string | string | string | string | null,
>                           type?: string | null
>                         } | {
>                           field?: {
>                             id?: string | null,
>                             api_name?: string | null
>                           } | null,
>                           comparator?: string | null,
>                           value?: (string | number | {
>                             id?: string & any | null,
>                             name?: string | null
>                           } | {
>                             name?: string | null
>                           } | {
>                             id?: string | null,
>                             name?: string | null
>                           })[] | string | number | boolean | {
>                             id?: string & any | null,
>                             name?: string | null
>                           } | {
>                             name?: string | null
>                           } | {
>                             id?: string | null,
>                             name?: string | null
>                           } | string | null,
>                           type?: string | null
>                         } | {
>                           field?: {
>                             id?: string | null,
>                             api_name?: string | null
>                           } | null,
>                           comparator?: string | null,
>                           value?: string[] | string | null,
>                           type?: string | null
>                         } | {
>                           field?: {
>                             id?: string | null,
>                             api_name?: string | null
>                           } | null,
>                           comparator?: string | null,
>                           value?: string | number | string | null,
>                           type?: string | null
>                         } | {
>                           field?: {
>                             id?: string | null,
>                             api_name?: string | null
>                           } | null,
>                           comparator?: string | null,
>                           value?: (string | number)[] | null,
>                           type?: string | null
>                         } | {
>                           field?: {
>                             id?: string | null,
>                             api_name?: string | null
>                           } | null,
>                           comparator?: string | null,
>                           value?: (string | number)[] | null,
>                           type?: string | null
>                         } | {
>                           field?: {
>                             id?: string | null,
>                             api_name?: string | null
>                           } | null,
>                           comparator?: string | null,
>                           value?: {
>                             id?: string & any | null,
>                             name?: string | null
>                           }[] | null,
>                           type?: string | null
>                         } | {
>                           group?: (
>                             {
>                               field?: {
>                                 id?: string | null,
>                                 api_name?: string | null
>                               } | null,
>                               comparator?: string | null,
>                               value?: (string | number | {
>                                 id?: string & any | null,
>                                 name?: string | null
>                               } | {
>                                 name?: string | null
>                               } | {
>                                 id?: string | null,
>                                 name?: string | null
>                               })[] | string | number | boolean | {
>                                 id?: string & any | null,
>                                 name?: string | null
>                               } | {
>                                 name?: string | null
>                               } | {
>                                 id?: string | null,
>                                 name?: string | null
>                               } | string | string | string | string | null,
>                               type?: string | null
>                             } | {
>                               field?: {
>                                 id?: string | null,
>                                 api_name?: string | null
>                               } | null,
>                               comparator?: string | null,
>                               value?: (string | number | {
>                                 id?: string & any | null,
>                                 name?: string | null
>                               } | {
>                                 name?: string | null
>                               } | {
>                                 id?: string | null,
>                                 name?: string | null
>                               })[] | string | number | boolean | {
>                                 id?: string & any | null,
>                                 name?: string | null
>                               } | {
>                                 name?: string | null
>                               } | {
>                                 id?: string | null,
>                                 name?: string | null
>                               } | string | null,
>                               type?: string | null
>                             } | {
>                               field?: {
>                                 id?: string | null,
>                                 api_name?: string | null
>                               } | null,
>                               comparator?: string | null,
>                               value?: string[] | string | null,
>                               type?: string | null
>                             } | {
>                               field?: {
>                                 id?: string | null,
>                                 api_name?: string | null
>                               } | null,
>                               comparator?: string | null,
>                               value?: string | number | string | null,
>                               type?: string | null
>                             } | {
>                               field?: {
>                                 id?: string | null,
>                                 api_name?: string | null
>                               } | null,
>                               comparator?: string | null,
>                               value?: (string | number)[] | null,
>                               type?: string | null
>                             } | {
>                               field?: {
>                                 id?: string | null,
>                                 api_name?: string | null
>                               } | null,
>                               comparator?: string | null,
>                               value?: (string | number)[] | null,
>                               type?: string | null
>                             } | {
>                               field?: {
>                                 id?: string | null,
>                                 api_name?: string | null
>                               } | null,
>                               comparator?: string | null,
>                               value?: {
>                                 id?: string & any | null,
>                                 name?: string | null
>                               }[] | null,
>                               type?: string | null
>                             } | (recursive)
>                           )[] | null,
>                           group_operator?: string | null
>                         }
>                       )[] | null,
>                       group_operator?: string | null
>                     } | null
>                   } | null,
>                   resource?: null | null,
>                   allow_agent_user?: boolean | null
>                 }
>               )[] | null,
>               related_records?: {
>                 api_name?: string | null,
>                 id?: string | null
>               }[] | null | null,
>               notify?: boolean | null,
>               apply_assignment_threshold?: boolean | null,
>               user_availability_based_on?: string[] | null | null,
>               lookup_field?: {
>                 api_name?: string | null,
>                 id?: string | null
>               } | null,
>               id?: string | null
>             } | null,
>             related_details?: {
>               best_time?: boolean | null
>             } | {
>               followup_details?: {
>                 condition?: string | null,
>                 unit?: number | null,
>                 period?: string | null
>               } | null
>             } | {
>               lookup_field?: {
>                 api_name?: string | null,
>                 id?: string | null
>               } | null
>             } | null | null,
>             id?: string | null,
>             _delete?: null | null
>           } | {
>             name?: string | null,
>             type?: string | null,
>             details?: {
>               module?: {
>                 api_name?: string | null,
>                 id?: string | null
>               } | null,
>               layout?: {
>                 id?: string | null,
>                 name?: string | null | null,
>                 display_label?: string | null
>               } | null,
>               field_mappings?: (
>                 {
>                   display_value?: string | null,
>                   field?: {
>                     api_name?: string | null,
>                     id?: string | null
>                   } | null,
>                   type?: string | null,
>                   value?: string | string[] | {
>                     id?: string | null,
>                     name?: string | null
>                   } | null
>                 } | {
>                   display_value?: string | null,
>                   field?: {
>                     api_name?: string | null,
>                     id?: string | null
>                   } | null,
>                   type?: string | null,
>                   value?: string | null,
>                   allow_agent_user?: boolean | null
>                 } | {
>                   display_value?: string | null,
>                   field?: {
>                     api_name?: string | null,
>                     id?: string | null
>                   } | null,
>                   type?: string | null,
>                   value?: {
>                     period?: string | null,
>                     unit?: string | null,
>                     sign?: string | null,
>                     trigger_field?: string | null,
>                     time?: string | null,
>                     notify_type?: string | null
>                   } | null
>                 } | {
>                   display_value?: string | null,
>                   field?: {
>                     api_name?: string | null,
>                     id?: string | null
>                   } | null,
>                   type?: string | null,
>                   value?: {
>                   } | null
>                 }
>               )[] | null,
>               apply_restriction?: boolean | null | null,
>               id?: string | null
>             } | null,
>             related_details?: {
>               best_time?: boolean | null
>             } | {
>               followup_details?: {
>                 condition?: string | null,
>                 unit?: number | null,
>                 period?: string | null
>               } | null
>             } | {
>               lookup_field?: {
>                 api_name?: string | null,
>                 id?: string | null
>               } | null
>             } | null | null,
>             id?: string | null,
>             _delete?: null | null
>           } | {
>             name?: string | null,
>             type?: string | null,
>             details?: {
>               module?: {
>                 api_name?: string | null,
>                 id?: string | null
>               } | null,
>               layout?: {
>                 id?: string | null,
>                 name?: string | null | null,
>                 display_label?: string | null
>               } | null,
>               field_mappings?: (
>                 {
>                   display_value?: string | null,
>                   field?: {
>                     api_name?: string | null,
>                     id?: string | null
>                   } | null,
>                   type?: string | null,
>                   value?: string | string[] | {
>                     id?: string | null,
>                     name?: string | null
>                   } | null
>                 } | {
>                   display_value?: string | null,
>                   field?: {
>                     api_name?: string | null,
>                     id?: string | null
>                   } | null,
>                   type?: string | null,
>                   value?: string | null,
>                   allow_agent_user?: boolean | null
>                 } | {
>                   display_value?: string | null,
>                   field?: {
>                     api_name?: string | null,
>                     id?: string | null
>                   } | null,
>                   type?: string | null,
>                   value?: {
>                     period?: string | null,
>                     unit?: string | null,
>                     sign?: string | null,
>                     trigger_field?: string | null,
>                     time?: string | null,
>                     notify_type?: string | null
>                   } | null
>                 } | {
>                   display_value?: string | null,
>                   field?: {
>                     api_name?: string | null,
>                     id?: string | null
>                   } | null,
>                   type?: string | null,
>                   value?: {
>                   } | null
>                 }
>               )[] | null,
>               apply_restriction?: boolean | null,
>               id?: string | null
>             } | null,
>             related_details?: {
>               best_time?: boolean | null
>             } | {
>               followup_details?: {
>                 condition?: string | null,
>                 unit?: number | null,
>                 period?: string | null
>               } | null
>             } | {
>               lookup_field?: {
>                 api_name?: string | null,
>                 id?: string | null
>               } | null
>             } | null | null,
>             id?: string | null,
>             _delete?: null | null
>           } | {
>             name?: string | null,
>             type?: string | null,
>             details?: {
>               module?: {
>                 api_name?: string | null,
>                 id?: string | null
>               } | null,
>               layout?: {
>                 id?: string | null,
>                 name?: string | null | null,
>                 display_label?: string | null
>               } | null,
>               field_mappings?: (
>                 {
>                   display_value?: string | null,
>                   field?: {
>                     api_name?: string | null,
>                     id?: string | null
>                   } | null,
>                   type?: string | null,
>                   value?: string | string[] | {
>                     id?: string | null,
>                     name?: string | null
>                   } | null
>                 } | {
>                   display_value?: string | null,
>                   field?: {
>                     api_name?: string | null,
>                     id?: string | null
>                   } | null,
>                   type?: string | null,
>                   value?: string | null,
>                   allow_agent_user?: boolean | null
>                 } | {
>                   display_value?: string | null,
>                   field?: {
>                     api_name?: string | null,
>                     id?: string | null
>                   } | null,
>                   type?: string | null,
>                   value?: {
>                     period?: string | null,
>                     unit?: string | null,
>                     sign?: string | null,
>                     trigger_field?: string | null,
>                     time?: string | null,
>                     notify_type?: string | null
>                   } | null
>                 } | {
>                   display_value?: string | null,
>                   field?: {
>                     api_name?: string | null,
>                     id?: string | null
>                   } | null,
>                   type?: string | null,
>                   value?: {
>                   } | null
>                 }
>               )[] | null,
>               meeting_duration?: {
>                 unit?: number | null,
>                 period?: string | null
>               } | null,
>               host_unavailable?: {
>                 assign_record_owner_as_host?: boolean | null,
>                 assign_task?: {
>                   name?: string | null,
>                   id?: string | null
>                 } | null | null
>               } | null,
>               apply_restriction?: boolean | null | null,
>               id?: string | null
>             } | null,
>             related_details?: {
>               best_time?: boolean | null
>             } | {
>               followup_details?: {
>                 condition?: string | null,
>                 unit?: number | null,
>                 period?: string | null
>               } | null
>             } | {
>               lookup_field?: {
>                 api_name?: string | null,
>                 id?: string | null
>               } | null
>             } | null | null,
>             id?: string | null,
>             _delete?: null | null
>           } | {
>             name?: string | null,
>             type?: string | null,
>             details?: {
>               module?: {
>                 api_name?: string | null,
>                 id?: string | null
>               } | null,
>               layout?: {
>                 id?: string | null,
>                 name?: string | null | null,
>                 display_label?: string | null
>               } | null,
>               field_mappings?: (
>                 {
>                   display_value?: string | null,
>                   field?: {
>                     api_name?: string | null,
>                     id?: string | null
>                   } | null,
>                   type?: string | null,
>                   value?: string | string[] | {
>                     id?: string | null,
>                     name?: string | null
>                   } | null
>                 } | {
>                   display_value?: string | null,
>                   field?: {
>                     api_name?: string | null,
>                     id?: string | null
>                   } | null,
>                   type?: string | null,
>                   value?: string | null,
>                   allow_agent_user?: boolean | null
>                 } | {
>                   display_value?: string | null,
>                   field?: {
>                     api_name?: string | null,
>                     id?: string | null
>                   } | null,
>                   type?: string | null,
>                   value?: {
>                     period?: string | null,
>                     unit?: string | null,
>                     sign?: string | null,
>                     trigger_field?: string | null,
>                     time?: string | null,
>                     notify_type?: string | null
>                   } | null
>                 } | {
>                   display_value?: string | null,
>                   field?: {
>                     api_name?: string | null,
>                     id?: string | null
>                   } | null,
>                   type?: string | null,
>                   value?: {
>                   } | null
>                 }
>               )[] | null,
>               apply_restriction?: boolean | null | null,
>               id?: string | null
>             } | null,
>             related_details?: {
>               best_time?: boolean | null
>             } | {
>               followup_details?: {
>                 condition?: string | null,
>                 unit?: number | null,
>                 period?: string | null
>               } | null
>             } | {
>               lookup_field?: {
>                 api_name?: string | null,
>                 id?: string | null
>               } | null
>             } | null | null,
>             id?: string | null,
>             _delete?: null | null
>           } | {
>             name?: string | null,
>             type?: string | null,
>             details?: {
>               over_write?: boolean | null,
>               tags?: {
>                 id?: string | null,
>                 name?: string | null,
>                 color_code?: string | null
>               }[] | null,
>               module?: {
>                 api_name?: string | null,
>                 id?: string | null
>               } | null,
>               id?: string | null
>             } | null,
>             related_details?: {
>               best_time?: boolean | null
>             } | {
>               followup_details?: {
>                 condition?: string | null,
>                 unit?: number | null,
>                 period?: string | null
>               } | null
>             } | {
>               lookup_field?: {
>                 api_name?: string | null,
>                 id?: string | null
>               } | null
>             } | null | null,
>             id?: string | null,
>             _delete?: null | null
>           } | {
>             name?: string | null,
>             type?: string | null,
>             details?: {
>               tags?: {
>                 id?: string | null,
>                 name?: string | null,
>                 color_code?: string | null
>               }[] | null,
>               module?: {
>                 api_name?: string | null,
>                 id?: string | null
>               } | null,
>               over_write?: boolean | null,
>               id?: string | null
>             } | null,
>             related_details?: {
>               best_time?: boolean | null
>             } | {
>               followup_details?: {
>                 condition?: string | null,
>                 unit?: number | null,
>                 period?: string | null
>               } | null
>             } | {
>               lookup_field?: {
>                 api_name?: string | null,
>                 id?: string | null
>               } | null
>             } | null | null,
>             id?: string | null,
>             _delete?: null | null
>           } | {
>             name?: string | null,
>             type?: string | null,
>             details?: {
>               add_to_existing_contact?: boolean | null,
>               add_to_existing_account?: boolean | null,
>               move_attachment_to?: {
>                 api_name?: string | null,
>                 id?: string | null
>               } | null,
>               carry_tags?: {
>                 api_name?: string | null,
>                 id?: string | null
>               }[] | null,
>               field_mappings?: (
>                 {
>                   display_value?: string | null,
>                   field?: {
>                     api_name?: string | null,
>                     id?: string | null
>                   } | null,
>                   type?: string | null,
>                   value?: string | string[] | {
>                     id?: string | null,
>                     name?: string | null
>                   } | null
>                 } | {
>                   display_value?: string | null,
>                   field?: {
>                     api_name?: string | null,
>                     id?: string | null
>                   } | null,
>                   type?: string | null,
>                   value?: string | null,
>                   allow_agent_user?: boolean | null
>                 } | {
>                   display_value?: string | null,
>                   field?: {
>                     api_name?: string | null,
>                     id?: string | null
>                   } | null,
>                   type?: string | null,
>                   value?: {
>                     period?: string | null,
>                     unit?: string | null,
>                     sign?: string | null,
>                     trigger_field?: string | null,
>                     time?: string | null,
>                     notify_type?: string | null
>                   } | null
>                 } | {
>                   display_value?: string | null,
>                   field?: {
>                     api_name?: string | null,
>                     id?: string | null
>                   } | null,
>                   type?: string | null,
>                   value?: {
>                   } | null
>                 }
>               )[] | null,
>               create_deal?: boolean | null,
>               change_owner?: {
>                 id?: string | null,
>                 name?: string | null,
>                 related_modules?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 }[] | null,
>                 apply_assignment_threshold?: boolean | null
>               } | null,
>               contact_role?: string | null,
>               convert_to?: {
>                 api_name?: string | null,
>                 id?: string | null
>               } | null,
>               portal_user_type?: {
>                 id?: string | null,
>                 name?: string | null
>               } | null,
>               apply_restriction?: boolean | null | null,
>               id?: string | null
>             } | null,
>             related_details?: {
>               best_time?: boolean | null
>             } | {
>               followup_details?: {
>                 condition?: string | null,
>                 unit?: number | null,
>                 period?: string | null
>               } | null
>             } | {
>               lookup_field?: {
>                 api_name?: string | null,
>                 id?: string | null
>               } | null
>             } | null | null,
>             id?: string | null,
>             _delete?: null | null
>           } | {
>             name?: string | null,
>             type?: string | null,
>             details?: {
>               message?: string | null,
>               notify_to?: {
>                 type?: string | null,
>                 id?: string | null,
>                 name?: string | null,
>                 module?: {
>                   id?: string | null,
>                   api_name?: string | null
>                 } | null,
>                 notify_fields?: {
>                   fields?: {
>                     id?: string | null,
>                     api_name?: string | null
>                   }[] | null,
>                   static_fields?: {
>                     id?: string | null,
>                     api_name?: string | null
>                   }[] | null
>                 } | null
>               } | null,
>               id?: string | null
>             } | null,
>             id?: string | null,
>             _delete?: null | null
>           } | {
>             name?: string | null,
>             type?: string | null,
>             details?: {
>               circuit_id?: string | null,
>               id?: string | null
>             } | null,
>             id?: string | null,
>             _delete?: null | null
>           } | {
>             name?: string | null,
>             type?: string | null,
>             details?: {
>               custom_action_id?: string | null,
>               custom_action_name?: string | null,
>               id?: string | null
>             } | null,
>             id?: string | null,
>             _delete?: null | null
>           } | {
>             name?: string | null,
>             type?: string | null,
>             details?: {
>               content?: string | null,
>               id?: string | null
>             } | null,
>             id?: string | null,
>             _delete?: null | null
>           } | {
>             name?: string | null,
>             type?: string | null,
>             details?: {
>               module?: {
>                 api_name?: string | null
>               } | null,
>               field_mappings?: {
>                 field?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 } | null,
>                 value?: {
>                   type?: string | null,
>                   resource?: {
>                     id?: string | null
>                   } | null
>                 } | null
>               }[] | null,
>               id?: string | null
>             } | null,
>             id?: string | null,
>             _delete?: null | null
>           } | {
>             id?: string | null,
>             name?: string | null,
>             type?: string | null,
>             details?: {
>               module?: {
>                 api_name?: string | null,
>                 id?: string | null
>               } | null
>             } | null,
>             related_details?: {
>               best_time?: boolean | null
>             } | null | null,
>             _delete?: null | null
>           } | {
>             id?: string | null,
>             name?: string | null,
>             type?: string | null,
>             details?: {
>               module?: {
>                 api_name?: string | null,
>                 id?: string | null
>               } | null
>             } | null,
>             related_details?: {
>               lookup_field?: {
>                 api_name?: string | null,
>                 id?: string | null
>               } | null
>             } | null | null,
>             _delete?: null | null
>           } | {
>             id?: string | null,
>             name?: string | null,
>             type?: string | null,
>             details?: {
>               module?: {
>                 api_name?: string | null,
>                 id?: string | null
>               } | null
>             } | null,
>             related_details?: {
>               followup_details?: {
>                 condition?: string | null,
>                 unit?: number | null,
>                 period?: string | null
>               } | null
>             } | null | null,
>             _delete?: null | null
>           } | {
>             id?: string | null,
>             name?: string | null,
>             type?: string | null,
>             details?: {
>               module?: {
>                 api_name?: string | null,
>                 id?: string | null
>               } | null
>             } | null,
>             _delete?: null | null
>           }
>         )[] | null
>       } | null,
>       scheduled_actions?: (
>         {
>           execute_after?: {
>             period?: string | null,
>             unit?: number | null
>           } | null,
>           actions?: (
>             {
>               name?: string | null,
>               type?: string | null,
>               details?: {
>                 module?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 } | null,
>                 assign_to?: (
>                   {
>                     type?: string | null,
>                     resource?: {
>                       id?: string | null,
>                       name?: string | null,
>                       type?: string | null
>                     } | null,
>                     allow_agent_user?: boolean | null,
>                     associated_to?: string | null | null,
>                     details?: null | null
>                   } | {
>                     type?: string | null,
>                     details?: {
>                       api_name?: string | null
>                     } | null,
>                     resource?: null | null,
>                     allow_agent_user?: boolean | null
>                   } | {
>                     type?: string | null,
>                     details?: {
>                       criteria?: {
>                         field?: {
>                           id?: string | null,
>                           api_name?: string | null
>                         } | null,
>                         comparator?: string | null,
>                         value?: (string | number | {
>                           id?: string & any | null,
>                           name?: string | null
>                         } | {
>                           name?: string | null
>                         } | {
>                           id?: string | null,
>                           name?: string | null
>                         })[] | string | number | boolean | {
>                           id?: string & any | null,
>                           name?: string | null
>                         } | {
>                           name?: string | null
>                         } | {
>                           id?: string | null,
>                           name?: string | null
>                         } | string | string | string | string | null,
>                         type?: string | null
>                       } | {
>                         field?: {
>                           id?: string | null,
>                           api_name?: string | null
>                         } | null,
>                         comparator?: string | null,
>                         value?: (string | number | {
>                           id?: string & any | null,
>                           name?: string | null
>                         } | {
>                           name?: string | null
>                         } | {
>                           id?: string | null,
>                           name?: string | null
>                         })[] | string | number | boolean | {
>                           id?: string & any | null,
>                           name?: string | null
>                         } | {
>                           name?: string | null
>                         } | {
>                           id?: string | null,
>                           name?: string | null
>                         } | string | null,
>                         type?: string | null
>                       } | {
>                         field?: {
>                           id?: string | null,
>                           api_name?: string | null
>                         } | null,
>                         comparator?: string | null,
>                         value?: string[] | string | null,
>                         type?: string | null
>                       } | {
>                         field?: {
>                           id?: string | null,
>                           api_name?: string | null
>                         } | null,
>                         comparator?: string | null,
>                         value?: string | number | string | null,
>                         type?: string | null
>                       } | {
>                         field?: {
>                           id?: string | null,
>                           api_name?: string | null
>                         } | null,
>                         comparator?: string | null,
>                         value?: (string | number)[] | null,
>                         type?: string | null
>                       } | {
>                         field?: {
>                           id?: string | null,
>                           api_name?: string | null
>                         } | null,
>                         comparator?: string | null,
>                         value?: (string | number)[] | null,
>                         type?: string | null
>                       } | {
>                         field?: {
>                           id?: string | null,
>                           api_name?: string | null
>                         } | null,
>                         comparator?: string | null,
>                         value?: {
>                           id?: string & any | null,
>                           name?: string | null
>                         }[] | null,
>                         type?: string | null
>                       } | {
>                         group?: (
>                           {
>                             field?: {
>                               id?: string | null,
>                               api_name?: string | null
>                             } | null,
>                             comparator?: string | null,
>                             value?: (string | number | {
>                               id?: string & any | null,
>                               name?: string | null
>                             } | {
>                               name?: string | null
>                             } | {
>                               id?: string | null,
>                               name?: string | null
>                             })[] | string | number | boolean | {
>                               id?: string & any | null,
>                               name?: string | null
>                             } | {
>                               name?: string | null
>                             } | {
>                               id?: string | null,
>                               name?: string | null
>                             } | string | string | string | string | null,
>                             type?: string | null
>                           } | {
>                             field?: {
>                               id?: string | null,
>                               api_name?: string | null
>                             } | null,
>                             comparator?: string | null,
>                             value?: (string | number | {
>                               id?: string & any | null,
>                               name?: string | null
>                             } | {
>                               name?: string | null
>                             } | {
>                               id?: string | null,
>                               name?: string | null
>                             })[] | string | number | boolean | {
>                               id?: string & any | null,
>                               name?: string | null
>                             } | {
>                               name?: string | null
>                             } | {
>                               id?: string | null,
>                               name?: string | null
>                             } | string | null,
>                             type?: string | null
>                           } | {
>                             field?: {
>                               id?: string | null,
>                               api_name?: string | null
>                             } | null,
>                             comparator?: string | null,
>                             value?: string[] | string | null,
>                             type?: string | null
>                           } | {
>                             field?: {
>                               id?: string | null,
>                               api_name?: string | null
>                             } | null,
>                             comparator?: string | null,
>                             value?: string | number | string | null,
>                             type?: string | null
>                           } | {
>                             field?: {
>                               id?: string | null,
>                               api_name?: string | null
>                             } | null,
>                             comparator?: string | null,
>                             value?: (string | number)[] | null,
>                             type?: string | null
>                           } | {
>                             field?: {
>                               id?: string | null,
>                               api_name?: string | null
>                             } | null,
>                             comparator?: string | null,
>                             value?: (string | number)[] | null,
>                             type?: string | null
>                           } | {
>                             field?: {
>                               id?: string | null,
>                               api_name?: string | null
>                             } | null,
>                             comparator?: string | null,
>                             value?: {
>                               id?: string & any | null,
>                               name?: string | null
>                             }[] | null,
>                             type?: string | null
>                           } | {
>                             group?: (
>                               {
>                                 field?: {
>                                   id?: string | null,
>                                   api_name?: string | null
>                                 } | null,
>                                 comparator?: string | null,
>                                 value?: (string | number | {
>                                   id?: string & any | null,
>                                   name?: string | null
>                                 } | {
>                                   name?: string | null
>                                 } | {
>                                   id?: string | null,
>                                   name?: string | null
>                                 })[] | string | number | boolean | {
>                                   id?: string & any | null,
>                                   name?: string | null
>                                 } | {
>                                   name?: string | null
>                                 } | {
>                                   id?: string | null,
>                                   name?: string | null
>                                 } | string | string | string | string | null,
>                                 type?: string | null
>                               } | {
>                                 field?: {
>                                   id?: string | null,
>                                   api_name?: string | null
>                                 } | null,
>                                 comparator?: string | null,
>                                 value?: (string | number | {
>                                   id?: string & any | null,
>                                   name?: string | null
>                                 } | {
>                                   name?: string | null
>                                 } | {
>                                   id?: string | null,
>                                   name?: string | null
>                                 })[] | string | number | boolean | {
>                                   id?: string & any | null,
>                                   name?: string | null
>                                 } | {
>                                   name?: string | null
>                                 } | {
>                                   id?: string | null,
>                                   name?: string | null
>                                 } | string | null,
>                                 type?: string | null
>                               } | {
>                                 field?: {
>                                   id?: string | null,
>                                   api_name?: string | null
>                                 } | null,
>                                 comparator?: string | null,
>                                 value?: string[] | string | null,
>                                 type?: string | null
>                               } | {
>                                 field?: {
>                                   id?: string | null,
>                                   api_name?: string | null
>                                 } | null,
>                                 comparator?: string | null,
>                                 value?: string | number | string | null,
>                                 type?: string | null
>                               } | {
>                                 field?: {
>                                   id?: string | null,
>                                   api_name?: string | null
>                                 } | null,
>                                 comparator?: string | null,
>                                 value?: (string | number)[] | null,
>                                 type?: string | null
>                               } | {
>                                 field?: {
>                                   id?: string | null,
>                                   api_name?: string | null
>                                 } | null,
>                                 comparator?: string | null,
>                                 value?: (string | number)[] | null,
>                                 type?: string | null
>                               } | {
>                                 field?: {
>                                   id?: string | null,
>                                   api_name?: string | null
>                                 } | null,
>                                 comparator?: string | null,
>                                 value?: {
>                                   id?: string & any | null,
>                                   name?: string | null
>                                 }[] | null,
>                                 type?: string | null
>                               } | (recursive)
>                             )[] | null,
>                             group_operator?: string | null
>                           }
>                         )[] | null,
>                         group_operator?: string | null
>                       } | null
>                     } | null,
>                     resource?: null | null,
>                     allow_agent_user?: boolean | null
>                   }
>                 )[] | null,
>                 related_records?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 }[] | null | null,
>                 notify?: boolean | null,
>                 apply_assignment_threshold?: boolean | null,
>                 user_availability_based_on?: string[] | null | null,
>                 lookup_field?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 } | null,
>                 id?: string | null
>               } | null,
>               related_details?: {
>                 best_time?: boolean | null
>               } | {
>                 followup_details?: {
>                   condition?: string | null,
>                   unit?: number | null,
>                   period?: string | null
>                 } | null
>               } | {
>                 lookup_field?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 } | null
>               } | null | null,
>               id?: string | null,
>               _delete?: null | null
>             } | {
>               name?: string | null,
>               type?: string | null,
>               details?: {
>                 module?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 } | null,
>                 layout?: {
>                   id?: string | null,
>                   name?: string | null | null,
>                   display_label?: string | null
>                 } | null,
>                 field_mappings?: (
>                   {
>                     display_value?: string | null,
>                     field?: {
>                       api_name?: string | null,
>                       id?: string | null
>                     } | null,
>                     type?: string | null,
>                     value?: string | string[] | {
>                       id?: string | null,
>                       name?: string | null
>                     } | null
>                   } | {
>                     display_value?: string | null,
>                     field?: {
>                       api_name?: string | null,
>                       id?: string | null
>                     } | null,
>                     type?: string | null,
>                     value?: string | null,
>                     allow_agent_user?: boolean | null
>                   } | {
>                     display_value?: string | null,
>                     field?: {
>                       api_name?: string | null,
>                       id?: string | null
>                     } | null,
>                     type?: string | null,
>                     value?: {
>                       period?: string | null,
>                       unit?: string | null,
>                       sign?: string | null,
>                       trigger_field?: string | null,
>                       time?: string | null,
>                       notify_type?: string | null
>                     } | null
>                   } | {
>                     display_value?: string | null,
>                     field?: {
>                       api_name?: string | null,
>                       id?: string | null
>                     } | null,
>                     type?: string | null,
>                     value?: {
>                     } | null
>                   }
>                 )[] | null,
>                 apply_restriction?: boolean | null | null,
>                 id?: string | null
>               } | null,
>               related_details?: {
>                 best_time?: boolean | null
>               } | {
>                 followup_details?: {
>                   condition?: string | null,
>                   unit?: number | null,
>                   period?: string | null
>                 } | null
>               } | {
>                 lookup_field?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 } | null
>               } | null | null,
>               id?: string | null,
>               _delete?: null | null
>             } | {
>               name?: string | null,
>               type?: string | null,
>               details?: {
>                 module?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 } | null,
>                 layout?: {
>                   id?: string | null,
>                   name?: string | null | null,
>                   display_label?: string | null
>                 } | null,
>                 field_mappings?: (
>                   {
>                     display_value?: string | null,
>                     field?: {
>                       api_name?: string | null,
>                       id?: string | null
>                     } | null,
>                     type?: string | null,
>                     value?: string | string[] | {
>                       id?: string | null,
>                       name?: string | null
>                     } | null
>                   } | {
>                     display_value?: string | null,
>                     field?: {
>                       api_name?: string | null,
>                       id?: string | null
>                     } | null,
>                     type?: string | null,
>                     value?: string | null,
>                     allow_agent_user?: boolean | null
>                   } | {
>                     display_value?: string | null,
>                     field?: {
>                       api_name?: string | null,
>                       id?: string | null
>                     } | null,
>                     type?: string | null,
>                     value?: {
>                       period?: string | null,
>                       unit?: string | null,
>                       sign?: string | null,
>                       trigger_field?: string | null,
>                       time?: string | null,
>                       notify_type?: string | null
>                     } | null
>                   } | {
>                     display_value?: string | null,
>                     field?: {
>                       api_name?: string | null,
>                       id?: string | null
>                     } | null,
>                     type?: string | null,
>                     value?: {
>                     } | null
>                   }
>                 )[] | null,
>                 apply_restriction?: boolean | null,
>                 id?: string | null
>               } | null,
>               related_details?: {
>                 best_time?: boolean | null
>               } | {
>                 followup_details?: {
>                   condition?: string | null,
>                   unit?: number | null,
>                   period?: string | null
>                 } | null
>               } | {
>                 lookup_field?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 } | null
>               } | null | null,
>               id?: string | null,
>               _delete?: null | null
>             } | {
>               name?: string | null,
>               type?: string | null,
>               details?: {
>                 module?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 } | null,
>                 layout?: {
>                   id?: string | null,
>                   name?: string | null | null,
>                   display_label?: string | null
>                 } | null,
>                 field_mappings?: (
>                   {
>                     display_value?: string | null,
>                     field?: {
>                       api_name?: string | null,
>                       id?: string | null
>                     } | null,
>                     type?: string | null,
>                     value?: string | string[] | {
>                       id?: string | null,
>                       name?: string | null
>                     } | null
>                   } | {
>                     display_value?: string | null,
>                     field?: {
>                       api_name?: string | null,
>                       id?: string | null
>                     } | null,
>                     type?: string | null,
>                     value?: string | null,
>                     allow_agent_user?: boolean | null
>                   } | {
>                     display_value?: string | null,
>                     field?: {
>                       api_name?: string | null,
>                       id?: string | null
>                     } | null,
>                     type?: string | null,
>                     value?: {
>                       period?: string | null,
>                       unit?: string | null,
>                       sign?: string | null,
>                       trigger_field?: string | null,
>                       time?: string | null,
>                       notify_type?: string | null
>                     } | null
>                   } | {
>                     display_value?: string | null,
>                     field?: {
>                       api_name?: string | null,
>                       id?: string | null
>                     } | null,
>                     type?: string | null,
>                     value?: {
>                     } | null
>                   }
>                 )[] | null,
>                 meeting_duration?: {
>                   unit?: number | null,
>                   period?: string | null
>                 } | null,
>                 host_unavailable?: {
>                   assign_record_owner_as_host?: boolean | null,
>                   assign_task?: {
>                     name?: string | null,
>                     id?: string | null
>                   } | null | null
>                 } | null,
>                 apply_restriction?: boolean | null | null,
>                 id?: string | null
>               } | null,
>               related_details?: {
>                 best_time?: boolean | null
>               } | {
>                 followup_details?: {
>                   condition?: string | null,
>                   unit?: number | null,
>                   period?: string | null
>                 } | null
>               } | {
>                 lookup_field?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 } | null
>               } | null | null,
>               id?: string | null,
>               _delete?: null | null
>             } | {
>               name?: string | null,
>               type?: string | null,
>               details?: {
>                 module?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 } | null,
>                 layout?: {
>                   id?: string | null,
>                   name?: string | null | null,
>                   display_label?: string | null
>                 } | null,
>                 field_mappings?: (
>                   {
>                     display_value?: string | null,
>                     field?: {
>                       api_name?: string | null,
>                       id?: string | null
>                     } | null,
>                     type?: string | null,
>                     value?: string | string[] | {
>                       id?: string | null,
>                       name?: string | null
>                     } | null
>                   } | {
>                     display_value?: string | null,
>                     field?: {
>                       api_name?: string | null,
>                       id?: string | null
>                     } | null,
>                     type?: string | null,
>                     value?: string | null,
>                     allow_agent_user?: boolean | null
>                   } | {
>                     display_value?: string | null,
>                     field?: {
>                       api_name?: string | null,
>                       id?: string | null
>                     } | null,
>                     type?: string | null,
>                     value?: {
>                       period?: string | null,
>                       unit?: string | null,
>                       sign?: string | null,
>                       trigger_field?: string | null,
>                       time?: string | null,
>                       notify_type?: string | null
>                     } | null
>                   } | {
>                     display_value?: string | null,
>                     field?: {
>                       api_name?: string | null,
>                       id?: string | null
>                     } | null,
>                     type?: string | null,
>                     value?: {
>                     } | null
>                   }
>                 )[] | null,
>                 apply_restriction?: boolean | null | null,
>                 id?: string | null
>               } | null,
>               related_details?: {
>                 best_time?: boolean | null
>               } | {
>                 followup_details?: {
>                   condition?: string | null,
>                   unit?: number | null,
>                   period?: string | null
>                 } | null
>               } | {
>                 lookup_field?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 } | null
>               } | null | null,
>               id?: string | null,
>               _delete?: null | null
>             } | {
>               name?: string | null,
>               type?: string | null,
>               details?: {
>                 over_write?: boolean | null,
>                 tags?: {
>                   id?: string | null,
>                   name?: string | null,
>                   color_code?: string | null
>                 }[] | null,
>                 module?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 } | null,
>                 id?: string | null
>               } | null,
>               related_details?: {
>                 best_time?: boolean | null
>               } | {
>                 followup_details?: {
>                   condition?: string | null,
>                   unit?: number | null,
>                   period?: string | null
>                 } | null
>               } | {
>                 lookup_field?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 } | null
>               } | null | null,
>               id?: string | null,
>               _delete?: null | null
>             } | {
>               name?: string | null,
>               type?: string | null,
>               details?: {
>                 tags?: {
>                   id?: string | null,
>                   name?: string | null,
>                   color_code?: string | null
>                 }[] | null,
>                 module?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 } | null,
>                 over_write?: boolean | null,
>                 id?: string | null
>               } | null,
>               related_details?: {
>                 best_time?: boolean | null
>               } | {
>                 followup_details?: {
>                   condition?: string | null,
>                   unit?: number | null,
>                   period?: string | null
>                 } | null
>               } | {
>                 lookup_field?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 } | null
>               } | null | null,
>               id?: string | null,
>               _delete?: null | null
>             } | {
>               name?: string | null,
>               type?: string | null,
>               details?: {
>                 add_to_existing_contact?: boolean | null,
>                 add_to_existing_account?: boolean | null,
>                 move_attachment_to?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 } | null,
>                 carry_tags?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 }[] | null,
>                 field_mappings?: (
>                   {
>                     display_value?: string | null,
>                     field?: {
>                       api_name?: string | null,
>                       id?: string | null
>                     } | null,
>                     type?: string | null,
>                     value?: string | string[] | {
>                       id?: string | null,
>                       name?: string | null
>                     } | null
>                   } | {
>                     display_value?: string | null,
>                     field?: {
>                       api_name?: string | null,
>                       id?: string | null
>                     } | null,
>                     type?: string | null,
>                     value?: string | null,
>                     allow_agent_user?: boolean | null
>                   } | {
>                     display_value?: string | null,
>                     field?: {
>                       api_name?: string | null,
>                       id?: string | null
>                     } | null,
>                     type?: string | null,
>                     value?: {
>                       period?: string | null,
>                       unit?: string | null,
>                       sign?: string | null,
>                       trigger_field?: string | null,
>                       time?: string | null,
>                       notify_type?: string | null
>                     } | null
>                   } | {
>                     display_value?: string | null,
>                     field?: {
>                       api_name?: string | null,
>                       id?: string | null
>                     } | null,
>                     type?: string | null,
>                     value?: {
>                     } | null
>                   }
>                 )[] | null,
>                 create_deal?: boolean | null,
>                 change_owner?: {
>                   id?: string | null,
>                   name?: string | null,
>                   related_modules?: {
>                     api_name?: string | null,
>                     id?: string | null
>                   }[] | null,
>                   apply_assignment_threshold?: boolean | null
>                 } | null,
>                 contact_role?: string | null,
>                 convert_to?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 } | null,
>                 portal_user_type?: {
>                   id?: string | null,
>                   name?: string | null
>                 } | null,
>                 apply_restriction?: boolean | null | null,
>                 id?: string | null
>               } | null,
>               related_details?: {
>                 best_time?: boolean | null
>               } | {
>                 followup_details?: {
>                   condition?: string | null,
>                   unit?: number | null,
>                   period?: string | null
>                 } | null
>               } | {
>                 lookup_field?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 } | null
>               } | null | null,
>               id?: string | null,
>               _delete?: null | null
>             } | {
>               name?: string | null,
>               type?: string | null,
>               details?: {
>                 message?: string | null,
>                 notify_to?: {
>                   type?: string | null,
>                   id?: string | null,
>                   name?: string | null,
>                   module?: {
>                     id?: string | null,
>                     api_name?: string | null
>                   } | null,
>                   notify_fields?: {
>                     fields?: {
>                       id?: string | null,
>                       api_name?: string | null
>                     }[] | null,
>                     static_fields?: {
>                       id?: string | null,
>                       api_name?: string | null
>                     }[] | null
>                   } | null
>                 } | null,
>                 id?: string | null
>               } | null,
>               id?: string | null,
>               _delete?: null | null
>             } | {
>               name?: string | null,
>               type?: string | null,
>               details?: {
>                 circuit_id?: string | null,
>                 id?: string | null
>               } | null,
>               id?: string | null,
>               _delete?: null | null
>             } | {
>               name?: string | null,
>               type?: string | null,
>               details?: {
>                 custom_action_id?: string | null,
>                 custom_action_name?: string | null,
>                 id?: string | null
>               } | null,
>               id?: string | null,
>               _delete?: null | null
>             } | {
>               name?: string | null,
>               type?: string | null,
>               details?: {
>                 content?: string | null,
>                 id?: string | null
>               } | null,
>               id?: string | null,
>               _delete?: null | null
>             } | {
>               name?: string | null,
>               type?: string | null,
>               details?: {
>                 module?: {
>                   api_name?: string | null
>                 } | null,
>                 field_mappings?: {
>                   field?: {
>                     api_name?: string | null,
>                     id?: string | null
>                   } | null,
>                   value?: {
>                     type?: string | null,
>                     resource?: {
>                       id?: string | null
>                     } | null
>                   } | null
>                 }[] | null,
>                 id?: string | null
>               } | null,
>               id?: string | null,
>               _delete?: null | null
>             } | {
>               id?: string | null,
>               name?: string | null,
>               type?: string | null,
>               details?: {
>                 module?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 } | null
>               } | null,
>               related_details?: {
>                 best_time?: boolean | null
>               } | null | null,
>               _delete?: null | null
>             } | {
>               id?: string | null,
>               name?: string | null,
>               type?: string | null,
>               details?: {
>                 module?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 } | null
>               } | null,
>               related_details?: {
>                 lookup_field?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 } | null
>               } | null | null,
>               _delete?: null | null
>             } | {
>               id?: string | null,
>               name?: string | null,
>               type?: string | null,
>               details?: {
>                 module?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 } | null
>               } | null,
>               related_details?: {
>                 followup_details?: {
>                   condition?: string | null,
>                   unit?: number | null,
>                   period?: string | null
>                 } | null
>               } | null | null,
>               _delete?: null | null
>             } | {
>               id?: string | null,
>               name?: string | null,
>               type?: string | null,
>               details?: {
>                 module?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 } | null
>               } | null,
>               _delete?: null | null
>             }
>           )[] | null,
>           id?: string | null
>         } | null
>       )[] | null | null,
>       criteria_details?: {
>         criteria?: {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number | {
>             id?: string & any | null,
>             name?: string | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           })[] | string | number | boolean | {
>             id?: string & any | null,
>             name?: string | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           } | string | string | string | string | null,
>           type?: string | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number | {
>             id?: string & any | null,
>             name?: string | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           })[] | string | number | boolean | {
>             id?: string & any | null,
>             name?: string | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           } | string | null,
>           type?: string | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: string[] | string | null,
>           type?: string | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: string | number | string | null,
>           type?: string | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number)[] | null,
>           type?: string | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number)[] | null,
>           type?: string | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: {
>             id?: string & any | null,
>             name?: string | null
>           }[] | null,
>           type?: string | null
>         } | {
>           group?: (
>             {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number | {
>                 id?: string & any | null,
>                 name?: string | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               })[] | string | number | boolean | {
>                 id?: string & any | null,
>                 name?: string | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               } | string | string | string | string | null,
>               type?: string | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number | {
>                 id?: string & any | null,
>                 name?: string | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               })[] | string | number | boolean | {
>                 id?: string & any | null,
>                 name?: string | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               } | string | null,
>               type?: string | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: string[] | string | null,
>               type?: string | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: string | number | string | null,
>               type?: string | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number)[] | null,
>               type?: string | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number)[] | null,
>               type?: string | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: {
>                 id?: string & any | null,
>                 name?: string | null
>               }[] | null,
>               type?: string | null
>             } | {
>               group?: (
>                 {
>                   field?: {
>                     id?: string | null,
>                     api_name?: string | null
>                   } | null,
>                   comparator?: string | null,
>                   value?: (string | number | {
>                     id?: string & any | null,
>                     name?: string | null
>                   } | {
>                     name?: string | null
>                   } | {
>                     id?: string | null,
>                     name?: string | null
>                   })[] | string | number | boolean | {
>                     id?: string & any | null,
>                     name?: string | null
>                   } | {
>                     name?: string | null
>                   } | {
>                     id?: string | null,
>                     name?: string | null
>                   } | string | string | string | string | null,
>                   type?: string | null
>                 } | {
>                   field?: {
>                     id?: string | null,
>                     api_name?: string | null
>                   } | null,
>                   comparator?: string | null,
>                   value?: (string | number | {
>                     id?: string & any | null,
>                     name?: string | null
>                   } | {
>                     name?: string | null
>                   } | {
>                     id?: string | null,
>                     name?: string | null
>                   })[] | string | number | boolean | {
>                     id?: string & any | null,
>                     name?: string | null
>                   } | {
>                     name?: string | null
>                   } | {
>                     id?: string | null,
>                     name?: string | null
>                   } | string | null,
>                   type?: string | null
>                 } | {
>                   field?: {
>                     id?: string | null,
>                     api_name?: string | null
>                   } | null,
>                   comparator?: string | null,
>                   value?: string[] | string | null,
>                   type?: string | null
>                 } | {
>                   field?: {
>                     id?: string | null,
>                     api_name?: string | null
>                   } | null,
>                   comparator?: string | null,
>                   value?: string | number | string | null,
>                   type?: string | null
>                 } | {
>                   field?: {
>                     id?: string | null,
>                     api_name?: string | null
>                   } | null,
>                   comparator?: string | null,
>                   value?: (string | number)[] | null,
>                   type?: string | null
>                 } | {
>                   field?: {
>                     id?: string | null,
>                     api_name?: string | null
>                   } | null,
>                   comparator?: string | null,
>                   value?: (string | number)[] | null,
>                   type?: string | null
>                 } | {
>                   field?: {
>                     id?: string | null,
>                     api_name?: string | null
>                   } | null,
>                   comparator?: string | null,
>                   value?: {
>                     id?: string & any | null,
>                     name?: string | null
>                   }[] | null,
>                   type?: string | null
>                 } | (recursive)
>               )[] | null,
>               group_operator?: string | null
>             }
>           )[] | null,
>           group_operator?: string | null
>         } | null | null,
>         relational_criteria?: {
>           criteria?: {
>             field?: {
>               id?: string | null,
>               api_name?: string | null
>             } | null,
>             comparator?: string | null,
>             value?: (string | number | {
>               id?: string & any | null,
>               name?: string | null
>             } | {
>               name?: string | null
>             } | {
>               id?: string | null,
>               name?: string | null
>             })[] | string | number | boolean | {
>               id?: string & any | null,
>               name?: string | null
>             } | {
>               name?: string | null
>             } | {
>               id?: string | null,
>               name?: string | null
>             } | string | string | string | string | null,
>             type?: string | null
>           } | {
>             field?: {
>               id?: string | null,
>               api_name?: string | null
>             } | null,
>             comparator?: string | null,
>             value?: (string | number | {
>               id?: string & any | null,
>               name?: string | null
>             } | {
>               name?: string | null
>             } | {
>               id?: string | null,
>               name?: string | null
>             })[] | string | number | boolean | {
>               id?: string & any | null,
>               name?: string | null
>             } | {
>               name?: string | null
>             } | {
>               id?: string | null,
>               name?: string | null
>             } | string | null,
>             type?: string | null
>           } | {
>             field?: {
>               id?: string | null,
>               api_name?: string | null
>             } | null,
>             comparator?: string | null,
>             value?: string[] | string | null,
>             type?: string | null
>           } | {
>             field?: {
>               id?: string | null,
>               api_name?: string | null
>             } | null,
>             comparator?: string | null,
>             value?: string | number | string | null,
>             type?: string | null
>           } | {
>             field?: {
>               id?: string | null,
>               api_name?: string | null
>             } | null,
>             comparator?: string | null,
>             value?: (string | number)[] | null,
>             type?: string | null
>           } | {
>             field?: {
>               id?: string | null,
>               api_name?: string | null
>             } | null,
>             comparator?: string | null,
>             value?: (string | number)[] | null,
>             type?: string | null
>           } | {
>             field?: {
>               id?: string | null,
>               api_name?: string | null
>             } | null,
>             comparator?: string | null,
>             value?: {
>               id?: string & any | null,
>               name?: string | null
>             }[] | null,
>             type?: string | null
>           } | {
>             group?: (
>               {
>                 field?: {
>                   id?: string | null,
>                   api_name?: string | null
>                 } | null,
>                 comparator?: string | null,
>                 value?: (string | number | {
>                   id?: string & any | null,
>                   name?: string | null
>                 } | {
>                   name?: string | null
>                 } | {
>                   id?: string | null,
>                   name?: string | null
>                 })[] | string | number | boolean | {
>                   id?: string & any | null,
>                   name?: string | null
>                 } | {
>                   name?: string | null
>                 } | {
>                   id?: string | null,
>                   name?: string | null
>                 } | string | string | string | string | null,
>                 type?: string | null
>               } | {
>                 field?: {
>                   id?: string | null,
>                   api_name?: string | null
>                 } | null,
>                 comparator?: string | null,
>                 value?: (string | number | {
>                   id?: string & any | null,
>                   name?: string | null
>                 } | {
>                   name?: string | null
>                 } | {
>                   id?: string | null,
>                   name?: string | null
>                 })[] | string | number | boolean | {
>                   id?: string & any | null,
>                   name?: string | null
>                 } | {
>                   name?: string | null
>                 } | {
>                   id?: string | null,
>                   name?: string | null
>                 } | string | null,
>                 type?: string | null
>               } | {
>                 field?: {
>                   id?: string | null,
>                   api_name?: string | null
>                 } | null,
>                 comparator?: string | null,
>                 value?: string[] | string | null,
>                 type?: string | null
>               } | {
>                 field?: {
>                   id?: string | null,
>                   api_name?: string | null
>                 } | null,
>                 comparator?: string | null,
>                 value?: string | number | string | null,
>                 type?: string | null
>               } | {
>                 field?: {
>                   id?: string | null,
>                   api_name?: string | null
>                 } | null,
>                 comparator?: string | null,
>                 value?: (string | number)[] | null,
>                 type?: string | null
>               } | {
>                 field?: {
>                   id?: string | null,
>                   api_name?: string | null
>                 } | null,
>                 comparator?: string | null,
>                 value?: (string | number)[] | null,
>                 type?: string | null
>               } | {
>                 field?: {
>                   id?: string | null,
>                   api_name?: string | null
>                 } | null,
>                 comparator?: string | null,
>                 value?: {
>                   id?: string & any | null,
>                   name?: string | null
>                 }[] | null,
>                 type?: string | null
>               } | {
>                 group?: (
>                   {
>                     field?: {
>                       id?: string | null,
>                       api_name?: string | null
>                     } | null,
>                     comparator?: string | null,
>                     value?: (string | number | {
>                       id?: string & any | null,
>                       name?: string | null
>                     } | {
>                       name?: string | null
>                     } | {
>                       id?: string | null,
>                       name?: string | null
>                     })[] | string | number | boolean | {
>                       id?: string & any | null,
>                       name?: string | null
>                     } | {
>                       name?: string | null
>                     } | {
>                       id?: string | null,
>                       name?: string | null
>                     } | string | string | string | string | null,
>                     type?: string | null
>                   } | {
>                     field?: {
>                       id?: string | null,
>                       api_name?: string | null
>                     } | null,
>                     comparator?: string | null,
>                     value?: (string | number | {
>                       id?: string & any | null,
>                       name?: string | null
>                     } | {
>                       name?: string | null
>                     } | {
>                       id?: string | null,
>                       name?: string | null
>                     })[] | string | number | boolean | {
>                       id?: string & any | null,
>                       name?: string | null
>                     } | {
>                       name?: string | null
>                     } | {
>                       id?: string | null,
>                       name?: string | null
>                     } | string | null,
>                     type?: string | null
>                   } | {
>                     field?: {
>                       id?: string | null,
>                       api_name?: string | null
>                     } | null,
>                     comparator?: string | null,
>                     value?: string[] | string | null,
>                     type?: string | null
>                   } | {
>                     field?: {
>                       id?: string | null,
>                       api_name?: string | null
>                     } | null,
>                     comparator?: string | null,
>                     value?: string | number | string | null,
>                     type?: string | null
>                   } | {
>                     field?: {
>                       id?: string | null,
>                       api_name?: string | null
>                     } | null,
>                     comparator?: string | null,
>                     value?: (string | number)[] | null,
>                     type?: string | null
>                   } | {
>                     field?: {
>                       id?: string | null,
>                       api_name?: string | null
>                     } | null,
>                     comparator?: string | null,
>                     value?: (string | number)[] | null,
>                     type?: string | null
>                   } | {
>                     field?: {
>                       id?: string | null,
>                       api_name?: string | null
>                     } | null,
>                     comparator?: string | null,
>                     value?: {
>                       id?: string & any | null,
>                       name?: string | null
>                     }[] | null,
>                     type?: string | null
>                   } | (recursive)
>                 )[] | null,
>                 group_operator?: string | null
>               }
>             )[] | null,
>             group_operator?: string | null
>           } | null | null,
>           module_selection?: string | null | null,
>           module?: {
>             api_name?: string | null,
>             id?: string | null
>           } | null | null
>         } | null
>       } | null,
>       id?: string | null,
>       _delete?: null | null
>     }[] | null,
>     status?: {
>       active?: boolean | null
>     } | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### getActionsCount

`workflowRules.getActionsCount`

Get Workflow Rule Action Counts. To retrieve the total number of actions configured in the specified workflow rules in your Zoho CRM organization, including counts categorized by action type across both instant and scheduled actions.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.workflowRules.getActionsCount({ ids: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `ids` | `string` | Yes | Specifies one or more workflow rule IDs to filter the results. Provide multiple IDs as comma-separated values. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   workflow_rules?: {
>     id?: string | null,
>     conditions?: {
>       sequence_number?: number | null,
>       instant_actions?: {
>         actions_count?: {
>           type?: string | null,
>           value?: number | null
>         }[] | null
>       } | null | null,
>       scheduled_actions?: {
>         actions_count?: {
>           type?: string | null,
>           value?: number | null
>         }[] | null
>       }[] | null | null,
>       id?: string | null
>     }[] | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### getConfigurations

`workflowRules.getConfigurations`

Workflow Configuration. Retrieves the available triggers, actions, and related trigger details for a specific module. Use this endpoint before creating or updating workflow rules to discover which triggers and actions are supported, their per-type limits, scheduling compatibility, and related module triggers.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.workflowRules.getConfigurations({ module: 'Leads' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the API name of the CRM module for which you want to retrieve workflow configuration metadata. Must be a workflow-supported module (for example, Leads, Contacts, Deals, Accounts, Tasks, Cases, Products, Quotes, Sales\_Orders, Purchase\_Orders, Invoices, Campaigns, Vendors). Refer to the [Get Modules Metadata API](modules.yaml#\$.paths./settings/modules.get) resource for valid values. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   workflow_configurations?: {
>     related_triggers_details?: {
>       api_name?: string | null,
>       module?: {
>         singular_label?: string | null,
>         plural_label?: string | null,
>         api_name?: string | null,
>         name?: string | null,
>         id?: string | null
>       } | null,
>       name?: string | null,
>       triggers?: {
>         api_name?: string | null,
>         deprecated?: boolean | null,
>         name?: string | null,
>         scheduled_actions_supported?: boolean | null,
>         actions?: string[] | null,
>         component_id?: string | null | null,
>         generated_type?: string | null | null
>       }[] | null
>     }[] | null,
>     triggers?: {
>       api_name?: string | null,
>       deprecated?: boolean | null,
>       name?: string | null,
>       scheduled_actions_supported?: boolean | null,
>       actions?: string[] | null,
>       component_id?: string | null | null,
>       generated_type?: string | null | null
>     }[] | null,
>     actions?: {
>       is_clickable?: boolean | null,
>       associate_action?: boolean | null,
>       limit_per_action?: number | null | null,
>       api_name?: string | null,
>       supported_in_scheduled_action?: boolean | null,
>       name?: string | null,
>       limit?: number | null
>     }[] | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### getCount

`workflowRules.getCount`

Get Workflow Rule Quota and Usage Counts. To retrieve the organization-level quota and current usage counts for workflow rules and actions in your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.workflowRules.getCount({});
```

**Input:** *empty object*

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   rules_count?: {
>     scheduled_actions_per_rule_limit?: number | null,
>     total_rules_limit?: number | null,
>     active_rules_configured?: number | null,
>     rules_per_process_limit?: number | null,
>     total_actions_per_rule_limit?: number | null,
>     total_rules_limit_per_module?: number | null,
>     active_rules_limit?: number | null,
>     total_rules_configured?: number | null,
>     active_rules_limit_per_module?: number | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### getModuleActionsCount

`workflowRules.getModuleActionsCount`

Get Active and Total Workflow Rule Counts by Module. To retrieve the count of active and total workflow rules configured for each module in your Zoho CRM organization.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.workflowRules.getModuleActionsCount({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | No | Specifies the CRM module API name to filter workflow rules by, such as Leads, Contacts, or Deals. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   module_specific_count?: {
>     active_rules_configured?: number | null,
>     module?: {
>       api_name?: string | null,
>       id?: string | null
>     } | null,
>     total_rules_configured?: number | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### getUsage

`workflowRules.getUsage`

Retrieve Action Usage for a Workflow Rule. To retrieve the action usage report for a specific workflow rule in your Zoho CRM organization, including trigger count and per-action success, failure, and queue metrics, as well as email engagement statistics. Results are scoped to a configurable date range.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.workflowRules.getUsage({ executed_from: 'example', executed_till: 'example', workflowRuleId: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `executed_from` | `string` | Yes | Specifies the start date of the usage data query window in ISO 8601 format (yyyy-MM-dd). |
| `executed_till` | `string` | Yes | Specifies the end date of the usage data query window in ISO 8601 format (yyyy-MM-dd). |
| `workflowRuleId` | `string` | Yes | Represents the unique 19-digit numeric ID of the workflow rule to target. Obtain valid IDs from the List Workflow Rules endpoint. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   workflow_rules?: {
>     trigger_count?: number | null,
>     name?: string | null,
>     id?: string | null,
>     conditions?: (
>       {
>         instant_actions?: {
>           actions?: (
>             {
>               queue_count?: number | null,
>               related_details?: {
>                 bulk_mail?: boolean | null,
>                 unopened?: number | null,
>                 sent_percentage?: number | null,
>                 opened?: number | null,
>                 delivered?: number | null,
>                 unsent?: number | null,
>                 bounced?: number | null,
>                 clicked?: number | null,
>                 sent?: number | null
>               } | null,
>               name?: string | null,
>               success_count?: number | null,
>               failure_count?: number | null,
>               id?: string | null,
>               type?: string | null,
>               associated_time?: string | null
>             } | {
>               name?: string | null,
>               success_count?: number | null,
>               failure_count?: number | null,
>               id?: string | null,
>               type?: string | null,
>               associated_time?: string | null
>             }
>           )[] | null
>         } | null,
>         scheduled_actions?: {
>           id?: string | null,
>           actions?: {
>             queue_count?: number | null,
>             related_details?: {
>               bulk_mail?: boolean | null,
>               unopened?: number | null,
>               sent_percentage?: number | null,
>               opened?: number | null,
>               delivered?: number | null,
>               unsent?: number | null,
>               bounced?: number | null,
>               clicked?: number | null,
>               sent?: number | null
>             } | null,
>             name?: string | null,
>             success_count?: number | null,
>             failure_count?: number | null,
>             id?: string | null,
>             type?: string | null,
>             associated_time?: string | null
>           }[] | null
>         }[] | null,
>         usage_count?: number | null,
>         id?: string | null
>       } | {
>         instant_actions?: {
>           actions?: {
>             name?: string | null,
>             success_count?: number | null,
>             tag_id?: string | null,
>             failure_count?: number | null,
>             id?: string | null,
>             type?: string | null,
>             associated_time?: string | null
>           }[] | null
>         } | null,
>         scheduled_actions?: {
>           id?: string | null,
>           actions?: {
>             id?: string | null,
>             name?: string | null,
>             type?: string | null,
>             queue_count?: number | null,
>             success_count?: number | null,
>             failure_count?: number | null,
>             associated_time?: string | null,
>             related_details?: {
>             } | null
>           }[] | null
>         }[] | null,
>         usage_count?: number | null,
>         id?: string | null
>       }
>     )[] | null,
>     reset_time?: string | null | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### list

`workflowRules.list`

List Workflow Rules in your Zoho CRM Organization. To retrieve the list of workflow rules configured in your Zoho CRM organization, including their trigger conditions, module associations, and action configurations.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.workflowRules.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `page` | `number \| string` | No | Specifies the page number for paginated results. Page numbering starts at 1. |
| `per_page` | `number \| string` | No | Specifies the number of workflow rules to return per page. The default and maximum value is 200. |
| `module` | `string` | No | Specifies the CRM module API name to filter workflow rules by, such as Leads, Contacts, or Deals. |
| `status_active` | `boolean` | No | Filters workflow rules by activation status. Set to true to return only active rules, or false to return only inactive rules. |
| `execute_on` | `string` | No | Specifies the trigger type to filter workflow rules by, such as create, edit, or delete events. |
| `sort_order` | `asc \| desc` | No | Specifies the sort direction for the workflow rule list. Accepted values are `asc` and `desc`. |
| `sort_by` | `string` | No | Specifies the field to sort workflow rules by. Only `modified_time` is supported. |
| `include_inner_details` | `string` | No | Includes the `conditions` array with its criteria and action configurations in the response. Pass the complete list of keys, separated by commas: `conditions,conditions.instant_actions,conditions.criteria_details,conditions.scheduled_actions`. Omit this parameter to return only summary-level rule details. |
| `filter` | `string` | No | Specifies a JSON filter expression to search workflow rules by name. Supports only contains-type matching on the rule name field. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   workflow_rules?: {
>     created_time?: string | null,
>     execute_when?: {
>       type?: string | null,
>       details?: {
>         repeat?: boolean | null,
>         trigger_module?: {
>           api_name?: string | null,
>           id?: string | null
>         } | null
>       } | null
>     } | {
>       type?: string | null,
>       details?: {
>         criteria?: {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: string | number | boolean | {
>             id?: string & any | null,
>             name?: string | null
>           } | null,
>           type?: string | null
>         } | {
>           group?: (
>             {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: string | number | boolean | {
>                 id?: string & any | null,
>                 name?: string | null
>               } | null,
>               type?: string | null
>             } | {
>               group?: (
>                 {
>                   field?: {
>                     id?: string | null,
>                     api_name?: string | null
>                   } | null,
>                   comparator?: string | null,
>                   value?: string | number | boolean | {
>                     id?: string & any | null,
>                     name?: string | null
>                   } | null,
>                   type?: string | null
>                 } | (recursive)
>               )[] | null,
>               group_operator?: string | null
>             }
>           )[] | null,
>           group_operator?: string | null
>         } | null,
>         match_all?: boolean | null,
>         repeat?: boolean | null,
>         trigger_module?: {
>           api_name?: string | null,
>           id?: string | null
>         } | null
>       } | null
>     } | {
>       type?: string | null,
>       details?: {
>         section_ids?: string[] | null,
>         repeat?: boolean | null,
>         trigger_module?: {
>           api_name?: string | null,
>           id?: string | null
>         } | null
>       } | null
>     } | {
>       type?: string | null,
>       details?: {
>         field?: {
>           api_name?: string | null,
>           id?: string | null
>         } | null,
>         period?: string | null,
>         unit?: number | null,
>         execute_at?: string | null,
>         recur_cycle?: string | null,
>         repeat?: boolean | null,
>         trigger_module?: {
>           api_name?: string | null,
>           id?: string | null
>         } | null
>       } | null
>     } | {
>       type?: string | null,
>       details?: {
>         period?: string | null,
>         unit?: number | null,
>         trigger_module?: {
>           api_name?: string | null,
>           id?: string | null
>         } | null,
>         field?: {
>           id?: string | null
>         } | null
>       } | null
>     } | {
>       type?: string | null,
>       details?: {
>         type?: string | null,
>         rules?: {
>           id?: string | null,
>           name?: string | null
>         }[] | null,
>         repeat?: boolean | null,
>         trigger_module?: {
>           api_name?: string | null,
>           id?: string | null
>         } | null
>       } | null
>     } | {
>       type?: string | null,
>       details?: {
>         period?: string | null,
>         unit?: number | null,
>         trigger_module?: {
>           api_name?: string | null,
>           id?: string | null
>         } | null
>       } | null
>     } | null,
>     editable?: boolean | null,
>     module?: {
>       api_name?: string | null,
>       id?: string | null
>     } | null,
>     deprecated?: boolean | null,
>     deletable?: boolean | null,
>     description?: string | null | null,
>     source?: string | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     last_executed_time?: string | null | null,
>     modified_time?: string | null | null,
>     name?: string | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     lock?: {
>       locked_by?: {
>         name?: string | null,
>         id?: string | null
>       } | null | null,
>       message?: string | null | null,
>       status?: boolean | null
>     } | null,
>     id?: string | null,
>     category?: string | null,
>     conditions?: {
>       sequence_number?: number | null,
>       instant_actions?: {
>         actions?: (
>           {
>             name?: string | null,
>             type?: string | null,
>             details?: {
>               module?: {
>                 api_name?: string | null,
>                 id?: string | null
>               } | null,
>               assign_to?: (
>                 {
>                   type?: string | null,
>                   resource?: {
>                     id?: string | null,
>                     name?: string | null,
>                     type?: string | null
>                   } | null,
>                   allow_agent_user?: boolean | null,
>                   associated_to?: string | null | null,
>                   details?: null | null
>                 } | {
>                   type?: string | null,
>                   details?: {
>                     api_name?: string | null
>                   } | null,
>                   resource?: null | null,
>                   allow_agent_user?: boolean | null
>                 } | {
>                   type?: string | null,
>                   details?: {
>                     criteria?: {
>                       field?: {
>                         id?: string | null,
>                         api_name?: string | null
>                       } | null,
>                       comparator?: string | null,
>                       value?: (string | number | {
>                         id?: string & any | null,
>                         name?: string | null
>                       } | {
>                         name?: string | null
>                       } | {
>                         id?: string | null,
>                         name?: string | null
>                       })[] | string | number | boolean | {
>                         id?: string & any | null,
>                         name?: string | null
>                       } | {
>                         name?: string | null
>                       } | {
>                         id?: string | null,
>                         name?: string | null
>                       } | string | string | string | string | null,
>                       type?: string | null
>                     } | {
>                       field?: {
>                         id?: string | null,
>                         api_name?: string | null
>                       } | null,
>                       comparator?: string | null,
>                       value?: (string | number | {
>                         id?: string & any | null,
>                         name?: string | null
>                       } | {
>                         name?: string | null
>                       } | {
>                         id?: string | null,
>                         name?: string | null
>                       })[] | string | number | boolean | {
>                         id?: string & any | null,
>                         name?: string | null
>                       } | {
>                         name?: string | null
>                       } | {
>                         id?: string | null,
>                         name?: string | null
>                       } | string | null,
>                       type?: string | null
>                     } | {
>                       field?: {
>                         id?: string | null,
>                         api_name?: string | null
>                       } | null,
>                       comparator?: string | null,
>                       value?: string[] | string | null,
>                       type?: string | null
>                     } | {
>                       field?: {
>                         id?: string | null,
>                         api_name?: string | null
>                       } | null,
>                       comparator?: string | null,
>                       value?: string | number | string | null,
>                       type?: string | null
>                     } | {
>                       field?: {
>                         id?: string | null,
>                         api_name?: string | null
>                       } | null,
>                       comparator?: string | null,
>                       value?: (string | number)[] | null,
>                       type?: string | null
>                     } | {
>                       field?: {
>                         id?: string | null,
>                         api_name?: string | null
>                       } | null,
>                       comparator?: string | null,
>                       value?: (string | number)[] | null,
>                       type?: string | null
>                     } | {
>                       field?: {
>                         id?: string | null,
>                         api_name?: string | null
>                       } | null,
>                       comparator?: string | null,
>                       value?: {
>                         id?: string & any | null,
>                         name?: string | null
>                       }[] | null,
>                       type?: string | null
>                     } | {
>                       group?: (
>                         {
>                           field?: {
>                             id?: string | null,
>                             api_name?: string | null
>                           } | null,
>                           comparator?: string | null,
>                           value?: (string | number | {
>                             id?: string & any | null,
>                             name?: string | null
>                           } | {
>                             name?: string | null
>                           } | {
>                             id?: string | null,
>                             name?: string | null
>                           })[] | string | number | boolean | {
>                             id?: string & any | null,
>                             name?: string | null
>                           } | {
>                             name?: string | null
>                           } | {
>                             id?: string | null,
>                             name?: string | null
>                           } | string | string | string | string | null,
>                           type?: string | null
>                         } | {
>                           field?: {
>                             id?: string | null,
>                             api_name?: string | null
>                           } | null,
>                           comparator?: string | null,
>                           value?: (string | number | {
>                             id?: string & any | null,
>                             name?: string | null
>                           } | {
>                             name?: string | null
>                           } | {
>                             id?: string | null,
>                             name?: string | null
>                           })[] | string | number | boolean | {
>                             id?: string & any | null,
>                             name?: string | null
>                           } | {
>                             name?: string | null
>                           } | {
>                             id?: string | null,
>                             name?: string | null
>                           } | string | null,
>                           type?: string | null
>                         } | {
>                           field?: {
>                             id?: string | null,
>                             api_name?: string | null
>                           } | null,
>                           comparator?: string | null,
>                           value?: string[] | string | null,
>                           type?: string | null
>                         } | {
>                           field?: {
>                             id?: string | null,
>                             api_name?: string | null
>                           } | null,
>                           comparator?: string | null,
>                           value?: string | number | string | null,
>                           type?: string | null
>                         } | {
>                           field?: {
>                             id?: string | null,
>                             api_name?: string | null
>                           } | null,
>                           comparator?: string | null,
>                           value?: (string | number)[] | null,
>                           type?: string | null
>                         } | {
>                           field?: {
>                             id?: string | null,
>                             api_name?: string | null
>                           } | null,
>                           comparator?: string | null,
>                           value?: (string | number)[] | null,
>                           type?: string | null
>                         } | {
>                           field?: {
>                             id?: string | null,
>                             api_name?: string | null
>                           } | null,
>                           comparator?: string | null,
>                           value?: {
>                             id?: string & any | null,
>                             name?: string | null
>                           }[] | null,
>                           type?: string | null
>                         } | {
>                           group?: (
>                             {
>                               field?: {
>                                 id?: string | null,
>                                 api_name?: string | null
>                               } | null,
>                               comparator?: string | null,
>                               value?: (string | number | {
>                                 id?: string & any | null,
>                                 name?: string | null
>                               } | {
>                                 name?: string | null
>                               } | {
>                                 id?: string | null,
>                                 name?: string | null
>                               })[] | string | number | boolean | {
>                                 id?: string & any | null,
>                                 name?: string | null
>                               } | {
>                                 name?: string | null
>                               } | {
>                                 id?: string | null,
>                                 name?: string | null
>                               } | string | string | string | string | null,
>                               type?: string | null
>                             } | {
>                               field?: {
>                                 id?: string | null,
>                                 api_name?: string | null
>                               } | null,
>                               comparator?: string | null,
>                               value?: (string | number | {
>                                 id?: string & any | null,
>                                 name?: string | null
>                               } | {
>                                 name?: string | null
>                               } | {
>                                 id?: string | null,
>                                 name?: string | null
>                               })[] | string | number | boolean | {
>                                 id?: string & any | null,
>                                 name?: string | null
>                               } | {
>                                 name?: string | null
>                               } | {
>                                 id?: string | null,
>                                 name?: string | null
>                               } | string | null,
>                               type?: string | null
>                             } | {
>                               field?: {
>                                 id?: string | null,
>                                 api_name?: string | null
>                               } | null,
>                               comparator?: string | null,
>                               value?: string[] | string | null,
>                               type?: string | null
>                             } | {
>                               field?: {
>                                 id?: string | null,
>                                 api_name?: string | null
>                               } | null,
>                               comparator?: string | null,
>                               value?: string | number | string | null,
>                               type?: string | null
>                             } | {
>                               field?: {
>                                 id?: string | null,
>                                 api_name?: string | null
>                               } | null,
>                               comparator?: string | null,
>                               value?: (string | number)[] | null,
>                               type?: string | null
>                             } | {
>                               field?: {
>                                 id?: string | null,
>                                 api_name?: string | null
>                               } | null,
>                               comparator?: string | null,
>                               value?: (string | number)[] | null,
>                               type?: string | null
>                             } | {
>                               field?: {
>                                 id?: string | null,
>                                 api_name?: string | null
>                               } | null,
>                               comparator?: string | null,
>                               value?: {
>                                 id?: string & any | null,
>                                 name?: string | null
>                               }[] | null,
>                               type?: string | null
>                             } | (recursive)
>                           )[] | null,
>                           group_operator?: string | null
>                         }
>                       )[] | null,
>                       group_operator?: string | null
>                     } | null
>                   } | null,
>                   resource?: null | null,
>                   allow_agent_user?: boolean | null
>                 }
>               )[] | null,
>               related_records?: {
>                 api_name?: string | null,
>                 id?: string | null
>               }[] | null | null,
>               notify?: boolean | null,
>               apply_assignment_threshold?: boolean | null,
>               user_availability_based_on?: string[] | null | null,
>               lookup_field?: {
>                 api_name?: string | null,
>                 id?: string | null
>               } | null,
>               id?: string | null
>             } | null,
>             related_details?: {
>               best_time?: boolean | null
>             } | {
>               followup_details?: {
>                 condition?: string | null,
>                 unit?: number | null,
>                 period?: string | null
>               } | null
>             } | {
>               lookup_field?: {
>                 api_name?: string | null,
>                 id?: string | null
>               } | null
>             } | null | null,
>             id?: string | null,
>             _delete?: null | null
>           } | {
>             name?: string | null,
>             type?: string | null,
>             details?: {
>               module?: {
>                 api_name?: string | null,
>                 id?: string | null
>               } | null,
>               layout?: {
>                 id?: string | null,
>                 name?: string | null | null,
>                 display_label?: string | null
>               } | null,
>               field_mappings?: (
>                 {
>                   display_value?: string | null,
>                   field?: {
>                     api_name?: string | null,
>                     id?: string | null
>                   } | null,
>                   type?: string | null,
>                   value?: string | string[] | {
>                     id?: string | null,
>                     name?: string | null
>                   } | null
>                 } | {
>                   display_value?: string | null,
>                   field?: {
>                     api_name?: string | null,
>                     id?: string | null
>                   } | null,
>                   type?: string | null,
>                   value?: string | null,
>                   allow_agent_user?: boolean | null
>                 } | {
>                   display_value?: string | null,
>                   field?: {
>                     api_name?: string | null,
>                     id?: string | null
>                   } | null,
>                   type?: string | null,
>                   value?: {
>                     period?: string | null,
>                     unit?: string | null,
>                     sign?: string | null,
>                     trigger_field?: string | null,
>                     time?: string | null,
>                     notify_type?: string | null
>                   } | null
>                 } | {
>                   display_value?: string | null,
>                   field?: {
>                     api_name?: string | null,
>                     id?: string | null
>                   } | null,
>                   type?: string | null,
>                   value?: {
>                   } | null
>                 }
>               )[] | null,
>               apply_restriction?: boolean | null | null,
>               id?: string | null
>             } | null,
>             related_details?: {
>               best_time?: boolean | null
>             } | {
>               followup_details?: {
>                 condition?: string | null,
>                 unit?: number | null,
>                 period?: string | null
>               } | null
>             } | {
>               lookup_field?: {
>                 api_name?: string | null,
>                 id?: string | null
>               } | null
>             } | null | null,
>             id?: string | null,
>             _delete?: null | null
>           } | {
>             name?: string | null,
>             type?: string | null,
>             details?: {
>               module?: {
>                 api_name?: string | null,
>                 id?: string | null
>               } | null,
>               layout?: {
>                 id?: string | null,
>                 name?: string | null | null,
>                 display_label?: string | null
>               } | null,
>               field_mappings?: (
>                 {
>                   display_value?: string | null,
>                   field?: {
>                     api_name?: string | null,
>                     id?: string | null
>                   } | null,
>                   type?: string | null,
>                   value?: string | string[] | {
>                     id?: string | null,
>                     name?: string | null
>                   } | null
>                 } | {
>                   display_value?: string | null,
>                   field?: {
>                     api_name?: string | null,
>                     id?: string | null
>                   } | null,
>                   type?: string | null,
>                   value?: string | null,
>                   allow_agent_user?: boolean | null
>                 } | {
>                   display_value?: string | null,
>                   field?: {
>                     api_name?: string | null,
>                     id?: string | null
>                   } | null,
>                   type?: string | null,
>                   value?: {
>                     period?: string | null,
>                     unit?: string | null,
>                     sign?: string | null,
>                     trigger_field?: string | null,
>                     time?: string | null,
>                     notify_type?: string | null
>                   } | null
>                 } | {
>                   display_value?: string | null,
>                   field?: {
>                     api_name?: string | null,
>                     id?: string | null
>                   } | null,
>                   type?: string | null,
>                   value?: {
>                   } | null
>                 }
>               )[] | null,
>               apply_restriction?: boolean | null,
>               id?: string | null
>             } | null,
>             related_details?: {
>               best_time?: boolean | null
>             } | {
>               followup_details?: {
>                 condition?: string | null,
>                 unit?: number | null,
>                 period?: string | null
>               } | null
>             } | {
>               lookup_field?: {
>                 api_name?: string | null,
>                 id?: string | null
>               } | null
>             } | null | null,
>             id?: string | null,
>             _delete?: null | null
>           } | {
>             name?: string | null,
>             type?: string | null,
>             details?: {
>               module?: {
>                 api_name?: string | null,
>                 id?: string | null
>               } | null,
>               layout?: {
>                 id?: string | null,
>                 name?: string | null | null,
>                 display_label?: string | null
>               } | null,
>               field_mappings?: (
>                 {
>                   display_value?: string | null,
>                   field?: {
>                     api_name?: string | null,
>                     id?: string | null
>                   } | null,
>                   type?: string | null,
>                   value?: string | string[] | {
>                     id?: string | null,
>                     name?: string | null
>                   } | null
>                 } | {
>                   display_value?: string | null,
>                   field?: {
>                     api_name?: string | null,
>                     id?: string | null
>                   } | null,
>                   type?: string | null,
>                   value?: string | null,
>                   allow_agent_user?: boolean | null
>                 } | {
>                   display_value?: string | null,
>                   field?: {
>                     api_name?: string | null,
>                     id?: string | null
>                   } | null,
>                   type?: string | null,
>                   value?: {
>                     period?: string | null,
>                     unit?: string | null,
>                     sign?: string | null,
>                     trigger_field?: string | null,
>                     time?: string | null,
>                     notify_type?: string | null
>                   } | null
>                 } | {
>                   display_value?: string | null,
>                   field?: {
>                     api_name?: string | null,
>                     id?: string | null
>                   } | null,
>                   type?: string | null,
>                   value?: {
>                   } | null
>                 }
>               )[] | null,
>               meeting_duration?: {
>                 unit?: number | null,
>                 period?: string | null
>               } | null,
>               host_unavailable?: {
>                 assign_record_owner_as_host?: boolean | null,
>                 assign_task?: {
>                   name?: string | null,
>                   id?: string | null
>                 } | null | null
>               } | null,
>               apply_restriction?: boolean | null | null,
>               id?: string | null
>             } | null,
>             related_details?: {
>               best_time?: boolean | null
>             } | {
>               followup_details?: {
>                 condition?: string | null,
>                 unit?: number | null,
>                 period?: string | null
>               } | null
>             } | {
>               lookup_field?: {
>                 api_name?: string | null,
>                 id?: string | null
>               } | null
>             } | null | null,
>             id?: string | null,
>             _delete?: null | null
>           } | {
>             name?: string | null,
>             type?: string | null,
>             details?: {
>               module?: {
>                 api_name?: string | null,
>                 id?: string | null
>               } | null,
>               layout?: {
>                 id?: string | null,
>                 name?: string | null | null,
>                 display_label?: string | null
>               } | null,
>               field_mappings?: (
>                 {
>                   display_value?: string | null,
>                   field?: {
>                     api_name?: string | null,
>                     id?: string | null
>                   } | null,
>                   type?: string | null,
>                   value?: string | string[] | {
>                     id?: string | null,
>                     name?: string | null
>                   } | null
>                 } | {
>                   display_value?: string | null,
>                   field?: {
>                     api_name?: string | null,
>                     id?: string | null
>                   } | null,
>                   type?: string | null,
>                   value?: string | null,
>                   allow_agent_user?: boolean | null
>                 } | {
>                   display_value?: string | null,
>                   field?: {
>                     api_name?: string | null,
>                     id?: string | null
>                   } | null,
>                   type?: string | null,
>                   value?: {
>                     period?: string | null,
>                     unit?: string | null,
>                     sign?: string | null,
>                     trigger_field?: string | null,
>                     time?: string | null,
>                     notify_type?: string | null
>                   } | null
>                 } | {
>                   display_value?: string | null,
>                   field?: {
>                     api_name?: string | null,
>                     id?: string | null
>                   } | null,
>                   type?: string | null,
>                   value?: {
>                   } | null
>                 }
>               )[] | null,
>               apply_restriction?: boolean | null | null,
>               id?: string | null
>             } | null,
>             related_details?: {
>               best_time?: boolean | null
>             } | {
>               followup_details?: {
>                 condition?: string | null,
>                 unit?: number | null,
>                 period?: string | null
>               } | null
>             } | {
>               lookup_field?: {
>                 api_name?: string | null,
>                 id?: string | null
>               } | null
>             } | null | null,
>             id?: string | null,
>             _delete?: null | null
>           } | {
>             name?: string | null,
>             type?: string | null,
>             details?: {
>               over_write?: boolean | null,
>               tags?: {
>                 id?: string | null,
>                 name?: string | null,
>                 color_code?: string | null
>               }[] | null,
>               module?: {
>                 api_name?: string | null,
>                 id?: string | null
>               } | null,
>               id?: string | null
>             } | null,
>             related_details?: {
>               best_time?: boolean | null
>             } | {
>               followup_details?: {
>                 condition?: string | null,
>                 unit?: number | null,
>                 period?: string | null
>               } | null
>             } | {
>               lookup_field?: {
>                 api_name?: string | null,
>                 id?: string | null
>               } | null
>             } | null | null,
>             id?: string | null,
>             _delete?: null | null
>           } | {
>             name?: string | null,
>             type?: string | null,
>             details?: {
>               tags?: {
>                 id?: string | null,
>                 name?: string | null,
>                 color_code?: string | null
>               }[] | null,
>               module?: {
>                 api_name?: string | null,
>                 id?: string | null
>               } | null,
>               over_write?: boolean | null,
>               id?: string | null
>             } | null,
>             related_details?: {
>               best_time?: boolean | null
>             } | {
>               followup_details?: {
>                 condition?: string | null,
>                 unit?: number | null,
>                 period?: string | null
>               } | null
>             } | {
>               lookup_field?: {
>                 api_name?: string | null,
>                 id?: string | null
>               } | null
>             } | null | null,
>             id?: string | null,
>             _delete?: null | null
>           } | {
>             name?: string | null,
>             type?: string | null,
>             details?: {
>               add_to_existing_contact?: boolean | null,
>               add_to_existing_account?: boolean | null,
>               move_attachment_to?: {
>                 api_name?: string | null,
>                 id?: string | null
>               } | null,
>               carry_tags?: {
>                 api_name?: string | null,
>                 id?: string | null
>               }[] | null,
>               field_mappings?: (
>                 {
>                   display_value?: string | null,
>                   field?: {
>                     api_name?: string | null,
>                     id?: string | null
>                   } | null,
>                   type?: string | null,
>                   value?: string | string[] | {
>                     id?: string | null,
>                     name?: string | null
>                   } | null
>                 } | {
>                   display_value?: string | null,
>                   field?: {
>                     api_name?: string | null,
>                     id?: string | null
>                   } | null,
>                   type?: string | null,
>                   value?: string | null,
>                   allow_agent_user?: boolean | null
>                 } | {
>                   display_value?: string | null,
>                   field?: {
>                     api_name?: string | null,
>                     id?: string | null
>                   } | null,
>                   type?: string | null,
>                   value?: {
>                     period?: string | null,
>                     unit?: string | null,
>                     sign?: string | null,
>                     trigger_field?: string | null,
>                     time?: string | null,
>                     notify_type?: string | null
>                   } | null
>                 } | {
>                   display_value?: string | null,
>                   field?: {
>                     api_name?: string | null,
>                     id?: string | null
>                   } | null,
>                   type?: string | null,
>                   value?: {
>                   } | null
>                 }
>               )[] | null,
>               create_deal?: boolean | null,
>               change_owner?: {
>                 id?: string | null,
>                 name?: string | null,
>                 related_modules?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 }[] | null,
>                 apply_assignment_threshold?: boolean | null
>               } | null,
>               contact_role?: string | null,
>               convert_to?: {
>                 api_name?: string | null,
>                 id?: string | null
>               } | null,
>               portal_user_type?: {
>                 id?: string | null,
>                 name?: string | null
>               } | null,
>               apply_restriction?: boolean | null | null,
>               id?: string | null
>             } | null,
>             related_details?: {
>               best_time?: boolean | null
>             } | {
>               followup_details?: {
>                 condition?: string | null,
>                 unit?: number | null,
>                 period?: string | null
>               } | null
>             } | {
>               lookup_field?: {
>                 api_name?: string | null,
>                 id?: string | null
>               } | null
>             } | null | null,
>             id?: string | null,
>             _delete?: null | null
>           } | {
>             name?: string | null,
>             type?: string | null,
>             details?: {
>               message?: string | null,
>               notify_to?: {
>                 type?: string | null,
>                 id?: string | null,
>                 name?: string | null,
>                 module?: {
>                   id?: string | null,
>                   api_name?: string | null
>                 } | null,
>                 notify_fields?: {
>                   fields?: {
>                     id?: string | null,
>                     api_name?: string | null
>                   }[] | null,
>                   static_fields?: {
>                     id?: string | null,
>                     api_name?: string | null
>                   }[] | null
>                 } | null
>               } | null,
>               id?: string | null
>             } | null,
>             id?: string | null,
>             _delete?: null | null
>           } | {
>             name?: string | null,
>             type?: string | null,
>             details?: {
>               circuit_id?: string | null,
>               id?: string | null
>             } | null,
>             id?: string | null,
>             _delete?: null | null
>           } | {
>             name?: string | null,
>             type?: string | null,
>             details?: {
>               custom_action_id?: string | null,
>               custom_action_name?: string | null,
>               id?: string | null
>             } | null,
>             id?: string | null,
>             _delete?: null | null
>           } | {
>             name?: string | null,
>             type?: string | null,
>             details?: {
>               content?: string | null,
>               id?: string | null
>             } | null,
>             id?: string | null,
>             _delete?: null | null
>           } | {
>             name?: string | null,
>             type?: string | null,
>             details?: {
>               module?: {
>                 api_name?: string | null
>               } | null,
>               field_mappings?: {
>                 field?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 } | null,
>                 value?: {
>                   type?: string | null,
>                   resource?: {
>                     id?: string | null
>                   } | null
>                 } | null
>               }[] | null,
>               id?: string | null
>             } | null,
>             id?: string | null,
>             _delete?: null | null
>           } | {
>             id?: string | null,
>             name?: string | null,
>             type?: string | null,
>             details?: {
>               module?: {
>                 api_name?: string | null,
>                 id?: string | null
>               } | null
>             } | null,
>             related_details?: {
>               best_time?: boolean | null
>             } | null | null,
>             _delete?: null | null
>           } | {
>             id?: string | null,
>             name?: string | null,
>             type?: string | null,
>             details?: {
>               module?: {
>                 api_name?: string | null,
>                 id?: string | null
>               } | null
>             } | null,
>             related_details?: {
>               lookup_field?: {
>                 api_name?: string | null,
>                 id?: string | null
>               } | null
>             } | null | null,
>             _delete?: null | null
>           } | {
>             id?: string | null,
>             name?: string | null,
>             type?: string | null,
>             details?: {
>               module?: {
>                 api_name?: string | null,
>                 id?: string | null
>               } | null
>             } | null,
>             related_details?: {
>               followup_details?: {
>                 condition?: string | null,
>                 unit?: number | null,
>                 period?: string | null
>               } | null
>             } | null | null,
>             _delete?: null | null
>           } | {
>             id?: string | null,
>             name?: string | null,
>             type?: string | null,
>             details?: {
>               module?: {
>                 api_name?: string | null,
>                 id?: string | null
>               } | null
>             } | null,
>             _delete?: null | null
>           }
>         )[] | null
>       } | null,
>       scheduled_actions?: (
>         {
>           execute_after?: {
>             period?: string | null,
>             unit?: number | null
>           } | null,
>           actions?: (
>             {
>               name?: string | null,
>               type?: string | null,
>               details?: {
>                 module?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 } | null,
>                 assign_to?: (
>                   {
>                     type?: string | null,
>                     resource?: {
>                       id?: string | null,
>                       name?: string | null,
>                       type?: string | null
>                     } | null,
>                     allow_agent_user?: boolean | null,
>                     associated_to?: string | null | null,
>                     details?: null | null
>                   } | {
>                     type?: string | null,
>                     details?: {
>                       api_name?: string | null
>                     } | null,
>                     resource?: null | null,
>                     allow_agent_user?: boolean | null
>                   } | {
>                     type?: string | null,
>                     details?: {
>                       criteria?: {
>                         field?: {
>                           id?: string | null,
>                           api_name?: string | null
>                         } | null,
>                         comparator?: string | null,
>                         value?: (string | number | {
>                           id?: string & any | null,
>                           name?: string | null
>                         } | {
>                           name?: string | null
>                         } | {
>                           id?: string | null,
>                           name?: string | null
>                         })[] | string | number | boolean | {
>                           id?: string & any | null,
>                           name?: string | null
>                         } | {
>                           name?: string | null
>                         } | {
>                           id?: string | null,
>                           name?: string | null
>                         } | string | string | string | string | null,
>                         type?: string | null
>                       } | {
>                         field?: {
>                           id?: string | null,
>                           api_name?: string | null
>                         } | null,
>                         comparator?: string | null,
>                         value?: (string | number | {
>                           id?: string & any | null,
>                           name?: string | null
>                         } | {
>                           name?: string | null
>                         } | {
>                           id?: string | null,
>                           name?: string | null
>                         })[] | string | number | boolean | {
>                           id?: string & any | null,
>                           name?: string | null
>                         } | {
>                           name?: string | null
>                         } | {
>                           id?: string | null,
>                           name?: string | null
>                         } | string | null,
>                         type?: string | null
>                       } | {
>                         field?: {
>                           id?: string | null,
>                           api_name?: string | null
>                         } | null,
>                         comparator?: string | null,
>                         value?: string[] | string | null,
>                         type?: string | null
>                       } | {
>                         field?: {
>                           id?: string | null,
>                           api_name?: string | null
>                         } | null,
>                         comparator?: string | null,
>                         value?: string | number | string | null,
>                         type?: string | null
>                       } | {
>                         field?: {
>                           id?: string | null,
>                           api_name?: string | null
>                         } | null,
>                         comparator?: string | null,
>                         value?: (string | number)[] | null,
>                         type?: string | null
>                       } | {
>                         field?: {
>                           id?: string | null,
>                           api_name?: string | null
>                         } | null,
>                         comparator?: string | null,
>                         value?: (string | number)[] | null,
>                         type?: string | null
>                       } | {
>                         field?: {
>                           id?: string | null,
>                           api_name?: string | null
>                         } | null,
>                         comparator?: string | null,
>                         value?: {
>                           id?: string & any | null,
>                           name?: string | null
>                         }[] | null,
>                         type?: string | null
>                       } | {
>                         group?: (
>                           {
>                             field?: {
>                               id?: string | null,
>                               api_name?: string | null
>                             } | null,
>                             comparator?: string | null,
>                             value?: (string | number | {
>                               id?: string & any | null,
>                               name?: string | null
>                             } | {
>                               name?: string | null
>                             } | {
>                               id?: string | null,
>                               name?: string | null
>                             })[] | string | number | boolean | {
>                               id?: string & any | null,
>                               name?: string | null
>                             } | {
>                               name?: string | null
>                             } | {
>                               id?: string | null,
>                               name?: string | null
>                             } | string | string | string | string | null,
>                             type?: string | null
>                           } | {
>                             field?: {
>                               id?: string | null,
>                               api_name?: string | null
>                             } | null,
>                             comparator?: string | null,
>                             value?: (string | number | {
>                               id?: string & any | null,
>                               name?: string | null
>                             } | {
>                               name?: string | null
>                             } | {
>                               id?: string | null,
>                               name?: string | null
>                             })[] | string | number | boolean | {
>                               id?: string & any | null,
>                               name?: string | null
>                             } | {
>                               name?: string | null
>                             } | {
>                               id?: string | null,
>                               name?: string | null
>                             } | string | null,
>                             type?: string | null
>                           } | {
>                             field?: {
>                               id?: string | null,
>                               api_name?: string | null
>                             } | null,
>                             comparator?: string | null,
>                             value?: string[] | string | null,
>                             type?: string | null
>                           } | {
>                             field?: {
>                               id?: string | null,
>                               api_name?: string | null
>                             } | null,
>                             comparator?: string | null,
>                             value?: string | number | string | null,
>                             type?: string | null
>                           } | {
>                             field?: {
>                               id?: string | null,
>                               api_name?: string | null
>                             } | null,
>                             comparator?: string | null,
>                             value?: (string | number)[] | null,
>                             type?: string | null
>                           } | {
>                             field?: {
>                               id?: string | null,
>                               api_name?: string | null
>                             } | null,
>                             comparator?: string | null,
>                             value?: (string | number)[] | null,
>                             type?: string | null
>                           } | {
>                             field?: {
>                               id?: string | null,
>                               api_name?: string | null
>                             } | null,
>                             comparator?: string | null,
>                             value?: {
>                               id?: string & any | null,
>                               name?: string | null
>                             }[] | null,
>                             type?: string | null
>                           } | {
>                             group?: (
>                               {
>                                 field?: {
>                                   id?: string | null,
>                                   api_name?: string | null
>                                 } | null,
>                                 comparator?: string | null,
>                                 value?: (string | number | {
>                                   id?: string & any | null,
>                                   name?: string | null
>                                 } | {
>                                   name?: string | null
>                                 } | {
>                                   id?: string | null,
>                                   name?: string | null
>                                 })[] | string | number | boolean | {
>                                   id?: string & any | null,
>                                   name?: string | null
>                                 } | {
>                                   name?: string | null
>                                 } | {
>                                   id?: string | null,
>                                   name?: string | null
>                                 } | string | string | string | string | null,
>                                 type?: string | null
>                               } | {
>                                 field?: {
>                                   id?: string | null,
>                                   api_name?: string | null
>                                 } | null,
>                                 comparator?: string | null,
>                                 value?: (string | number | {
>                                   id?: string & any | null,
>                                   name?: string | null
>                                 } | {
>                                   name?: string | null
>                                 } | {
>                                   id?: string | null,
>                                   name?: string | null
>                                 })[] | string | number | boolean | {
>                                   id?: string & any | null,
>                                   name?: string | null
>                                 } | {
>                                   name?: string | null
>                                 } | {
>                                   id?: string | null,
>                                   name?: string | null
>                                 } | string | null,
>                                 type?: string | null
>                               } | {
>                                 field?: {
>                                   id?: string | null,
>                                   api_name?: string | null
>                                 } | null,
>                                 comparator?: string | null,
>                                 value?: string[] | string | null,
>                                 type?: string | null
>                               } | {
>                                 field?: {
>                                   id?: string | null,
>                                   api_name?: string | null
>                                 } | null,
>                                 comparator?: string | null,
>                                 value?: string | number | string | null,
>                                 type?: string | null
>                               } | {
>                                 field?: {
>                                   id?: string | null,
>                                   api_name?: string | null
>                                 } | null,
>                                 comparator?: string | null,
>                                 value?: (string | number)[] | null,
>                                 type?: string | null
>                               } | {
>                                 field?: {
>                                   id?: string | null,
>                                   api_name?: string | null
>                                 } | null,
>                                 comparator?: string | null,
>                                 value?: (string | number)[] | null,
>                                 type?: string | null
>                               } | {
>                                 field?: {
>                                   id?: string | null,
>                                   api_name?: string | null
>                                 } | null,
>                                 comparator?: string | null,
>                                 value?: {
>                                   id?: string & any | null,
>                                   name?: string | null
>                                 }[] | null,
>                                 type?: string | null
>                               } | (recursive)
>                             )[] | null,
>                             group_operator?: string | null
>                           }
>                         )[] | null,
>                         group_operator?: string | null
>                       } | null
>                     } | null,
>                     resource?: null | null,
>                     allow_agent_user?: boolean | null
>                   }
>                 )[] | null,
>                 related_records?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 }[] | null | null,
>                 notify?: boolean | null,
>                 apply_assignment_threshold?: boolean | null,
>                 user_availability_based_on?: string[] | null | null,
>                 lookup_field?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 } | null,
>                 id?: string | null
>               } | null,
>               related_details?: {
>                 best_time?: boolean | null
>               } | {
>                 followup_details?: {
>                   condition?: string | null,
>                   unit?: number | null,
>                   period?: string | null
>                 } | null
>               } | {
>                 lookup_field?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 } | null
>               } | null | null,
>               id?: string | null,
>               _delete?: null | null
>             } | {
>               name?: string | null,
>               type?: string | null,
>               details?: {
>                 module?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 } | null,
>                 layout?: {
>                   id?: string | null,
>                   name?: string | null | null,
>                   display_label?: string | null
>                 } | null,
>                 field_mappings?: (
>                   {
>                     display_value?: string | null,
>                     field?: {
>                       api_name?: string | null,
>                       id?: string | null
>                     } | null,
>                     type?: string | null,
>                     value?: string | string[] | {
>                       id?: string | null,
>                       name?: string | null
>                     } | null
>                   } | {
>                     display_value?: string | null,
>                     field?: {
>                       api_name?: string | null,
>                       id?: string | null
>                     } | null,
>                     type?: string | null,
>                     value?: string | null,
>                     allow_agent_user?: boolean | null
>                   } | {
>                     display_value?: string | null,
>                     field?: {
>                       api_name?: string | null,
>                       id?: string | null
>                     } | null,
>                     type?: string | null,
>                     value?: {
>                       period?: string | null,
>                       unit?: string | null,
>                       sign?: string | null,
>                       trigger_field?: string | null,
>                       time?: string | null,
>                       notify_type?: string | null
>                     } | null
>                   } | {
>                     display_value?: string | null,
>                     field?: {
>                       api_name?: string | null,
>                       id?: string | null
>                     } | null,
>                     type?: string | null,
>                     value?: {
>                     } | null
>                   }
>                 )[] | null,
>                 apply_restriction?: boolean | null | null,
>                 id?: string | null
>               } | null,
>               related_details?: {
>                 best_time?: boolean | null
>               } | {
>                 followup_details?: {
>                   condition?: string | null,
>                   unit?: number | null,
>                   period?: string | null
>                 } | null
>               } | {
>                 lookup_field?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 } | null
>               } | null | null,
>               id?: string | null,
>               _delete?: null | null
>             } | {
>               name?: string | null,
>               type?: string | null,
>               details?: {
>                 module?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 } | null,
>                 layout?: {
>                   id?: string | null,
>                   name?: string | null | null,
>                   display_label?: string | null
>                 } | null,
>                 field_mappings?: (
>                   {
>                     display_value?: string | null,
>                     field?: {
>                       api_name?: string | null,
>                       id?: string | null
>                     } | null,
>                     type?: string | null,
>                     value?: string | string[] | {
>                       id?: string | null,
>                       name?: string | null
>                     } | null
>                   } | {
>                     display_value?: string | null,
>                     field?: {
>                       api_name?: string | null,
>                       id?: string | null
>                     } | null,
>                     type?: string | null,
>                     value?: string | null,
>                     allow_agent_user?: boolean | null
>                   } | {
>                     display_value?: string | null,
>                     field?: {
>                       api_name?: string | null,
>                       id?: string | null
>                     } | null,
>                     type?: string | null,
>                     value?: {
>                       period?: string | null,
>                       unit?: string | null,
>                       sign?: string | null,
>                       trigger_field?: string | null,
>                       time?: string | null,
>                       notify_type?: string | null
>                     } | null
>                   } | {
>                     display_value?: string | null,
>                     field?: {
>                       api_name?: string | null,
>                       id?: string | null
>                     } | null,
>                     type?: string | null,
>                     value?: {
>                     } | null
>                   }
>                 )[] | null,
>                 apply_restriction?: boolean | null,
>                 id?: string | null
>               } | null,
>               related_details?: {
>                 best_time?: boolean | null
>               } | {
>                 followup_details?: {
>                   condition?: string | null,
>                   unit?: number | null,
>                   period?: string | null
>                 } | null
>               } | {
>                 lookup_field?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 } | null
>               } | null | null,
>               id?: string | null,
>               _delete?: null | null
>             } | {
>               name?: string | null,
>               type?: string | null,
>               details?: {
>                 module?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 } | null,
>                 layout?: {
>                   id?: string | null,
>                   name?: string | null | null,
>                   display_label?: string | null
>                 } | null,
>                 field_mappings?: (
>                   {
>                     display_value?: string | null,
>                     field?: {
>                       api_name?: string | null,
>                       id?: string | null
>                     } | null,
>                     type?: string | null,
>                     value?: string | string[] | {
>                       id?: string | null,
>                       name?: string | null
>                     } | null
>                   } | {
>                     display_value?: string | null,
>                     field?: {
>                       api_name?: string | null,
>                       id?: string | null
>                     } | null,
>                     type?: string | null,
>                     value?: string | null,
>                     allow_agent_user?: boolean | null
>                   } | {
>                     display_value?: string | null,
>                     field?: {
>                       api_name?: string | null,
>                       id?: string | null
>                     } | null,
>                     type?: string | null,
>                     value?: {
>                       period?: string | null,
>                       unit?: string | null,
>                       sign?: string | null,
>                       trigger_field?: string | null,
>                       time?: string | null,
>                       notify_type?: string | null
>                     } | null
>                   } | {
>                     display_value?: string | null,
>                     field?: {
>                       api_name?: string | null,
>                       id?: string | null
>                     } | null,
>                     type?: string | null,
>                     value?: {
>                     } | null
>                   }
>                 )[] | null,
>                 meeting_duration?: {
>                   unit?: number | null,
>                   period?: string | null
>                 } | null,
>                 host_unavailable?: {
>                   assign_record_owner_as_host?: boolean | null,
>                   assign_task?: {
>                     name?: string | null,
>                     id?: string | null
>                   } | null | null
>                 } | null,
>                 apply_restriction?: boolean | null | null,
>                 id?: string | null
>               } | null,
>               related_details?: {
>                 best_time?: boolean | null
>               } | {
>                 followup_details?: {
>                   condition?: string | null,
>                   unit?: number | null,
>                   period?: string | null
>                 } | null
>               } | {
>                 lookup_field?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 } | null
>               } | null | null,
>               id?: string | null,
>               _delete?: null | null
>             } | {
>               name?: string | null,
>               type?: string | null,
>               details?: {
>                 module?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 } | null,
>                 layout?: {
>                   id?: string | null,
>                   name?: string | null | null,
>                   display_label?: string | null
>                 } | null,
>                 field_mappings?: (
>                   {
>                     display_value?: string | null,
>                     field?: {
>                       api_name?: string | null,
>                       id?: string | null
>                     } | null,
>                     type?: string | null,
>                     value?: string | string[] | {
>                       id?: string | null,
>                       name?: string | null
>                     } | null
>                   } | {
>                     display_value?: string | null,
>                     field?: {
>                       api_name?: string | null,
>                       id?: string | null
>                     } | null,
>                     type?: string | null,
>                     value?: string | null,
>                     allow_agent_user?: boolean | null
>                   } | {
>                     display_value?: string | null,
>                     field?: {
>                       api_name?: string | null,
>                       id?: string | null
>                     } | null,
>                     type?: string | null,
>                     value?: {
>                       period?: string | null,
>                       unit?: string | null,
>                       sign?: string | null,
>                       trigger_field?: string | null,
>                       time?: string | null,
>                       notify_type?: string | null
>                     } | null
>                   } | {
>                     display_value?: string | null,
>                     field?: {
>                       api_name?: string | null,
>                       id?: string | null
>                     } | null,
>                     type?: string | null,
>                     value?: {
>                     } | null
>                   }
>                 )[] | null,
>                 apply_restriction?: boolean | null | null,
>                 id?: string | null
>               } | null,
>               related_details?: {
>                 best_time?: boolean | null
>               } | {
>                 followup_details?: {
>                   condition?: string | null,
>                   unit?: number | null,
>                   period?: string | null
>                 } | null
>               } | {
>                 lookup_field?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 } | null
>               } | null | null,
>               id?: string | null,
>               _delete?: null | null
>             } | {
>               name?: string | null,
>               type?: string | null,
>               details?: {
>                 over_write?: boolean | null,
>                 tags?: {
>                   id?: string | null,
>                   name?: string | null,
>                   color_code?: string | null
>                 }[] | null,
>                 module?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 } | null,
>                 id?: string | null
>               } | null,
>               related_details?: {
>                 best_time?: boolean | null
>               } | {
>                 followup_details?: {
>                   condition?: string | null,
>                   unit?: number | null,
>                   period?: string | null
>                 } | null
>               } | {
>                 lookup_field?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 } | null
>               } | null | null,
>               id?: string | null,
>               _delete?: null | null
>             } | {
>               name?: string | null,
>               type?: string | null,
>               details?: {
>                 tags?: {
>                   id?: string | null,
>                   name?: string | null,
>                   color_code?: string | null
>                 }[] | null,
>                 module?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 } | null,
>                 over_write?: boolean | null,
>                 id?: string | null
>               } | null,
>               related_details?: {
>                 best_time?: boolean | null
>               } | {
>                 followup_details?: {
>                   condition?: string | null,
>                   unit?: number | null,
>                   period?: string | null
>                 } | null
>               } | {
>                 lookup_field?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 } | null
>               } | null | null,
>               id?: string | null,
>               _delete?: null | null
>             } | {
>               name?: string | null,
>               type?: string | null,
>               details?: {
>                 add_to_existing_contact?: boolean | null,
>                 add_to_existing_account?: boolean | null,
>                 move_attachment_to?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 } | null,
>                 carry_tags?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 }[] | null,
>                 field_mappings?: (
>                   {
>                     display_value?: string | null,
>                     field?: {
>                       api_name?: string | null,
>                       id?: string | null
>                     } | null,
>                     type?: string | null,
>                     value?: string | string[] | {
>                       id?: string | null,
>                       name?: string | null
>                     } | null
>                   } | {
>                     display_value?: string | null,
>                     field?: {
>                       api_name?: string | null,
>                       id?: string | null
>                     } | null,
>                     type?: string | null,
>                     value?: string | null,
>                     allow_agent_user?: boolean | null
>                   } | {
>                     display_value?: string | null,
>                     field?: {
>                       api_name?: string | null,
>                       id?: string | null
>                     } | null,
>                     type?: string | null,
>                     value?: {
>                       period?: string | null,
>                       unit?: string | null,
>                       sign?: string | null,
>                       trigger_field?: string | null,
>                       time?: string | null,
>                       notify_type?: string | null
>                     } | null
>                   } | {
>                     display_value?: string | null,
>                     field?: {
>                       api_name?: string | null,
>                       id?: string | null
>                     } | null,
>                     type?: string | null,
>                     value?: {
>                     } | null
>                   }
>                 )[] | null,
>                 create_deal?: boolean | null,
>                 change_owner?: {
>                   id?: string | null,
>                   name?: string | null,
>                   related_modules?: {
>                     api_name?: string | null,
>                     id?: string | null
>                   }[] | null,
>                   apply_assignment_threshold?: boolean | null
>                 } | null,
>                 contact_role?: string | null,
>                 convert_to?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 } | null,
>                 portal_user_type?: {
>                   id?: string | null,
>                   name?: string | null
>                 } | null,
>                 apply_restriction?: boolean | null | null,
>                 id?: string | null
>               } | null,
>               related_details?: {
>                 best_time?: boolean | null
>               } | {
>                 followup_details?: {
>                   condition?: string | null,
>                   unit?: number | null,
>                   period?: string | null
>                 } | null
>               } | {
>                 lookup_field?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 } | null
>               } | null | null,
>               id?: string | null,
>               _delete?: null | null
>             } | {
>               name?: string | null,
>               type?: string | null,
>               details?: {
>                 message?: string | null,
>                 notify_to?: {
>                   type?: string | null,
>                   id?: string | null,
>                   name?: string | null,
>                   module?: {
>                     id?: string | null,
>                     api_name?: string | null
>                   } | null,
>                   notify_fields?: {
>                     fields?: {
>                       id?: string | null,
>                       api_name?: string | null
>                     }[] | null,
>                     static_fields?: {
>                       id?: string | null,
>                       api_name?: string | null
>                     }[] | null
>                   } | null
>                 } | null,
>                 id?: string | null
>               } | null,
>               id?: string | null,
>               _delete?: null | null
>             } | {
>               name?: string | null,
>               type?: string | null,
>               details?: {
>                 circuit_id?: string | null,
>                 id?: string | null
>               } | null,
>               id?: string | null,
>               _delete?: null | null
>             } | {
>               name?: string | null,
>               type?: string | null,
>               details?: {
>                 custom_action_id?: string | null,
>                 custom_action_name?: string | null,
>                 id?: string | null
>               } | null,
>               id?: string | null,
>               _delete?: null | null
>             } | {
>               name?: string | null,
>               type?: string | null,
>               details?: {
>                 content?: string | null,
>                 id?: string | null
>               } | null,
>               id?: string | null,
>               _delete?: null | null
>             } | {
>               name?: string | null,
>               type?: string | null,
>               details?: {
>                 module?: {
>                   api_name?: string | null
>                 } | null,
>                 field_mappings?: {
>                   field?: {
>                     api_name?: string | null,
>                     id?: string | null
>                   } | null,
>                   value?: {
>                     type?: string | null,
>                     resource?: {
>                       id?: string | null
>                     } | null
>                   } | null
>                 }[] | null,
>                 id?: string | null
>               } | null,
>               id?: string | null,
>               _delete?: null | null
>             } | {
>               id?: string | null,
>               name?: string | null,
>               type?: string | null,
>               details?: {
>                 module?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 } | null
>               } | null,
>               related_details?: {
>                 best_time?: boolean | null
>               } | null | null,
>               _delete?: null | null
>             } | {
>               id?: string | null,
>               name?: string | null,
>               type?: string | null,
>               details?: {
>                 module?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 } | null
>               } | null,
>               related_details?: {
>                 lookup_field?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 } | null
>               } | null | null,
>               _delete?: null | null
>             } | {
>               id?: string | null,
>               name?: string | null,
>               type?: string | null,
>               details?: {
>                 module?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 } | null
>               } | null,
>               related_details?: {
>                 followup_details?: {
>                   condition?: string | null,
>                   unit?: number | null,
>                   period?: string | null
>                 } | null
>               } | null | null,
>               _delete?: null | null
>             } | {
>               id?: string | null,
>               name?: string | null,
>               type?: string | null,
>               details?: {
>                 module?: {
>                   api_name?: string | null,
>                   id?: string | null
>                 } | null
>               } | null,
>               _delete?: null | null
>             }
>           )[] | null,
>           id?: string | null
>         } | null
>       )[] | null | null,
>       criteria_details?: {
>         criteria?: {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number | {
>             id?: string & any | null,
>             name?: string | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           })[] | string | number | boolean | {
>             id?: string & any | null,
>             name?: string | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           } | string | string | string | string | null,
>           type?: string | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number | {
>             id?: string & any | null,
>             name?: string | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           })[] | string | number | boolean | {
>             id?: string & any | null,
>             name?: string | null
>           } | {
>             name?: string | null
>           } | {
>             id?: string | null,
>             name?: string | null
>           } | string | null,
>           type?: string | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: string[] | string | null,
>           type?: string | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: string | number | string | null,
>           type?: string | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number)[] | null,
>           type?: string | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: (string | number)[] | null,
>           type?: string | null
>         } | {
>           field?: {
>             id?: string | null,
>             api_name?: string | null
>           } | null,
>           comparator?: string | null,
>           value?: {
>             id?: string & any | null,
>             name?: string | null
>           }[] | null,
>           type?: string | null
>         } | {
>           group?: (
>             {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number | {
>                 id?: string & any | null,
>                 name?: string | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               })[] | string | number | boolean | {
>                 id?: string & any | null,
>                 name?: string | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               } | string | string | string | string | null,
>               type?: string | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number | {
>                 id?: string & any | null,
>                 name?: string | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               })[] | string | number | boolean | {
>                 id?: string & any | null,
>                 name?: string | null
>               } | {
>                 name?: string | null
>               } | {
>                 id?: string | null,
>                 name?: string | null
>               } | string | null,
>               type?: string | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: string[] | string | null,
>               type?: string | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: string | number | string | null,
>               type?: string | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number)[] | null,
>               type?: string | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: (string | number)[] | null,
>               type?: string | null
>             } | {
>               field?: {
>                 id?: string | null,
>                 api_name?: string | null
>               } | null,
>               comparator?: string | null,
>               value?: {
>                 id?: string & any | null,
>                 name?: string | null
>               }[] | null,
>               type?: string | null
>             } | {
>               group?: (
>                 {
>                   field?: {
>                     id?: string | null,
>                     api_name?: string | null
>                   } | null,
>                   comparator?: string | null,
>                   value?: (string | number | {
>                     id?: string & any | null,
>                     name?: string | null
>                   } | {
>                     name?: string | null
>                   } | {
>                     id?: string | null,
>                     name?: string | null
>                   })[] | string | number | boolean | {
>                     id?: string & any | null,
>                     name?: string | null
>                   } | {
>                     name?: string | null
>                   } | {
>                     id?: string | null,
>                     name?: string | null
>                   } | string | string | string | string | null,
>                   type?: string | null
>                 } | {
>                   field?: {
>                     id?: string | null,
>                     api_name?: string | null
>                   } | null,
>                   comparator?: string | null,
>                   value?: (string | number | {
>                     id?: string & any | null,
>                     name?: string | null
>                   } | {
>                     name?: string | null
>                   } | {
>                     id?: string | null,
>                     name?: string | null
>                   })[] | string | number | boolean | {
>                     id?: string & any | null,
>                     name?: string | null
>                   } | {
>                     name?: string | null
>                   } | {
>                     id?: string | null,
>                     name?: string | null
>                   } | string | null,
>                   type?: string | null
>                 } | {
>                   field?: {
>                     id?: string | null,
>                     api_name?: string | null
>                   } | null,
>                   comparator?: string | null,
>                   value?: string[] | string | null,
>                   type?: string | null
>                 } | {
>                   field?: {
>                     id?: string | null,
>                     api_name?: string | null
>                   } | null,
>                   comparator?: string | null,
>                   value?: string | number | string | null,
>                   type?: string | null
>                 } | {
>                   field?: {
>                     id?: string | null,
>                     api_name?: string | null
>                   } | null,
>                   comparator?: string | null,
>                   value?: (string | number)[] | null,
>                   type?: string | null
>                 } | {
>                   field?: {
>                     id?: string | null,
>                     api_name?: string | null
>                   } | null,
>                   comparator?: string | null,
>                   value?: (string | number)[] | null,
>                   type?: string | null
>                 } | {
>                   field?: {
>                     id?: string | null,
>                     api_name?: string | null
>                   } | null,
>                   comparator?: string | null,
>                   value?: {
>                     id?: string & any | null,
>                     name?: string | null
>                   }[] | null,
>                   type?: string | null
>                 } | (recursive)
>               )[] | null,
>               group_operator?: string | null
>             }
>           )[] | null,
>           group_operator?: string | null
>         } | null | null,
>         relational_criteria?: {
>           criteria?: {
>             field?: {
>               id?: string | null,
>               api_name?: string | null
>             } | null,
>             comparator?: string | null,
>             value?: (string | number | {
>               id?: string & any | null,
>               name?: string | null
>             } | {
>               name?: string | null
>             } | {
>               id?: string | null,
>               name?: string | null
>             })[] | string | number | boolean | {
>               id?: string & any | null,
>               name?: string | null
>             } | {
>               name?: string | null
>             } | {
>               id?: string | null,
>               name?: string | null
>             } | string | string | string | string | null,
>             type?: string | null
>           } | {
>             field?: {
>               id?: string | null,
>               api_name?: string | null
>             } | null,
>             comparator?: string | null,
>             value?: (string | number | {
>               id?: string & any | null,
>               name?: string | null
>             } | {
>               name?: string | null
>             } | {
>               id?: string | null,
>               name?: string | null
>             })[] | string | number | boolean | {
>               id?: string & any | null,
>               name?: string | null
>             } | {
>               name?: string | null
>             } | {
>               id?: string | null,
>               name?: string | null
>             } | string | null,
>             type?: string | null
>           } | {
>             field?: {
>               id?: string | null,
>               api_name?: string | null
>             } | null,
>             comparator?: string | null,
>             value?: string[] | string | null,
>             type?: string | null
>           } | {
>             field?: {
>               id?: string | null,
>               api_name?: string | null
>             } | null,
>             comparator?: string | null,
>             value?: string | number | string | null,
>             type?: string | null
>           } | {
>             field?: {
>               id?: string | null,
>               api_name?: string | null
>             } | null,
>             comparator?: string | null,
>             value?: (string | number)[] | null,
>             type?: string | null
>           } | {
>             field?: {
>               id?: string | null,
>               api_name?: string | null
>             } | null,
>             comparator?: string | null,
>             value?: (string | number)[] | null,
>             type?: string | null
>           } | {
>             field?: {
>               id?: string | null,
>               api_name?: string | null
>             } | null,
>             comparator?: string | null,
>             value?: {
>               id?: string & any | null,
>               name?: string | null
>             }[] | null,
>             type?: string | null
>           } | {
>             group?: (
>               {
>                 field?: {
>                   id?: string | null,
>                   api_name?: string | null
>                 } | null,
>                 comparator?: string | null,
>                 value?: (string | number | {
>                   id?: string & any | null,
>                   name?: string | null
>                 } | {
>                   name?: string | null
>                 } | {
>                   id?: string | null,
>                   name?: string | null
>                 })[] | string | number | boolean | {
>                   id?: string & any | null,
>                   name?: string | null
>                 } | {
>                   name?: string | null
>                 } | {
>                   id?: string | null,
>                   name?: string | null
>                 } | string | string | string | string | null,
>                 type?: string | null
>               } | {
>                 field?: {
>                   id?: string | null,
>                   api_name?: string | null
>                 } | null,
>                 comparator?: string | null,
>                 value?: (string | number | {
>                   id?: string & any | null,
>                   name?: string | null
>                 } | {
>                   name?: string | null
>                 } | {
>                   id?: string | null,
>                   name?: string | null
>                 })[] | string | number | boolean | {
>                   id?: string & any | null,
>                   name?: string | null
>                 } | {
>                   name?: string | null
>                 } | {
>                   id?: string | null,
>                   name?: string | null
>                 } | string | null,
>                 type?: string | null
>               } | {
>                 field?: {
>                   id?: string | null,
>                   api_name?: string | null
>                 } | null,
>                 comparator?: string | null,
>                 value?: string[] | string | null,
>                 type?: string | null
>               } | {
>                 field?: {
>                   id?: string | null,
>                   api_name?: string | null
>                 } | null,
>                 comparator?: string | null,
>                 value?: string | number | string | null,
>                 type?: string | null
>               } | {
>                 field?: {
>                   id?: string | null,
>                   api_name?: string | null
>                 } | null,
>                 comparator?: string | null,
>                 value?: (string | number)[] | null,
>                 type?: string | null
>               } | {
>                 field?: {
>                   id?: string | null,
>                   api_name?: string | null
>                 } | null,
>                 comparator?: string | null,
>                 value?: (string | number)[] | null,
>                 type?: string | null
>               } | {
>                 field?: {
>                   id?: string | null,
>                   api_name?: string | null
>                 } | null,
>                 comparator?: string | null,
>                 value?: {
>                   id?: string & any | null,
>                   name?: string | null
>                 }[] | null,
>                 type?: string | null
>               } | {
>                 group?: (
>                   {
>                     field?: {
>                       id?: string | null,
>                       api_name?: string | null
>                     } | null,
>                     comparator?: string | null,
>                     value?: (string | number | {
>                       id?: string & any | null,
>                       name?: string | null
>                     } | {
>                       name?: string | null
>                     } | {
>                       id?: string | null,
>                       name?: string | null
>                     })[] | string | number | boolean | {
>                       id?: string & any | null,
>                       name?: string | null
>                     } | {
>                       name?: string | null
>                     } | {
>                       id?: string | null,
>                       name?: string | null
>                     } | string | string | string | string | null,
>                     type?: string | null
>                   } | {
>                     field?: {
>                       id?: string | null,
>                       api_name?: string | null
>                     } | null,
>                     comparator?: string | null,
>                     value?: (string | number | {
>                       id?: string & any | null,
>                       name?: string | null
>                     } | {
>                       name?: string | null
>                     } | {
>                       id?: string | null,
>                       name?: string | null
>                     })[] | string | number | boolean | {
>                       id?: string & any | null,
>                       name?: string | null
>                     } | {
>                       name?: string | null
>                     } | {
>                       id?: string | null,
>                       name?: string | null
>                     } | string | null,
>                     type?: string | null
>                   } | {
>                     field?: {
>                       id?: string | null,
>                       api_name?: string | null
>                     } | null,
>                     comparator?: string | null,
>                     value?: string[] | string | null,
>                     type?: string | null
>                   } | {
>                     field?: {
>                       id?: string | null,
>                       api_name?: string | null
>                     } | null,
>                     comparator?: string | null,
>                     value?: string | number | string | null,
>                     type?: string | null
>                   } | {
>                     field?: {
>                       id?: string | null,
>                       api_name?: string | null
>                     } | null,
>                     comparator?: string | null,
>                     value?: (string | number)[] | null,
>                     type?: string | null
>                   } | {
>                     field?: {
>                       id?: string | null,
>                       api_name?: string | null
>                     } | null,
>                     comparator?: string | null,
>                     value?: (string | number)[] | null,
>                     type?: string | null
>                   } | {
>                     field?: {
>                       id?: string | null,
>                       api_name?: string | null
>                     } | null,
>                     comparator?: string | null,
>                     value?: {
>                       id?: string & any | null,
>                       name?: string | null
>                     }[] | null,
>                     type?: string | null
>                   } | (recursive)
>                 )[] | null,
>                 group_operator?: string | null
>               }
>             )[] | null,
>             group_operator?: string | null
>           } | null | null,
>           module_selection?: string | null | null,
>           module?: {
>             api_name?: string | null,
>             id?: string | null
>           } | null | null
>         } | null
>       } | null,
>       id?: string | null,
>       _delete?: null | null
>     }[] | null,
>     status?: {
>       active?: boolean | null
>     } | null
>   }[] | null,
>   info?: {
>     per_page?: number | null,
>     count?: number | null,
>     page?: number | null,
>     more_records?: boolean | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### reorder

`workflowRules.reorder`

Update Workflow Rule Execution Order for Module. To update the execution order of workflow rules for a specific module in your Zoho CRM organization. By default, rules execute in the order in which they were created. If any of the specified rule IDs are invalid, the entire request fails and no partial updates are applied.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.workflowRules.reorder({
	reorder: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | No | Specifies the CRM module API name to filter workflow rules by, such as Leads, Contacts, or Deals. |
| `reorder` | `object` | Yes | Represents the reorder payload containing the list of workflow rules and their updated execution order. |

> [accordion] reorder full type
>
> ```ts theme={null}
> {
>   workflow_rules?: {
>     module_specific_sequence: number | string,
>     id: string
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `reorder` | `object[] \| null` | No | Represents the array of workflow rule objects with their updated execution order. |

> [accordion] reorder full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### update

`workflowRules.update`

Update Workflow Rule by ID. To update an existing workflow rule in your Zoho CRM organization, use this operation with the rule's unique ID. You can modify the rule's name, description, triggers, criteria, conditions, and actions, or activate and deactivate the rule.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.workflowRules.update({
	id: '4876876000000333001',
	workflow_rules: [{}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Represents the unique 19-digit numeric ID of the workflow rule. Obtain valid IDs from the List Workflow Rules endpoint. |
| `workflow_rules` | `object[]` | Yes | The request body must contain a **workflow\_rules** array with one object. |

> [accordion] workflow\_rules full type
>
> ```ts theme={null}
> {
>   id?: string,
>   status?: {
>     active?: boolean,
>     delete_schedule_action?: boolean
>   },
>   execute_when?: {
>     type: create | edit | create_or_edit | delete | cancel | reschedule | reassign | anyaction | deactivate | activate | marked_as_complete | incoming_call_ring | incoming_call_start | incoming_call_createedit | incoming_call_edit | outgoing_call_ring | outgoing_call_start | outgoing_call_edit | outgoing_call_createedit | missed_call | scheduled_call_createedit | scheduled_call_edit | email_received | mail_sent | mail_sent_clicked | mail_sent_replied | mail_sent_opened | mail_sent_bounced | fb_post_on_page | fb_comment_on_page | fb_like_on_post | fb_send_message | tw_mention_on | tw_retweet_on_tweet | tw_comment_on_tweet | tw_send_message | voc_incoming_signal,
>     details?: {
>       repeat?: boolean,
>       trigger_module?: {
>         api_name: string,
>         id: string
>       }
>     }
>   } | {
>     type: field_update | incoming_call_field_update | outgoing_call_field_update | scheduled_call_field_update | stage_automation_field_update | rollup_summary_update,
>     details: {
>       criteria: {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: equal | not_equal | like | not_like | starts_with | ends_with | contains | not_contains | greater_than | greater_equal | less_equal | less_than | in | not_in | between | ${
>           ANYVALUE
>         },
>         value: string | number | boolean | {
>           id: string & any,
>           name?: string
>         },
>         type?: merge_field | pre_defined | value | field
>       } | {
>         group: (
>           {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: equal | not_equal | like | not_like | starts_with | ends_with | contains | not_contains | greater_than | greater_equal | less_equal | less_than | in | not_in | between | ${
>               ANYVALUE
>             },
>             value: string | number | boolean | {
>               id: string & any,
>               name?: string
>             },
>             type?: merge_field | pre_defined | value | field
>           } | {
>             group: (
>               {
>                 field: {
>                   id?: string,
>                   api_name: string
>                 },
>                 comparator: equal | not_equal | like | not_like | starts_with | ends_with | contains | not_contains | greater_than | greater_equal | less_equal | less_than | in | not_in | between | ${
>                   ANYVALUE
>                 },
>                 value: string | number | boolean | {
>                   id: string & any,
>                   name?: string
>                 },
>                 type?: merge_field | pre_defined | value | field
>               } | (recursive)
>             )[],
>             group_operator: AND | OR
>           }
>         )[],
>         group_operator: AND | OR
>       },
>       match_all?: boolean,
>       repeat?: boolean,
>       trigger_module?: {
>         api_name: string,
>         id: string
>       }
>     }
>   } | {
>     type: section_update | incoming_call_section_update | outgoing_call_section_update | scheduled_call_section_update,
>     details: {
>       section_ids: string[],
>       repeat?: boolean,
>       trigger_module?: {
>         api_name: string,
>         id: string
>       }
>     }
>   } | {
>     type: string,
>     details: {
>       field: {
>         api_name: string,
>         id?: string
>       },
>       period: minutes | hours | days | weeks | months | years | b_hours | b_days,
>       unit: number | string,
>       execute_at?: string,
>       recur_cycle?: once | monthly | yearly,
>       repeat?: boolean,
>       trigger_module?: {
>         api_name: string,
>         id: string
>       }
>     }
>   } | {
>     type: overdue | email_received_notreplied | email_received_opened_notreplied | mail_sent_opened_notreplied | mail_sent_notreplied | mail_sent_notopened | recommendation_rebuy,
>     details: {
>       period: days | hours,
>       unit: number | string,
>       trigger_module?: {
>         api_name: string,
>         id: string
>       },
>       field?: {
>         id?: string
>       }
>     }
>   } | {
>     type: score_increase | score_decrease | score_update | zia_scoring_rule,
>     details: {
>       type: All_Rules | Selective_Rules,
>       rules?: {
>         id: string
>       }[],
>       repeat?: boolean,
>       trigger_module?: {
>         api_name: string,
>         id: string
>       }
>     }
>   } | {
>     type: string,
>     details: {
>       period: days | hours,
>       unit: number | string,
>       trigger_module?: {
>         api_name: string,
>         id: string
>       }
>     }
>   },
>   name?: string,
>   description?: string,
>   conditions?: {
>     sequence_number: number | string,
>     instant_actions?: {
>       actions: (
>         {
>           name?: string,
>           type: assign_owner,
>           details: {
>             module: {
>               api_name?: string,
>               id?: string
>             },
>             assign_to: (
>               {
>                 type: user | role | group | assignment_rule | profile,
>                 resource: {
>                   id: string,
>                   name?: string,
>                   type?: user | role | group | assignment_rule | profile
>                 },
>                 allow_agent_user?: boolean,
>                 associated_to?: string | null,
>                 details?: null
>               } | {
>                 type: merge_field,
>                 details: {
>                   api_name: string
>                 },
>                 resource?: null,
>                 allow_agent_user?: boolean
>               } | {
>                 type: criteria,
>                 details: {
>                   criteria: {
>                     field: {
>                       id?: string,
>                       api_name: string
>                     },
>                     comparator: string,
>                     value: (string | number | {
>                       id: string & any,
>                       name?: string
>                     } | {
>                       name: string
>                     } | {
>                       id: string,
>                       name?: string
>                     })[] | string | number | boolean | {
>                       id: string & any,
>                       name?: string
>                     } | {
>                       name: string
>                     } | {
>                       id: string,
>                       name?: string
>                     } | ${
>                       EMPTY
>                     } | ${
>                       NOTEMPTY
>                     } | ${
>                       TODAY
>                     } | ${
>                       TOMORROW
>                     } | ${
>                       TOMORROWPLUS
>                     } | ${
>                       YESTERDAY
>                     } | ${
>                       YESTERDAYMINUS
>                     } | ${
>                       LASTMONTH
>                     } | ${
>                       THISMONTH
>                     } | ${
>                       NEXTMONTH
>                     } | ${
>                       LASTWEEK
>                     } | ${
>                       THISWEEK
>                     } | ${
>                       NEXTWEEK
>                     } | ${
>                       THISYEAR
>                     } | ${
>                       THISFY
>                     } | ${
>                       THISFQ
>                     } | ${
>                       LASTYEAR
>                     } | ${
>                       PREVFY
>                     } | ${
>                       PREVFQ
>                     } | ${
>                       NEXTYEAR
>                     } | ${
>                       NEXTFY
>                     } | ${
>                       NEXTFQ
>                     } | ${
>                       EMPTY
>                     } | ${
>                       NOTEMPTY
>                     } | string | string,
>                     type?: merge_field | pre_defined | value | field
>                   } | {
>                     field: {
>                       id?: string,
>                       api_name: string
>                     },
>                     comparator: string,
>                     value: (string | number | {
>                       id: string & any,
>                       name?: string
>                     } | {
>                       name: string
>                     } | {
>                       id: string,
>                       name?: string
>                     })[] | string | number | boolean | {
>                       id: string & any,
>                       name?: string
>                     } | {
>                       name: string
>                     } | {
>                       id: string,
>                       name?: string
>                     } | string,
>                     type?: merge_field | pre_defined | value | field
>                   } | {
>                     field: {
>                       id?: string,
>                       api_name: string
>                     },
>                     comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>                     value: string[] | string,
>                     type?: merge_field | pre_defined | value | field
>                   } | {
>                     field: {
>                       id?: string,
>                       api_name: string
>                     },
>                     comparator: less_than | less_equal | greater_than | greater_equal,
>                     value: string | number | string,
>                     type?: merge_field | pre_defined | value | field
>                   } | {
>                     field: {
>                       id?: string,
>                       api_name: string
>                     },
>                     comparator: between | not_between,
>                     value: (string | number)[],
>                     type?: merge_field | pre_defined | value | field
>                   } | {
>                     field: {
>                       id?: string,
>                       api_name: string
>                     },
>                     comparator: in | not_in,
>                     value: (string | number)[],
>                     type?: merge_field | pre_defined | value | field
>                   } | {
>                     field: {
>                       id?: string,
>                       api_name: string
>                     },
>                     comparator: include_all | include_any | exclude_all | exclude_any,
>                     value: {
>                       id: string & any,
>                       name?: string
>                     }[],
>                     type?: merge_field | pre_defined | value | field
>                   } | {
>                     group: (
>                       {
>                         field: {
>                           id?: string,
>                           api_name: string
>                         },
>                         comparator: string,
>                         value: (string | number | {
>                           id: string & any,
>                           name?: string
>                         } | {
>                           name: string
>                         } | {
>                           id: string,
>                           name?: string
>                         })[] | string | number | boolean | {
>                           id: string & any,
>                           name?: string
>                         } | {
>                           name: string
>                         } | {
>                           id: string,
>                           name?: string
>                         } | ${
>                           EMPTY
>                         } | ${
>                           NOTEMPTY
>                         } | ${
>                           TODAY
>                         } | ${
>                           TOMORROW
>                         } | ${
>                           TOMORROWPLUS
>                         } | ${
>                           YESTERDAY
>                         } | ${
>                           YESTERDAYMINUS
>                         } | ${
>                           LASTMONTH
>                         } | ${
>                           THISMONTH
>                         } | ${
>                           NEXTMONTH
>                         } | ${
>                           LASTWEEK
>                         } | ${
>                           THISWEEK
>                         } | ${
>                           NEXTWEEK
>                         } | ${
>                           THISYEAR
>                         } | ${
>                           THISFY
>                         } | ${
>                           THISFQ
>                         } | ${
>                           LASTYEAR
>                         } | ${
>                           PREVFY
>                         } | ${
>                           PREVFQ
>                         } | ${
>                           NEXTYEAR
>                         } | ${
>                           NEXTFY
>                         } | ${
>                           NEXTFQ
>                         } | ${
>                           EMPTY
>                         } | ${
>                           NOTEMPTY
>                         } | string | string,
>                         type?: merge_field | pre_defined | value | field
>                       } | {
>                         field: {
>                           id?: string,
>                           api_name: string
>                         },
>                         comparator: string,
>                         value: (string | number | {
>                           id: string & any,
>                           name?: string
>                         } | {
>                           name: string
>                         } | {
>                           id: string,
>                           name?: string
>                         })[] | string | number | boolean | {
>                           id: string & any,
>                           name?: string
>                         } | {
>                           name: string
>                         } | {
>                           id: string,
>                           name?: string
>                         } | string,
>                         type?: merge_field | pre_defined | value | field
>                       } | {
>                         field: {
>                           id?: string,
>                           api_name: string
>                         },
>                         comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>                         value: string[] | string,
>                         type?: merge_field | pre_defined | value | field
>                       } | {
>                         field: {
>                           id?: string,
>                           api_name: string
>                         },
>                         comparator: less_than | less_equal | greater_than | greater_equal,
>                         value: string | number | string,
>                         type?: merge_field | pre_defined | value | field
>                       } | {
>                         field: {
>                           id?: string,
>                           api_name: string
>                         },
>                         comparator: between | not_between,
>                         value: (string | number)[],
>                         type?: merge_field | pre_defined | value | field
>                       } | {
>                         field: {
>                           id?: string,
>                           api_name: string
>                         },
>                         comparator: in | not_in,
>                         value: (string | number)[],
>                         type?: merge_field | pre_defined | value | field
>                       } | {
>                         field: {
>                           id?: string,
>                           api_name: string
>                         },
>                         comparator: include_all | include_any | exclude_all | exclude_any,
>                         value: {
>                           id: string & any,
>                           name?: string
>                         }[],
>                         type?: merge_field | pre_defined | value | field
>                       } | {
>                         group: (
>                           {
>                             field: {
>                               id?: string,
>                               api_name: string
>                             },
>                             comparator: string,
>                             value: (string | number | {
>                               id: string & any,
>                               name?: string
>                             } | {
>                               name: string
>                             } | {
>                               id: string,
>                               name?: string
>                             })[] | string | number | boolean | {
>                               id: string & any,
>                               name?: string
>                             } | {
>                               name: string
>                             } | {
>                               id: string,
>                               name?: string
>                             } | ${
>                               EMPTY
>                             } | ${
>                               NOTEMPTY
>                             } | ${
>                               TODAY
>                             } | ${
>                               TOMORROW
>                             } | ${
>                               TOMORROWPLUS
>                             } | ${
>                               YESTERDAY
>                             } | ${
>                               YESTERDAYMINUS
>                             } | ${
>                               LASTMONTH
>                             } | ${
>                               THISMONTH
>                             } | ${
>                               NEXTMONTH
>                             } | ${
>                               LASTWEEK
>                             } | ${
>                               THISWEEK
>                             } | ${
>                               NEXTWEEK
>                             } | ${
>                               THISYEAR
>                             } | ${
>                               THISFY
>                             } | ${
>                               THISFQ
>                             } | ${
>                               LASTYEAR
>                             } | ${
>                               PREVFY
>                             } | ${
>                               PREVFQ
>                             } | ${
>                               NEXTYEAR
>                             } | ${
>                               NEXTFY
>                             } | ${
>                               NEXTFQ
>                             } | ${
>                               EMPTY
>                             } | ${
>                               NOTEMPTY
>                             } | string | string,
>                             type?: merge_field | pre_defined | value | field
>                           } | {
>                             field: {
>                               id?: string,
>                               api_name: string
>                             },
>                             comparator: string,
>                             value: (string | number | {
>                               id: string & any,
>                               name?: string
>                             } | {
>                               name: string
>                             } | {
>                               id: string,
>                               name?: string
>                             })[] | string | number | boolean | {
>                               id: string & any,
>                               name?: string
>                             } | {
>                               name: string
>                             } | {
>                               id: string,
>                               name?: string
>                             } | string,
>                             type?: merge_field | pre_defined | value | field
>                           } | {
>                             field: {
>                               id?: string,
>                               api_name: string
>                             },
>                             comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>                             value: string[] | string,
>                             type?: merge_field | pre_defined | value | field
>                           } | {
>                             field: {
>                               id?: string,
>                               api_name: string
>                             },
>                             comparator: less_than | less_equal | greater_than | greater_equal,
>                             value: string | number | string,
>                             type?: merge_field | pre_defined | value | field
>                           } | {
>                             field: {
>                               id?: string,
>                               api_name: string
>                             },
>                             comparator: between | not_between,
>                             value: (string | number)[],
>                             type?: merge_field | pre_defined | value | field
>                           } | {
>                             field: {
>                               id?: string,
>                               api_name: string
>                             },
>                             comparator: in | not_in,
>                             value: (string | number)[],
>                             type?: merge_field | pre_defined | value | field
>                           } | {
>                             field: {
>                               id?: string,
>                               api_name: string
>                             },
>                             comparator: include_all | include_any | exclude_all | exclude_any,
>                             value: {
>                               id: string & any,
>                               name?: string
>                             }[],
>                             type?: merge_field | pre_defined | value | field
>                           } | (recursive)
>                         )[],
>                         group_operator: AND | OR | and | or
>                       }
>                     )[],
>                     group_operator: AND | OR | and | or
>                   }
>                 },
>                 resource?: null,
>                 allow_agent_user?: boolean
>               }
>             )[],
>             related_records?: {
>               api_name: Events | Calls | Tasks | Contacts | Deals,
>               id?: string
>             }[] | null,
>             notify?: boolean,
>             apply_assignment_threshold?: boolean,
>             user_availability_based_on?: string[] | null,
>             lookup_field?: {
>               api_name?: string,
>               id?: string
>             },
>             id?: string
>           },
>           related_details?: {
>             best_time?: boolean
>           } | {
>             followup_details?: {
>               condition?: string,
>               unit?: number | string,
>               period?: string
>             }
>           } | {
>             lookup_field?: {
>               api_name: string,
>               id: string
>             }
>           } | null,
>           id?: string,
>           _delete?: null
>         } | {
>           name?: string,
>           type: create_record,
>           details: {
>             module: {
>               api_name?: string,
>               id?: string
>             },
>             layout: {
>               id: string,
>               name?: string | null,
>               display_label?: string
>             },
>             field_mappings: (
>               {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: static,
>                 value: string | string[] | {
>                   id: string,
>                   name?: string
>                 }
>               } | {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: merge_field,
>                 value: string,
>                 allow_agent_user?: boolean
>               } | {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: execution_time,
>                 value: {
>                   period: days | business_days | hours | minutes,
>                   unit: string,
>                   sign?: plus | minus,
>                   trigger_field: string,
>                   time?: string,
>                   notify_type?: popup | email | emailandpopup
>                 }
>               } | {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: composite,
>                 value: {
>                 }
>               }
>             )[],
>             apply_restriction?: boolean | null,
>             id?: string
>           },
>           related_details?: {
>             best_time?: boolean
>           } | {
>             followup_details?: {
>               condition?: string,
>               unit?: number | string,
>               period?: string
>             }
>           } | {
>             lookup_field?: {
>               api_name: string,
>               id: string
>             }
>           } | null,
>           id?: string,
>           _delete?: null
>         } | {
>           name?: string,
>           type: create_connected_record,
>           details: {
>             module: {
>               api_name: string,
>               id?: string
>             },
>             layout: {
>               id: string,
>               name?: string | null,
>               display_label?: string
>             },
>             field_mappings: (
>               {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: static,
>                 value: string | string[] | {
>                   id: string,
>                   name?: string
>                 }
>               } | {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: merge_field,
>                 value: string,
>                 allow_agent_user?: boolean
>               } | {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: execution_time,
>                 value: {
>                   period: days | business_days | hours | minutes,
>                   unit: string,
>                   sign?: plus | minus,
>                   trigger_field: string,
>                   time?: string,
>                   notify_type?: popup | email | emailandpopup
>                 }
>               } | {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: composite,
>                 value: {
>                 }
>               }
>             )[],
>             apply_restriction?: boolean,
>             id?: string
>           },
>           related_details?: {
>             best_time?: boolean
>           } | {
>             followup_details?: {
>               condition?: string,
>               unit?: number | string,
>               period?: string
>             }
>           } | {
>             lookup_field?: {
>               api_name: string,
>               id: string
>             }
>           } | null,
>           id?: string,
>           _delete?: null
>         } | {
>           name?: string,
>           type: add_meeting,
>           details: {
>             module: {
>               api_name?: string,
>               id?: string
>             },
>             layout: {
>               id: string,
>               name?: string | null,
>               display_label?: string
>             },
>             field_mappings: (
>               {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: static,
>                 value: string | string[] | {
>                   id: string,
>                   name?: string
>                 }
>               } | {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: merge_field,
>                 value: string,
>                 allow_agent_user?: boolean
>               } | {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: execution_time,
>                 value: {
>                   period: days | business_days | hours | minutes,
>                   unit: string,
>                   sign?: plus | minus,
>                   trigger_field: string,
>                   time?: string,
>                   notify_type?: popup | email | emailandpopup
>                 }
>               } | {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: composite,
>                 value: {
>                 }
>               }
>             )[],
>             meeting_duration: {
>               unit: number | string,
>               period: hours | minutes
>             },
>             host_unavailable?: {
>               assign_record_owner_as_host?: boolean,
>               assign_task?: {
>                 name?: string,
>                 id: string
>               } | null
>             },
>             apply_restriction?: boolean | null,
>             id?: string
>           },
>           related_details?: {
>             best_time?: boolean
>           } | {
>             followup_details?: {
>               condition?: string,
>               unit?: number | string,
>               period?: string
>             }
>           } | {
>             lookup_field?: {
>               api_name: string,
>               id: string
>             }
>           } | null,
>           id?: string,
>           _delete?: null
>         } | {
>           name?: string,
>           type: schedule_call,
>           details: {
>             module: {
>               api_name?: string,
>               id?: string
>             },
>             layout: {
>               id: string,
>               name?: string | null,
>               display_label?: string
>             },
>             field_mappings: (
>               {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: static,
>                 value: string | string[] | {
>                   id: string,
>                   name?: string
>                 }
>               } | {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: merge_field,
>                 value: string,
>                 allow_agent_user?: boolean
>               } | {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: execution_time,
>                 value: {
>                   period: days | business_days | hours | minutes,
>                   unit: string,
>                   sign?: plus | minus,
>                   trigger_field: string,
>                   time?: string,
>                   notify_type?: popup | email | emailandpopup
>                 }
>               } | {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: composite,
>                 value: {
>                 }
>               }
>             )[],
>             apply_restriction?: boolean | null,
>             id?: string
>           },
>           related_details?: {
>             best_time?: boolean
>           } | {
>             followup_details?: {
>               condition?: string,
>               unit?: number | string,
>               period?: string
>             }
>           } | {
>             lookup_field?: {
>               api_name: string,
>               id: string
>             }
>           } | null,
>           id?: string,
>           _delete?: null
>         } | {
>           name?: string,
>           type: add_tags,
>           details: {
>             over_write?: boolean,
>             tags: {
>               id: string,
>               name: string,
>               color_code?: string
>             }[],
>             module?: {
>               api_name?: string,
>               id?: string
>             },
>             id?: string
>           },
>           related_details?: {
>             best_time?: boolean
>           } | {
>             followup_details?: {
>               condition?: string,
>               unit?: number | string,
>               period?: string
>             }
>           } | {
>             lookup_field?: {
>               api_name: string,
>               id: string
>             }
>           } | null,
>           id?: string,
>           _delete?: null
>         } | {
>           name?: string,
>           type: remove_tags,
>           details: {
>             tags: {
>               id: string,
>               name: string,
>               color_code?: string
>             }[],
>             module?: {
>               api_name?: string,
>               id?: string
>             },
>             over_write?: boolean,
>             id?: string
>           },
>           related_details?: {
>             best_time?: boolean
>           } | {
>             followup_details?: {
>               condition?: string,
>               unit?: number | string,
>               period?: string
>             }
>           } | {
>             lookup_field?: {
>               api_name: string,
>               id: string
>             }
>           } | null,
>           id?: string,
>           _delete?: null
>         } | {
>           name?: string,
>           type: convert,
>           details: {
>             add_to_existing_contact?: boolean,
>             add_to_existing_account?: boolean,
>             move_attachment_to?: {
>               api_name?: string,
>               id?: string
>             },
>             carry_tags?: {
>               api_name?: string,
>               id?: string
>             }[],
>             field_mappings?: (
>               {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: static,
>                 value: string | string[] | {
>                   id: string,
>                   name?: string
>                 }
>               } | {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: merge_field,
>                 value: string,
>                 allow_agent_user?: boolean
>               } | {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: execution_time,
>                 value: {
>                   period: days | business_days | hours | minutes,
>                   unit: string,
>                   sign?: plus | minus,
>                   trigger_field: string,
>                   time?: string,
>                   notify_type?: popup | email | emailandpopup
>                 }
>               } | {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: composite,
>                 value: {
>                 }
>               }
>             )[],
>             create_deal?: boolean,
>             change_owner?: {
>               id: string,
>               name?: string,
>               related_modules?: {
>                 api_name: Events | Calls | Tasks | Contacts | Deals,
>                 id?: string
>               }[],
>               apply_assignment_threshold?: boolean
>             },
>             contact_role?: string,
>             convert_to?: {
>               api_name: string,
>               id: string
>             },
>             portal_user_type?: {
>               id: string,
>               name: string
>             },
>             apply_restriction?: boolean | null,
>             id?: string
>           },
>           related_details?: {
>             best_time?: boolean
>           } | {
>             followup_details?: {
>               condition?: string,
>               unit?: number | string,
>               period?: string
>             }
>           } | {
>             lookup_field?: {
>               api_name: string,
>               id: string
>             }
>           } | null,
>           id?: string,
>           _delete?: null
>         } | {
>           name: string,
>           type: slack_notifications | cliq_notifications | cisco_notifications | google_chat_notifications | microsoft_teams_notifications,
>           details: {
>             message: string,
>             notify_to: {
>               type: user | channel | fields,
>               id?: string,
>               name?: string,
>               module?: {
>                 id?: string,
>                 api_name?: string
>               },
>               notify_fields?: {
>                 fields?: {
>                   id?: string,
>                   api_name?: string
>                 }[],
>                 static_fields?: {
>                   id?: string,
>                   api_name?: string
>                 }[]
>               }
>             },
>             id?: string
>           },
>           id?: string,
>           _delete?: null
>         } | {
>           name: string,
>           type: circuits,
>           details: {
>             circuit_id: string,
>             id?: string
>           },
>           id?: string,
>           _delete?: null
>         } | {
>           name: string,
>           type: flow,
>           details: {
>             custom_action_id: string,
>             custom_action_name: string,
>             id?: string
>           },
>           id?: string,
>           _delete?: null
>         } | {
>           name?: string,
>           type: comment_to_post | reply_to_comment | like_to_comment | reply_to_message | retweet | reply_to_tweet,
>           details?: {
>             content?: string,
>             id?: string
>           },
>           id?: string,
>           _delete?: null
>         } | {
>           name?: string,
>           type: create_record_email,
>           details: {
>             module: {
>               api_name: Leads | Contacts
>             },
>             field_mappings: {
>               field: {
>                 api_name?: string,
>                 id?: string
>               },
>               value: {
>                 type: user | role | group | country,
>                 resource?: {
>                   id?: string
>                 }
>               }
>             }[],
>             id?: string
>           },
>           id?: string,
>           _delete?: null
>         } | {
>           id: string,
>           name?: string,
>           type: email_notifications,
>           details?: {
>             module?: {
>               api_name: string,
>               id: string
>             }
>           },
>           related_details?: {
>             best_time?: boolean
>           } | null,
>           _delete?: null
>         } | {
>           id: string,
>           name?: string,
>           type: field_updates,
>           details?: {
>             module?: {
>               api_name: string,
>               id: string
>             }
>           },
>           related_details?: {
>             lookup_field?: {
>               api_name: string,
>               id: string
>             }
>           } | null,
>           _delete?: null
>         } | {
>           id: string,
>           name?: string,
>           type: tasks,
>           details?: {
>             module?: {
>               api_name: string,
>               id: string
>             }
>           },
>           related_details?: {
>             followup_details?: {
>               condition?: string,
>               unit?: number | string,
>               period?: string
>             }
>           } | null,
>           _delete?: null
>         } | {
>           id: string,
>           name?: string,
>           type: webhooks | functions | sms | whatsapp,
>           details?: {
>             module?: {
>               api_name: string,
>               id: string
>             }
>           },
>           _delete?: null
>         }
>       )[]
>     },
>     scheduled_actions?: (
>       {
>         execute_after?: {
>           period: minutes | hours | days | weeks | months | years | business_hours | business_days,
>           unit: number | string
>         },
>         actions: (
>           {
>             name?: string,
>             type: assign_owner,
>             details: {
>               module: {
>                 api_name?: string,
>                 id?: string
>               },
>               assign_to: (
>                 {
>                   type: user | role | group | assignment_rule | profile,
>                   resource: {
>                     id: string,
>                     name?: string,
>                     type?: user | role | group | assignment_rule | profile
>                   },
>                   allow_agent_user?: boolean,
>                   associated_to?: string | null,
>                   details?: null
>                 } | {
>                   type: merge_field,
>                   details: {
>                     api_name: string
>                   },
>                   resource?: null,
>                   allow_agent_user?: boolean
>                 } | {
>                   type: criteria,
>                   details: {
>                     criteria: {
>                       field: {
>                         id?: string,
>                         api_name: string
>                       },
>                       comparator: string,
>                       value: (string | number | {
>                         id: string & any,
>                         name?: string
>                       } | {
>                         name: string
>                       } | {
>                         id: string,
>                         name?: string
>                       })[] | string | number | boolean | {
>                         id: string & any,
>                         name?: string
>                       } | {
>                         name: string
>                       } | {
>                         id: string,
>                         name?: string
>                       } | ${
>                         EMPTY
>                       } | ${
>                         NOTEMPTY
>                       } | ${
>                         TODAY
>                       } | ${
>                         TOMORROW
>                       } | ${
>                         TOMORROWPLUS
>                       } | ${
>                         YESTERDAY
>                       } | ${
>                         YESTERDAYMINUS
>                       } | ${
>                         LASTMONTH
>                       } | ${
>                         THISMONTH
>                       } | ${
>                         NEXTMONTH
>                       } | ${
>                         LASTWEEK
>                       } | ${
>                         THISWEEK
>                       } | ${
>                         NEXTWEEK
>                       } | ${
>                         THISYEAR
>                       } | ${
>                         THISFY
>                       } | ${
>                         THISFQ
>                       } | ${
>                         LASTYEAR
>                       } | ${
>                         PREVFY
>                       } | ${
>                         PREVFQ
>                       } | ${
>                         NEXTYEAR
>                       } | ${
>                         NEXTFY
>                       } | ${
>                         NEXTFQ
>                       } | ${
>                         EMPTY
>                       } | ${
>                         NOTEMPTY
>                       } | string | string,
>                       type?: merge_field | pre_defined | value | field
>                     } | {
>                       field: {
>                         id?: string,
>                         api_name: string
>                       },
>                       comparator: string,
>                       value: (string | number | {
>                         id: string & any,
>                         name?: string
>                       } | {
>                         name: string
>                       } | {
>                         id: string,
>                         name?: string
>                       })[] | string | number | boolean | {
>                         id: string & any,
>                         name?: string
>                       } | {
>                         name: string
>                       } | {
>                         id: string,
>                         name?: string
>                       } | string,
>                       type?: merge_field | pre_defined | value | field
>                     } | {
>                       field: {
>                         id?: string,
>                         api_name: string
>                       },
>                       comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>                       value: string[] | string,
>                       type?: merge_field | pre_defined | value | field
>                     } | {
>                       field: {
>                         id?: string,
>                         api_name: string
>                       },
>                       comparator: less_than | less_equal | greater_than | greater_equal,
>                       value: string | number | string,
>                       type?: merge_field | pre_defined | value | field
>                     } | {
>                       field: {
>                         id?: string,
>                         api_name: string
>                       },
>                       comparator: between | not_between,
>                       value: (string | number)[],
>                       type?: merge_field | pre_defined | value | field
>                     } | {
>                       field: {
>                         id?: string,
>                         api_name: string
>                       },
>                       comparator: in | not_in,
>                       value: (string | number)[],
>                       type?: merge_field | pre_defined | value | field
>                     } | {
>                       field: {
>                         id?: string,
>                         api_name: string
>                       },
>                       comparator: include_all | include_any | exclude_all | exclude_any,
>                       value: {
>                         id: string & any,
>                         name?: string
>                       }[],
>                       type?: merge_field | pre_defined | value | field
>                     } | {
>                       group: (
>                         {
>                           field: {
>                             id?: string,
>                             api_name: string
>                           },
>                           comparator: string,
>                           value: (string | number | {
>                             id: string & any,
>                             name?: string
>                           } | {
>                             name: string
>                           } | {
>                             id: string,
>                             name?: string
>                           })[] | string | number | boolean | {
>                             id: string & any,
>                             name?: string
>                           } | {
>                             name: string
>                           } | {
>                             id: string,
>                             name?: string
>                           } | ${
>                             EMPTY
>                           } | ${
>                             NOTEMPTY
>                           } | ${
>                             TODAY
>                           } | ${
>                             TOMORROW
>                           } | ${
>                             TOMORROWPLUS
>                           } | ${
>                             YESTERDAY
>                           } | ${
>                             YESTERDAYMINUS
>                           } | ${
>                             LASTMONTH
>                           } | ${
>                             THISMONTH
>                           } | ${
>                             NEXTMONTH
>                           } | ${
>                             LASTWEEK
>                           } | ${
>                             THISWEEK
>                           } | ${
>                             NEXTWEEK
>                           } | ${
>                             THISYEAR
>                           } | ${
>                             THISFY
>                           } | ${
>                             THISFQ
>                           } | ${
>                             LASTYEAR
>                           } | ${
>                             PREVFY
>                           } | ${
>                             PREVFQ
>                           } | ${
>                             NEXTYEAR
>                           } | ${
>                             NEXTFY
>                           } | ${
>                             NEXTFQ
>                           } | ${
>                             EMPTY
>                           } | ${
>                             NOTEMPTY
>                           } | string | string,
>                           type?: merge_field | pre_defined | value | field
>                         } | {
>                           field: {
>                             id?: string,
>                             api_name: string
>                           },
>                           comparator: string,
>                           value: (string | number | {
>                             id: string & any,
>                             name?: string
>                           } | {
>                             name: string
>                           } | {
>                             id: string,
>                             name?: string
>                           })[] | string | number | boolean | {
>                             id: string & any,
>                             name?: string
>                           } | {
>                             name: string
>                           } | {
>                             id: string,
>                             name?: string
>                           } | string,
>                           type?: merge_field | pre_defined | value | field
>                         } | {
>                           field: {
>                             id?: string,
>                             api_name: string
>                           },
>                           comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>                           value: string[] | string,
>                           type?: merge_field | pre_defined | value | field
>                         } | {
>                           field: {
>                             id?: string,
>                             api_name: string
>                           },
>                           comparator: less_than | less_equal | greater_than | greater_equal,
>                           value: string | number | string,
>                           type?: merge_field | pre_defined | value | field
>                         } | {
>                           field: {
>                             id?: string,
>                             api_name: string
>                           },
>                           comparator: between | not_between,
>                           value: (string | number)[],
>                           type?: merge_field | pre_defined | value | field
>                         } | {
>                           field: {
>                             id?: string,
>                             api_name: string
>                           },
>                           comparator: in | not_in,
>                           value: (string | number)[],
>                           type?: merge_field | pre_defined | value | field
>                         } | {
>                           field: {
>                             id?: string,
>                             api_name: string
>                           },
>                           comparator: include_all | include_any | exclude_all | exclude_any,
>                           value: {
>                             id: string & any,
>                             name?: string
>                           }[],
>                           type?: merge_field | pre_defined | value | field
>                         } | {
>                           group: (
>                             {
>                               field: {
>                                 id?: string,
>                                 api_name: string
>                               },
>                               comparator: string,
>                               value: (string | number | {
>                                 id: string & any,
>                                 name?: string
>                               } | {
>                                 name: string
>                               } | {
>                                 id: string,
>                                 name?: string
>                               })[] | string | number | boolean | {
>                                 id: string & any,
>                                 name?: string
>                               } | {
>                                 name: string
>                               } | {
>                                 id: string,
>                                 name?: string
>                               } | ${
>                                 EMPTY
>                               } | ${
>                                 NOTEMPTY
>                               } | ${
>                                 TODAY
>                               } | ${
>                                 TOMORROW
>                               } | ${
>                                 TOMORROWPLUS
>                               } | ${
>                                 YESTERDAY
>                               } | ${
>                                 YESTERDAYMINUS
>                               } | ${
>                                 LASTMONTH
>                               } | ${
>                                 THISMONTH
>                               } | ${
>                                 NEXTMONTH
>                               } | ${
>                                 LASTWEEK
>                               } | ${
>                                 THISWEEK
>                               } | ${
>                                 NEXTWEEK
>                               } | ${
>                                 THISYEAR
>                               } | ${
>                                 THISFY
>                               } | ${
>                                 THISFQ
>                               } | ${
>                                 LASTYEAR
>                               } | ${
>                                 PREVFY
>                               } | ${
>                                 PREVFQ
>                               } | ${
>                                 NEXTYEAR
>                               } | ${
>                                 NEXTFY
>                               } | ${
>                                 NEXTFQ
>                               } | ${
>                                 EMPTY
>                               } | ${
>                                 NOTEMPTY
>                               } | string | string,
>                               type?: merge_field | pre_defined | value | field
>                             } | {
>                               field: {
>                                 id?: string,
>                                 api_name: string
>                               },
>                               comparator: string,
>                               value: (string | number | {
>                                 id: string & any,
>                                 name?: string
>                               } | {
>                                 name: string
>                               } | {
>                                 id: string,
>                                 name?: string
>                               })[] | string | number | boolean | {
>                                 id: string & any,
>                                 name?: string
>                               } | {
>                                 name: string
>                               } | {
>                                 id: string,
>                                 name?: string
>                               } | string,
>                               type?: merge_field | pre_defined | value | field
>                             } | {
>                               field: {
>                                 id?: string,
>                                 api_name: string
>                               },
>                               comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>                               value: string[] | string,
>                               type?: merge_field | pre_defined | value | field
>                             } | {
>                               field: {
>                                 id?: string,
>                                 api_name: string
>                               },
>                               comparator: less_than | less_equal | greater_than | greater_equal,
>                               value: string | number | string,
>                               type?: merge_field | pre_defined | value | field
>                             } | {
>                               field: {
>                                 id?: string,
>                                 api_name: string
>                               },
>                               comparator: between | not_between,
>                               value: (string | number)[],
>                               type?: merge_field | pre_defined | value | field
>                             } | {
>                               field: {
>                                 id?: string,
>                                 api_name: string
>                               },
>                               comparator: in | not_in,
>                               value: (string | number)[],
>                               type?: merge_field | pre_defined | value | field
>                             } | {
>                               field: {
>                                 id?: string,
>                                 api_name: string
>                               },
>                               comparator: include_all | include_any | exclude_all | exclude_any,
>                               value: {
>                                 id: string & any,
>                                 name?: string
>                               }[],
>                               type?: merge_field | pre_defined | value | field
>                             } | (recursive)
>                           )[],
>                           group_operator: AND | OR | and | or
>                         }
>                       )[],
>                       group_operator: AND | OR | and | or
>                     }
>                   },
>                   resource?: null,
>                   allow_agent_user?: boolean
>                 }
>               )[],
>               related_records?: {
>                 api_name: Events | Calls | Tasks | Contacts | Deals,
>                 id?: string
>               }[] | null,
>               notify?: boolean,
>               apply_assignment_threshold?: boolean,
>               user_availability_based_on?: string[] | null,
>               lookup_field?: {
>                 api_name?: string,
>                 id?: string
>               },
>               id?: string
>             },
>             related_details?: {
>               best_time?: boolean
>             } | {
>               followup_details?: {
>                 condition?: string,
>                 unit?: number | string,
>                 period?: string
>               }
>             } | {
>               lookup_field?: {
>                 api_name: string,
>                 id: string
>               }
>             } | null,
>             id?: string,
>             _delete?: null
>           } | {
>             name?: string,
>             type: create_record,
>             details: {
>               module: {
>                 api_name?: string,
>                 id?: string
>               },
>               layout: {
>                 id: string,
>                 name?: string | null,
>                 display_label?: string
>               },
>               field_mappings: (
>                 {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: static,
>                   value: string | string[] | {
>                     id: string,
>                     name?: string
>                   }
>                 } | {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: merge_field,
>                   value: string,
>                   allow_agent_user?: boolean
>                 } | {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: execution_time,
>                   value: {
>                     period: days | business_days | hours | minutes,
>                     unit: string,
>                     sign?: plus | minus,
>                     trigger_field: string,
>                     time?: string,
>                     notify_type?: popup | email | emailandpopup
>                   }
>                 } | {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: composite,
>                   value: {
>                   }
>                 }
>               )[],
>               apply_restriction?: boolean | null,
>               id?: string
>             },
>             related_details?: {
>               best_time?: boolean
>             } | {
>               followup_details?: {
>                 condition?: string,
>                 unit?: number | string,
>                 period?: string
>               }
>             } | {
>               lookup_field?: {
>                 api_name: string,
>                 id: string
>               }
>             } | null,
>             id?: string,
>             _delete?: null
>           } | {
>             name?: string,
>             type: create_connected_record,
>             details: {
>               module: {
>                 api_name: string,
>                 id?: string
>               },
>               layout: {
>                 id: string,
>                 name?: string | null,
>                 display_label?: string
>               },
>               field_mappings: (
>                 {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: static,
>                   value: string | string[] | {
>                     id: string,
>                     name?: string
>                   }
>                 } | {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: merge_field,
>                   value: string,
>                   allow_agent_user?: boolean
>                 } | {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: execution_time,
>                   value: {
>                     period: days | business_days | hours | minutes,
>                     unit: string,
>                     sign?: plus | minus,
>                     trigger_field: string,
>                     time?: string,
>                     notify_type?: popup | email | emailandpopup
>                   }
>                 } | {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: composite,
>                   value: {
>                   }
>                 }
>               )[],
>               apply_restriction?: boolean,
>               id?: string
>             },
>             related_details?: {
>               best_time?: boolean
>             } | {
>               followup_details?: {
>                 condition?: string,
>                 unit?: number | string,
>                 period?: string
>               }
>             } | {
>               lookup_field?: {
>                 api_name: string,
>                 id: string
>               }
>             } | null,
>             id?: string,
>             _delete?: null
>           } | {
>             name?: string,
>             type: add_meeting,
>             details: {
>               module: {
>                 api_name?: string,
>                 id?: string
>               },
>               layout: {
>                 id: string,
>                 name?: string | null,
>                 display_label?: string
>               },
>               field_mappings: (
>                 {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: static,
>                   value: string | string[] | {
>                     id: string,
>                     name?: string
>                   }
>                 } | {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: merge_field,
>                   value: string,
>                   allow_agent_user?: boolean
>                 } | {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: execution_time,
>                   value: {
>                     period: days | business_days | hours | minutes,
>                     unit: string,
>                     sign?: plus | minus,
>                     trigger_field: string,
>                     time?: string,
>                     notify_type?: popup | email | emailandpopup
>                   }
>                 } | {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: composite,
>                   value: {
>                   }
>                 }
>               )[],
>               meeting_duration: {
>                 unit: number | string,
>                 period: hours | minutes
>               },
>               host_unavailable?: {
>                 assign_record_owner_as_host?: boolean,
>                 assign_task?: {
>                   name?: string,
>                   id: string
>                 } | null
>               },
>               apply_restriction?: boolean | null,
>               id?: string
>             },
>             related_details?: {
>               best_time?: boolean
>             } | {
>               followup_details?: {
>                 condition?: string,
>                 unit?: number | string,
>                 period?: string
>               }
>             } | {
>               lookup_field?: {
>                 api_name: string,
>                 id: string
>               }
>             } | null,
>             id?: string,
>             _delete?: null
>           } | {
>             name?: string,
>             type: schedule_call,
>             details: {
>               module: {
>                 api_name?: string,
>                 id?: string
>               },
>               layout: {
>                 id: string,
>                 name?: string | null,
>                 display_label?: string
>               },
>               field_mappings: (
>                 {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: static,
>                   value: string | string[] | {
>                     id: string,
>                     name?: string
>                   }
>                 } | {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: merge_field,
>                   value: string,
>                   allow_agent_user?: boolean
>                 } | {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: execution_time,
>                   value: {
>                     period: days | business_days | hours | minutes,
>                     unit: string,
>                     sign?: plus | minus,
>                     trigger_field: string,
>                     time?: string,
>                     notify_type?: popup | email | emailandpopup
>                   }
>                 } | {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: composite,
>                   value: {
>                   }
>                 }
>               )[],
>               apply_restriction?: boolean | null,
>               id?: string
>             },
>             related_details?: {
>               best_time?: boolean
>             } | {
>               followup_details?: {
>                 condition?: string,
>                 unit?: number | string,
>                 period?: string
>               }
>             } | {
>               lookup_field?: {
>                 api_name: string,
>                 id: string
>               }
>             } | null,
>             id?: string,
>             _delete?: null
>           } | {
>             name?: string,
>             type: add_tags,
>             details: {
>               over_write?: boolean,
>               tags: {
>                 id: string,
>                 name: string,
>                 color_code?: string
>               }[],
>               module?: {
>                 api_name?: string,
>                 id?: string
>               },
>               id?: string
>             },
>             related_details?: {
>               best_time?: boolean
>             } | {
>               followup_details?: {
>                 condition?: string,
>                 unit?: number | string,
>                 period?: string
>               }
>             } | {
>               lookup_field?: {
>                 api_name: string,
>                 id: string
>               }
>             } | null,
>             id?: string,
>             _delete?: null
>           } | {
>             name?: string,
>             type: remove_tags,
>             details: {
>               tags: {
>                 id: string,
>                 name: string,
>                 color_code?: string
>               }[],
>               module?: {
>                 api_name?: string,
>                 id?: string
>               },
>               over_write?: boolean,
>               id?: string
>             },
>             related_details?: {
>               best_time?: boolean
>             } | {
>               followup_details?: {
>                 condition?: string,
>                 unit?: number | string,
>                 period?: string
>               }
>             } | {
>               lookup_field?: {
>                 api_name: string,
>                 id: string
>               }
>             } | null,
>             id?: string,
>             _delete?: null
>           } | {
>             name?: string,
>             type: convert,
>             details: {
>               add_to_existing_contact?: boolean,
>               add_to_existing_account?: boolean,
>               move_attachment_to?: {
>                 api_name?: string,
>                 id?: string
>               },
>               carry_tags?: {
>                 api_name?: string,
>                 id?: string
>               }[],
>               field_mappings?: (
>                 {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: static,
>                   value: string | string[] | {
>                     id: string,
>                     name?: string
>                   }
>                 } | {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: merge_field,
>                   value: string,
>                   allow_agent_user?: boolean
>                 } | {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: execution_time,
>                   value: {
>                     period: days | business_days | hours | minutes,
>                     unit: string,
>                     sign?: plus | minus,
>                     trigger_field: string,
>                     time?: string,
>                     notify_type?: popup | email | emailandpopup
>                   }
>                 } | {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: composite,
>                   value: {
>                   }
>                 }
>               )[],
>               create_deal?: boolean,
>               change_owner?: {
>                 id: string,
>                 name?: string,
>                 related_modules?: {
>                   api_name: Events | Calls | Tasks | Contacts | Deals,
>                   id?: string
>                 }[],
>                 apply_assignment_threshold?: boolean
>               },
>               contact_role?: string,
>               convert_to?: {
>                 api_name: string,
>                 id: string
>               },
>               portal_user_type?: {
>                 id: string,
>                 name: string
>               },
>               apply_restriction?: boolean | null,
>               id?: string
>             },
>             related_details?: {
>               best_time?: boolean
>             } | {
>               followup_details?: {
>                 condition?: string,
>                 unit?: number | string,
>                 period?: string
>               }
>             } | {
>               lookup_field?: {
>                 api_name: string,
>                 id: string
>               }
>             } | null,
>             id?: string,
>             _delete?: null
>           } | {
>             name: string,
>             type: slack_notifications | cliq_notifications | cisco_notifications | google_chat_notifications | microsoft_teams_notifications,
>             details: {
>               message: string,
>               notify_to: {
>                 type: user | channel | fields,
>                 id?: string,
>                 name?: string,
>                 module?: {
>                   id?: string,
>                   api_name?: string
>                 },
>                 notify_fields?: {
>                   fields?: {
>                     id?: string,
>                     api_name?: string
>                   }[],
>                   static_fields?: {
>                     id?: string,
>                     api_name?: string
>                   }[]
>                 }
>               },
>               id?: string
>             },
>             id?: string,
>             _delete?: null
>           } | {
>             name: string,
>             type: circuits,
>             details: {
>               circuit_id: string,
>               id?: string
>             },
>             id?: string,
>             _delete?: null
>           } | {
>             name: string,
>             type: flow,
>             details: {
>               custom_action_id: string,
>               custom_action_name: string,
>               id?: string
>             },
>             id?: string,
>             _delete?: null
>           } | {
>             name?: string,
>             type: comment_to_post | reply_to_comment | like_to_comment | reply_to_message | retweet | reply_to_tweet,
>             details?: {
>               content?: string,
>               id?: string
>             },
>             id?: string,
>             _delete?: null
>           } | {
>             name?: string,
>             type: create_record_email,
>             details: {
>               module: {
>                 api_name: Leads | Contacts
>               },
>               field_mappings: {
>                 field: {
>                   api_name?: string,
>                   id?: string
>                 },
>                 value: {
>                   type: user | role | group | country,
>                   resource?: {
>                     id?: string
>                   }
>                 }
>               }[],
>               id?: string
>             },
>             id?: string,
>             _delete?: null
>           } | {
>             id: string,
>             name?: string,
>             type: email_notifications,
>             details?: {
>               module?: {
>                 api_name: string,
>                 id: string
>               }
>             },
>             related_details?: {
>               best_time?: boolean
>             } | null,
>             _delete?: null
>           } | {
>             id: string,
>             name?: string,
>             type: field_updates,
>             details?: {
>               module?: {
>                 api_name: string,
>                 id: string
>               }
>             },
>             related_details?: {
>               lookup_field?: {
>                 api_name: string,
>                 id: string
>               }
>             } | null,
>             _delete?: null
>           } | {
>             id: string,
>             name?: string,
>             type: tasks,
>             details?: {
>               module?: {
>                 api_name: string,
>                 id: string
>               }
>             },
>             related_details?: {
>               followup_details?: {
>                 condition?: string,
>                 unit?: number | string,
>                 period?: string
>               }
>             } | null,
>             _delete?: null
>           } | {
>             id: string,
>             name?: string,
>             type: webhooks | functions | sms | whatsapp,
>             details?: {
>               module?: {
>                 api_name: string,
>                 id: string
>               }
>             },
>             _delete?: null
>           }
>         )[],
>         id?: string
>       } | null
>     )[] | null,
>     criteria_details?: {
>       criteria?: {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: string,
>         value: (string | number | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         })[] | string | number | boolean | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         } | ${
>           EMPTY
>         } | ${
>           NOTEMPTY
>         } | ${
>           TODAY
>         } | ${
>           TOMORROW
>         } | ${
>           TOMORROWPLUS
>         } | ${
>           YESTERDAY
>         } | ${
>           YESTERDAYMINUS
>         } | ${
>           LASTMONTH
>         } | ${
>           THISMONTH
>         } | ${
>           NEXTMONTH
>         } | ${
>           LASTWEEK
>         } | ${
>           THISWEEK
>         } | ${
>           NEXTWEEK
>         } | ${
>           THISYEAR
>         } | ${
>           THISFY
>         } | ${
>           THISFQ
>         } | ${
>           LASTYEAR
>         } | ${
>           PREVFY
>         } | ${
>           PREVFQ
>         } | ${
>           NEXTYEAR
>         } | ${
>           NEXTFY
>         } | ${
>           NEXTFQ
>         } | ${
>           EMPTY
>         } | ${
>           NOTEMPTY
>         } | string | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: string,
>         value: (string | number | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         })[] | string | number | boolean | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         } | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>         value: string[] | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: less_than | less_equal | greater_than | greater_equal,
>         value: string | number | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: between | not_between,
>         value: (string | number)[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: in | not_in,
>         value: (string | number)[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: include_all | include_any | exclude_all | exclude_any,
>         value: {
>           id: string & any,
>           name?: string
>         }[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         group: (
>           {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: string,
>             value: (string | number | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             })[] | string | number | boolean | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             } | ${
>               EMPTY
>             } | ${
>               NOTEMPTY
>             } | ${
>               TODAY
>             } | ${
>               TOMORROW
>             } | ${
>               TOMORROWPLUS
>             } | ${
>               YESTERDAY
>             } | ${
>               YESTERDAYMINUS
>             } | ${
>               LASTMONTH
>             } | ${
>               THISMONTH
>             } | ${
>               NEXTMONTH
>             } | ${
>               LASTWEEK
>             } | ${
>               THISWEEK
>             } | ${
>               NEXTWEEK
>             } | ${
>               THISYEAR
>             } | ${
>               THISFY
>             } | ${
>               THISFQ
>             } | ${
>               LASTYEAR
>             } | ${
>               PREVFY
>             } | ${
>               PREVFQ
>             } | ${
>               NEXTYEAR
>             } | ${
>               NEXTFY
>             } | ${
>               NEXTFQ
>             } | ${
>               EMPTY
>             } | ${
>               NOTEMPTY
>             } | string | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: string,
>             value: (string | number | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             })[] | string | number | boolean | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             } | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>             value: string[] | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: less_than | less_equal | greater_than | greater_equal,
>             value: string | number | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: between | not_between,
>             value: (string | number)[],
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: in | not_in,
>             value: (string | number)[],
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: include_all | include_any | exclude_all | exclude_any,
>             value: {
>               id: string & any,
>               name?: string
>             }[],
>             type?: merge_field | pre_defined | value | field
>           } | {
>             group: (
>               {
>                 field: {
>                   id?: string,
>                   api_name: string
>                 },
>                 comparator: string,
>                 value: (string | number | {
>                   id: string & any,
>                   name?: string
>                 } | {
>                   name: string
>                 } | {
>                   id: string,
>                   name?: string
>                 })[] | string | number | boolean | {
>                   id: string & any,
>                   name?: string
>                 } | {
>                   name: string
>                 } | {
>                   id: string,
>                   name?: string
>                 } | ${
>                   EMPTY
>                 } | ${
>                   NOTEMPTY
>                 } | ${
>                   TODAY
>                 } | ${
>                   TOMORROW
>                 } | ${
>                   TOMORROWPLUS
>                 } | ${
>                   YESTERDAY
>                 } | ${
>                   YESTERDAYMINUS
>                 } | ${
>                   LASTMONTH
>                 } | ${
>                   THISMONTH
>                 } | ${
>                   NEXTMONTH
>                 } | ${
>                   LASTWEEK
>                 } | ${
>                   THISWEEK
>                 } | ${
>                   NEXTWEEK
>                 } | ${
>                   THISYEAR
>                 } | ${
>                   THISFY
>                 } | ${
>                   THISFQ
>                 } | ${
>                   LASTYEAR
>                 } | ${
>                   PREVFY
>                 } | ${
>                   PREVFQ
>                 } | ${
>                   NEXTYEAR
>                 } | ${
>                   NEXTFY
>                 } | ${
>                   NEXTFQ
>                 } | ${
>                   EMPTY
>                 } | ${
>                   NOTEMPTY
>                 } | string | string,
>                 type?: merge_field | pre_defined | value | field
>               } | {
>                 field: {
>                   id?: string,
>                   api_name: string
>                 },
>                 comparator: string,
>                 value: (string | number | {
>                   id: string & any,
>                   name?: string
>                 } | {
>                   name: string
>                 } | {
>                   id: string,
>                   name?: string
>                 })[] | string | number | boolean | {
>                   id: string & any,
>                   name?: string
>                 } | {
>                   name: string
>                 } | {
>                   id: string,
>                   name?: string
>                 } | string,
>                 type?: merge_field | pre_defined | value | field
>               } | {
>                 field: {
>                   id?: string,
>                   api_name: string
>                 },
>                 comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>                 value: string[] | string,
>                 type?: merge_field | pre_defined | value | field
>               } | {
>                 field: {
>                   id?: string,
>                   api_name: string
>                 },
>                 comparator: less_than | less_equal | greater_than | greater_equal,
>                 value: string | number | string,
>                 type?: merge_field | pre_defined | value | field
>               } | {
>                 field: {
>                   id?: string,
>                   api_name: string
>                 },
>                 comparator: between | not_between,
>                 value: (string | number)[],
>                 type?: merge_field | pre_defined | value | field
>               } | {
>                 field: {
>                   id?: string,
>                   api_name: string
>                 },
>                 comparator: in | not_in,
>                 value: (string | number)[],
>                 type?: merge_field | pre_defined | value | field
>               } | {
>                 field: {
>                   id?: string,
>                   api_name: string
>                 },
>                 comparator: include_all | include_any | exclude_all | exclude_any,
>                 value: {
>                   id: string & any,
>                   name?: string
>                 }[],
>                 type?: merge_field | pre_defined | value | field
>               } | (recursive)
>             )[],
>             group_operator: AND | OR | and | or
>           }
>         )[],
>         group_operator: AND | OR | and | or
>       } | null,
>       relational_criteria?: {
>         criteria?: {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: string,
>           value: (string | number | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           })[] | string | number | boolean | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           } | ${
>             EMPTY
>           } | ${
>             NOTEMPTY
>           } | ${
>             TODAY
>           } | ${
>             TOMORROW
>           } | ${
>             TOMORROWPLUS
>           } | ${
>             YESTERDAY
>           } | ${
>             YESTERDAYMINUS
>           } | ${
>             LASTMONTH
>           } | ${
>             THISMONTH
>           } | ${
>             NEXTMONTH
>           } | ${
>             LASTWEEK
>           } | ${
>             THISWEEK
>           } | ${
>             NEXTWEEK
>           } | ${
>             THISYEAR
>           } | ${
>             THISFY
>           } | ${
>             THISFQ
>           } | ${
>             LASTYEAR
>           } | ${
>             PREVFY
>           } | ${
>             PREVFQ
>           } | ${
>             NEXTYEAR
>           } | ${
>             NEXTFY
>           } | ${
>             NEXTFQ
>           } | ${
>             EMPTY
>           } | ${
>             NOTEMPTY
>           } | string | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: string,
>           value: (string | number | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           })[] | string | number | boolean | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           } | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>           value: string[] | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: less_than | less_equal | greater_than | greater_equal,
>           value: string | number | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: between | not_between,
>           value: (string | number)[],
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: in | not_in,
>           value: (string | number)[],
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: include_all | include_any | exclude_all | exclude_any,
>           value: {
>             id: string & any,
>             name?: string
>           }[],
>           type?: merge_field | pre_defined | value | field
>         } | {
>           group: (
>             {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: string,
>               value: (string | number | {
>                 id: string & any,
>                 name?: string
>               } | {
>                 name: string
>               } | {
>                 id: string,
>                 name?: string
>               })[] | string | number | boolean | {
>                 id: string & any,
>                 name?: string
>               } | {
>                 name: string
>               } | {
>                 id: string,
>                 name?: string
>               } | ${
>                 EMPTY
>               } | ${
>                 NOTEMPTY
>               } | ${
>                 TODAY
>               } | ${
>                 TOMORROW
>               } | ${
>                 TOMORROWPLUS
>               } | ${
>                 YESTERDAY
>               } | ${
>                 YESTERDAYMINUS
>               } | ${
>                 LASTMONTH
>               } | ${
>                 THISMONTH
>               } | ${
>                 NEXTMONTH
>               } | ${
>                 LASTWEEK
>               } | ${
>                 THISWEEK
>               } | ${
>                 NEXTWEEK
>               } | ${
>                 THISYEAR
>               } | ${
>                 THISFY
>               } | ${
>                 THISFQ
>               } | ${
>                 LASTYEAR
>               } | ${
>                 PREVFY
>               } | ${
>                 PREVFQ
>               } | ${
>                 NEXTYEAR
>               } | ${
>                 NEXTFY
>               } | ${
>                 NEXTFQ
>               } | ${
>                 EMPTY
>               } | ${
>                 NOTEMPTY
>               } | string | string,
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: string,
>               value: (string | number | {
>                 id: string & any,
>                 name?: string
>               } | {
>                 name: string
>               } | {
>                 id: string,
>                 name?: string
>               })[] | string | number | boolean | {
>                 id: string & any,
>                 name?: string
>               } | {
>                 name: string
>               } | {
>                 id: string,
>                 name?: string
>               } | string,
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>               value: string[] | string,
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: less_than | less_equal | greater_than | greater_equal,
>               value: string | number | string,
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: between | not_between,
>               value: (string | number)[],
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: in | not_in,
>               value: (string | number)[],
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: include_all | include_any | exclude_all | exclude_any,
>               value: {
>                 id: string & any,
>                 name?: string
>               }[],
>               type?: merge_field | pre_defined | value | field
>             } | {
>               group: (
>                 {
>                   field: {
>                     id?: string,
>                     api_name: string
>                   },
>                   comparator: string,
>                   value: (string | number | {
>                     id: string & any,
>                     name?: string
>                   } | {
>                     name: string
>                   } | {
>                     id: string,
>                     name?: string
>                   })[] | string | number | boolean | {
>                     id: string & any,
>                     name?: string
>                   } | {
>                     name: string
>                   } | {
>                     id: string,
>                     name?: string
>                   } | ${
>                     EMPTY
>                   } | ${
>                     NOTEMPTY
>                   } | ${
>                     TODAY
>                   } | ${
>                     TOMORROW
>                   } | ${
>                     TOMORROWPLUS
>                   } | ${
>                     YESTERDAY
>                   } | ${
>                     YESTERDAYMINUS
>                   } | ${
>                     LASTMONTH
>                   } | ${
>                     THISMONTH
>                   } | ${
>                     NEXTMONTH
>                   } | ${
>                     LASTWEEK
>                   } | ${
>                     THISWEEK
>                   } | ${
>                     NEXTWEEK
>                   } | ${
>                     THISYEAR
>                   } | ${
>                     THISFY
>                   } | ${
>                     THISFQ
>                   } | ${
>                     LASTYEAR
>                   } | ${
>                     PREVFY
>                   } | ${
>                     PREVFQ
>                   } | ${
>                     NEXTYEAR
>                   } | ${
>                     NEXTFY
>                   } | ${
>                     NEXTFQ
>                   } | ${
>                     EMPTY
>                   } | ${
>                     NOTEMPTY
>                   } | string | string,
>                   type?: merge_field | pre_defined | value | field
>                 } | {
>                   field: {
>                     id?: string,
>                     api_name: string
>                   },
>                   comparator: string,
>                   value: (string | number | {
>                     id: string & any,
>                     name?: string
>                   } | {
>                     name: string
>                   } | {
>                     id: string,
>                     name?: string
>                   })[] | string | number | boolean | {
>                     id: string & any,
>                     name?: string
>                   } | {
>                     name: string
>                   } | {
>                     id: string,
>                     name?: string
>                   } | string,
>                   type?: merge_field | pre_defined | value | field
>                 } | {
>                   field: {
>                     id?: string,
>                     api_name: string
>                   },
>                   comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>                   value: string[] | string,
>                   type?: merge_field | pre_defined | value | field
>                 } | {
>                   field: {
>                     id?: string,
>                     api_name: string
>                   },
>                   comparator: less_than | less_equal | greater_than | greater_equal,
>                   value: string | number | string,
>                   type?: merge_field | pre_defined | value | field
>                 } | {
>                   field: {
>                     id?: string,
>                     api_name: string
>                   },
>                   comparator: between | not_between,
>                   value: (string | number)[],
>                   type?: merge_field | pre_defined | value | field
>                 } | {
>                   field: {
>                     id?: string,
>                     api_name: string
>                   },
>                   comparator: in | not_in,
>                   value: (string | number)[],
>                   type?: merge_field | pre_defined | value | field
>                 } | {
>                   field: {
>                     id?: string,
>                     api_name: string
>                   },
>                   comparator: include_all | include_any | exclude_all | exclude_any,
>                   value: {
>                     id: string & any,
>                     name?: string
>                   }[],
>                   type?: merge_field | pre_defined | value | field
>                 } | (recursive)
>               )[],
>               group_operator: AND | OR | and | or
>             }
>           )[],
>           group_operator: AND | OR | and | or
>         } | null,
>         module_selection?: all | specific | unknown | null,
>         module?: {
>           api_name: string,
>           id: string
>         } | null
>       }
>     },
>     id?: string,
>     _delete?: null
>   }[],
>   lock?: {
>     message?: string,
>     status?: true | false
>   },
>   module?: {
>     api_name: string,
>     id: string
>   }
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `workflow_rules` | `object[] \| null` | No | Represents the array of workflow rule objects returned in the success response. |

> [accordion] workflow\_rules full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### updateMany

`workflowRules.updateMany`

Update workflow rules by ID in the request body. To update one or more existing workflow rules in your Zoho CRM organization, submit a workflow\_rules array in the request body with each entry containing the rule's id. You can modify a rule's name, description, criteria, conditions, actions, and active status.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.workflowRules.updateMany({
	workflow_rules: [{}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `workflow_rules` | `object[]` | Yes | The request body must contain a **workflow\_rules** array with one object. |

> [accordion] workflow\_rules full type
>
> ```ts theme={null}
> {
>   id?: string,
>   status?: {
>     active?: boolean,
>     delete_schedule_action?: boolean
>   },
>   execute_when?: {
>     type: create | edit | create_or_edit | delete | cancel | reschedule | reassign | anyaction | deactivate | activate | marked_as_complete | incoming_call_ring | incoming_call_start | incoming_call_createedit | incoming_call_edit | outgoing_call_ring | outgoing_call_start | outgoing_call_edit | outgoing_call_createedit | missed_call | scheduled_call_createedit | scheduled_call_edit | email_received | mail_sent | mail_sent_clicked | mail_sent_replied | mail_sent_opened | mail_sent_bounced | fb_post_on_page | fb_comment_on_page | fb_like_on_post | fb_send_message | tw_mention_on | tw_retweet_on_tweet | tw_comment_on_tweet | tw_send_message | voc_incoming_signal,
>     details?: {
>       repeat?: boolean,
>       trigger_module?: {
>         api_name: string,
>         id: string
>       }
>     }
>   } | {
>     type: field_update | incoming_call_field_update | outgoing_call_field_update | scheduled_call_field_update | stage_automation_field_update | rollup_summary_update,
>     details: {
>       criteria: {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: equal | not_equal | like | not_like | starts_with | ends_with | contains | not_contains | greater_than | greater_equal | less_equal | less_than | in | not_in | between | ${
>           ANYVALUE
>         },
>         value: string | number | boolean | {
>           id: string & any,
>           name?: string
>         },
>         type?: merge_field | pre_defined | value | field
>       } | {
>         group: (
>           {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: equal | not_equal | like | not_like | starts_with | ends_with | contains | not_contains | greater_than | greater_equal | less_equal | less_than | in | not_in | between | ${
>               ANYVALUE
>             },
>             value: string | number | boolean | {
>               id: string & any,
>               name?: string
>             },
>             type?: merge_field | pre_defined | value | field
>           } | {
>             group: (
>               {
>                 field: {
>                   id?: string,
>                   api_name: string
>                 },
>                 comparator: equal | not_equal | like | not_like | starts_with | ends_with | contains | not_contains | greater_than | greater_equal | less_equal | less_than | in | not_in | between | ${
>                   ANYVALUE
>                 },
>                 value: string | number | boolean | {
>                   id: string & any,
>                   name?: string
>                 },
>                 type?: merge_field | pre_defined | value | field
>               } | (recursive)
>             )[],
>             group_operator: AND | OR
>           }
>         )[],
>         group_operator: AND | OR
>       },
>       match_all?: boolean,
>       repeat?: boolean,
>       trigger_module?: {
>         api_name: string,
>         id: string
>       }
>     }
>   } | {
>     type: section_update | incoming_call_section_update | outgoing_call_section_update | scheduled_call_section_update,
>     details: {
>       section_ids: string[],
>       repeat?: boolean,
>       trigger_module?: {
>         api_name: string,
>         id: string
>       }
>     }
>   } | {
>     type: string,
>     details: {
>       field: {
>         api_name: string,
>         id?: string
>       },
>       period: minutes | hours | days | weeks | months | years | b_hours | b_days,
>       unit: number | string,
>       execute_at?: string,
>       recur_cycle?: once | monthly | yearly,
>       repeat?: boolean,
>       trigger_module?: {
>         api_name: string,
>         id: string
>       }
>     }
>   } | {
>     type: overdue | email_received_notreplied | email_received_opened_notreplied | mail_sent_opened_notreplied | mail_sent_notreplied | mail_sent_notopened | recommendation_rebuy,
>     details: {
>       period: days | hours,
>       unit: number | string,
>       trigger_module?: {
>         api_name: string,
>         id: string
>       },
>       field?: {
>         id?: string
>       }
>     }
>   } | {
>     type: score_increase | score_decrease | score_update | zia_scoring_rule,
>     details: {
>       type: All_Rules | Selective_Rules,
>       rules?: {
>         id: string
>       }[],
>       repeat?: boolean,
>       trigger_module?: {
>         api_name: string,
>         id: string
>       }
>     }
>   } | {
>     type: string,
>     details: {
>       period: days | hours,
>       unit: number | string,
>       trigger_module?: {
>         api_name: string,
>         id: string
>       }
>     }
>   },
>   name?: string,
>   description?: string,
>   conditions?: {
>     sequence_number: number | string,
>     instant_actions?: {
>       actions: (
>         {
>           name?: string,
>           type: assign_owner,
>           details: {
>             module: {
>               api_name?: string,
>               id?: string
>             },
>             assign_to: (
>               {
>                 type: user | role | group | assignment_rule | profile,
>                 resource: {
>                   id: string,
>                   name?: string,
>                   type?: user | role | group | assignment_rule | profile
>                 },
>                 allow_agent_user?: boolean,
>                 associated_to?: string | null,
>                 details?: null
>               } | {
>                 type: merge_field,
>                 details: {
>                   api_name: string
>                 },
>                 resource?: null,
>                 allow_agent_user?: boolean
>               } | {
>                 type: criteria,
>                 details: {
>                   criteria: {
>                     field: {
>                       id?: string,
>                       api_name: string
>                     },
>                     comparator: string,
>                     value: (string | number | {
>                       id: string & any,
>                       name?: string
>                     } | {
>                       name: string
>                     } | {
>                       id: string,
>                       name?: string
>                     })[] | string | number | boolean | {
>                       id: string & any,
>                       name?: string
>                     } | {
>                       name: string
>                     } | {
>                       id: string,
>                       name?: string
>                     } | ${
>                       EMPTY
>                     } | ${
>                       NOTEMPTY
>                     } | ${
>                       TODAY
>                     } | ${
>                       TOMORROW
>                     } | ${
>                       TOMORROWPLUS
>                     } | ${
>                       YESTERDAY
>                     } | ${
>                       YESTERDAYMINUS
>                     } | ${
>                       LASTMONTH
>                     } | ${
>                       THISMONTH
>                     } | ${
>                       NEXTMONTH
>                     } | ${
>                       LASTWEEK
>                     } | ${
>                       THISWEEK
>                     } | ${
>                       NEXTWEEK
>                     } | ${
>                       THISYEAR
>                     } | ${
>                       THISFY
>                     } | ${
>                       THISFQ
>                     } | ${
>                       LASTYEAR
>                     } | ${
>                       PREVFY
>                     } | ${
>                       PREVFQ
>                     } | ${
>                       NEXTYEAR
>                     } | ${
>                       NEXTFY
>                     } | ${
>                       NEXTFQ
>                     } | ${
>                       EMPTY
>                     } | ${
>                       NOTEMPTY
>                     } | string | string,
>                     type?: merge_field | pre_defined | value | field
>                   } | {
>                     field: {
>                       id?: string,
>                       api_name: string
>                     },
>                     comparator: string,
>                     value: (string | number | {
>                       id: string & any,
>                       name?: string
>                     } | {
>                       name: string
>                     } | {
>                       id: string,
>                       name?: string
>                     })[] | string | number | boolean | {
>                       id: string & any,
>                       name?: string
>                     } | {
>                       name: string
>                     } | {
>                       id: string,
>                       name?: string
>                     } | string,
>                     type?: merge_field | pre_defined | value | field
>                   } | {
>                     field: {
>                       id?: string,
>                       api_name: string
>                     },
>                     comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>                     value: string[] | string,
>                     type?: merge_field | pre_defined | value | field
>                   } | {
>                     field: {
>                       id?: string,
>                       api_name: string
>                     },
>                     comparator: less_than | less_equal | greater_than | greater_equal,
>                     value: string | number | string,
>                     type?: merge_field | pre_defined | value | field
>                   } | {
>                     field: {
>                       id?: string,
>                       api_name: string
>                     },
>                     comparator: between | not_between,
>                     value: (string | number)[],
>                     type?: merge_field | pre_defined | value | field
>                   } | {
>                     field: {
>                       id?: string,
>                       api_name: string
>                     },
>                     comparator: in | not_in,
>                     value: (string | number)[],
>                     type?: merge_field | pre_defined | value | field
>                   } | {
>                     field: {
>                       id?: string,
>                       api_name: string
>                     },
>                     comparator: include_all | include_any | exclude_all | exclude_any,
>                     value: {
>                       id: string & any,
>                       name?: string
>                     }[],
>                     type?: merge_field | pre_defined | value | field
>                   } | {
>                     group: (
>                       {
>                         field: {
>                           id?: string,
>                           api_name: string
>                         },
>                         comparator: string,
>                         value: (string | number | {
>                           id: string & any,
>                           name?: string
>                         } | {
>                           name: string
>                         } | {
>                           id: string,
>                           name?: string
>                         })[] | string | number | boolean | {
>                           id: string & any,
>                           name?: string
>                         } | {
>                           name: string
>                         } | {
>                           id: string,
>                           name?: string
>                         } | ${
>                           EMPTY
>                         } | ${
>                           NOTEMPTY
>                         } | ${
>                           TODAY
>                         } | ${
>                           TOMORROW
>                         } | ${
>                           TOMORROWPLUS
>                         } | ${
>                           YESTERDAY
>                         } | ${
>                           YESTERDAYMINUS
>                         } | ${
>                           LASTMONTH
>                         } | ${
>                           THISMONTH
>                         } | ${
>                           NEXTMONTH
>                         } | ${
>                           LASTWEEK
>                         } | ${
>                           THISWEEK
>                         } | ${
>                           NEXTWEEK
>                         } | ${
>                           THISYEAR
>                         } | ${
>                           THISFY
>                         } | ${
>                           THISFQ
>                         } | ${
>                           LASTYEAR
>                         } | ${
>                           PREVFY
>                         } | ${
>                           PREVFQ
>                         } | ${
>                           NEXTYEAR
>                         } | ${
>                           NEXTFY
>                         } | ${
>                           NEXTFQ
>                         } | ${
>                           EMPTY
>                         } | ${
>                           NOTEMPTY
>                         } | string | string,
>                         type?: merge_field | pre_defined | value | field
>                       } | {
>                         field: {
>                           id?: string,
>                           api_name: string
>                         },
>                         comparator: string,
>                         value: (string | number | {
>                           id: string & any,
>                           name?: string
>                         } | {
>                           name: string
>                         } | {
>                           id: string,
>                           name?: string
>                         })[] | string | number | boolean | {
>                           id: string & any,
>                           name?: string
>                         } | {
>                           name: string
>                         } | {
>                           id: string,
>                           name?: string
>                         } | string,
>                         type?: merge_field | pre_defined | value | field
>                       } | {
>                         field: {
>                           id?: string,
>                           api_name: string
>                         },
>                         comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>                         value: string[] | string,
>                         type?: merge_field | pre_defined | value | field
>                       } | {
>                         field: {
>                           id?: string,
>                           api_name: string
>                         },
>                         comparator: less_than | less_equal | greater_than | greater_equal,
>                         value: string | number | string,
>                         type?: merge_field | pre_defined | value | field
>                       } | {
>                         field: {
>                           id?: string,
>                           api_name: string
>                         },
>                         comparator: between | not_between,
>                         value: (string | number)[],
>                         type?: merge_field | pre_defined | value | field
>                       } | {
>                         field: {
>                           id?: string,
>                           api_name: string
>                         },
>                         comparator: in | not_in,
>                         value: (string | number)[],
>                         type?: merge_field | pre_defined | value | field
>                       } | {
>                         field: {
>                           id?: string,
>                           api_name: string
>                         },
>                         comparator: include_all | include_any | exclude_all | exclude_any,
>                         value: {
>                           id: string & any,
>                           name?: string
>                         }[],
>                         type?: merge_field | pre_defined | value | field
>                       } | {
>                         group: (
>                           {
>                             field: {
>                               id?: string,
>                               api_name: string
>                             },
>                             comparator: string,
>                             value: (string | number | {
>                               id: string & any,
>                               name?: string
>                             } | {
>                               name: string
>                             } | {
>                               id: string,
>                               name?: string
>                             })[] | string | number | boolean | {
>                               id: string & any,
>                               name?: string
>                             } | {
>                               name: string
>                             } | {
>                               id: string,
>                               name?: string
>                             } | ${
>                               EMPTY
>                             } | ${
>                               NOTEMPTY
>                             } | ${
>                               TODAY
>                             } | ${
>                               TOMORROW
>                             } | ${
>                               TOMORROWPLUS
>                             } | ${
>                               YESTERDAY
>                             } | ${
>                               YESTERDAYMINUS
>                             } | ${
>                               LASTMONTH
>                             } | ${
>                               THISMONTH
>                             } | ${
>                               NEXTMONTH
>                             } | ${
>                               LASTWEEK
>                             } | ${
>                               THISWEEK
>                             } | ${
>                               NEXTWEEK
>                             } | ${
>                               THISYEAR
>                             } | ${
>                               THISFY
>                             } | ${
>                               THISFQ
>                             } | ${
>                               LASTYEAR
>                             } | ${
>                               PREVFY
>                             } | ${
>                               PREVFQ
>                             } | ${
>                               NEXTYEAR
>                             } | ${
>                               NEXTFY
>                             } | ${
>                               NEXTFQ
>                             } | ${
>                               EMPTY
>                             } | ${
>                               NOTEMPTY
>                             } | string | string,
>                             type?: merge_field | pre_defined | value | field
>                           } | {
>                             field: {
>                               id?: string,
>                               api_name: string
>                             },
>                             comparator: string,
>                             value: (string | number | {
>                               id: string & any,
>                               name?: string
>                             } | {
>                               name: string
>                             } | {
>                               id: string,
>                               name?: string
>                             })[] | string | number | boolean | {
>                               id: string & any,
>                               name?: string
>                             } | {
>                               name: string
>                             } | {
>                               id: string,
>                               name?: string
>                             } | string,
>                             type?: merge_field | pre_defined | value | field
>                           } | {
>                             field: {
>                               id?: string,
>                               api_name: string
>                             },
>                             comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>                             value: string[] | string,
>                             type?: merge_field | pre_defined | value | field
>                           } | {
>                             field: {
>                               id?: string,
>                               api_name: string
>                             },
>                             comparator: less_than | less_equal | greater_than | greater_equal,
>                             value: string | number | string,
>                             type?: merge_field | pre_defined | value | field
>                           } | {
>                             field: {
>                               id?: string,
>                               api_name: string
>                             },
>                             comparator: between | not_between,
>                             value: (string | number)[],
>                             type?: merge_field | pre_defined | value | field
>                           } | {
>                             field: {
>                               id?: string,
>                               api_name: string
>                             },
>                             comparator: in | not_in,
>                             value: (string | number)[],
>                             type?: merge_field | pre_defined | value | field
>                           } | {
>                             field: {
>                               id?: string,
>                               api_name: string
>                             },
>                             comparator: include_all | include_any | exclude_all | exclude_any,
>                             value: {
>                               id: string & any,
>                               name?: string
>                             }[],
>                             type?: merge_field | pre_defined | value | field
>                           } | (recursive)
>                         )[],
>                         group_operator: AND | OR | and | or
>                       }
>                     )[],
>                     group_operator: AND | OR | and | or
>                   }
>                 },
>                 resource?: null,
>                 allow_agent_user?: boolean
>               }
>             )[],
>             related_records?: {
>               api_name: Events | Calls | Tasks | Contacts | Deals,
>               id?: string
>             }[] | null,
>             notify?: boolean,
>             apply_assignment_threshold?: boolean,
>             user_availability_based_on?: string[] | null,
>             lookup_field?: {
>               api_name?: string,
>               id?: string
>             },
>             id?: string
>           },
>           related_details?: {
>             best_time?: boolean
>           } | {
>             followup_details?: {
>               condition?: string,
>               unit?: number | string,
>               period?: string
>             }
>           } | {
>             lookup_field?: {
>               api_name: string,
>               id: string
>             }
>           } | null,
>           id?: string,
>           _delete?: null
>         } | {
>           name?: string,
>           type: create_record,
>           details: {
>             module: {
>               api_name?: string,
>               id?: string
>             },
>             layout: {
>               id: string,
>               name?: string | null,
>               display_label?: string
>             },
>             field_mappings: (
>               {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: static,
>                 value: string | string[] | {
>                   id: string,
>                   name?: string
>                 }
>               } | {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: merge_field,
>                 value: string,
>                 allow_agent_user?: boolean
>               } | {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: execution_time,
>                 value: {
>                   period: days | business_days | hours | minutes,
>                   unit: string,
>                   sign?: plus | minus,
>                   trigger_field: string,
>                   time?: string,
>                   notify_type?: popup | email | emailandpopup
>                 }
>               } | {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: composite,
>                 value: {
>                 }
>               }
>             )[],
>             apply_restriction?: boolean | null,
>             id?: string
>           },
>           related_details?: {
>             best_time?: boolean
>           } | {
>             followup_details?: {
>               condition?: string,
>               unit?: number | string,
>               period?: string
>             }
>           } | {
>             lookup_field?: {
>               api_name: string,
>               id: string
>             }
>           } | null,
>           id?: string,
>           _delete?: null
>         } | {
>           name?: string,
>           type: create_connected_record,
>           details: {
>             module: {
>               api_name: string,
>               id?: string
>             },
>             layout: {
>               id: string,
>               name?: string | null,
>               display_label?: string
>             },
>             field_mappings: (
>               {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: static,
>                 value: string | string[] | {
>                   id: string,
>                   name?: string
>                 }
>               } | {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: merge_field,
>                 value: string,
>                 allow_agent_user?: boolean
>               } | {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: execution_time,
>                 value: {
>                   period: days | business_days | hours | minutes,
>                   unit: string,
>                   sign?: plus | minus,
>                   trigger_field: string,
>                   time?: string,
>                   notify_type?: popup | email | emailandpopup
>                 }
>               } | {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: composite,
>                 value: {
>                 }
>               }
>             )[],
>             apply_restriction?: boolean,
>             id?: string
>           },
>           related_details?: {
>             best_time?: boolean
>           } | {
>             followup_details?: {
>               condition?: string,
>               unit?: number | string,
>               period?: string
>             }
>           } | {
>             lookup_field?: {
>               api_name: string,
>               id: string
>             }
>           } | null,
>           id?: string,
>           _delete?: null
>         } | {
>           name?: string,
>           type: add_meeting,
>           details: {
>             module: {
>               api_name?: string,
>               id?: string
>             },
>             layout: {
>               id: string,
>               name?: string | null,
>               display_label?: string
>             },
>             field_mappings: (
>               {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: static,
>                 value: string | string[] | {
>                   id: string,
>                   name?: string
>                 }
>               } | {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: merge_field,
>                 value: string,
>                 allow_agent_user?: boolean
>               } | {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: execution_time,
>                 value: {
>                   period: days | business_days | hours | minutes,
>                   unit: string,
>                   sign?: plus | minus,
>                   trigger_field: string,
>                   time?: string,
>                   notify_type?: popup | email | emailandpopup
>                 }
>               } | {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: composite,
>                 value: {
>                 }
>               }
>             )[],
>             meeting_duration: {
>               unit: number | string,
>               period: hours | minutes
>             },
>             host_unavailable?: {
>               assign_record_owner_as_host?: boolean,
>               assign_task?: {
>                 name?: string,
>                 id: string
>               } | null
>             },
>             apply_restriction?: boolean | null,
>             id?: string
>           },
>           related_details?: {
>             best_time?: boolean
>           } | {
>             followup_details?: {
>               condition?: string,
>               unit?: number | string,
>               period?: string
>             }
>           } | {
>             lookup_field?: {
>               api_name: string,
>               id: string
>             }
>           } | null,
>           id?: string,
>           _delete?: null
>         } | {
>           name?: string,
>           type: schedule_call,
>           details: {
>             module: {
>               api_name?: string,
>               id?: string
>             },
>             layout: {
>               id: string,
>               name?: string | null,
>               display_label?: string
>             },
>             field_mappings: (
>               {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: static,
>                 value: string | string[] | {
>                   id: string,
>                   name?: string
>                 }
>               } | {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: merge_field,
>                 value: string,
>                 allow_agent_user?: boolean
>               } | {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: execution_time,
>                 value: {
>                   period: days | business_days | hours | minutes,
>                   unit: string,
>                   sign?: plus | minus,
>                   trigger_field: string,
>                   time?: string,
>                   notify_type?: popup | email | emailandpopup
>                 }
>               } | {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: composite,
>                 value: {
>                 }
>               }
>             )[],
>             apply_restriction?: boolean | null,
>             id?: string
>           },
>           related_details?: {
>             best_time?: boolean
>           } | {
>             followup_details?: {
>               condition?: string,
>               unit?: number | string,
>               period?: string
>             }
>           } | {
>             lookup_field?: {
>               api_name: string,
>               id: string
>             }
>           } | null,
>           id?: string,
>           _delete?: null
>         } | {
>           name?: string,
>           type: add_tags,
>           details: {
>             over_write?: boolean,
>             tags: {
>               id: string,
>               name: string,
>               color_code?: string
>             }[],
>             module?: {
>               api_name?: string,
>               id?: string
>             },
>             id?: string
>           },
>           related_details?: {
>             best_time?: boolean
>           } | {
>             followup_details?: {
>               condition?: string,
>               unit?: number | string,
>               period?: string
>             }
>           } | {
>             lookup_field?: {
>               api_name: string,
>               id: string
>             }
>           } | null,
>           id?: string,
>           _delete?: null
>         } | {
>           name?: string,
>           type: remove_tags,
>           details: {
>             tags: {
>               id: string,
>               name: string,
>               color_code?: string
>             }[],
>             module?: {
>               api_name?: string,
>               id?: string
>             },
>             over_write?: boolean,
>             id?: string
>           },
>           related_details?: {
>             best_time?: boolean
>           } | {
>             followup_details?: {
>               condition?: string,
>               unit?: number | string,
>               period?: string
>             }
>           } | {
>             lookup_field?: {
>               api_name: string,
>               id: string
>             }
>           } | null,
>           id?: string,
>           _delete?: null
>         } | {
>           name?: string,
>           type: convert,
>           details: {
>             add_to_existing_contact?: boolean,
>             add_to_existing_account?: boolean,
>             move_attachment_to?: {
>               api_name?: string,
>               id?: string
>             },
>             carry_tags?: {
>               api_name?: string,
>               id?: string
>             }[],
>             field_mappings?: (
>               {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: static,
>                 value: string | string[] | {
>                   id: string,
>                   name?: string
>                 }
>               } | {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: merge_field,
>                 value: string,
>                 allow_agent_user?: boolean
>               } | {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: execution_time,
>                 value: {
>                   period: days | business_days | hours | minutes,
>                   unit: string,
>                   sign?: plus | minus,
>                   trigger_field: string,
>                   time?: string,
>                   notify_type?: popup | email | emailandpopup
>                 }
>               } | {
>                 display_value?: string,
>                 field: {
>                   api_name: string,
>                   id: string
>                 },
>                 type: composite,
>                 value: {
>                 }
>               }
>             )[],
>             create_deal?: boolean,
>             change_owner?: {
>               id: string,
>               name?: string,
>               related_modules?: {
>                 api_name: Events | Calls | Tasks | Contacts | Deals,
>                 id?: string
>               }[],
>               apply_assignment_threshold?: boolean
>             },
>             contact_role?: string,
>             convert_to?: {
>               api_name: string,
>               id: string
>             },
>             portal_user_type?: {
>               id: string,
>               name: string
>             },
>             apply_restriction?: boolean | null,
>             id?: string
>           },
>           related_details?: {
>             best_time?: boolean
>           } | {
>             followup_details?: {
>               condition?: string,
>               unit?: number | string,
>               period?: string
>             }
>           } | {
>             lookup_field?: {
>               api_name: string,
>               id: string
>             }
>           } | null,
>           id?: string,
>           _delete?: null
>         } | {
>           name: string,
>           type: slack_notifications | cliq_notifications | cisco_notifications | google_chat_notifications | microsoft_teams_notifications,
>           details: {
>             message: string,
>             notify_to: {
>               type: user | channel | fields,
>               id?: string,
>               name?: string,
>               module?: {
>                 id?: string,
>                 api_name?: string
>               },
>               notify_fields?: {
>                 fields?: {
>                   id?: string,
>                   api_name?: string
>                 }[],
>                 static_fields?: {
>                   id?: string,
>                   api_name?: string
>                 }[]
>               }
>             },
>             id?: string
>           },
>           id?: string,
>           _delete?: null
>         } | {
>           name: string,
>           type: circuits,
>           details: {
>             circuit_id: string,
>             id?: string
>           },
>           id?: string,
>           _delete?: null
>         } | {
>           name: string,
>           type: flow,
>           details: {
>             custom_action_id: string,
>             custom_action_name: string,
>             id?: string
>           },
>           id?: string,
>           _delete?: null
>         } | {
>           name?: string,
>           type: comment_to_post | reply_to_comment | like_to_comment | reply_to_message | retweet | reply_to_tweet,
>           details?: {
>             content?: string,
>             id?: string
>           },
>           id?: string,
>           _delete?: null
>         } | {
>           name?: string,
>           type: create_record_email,
>           details: {
>             module: {
>               api_name: Leads | Contacts
>             },
>             field_mappings: {
>               field: {
>                 api_name?: string,
>                 id?: string
>               },
>               value: {
>                 type: user | role | group | country,
>                 resource?: {
>                   id?: string
>                 }
>               }
>             }[],
>             id?: string
>           },
>           id?: string,
>           _delete?: null
>         } | {
>           id: string,
>           name?: string,
>           type: email_notifications,
>           details?: {
>             module?: {
>               api_name: string,
>               id: string
>             }
>           },
>           related_details?: {
>             best_time?: boolean
>           } | null,
>           _delete?: null
>         } | {
>           id: string,
>           name?: string,
>           type: field_updates,
>           details?: {
>             module?: {
>               api_name: string,
>               id: string
>             }
>           },
>           related_details?: {
>             lookup_field?: {
>               api_name: string,
>               id: string
>             }
>           } | null,
>           _delete?: null
>         } | {
>           id: string,
>           name?: string,
>           type: tasks,
>           details?: {
>             module?: {
>               api_name: string,
>               id: string
>             }
>           },
>           related_details?: {
>             followup_details?: {
>               condition?: string,
>               unit?: number | string,
>               period?: string
>             }
>           } | null,
>           _delete?: null
>         } | {
>           id: string,
>           name?: string,
>           type: webhooks | functions | sms | whatsapp,
>           details?: {
>             module?: {
>               api_name: string,
>               id: string
>             }
>           },
>           _delete?: null
>         }
>       )[]
>     },
>     scheduled_actions?: (
>       {
>         execute_after?: {
>           period: minutes | hours | days | weeks | months | years | business_hours | business_days,
>           unit: number | string
>         },
>         actions: (
>           {
>             name?: string,
>             type: assign_owner,
>             details: {
>               module: {
>                 api_name?: string,
>                 id?: string
>               },
>               assign_to: (
>                 {
>                   type: user | role | group | assignment_rule | profile,
>                   resource: {
>                     id: string,
>                     name?: string,
>                     type?: user | role | group | assignment_rule | profile
>                   },
>                   allow_agent_user?: boolean,
>                   associated_to?: string | null,
>                   details?: null
>                 } | {
>                   type: merge_field,
>                   details: {
>                     api_name: string
>                   },
>                   resource?: null,
>                   allow_agent_user?: boolean
>                 } | {
>                   type: criteria,
>                   details: {
>                     criteria: {
>                       field: {
>                         id?: string,
>                         api_name: string
>                       },
>                       comparator: string,
>                       value: (string | number | {
>                         id: string & any,
>                         name?: string
>                       } | {
>                         name: string
>                       } | {
>                         id: string,
>                         name?: string
>                       })[] | string | number | boolean | {
>                         id: string & any,
>                         name?: string
>                       } | {
>                         name: string
>                       } | {
>                         id: string,
>                         name?: string
>                       } | ${
>                         EMPTY
>                       } | ${
>                         NOTEMPTY
>                       } | ${
>                         TODAY
>                       } | ${
>                         TOMORROW
>                       } | ${
>                         TOMORROWPLUS
>                       } | ${
>                         YESTERDAY
>                       } | ${
>                         YESTERDAYMINUS
>                       } | ${
>                         LASTMONTH
>                       } | ${
>                         THISMONTH
>                       } | ${
>                         NEXTMONTH
>                       } | ${
>                         LASTWEEK
>                       } | ${
>                         THISWEEK
>                       } | ${
>                         NEXTWEEK
>                       } | ${
>                         THISYEAR
>                       } | ${
>                         THISFY
>                       } | ${
>                         THISFQ
>                       } | ${
>                         LASTYEAR
>                       } | ${
>                         PREVFY
>                       } | ${
>                         PREVFQ
>                       } | ${
>                         NEXTYEAR
>                       } | ${
>                         NEXTFY
>                       } | ${
>                         NEXTFQ
>                       } | ${
>                         EMPTY
>                       } | ${
>                         NOTEMPTY
>                       } | string | string,
>                       type?: merge_field | pre_defined | value | field
>                     } | {
>                       field: {
>                         id?: string,
>                         api_name: string
>                       },
>                       comparator: string,
>                       value: (string | number | {
>                         id: string & any,
>                         name?: string
>                       } | {
>                         name: string
>                       } | {
>                         id: string,
>                         name?: string
>                       })[] | string | number | boolean | {
>                         id: string & any,
>                         name?: string
>                       } | {
>                         name: string
>                       } | {
>                         id: string,
>                         name?: string
>                       } | string,
>                       type?: merge_field | pre_defined | value | field
>                     } | {
>                       field: {
>                         id?: string,
>                         api_name: string
>                       },
>                       comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>                       value: string[] | string,
>                       type?: merge_field | pre_defined | value | field
>                     } | {
>                       field: {
>                         id?: string,
>                         api_name: string
>                       },
>                       comparator: less_than | less_equal | greater_than | greater_equal,
>                       value: string | number | string,
>                       type?: merge_field | pre_defined | value | field
>                     } | {
>                       field: {
>                         id?: string,
>                         api_name: string
>                       },
>                       comparator: between | not_between,
>                       value: (string | number)[],
>                       type?: merge_field | pre_defined | value | field
>                     } | {
>                       field: {
>                         id?: string,
>                         api_name: string
>                       },
>                       comparator: in | not_in,
>                       value: (string | number)[],
>                       type?: merge_field | pre_defined | value | field
>                     } | {
>                       field: {
>                         id?: string,
>                         api_name: string
>                       },
>                       comparator: include_all | include_any | exclude_all | exclude_any,
>                       value: {
>                         id: string & any,
>                         name?: string
>                       }[],
>                       type?: merge_field | pre_defined | value | field
>                     } | {
>                       group: (
>                         {
>                           field: {
>                             id?: string,
>                             api_name: string
>                           },
>                           comparator: string,
>                           value: (string | number | {
>                             id: string & any,
>                             name?: string
>                           } | {
>                             name: string
>                           } | {
>                             id: string,
>                             name?: string
>                           })[] | string | number | boolean | {
>                             id: string & any,
>                             name?: string
>                           } | {
>                             name: string
>                           } | {
>                             id: string,
>                             name?: string
>                           } | ${
>                             EMPTY
>                           } | ${
>                             NOTEMPTY
>                           } | ${
>                             TODAY
>                           } | ${
>                             TOMORROW
>                           } | ${
>                             TOMORROWPLUS
>                           } | ${
>                             YESTERDAY
>                           } | ${
>                             YESTERDAYMINUS
>                           } | ${
>                             LASTMONTH
>                           } | ${
>                             THISMONTH
>                           } | ${
>                             NEXTMONTH
>                           } | ${
>                             LASTWEEK
>                           } | ${
>                             THISWEEK
>                           } | ${
>                             NEXTWEEK
>                           } | ${
>                             THISYEAR
>                           } | ${
>                             THISFY
>                           } | ${
>                             THISFQ
>                           } | ${
>                             LASTYEAR
>                           } | ${
>                             PREVFY
>                           } | ${
>                             PREVFQ
>                           } | ${
>                             NEXTYEAR
>                           } | ${
>                             NEXTFY
>                           } | ${
>                             NEXTFQ
>                           } | ${
>                             EMPTY
>                           } | ${
>                             NOTEMPTY
>                           } | string | string,
>                           type?: merge_field | pre_defined | value | field
>                         } | {
>                           field: {
>                             id?: string,
>                             api_name: string
>                           },
>                           comparator: string,
>                           value: (string | number | {
>                             id: string & any,
>                             name?: string
>                           } | {
>                             name: string
>                           } | {
>                             id: string,
>                             name?: string
>                           })[] | string | number | boolean | {
>                             id: string & any,
>                             name?: string
>                           } | {
>                             name: string
>                           } | {
>                             id: string,
>                             name?: string
>                           } | string,
>                           type?: merge_field | pre_defined | value | field
>                         } | {
>                           field: {
>                             id?: string,
>                             api_name: string
>                           },
>                           comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>                           value: string[] | string,
>                           type?: merge_field | pre_defined | value | field
>                         } | {
>                           field: {
>                             id?: string,
>                             api_name: string
>                           },
>                           comparator: less_than | less_equal | greater_than | greater_equal,
>                           value: string | number | string,
>                           type?: merge_field | pre_defined | value | field
>                         } | {
>                           field: {
>                             id?: string,
>                             api_name: string
>                           },
>                           comparator: between | not_between,
>                           value: (string | number)[],
>                           type?: merge_field | pre_defined | value | field
>                         } | {
>                           field: {
>                             id?: string,
>                             api_name: string
>                           },
>                           comparator: in | not_in,
>                           value: (string | number)[],
>                           type?: merge_field | pre_defined | value | field
>                         } | {
>                           field: {
>                             id?: string,
>                             api_name: string
>                           },
>                           comparator: include_all | include_any | exclude_all | exclude_any,
>                           value: {
>                             id: string & any,
>                             name?: string
>                           }[],
>                           type?: merge_field | pre_defined | value | field
>                         } | {
>                           group: (
>                             {
>                               field: {
>                                 id?: string,
>                                 api_name: string
>                               },
>                               comparator: string,
>                               value: (string | number | {
>                                 id: string & any,
>                                 name?: string
>                               } | {
>                                 name: string
>                               } | {
>                                 id: string,
>                                 name?: string
>                               })[] | string | number | boolean | {
>                                 id: string & any,
>                                 name?: string
>                               } | {
>                                 name: string
>                               } | {
>                                 id: string,
>                                 name?: string
>                               } | ${
>                                 EMPTY
>                               } | ${
>                                 NOTEMPTY
>                               } | ${
>                                 TODAY
>                               } | ${
>                                 TOMORROW
>                               } | ${
>                                 TOMORROWPLUS
>                               } | ${
>                                 YESTERDAY
>                               } | ${
>                                 YESTERDAYMINUS
>                               } | ${
>                                 LASTMONTH
>                               } | ${
>                                 THISMONTH
>                               } | ${
>                                 NEXTMONTH
>                               } | ${
>                                 LASTWEEK
>                               } | ${
>                                 THISWEEK
>                               } | ${
>                                 NEXTWEEK
>                               } | ${
>                                 THISYEAR
>                               } | ${
>                                 THISFY
>                               } | ${
>                                 THISFQ
>                               } | ${
>                                 LASTYEAR
>                               } | ${
>                                 PREVFY
>                               } | ${
>                                 PREVFQ
>                               } | ${
>                                 NEXTYEAR
>                               } | ${
>                                 NEXTFY
>                               } | ${
>                                 NEXTFQ
>                               } | ${
>                                 EMPTY
>                               } | ${
>                                 NOTEMPTY
>                               } | string | string,
>                               type?: merge_field | pre_defined | value | field
>                             } | {
>                               field: {
>                                 id?: string,
>                                 api_name: string
>                               },
>                               comparator: string,
>                               value: (string | number | {
>                                 id: string & any,
>                                 name?: string
>                               } | {
>                                 name: string
>                               } | {
>                                 id: string,
>                                 name?: string
>                               })[] | string | number | boolean | {
>                                 id: string & any,
>                                 name?: string
>                               } | {
>                                 name: string
>                               } | {
>                                 id: string,
>                                 name?: string
>                               } | string,
>                               type?: merge_field | pre_defined | value | field
>                             } | {
>                               field: {
>                                 id?: string,
>                                 api_name: string
>                               },
>                               comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>                               value: string[] | string,
>                               type?: merge_field | pre_defined | value | field
>                             } | {
>                               field: {
>                                 id?: string,
>                                 api_name: string
>                               },
>                               comparator: less_than | less_equal | greater_than | greater_equal,
>                               value: string | number | string,
>                               type?: merge_field | pre_defined | value | field
>                             } | {
>                               field: {
>                                 id?: string,
>                                 api_name: string
>                               },
>                               comparator: between | not_between,
>                               value: (string | number)[],
>                               type?: merge_field | pre_defined | value | field
>                             } | {
>                               field: {
>                                 id?: string,
>                                 api_name: string
>                               },
>                               comparator: in | not_in,
>                               value: (string | number)[],
>                               type?: merge_field | pre_defined | value | field
>                             } | {
>                               field: {
>                                 id?: string,
>                                 api_name: string
>                               },
>                               comparator: include_all | include_any | exclude_all | exclude_any,
>                               value: {
>                                 id: string & any,
>                                 name?: string
>                               }[],
>                               type?: merge_field | pre_defined | value | field
>                             } | (recursive)
>                           )[],
>                           group_operator: AND | OR | and | or
>                         }
>                       )[],
>                       group_operator: AND | OR | and | or
>                     }
>                   },
>                   resource?: null,
>                   allow_agent_user?: boolean
>                 }
>               )[],
>               related_records?: {
>                 api_name: Events | Calls | Tasks | Contacts | Deals,
>                 id?: string
>               }[] | null,
>               notify?: boolean,
>               apply_assignment_threshold?: boolean,
>               user_availability_based_on?: string[] | null,
>               lookup_field?: {
>                 api_name?: string,
>                 id?: string
>               },
>               id?: string
>             },
>             related_details?: {
>               best_time?: boolean
>             } | {
>               followup_details?: {
>                 condition?: string,
>                 unit?: number | string,
>                 period?: string
>               }
>             } | {
>               lookup_field?: {
>                 api_name: string,
>                 id: string
>               }
>             } | null,
>             id?: string,
>             _delete?: null
>           } | {
>             name?: string,
>             type: create_record,
>             details: {
>               module: {
>                 api_name?: string,
>                 id?: string
>               },
>               layout: {
>                 id: string,
>                 name?: string | null,
>                 display_label?: string
>               },
>               field_mappings: (
>                 {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: static,
>                   value: string | string[] | {
>                     id: string,
>                     name?: string
>                   }
>                 } | {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: merge_field,
>                   value: string,
>                   allow_agent_user?: boolean
>                 } | {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: execution_time,
>                   value: {
>                     period: days | business_days | hours | minutes,
>                     unit: string,
>                     sign?: plus | minus,
>                     trigger_field: string,
>                     time?: string,
>                     notify_type?: popup | email | emailandpopup
>                   }
>                 } | {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: composite,
>                   value: {
>                   }
>                 }
>               )[],
>               apply_restriction?: boolean | null,
>               id?: string
>             },
>             related_details?: {
>               best_time?: boolean
>             } | {
>               followup_details?: {
>                 condition?: string,
>                 unit?: number | string,
>                 period?: string
>               }
>             } | {
>               lookup_field?: {
>                 api_name: string,
>                 id: string
>               }
>             } | null,
>             id?: string,
>             _delete?: null
>           } | {
>             name?: string,
>             type: create_connected_record,
>             details: {
>               module: {
>                 api_name: string,
>                 id?: string
>               },
>               layout: {
>                 id: string,
>                 name?: string | null,
>                 display_label?: string
>               },
>               field_mappings: (
>                 {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: static,
>                   value: string | string[] | {
>                     id: string,
>                     name?: string
>                   }
>                 } | {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: merge_field,
>                   value: string,
>                   allow_agent_user?: boolean
>                 } | {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: execution_time,
>                   value: {
>                     period: days | business_days | hours | minutes,
>                     unit: string,
>                     sign?: plus | minus,
>                     trigger_field: string,
>                     time?: string,
>                     notify_type?: popup | email | emailandpopup
>                   }
>                 } | {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: composite,
>                   value: {
>                   }
>                 }
>               )[],
>               apply_restriction?: boolean,
>               id?: string
>             },
>             related_details?: {
>               best_time?: boolean
>             } | {
>               followup_details?: {
>                 condition?: string,
>                 unit?: number | string,
>                 period?: string
>               }
>             } | {
>               lookup_field?: {
>                 api_name: string,
>                 id: string
>               }
>             } | null,
>             id?: string,
>             _delete?: null
>           } | {
>             name?: string,
>             type: add_meeting,
>             details: {
>               module: {
>                 api_name?: string,
>                 id?: string
>               },
>               layout: {
>                 id: string,
>                 name?: string | null,
>                 display_label?: string
>               },
>               field_mappings: (
>                 {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: static,
>                   value: string | string[] | {
>                     id: string,
>                     name?: string
>                   }
>                 } | {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: merge_field,
>                   value: string,
>                   allow_agent_user?: boolean
>                 } | {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: execution_time,
>                   value: {
>                     period: days | business_days | hours | minutes,
>                     unit: string,
>                     sign?: plus | minus,
>                     trigger_field: string,
>                     time?: string,
>                     notify_type?: popup | email | emailandpopup
>                   }
>                 } | {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: composite,
>                   value: {
>                   }
>                 }
>               )[],
>               meeting_duration: {
>                 unit: number | string,
>                 period: hours | minutes
>               },
>               host_unavailable?: {
>                 assign_record_owner_as_host?: boolean,
>                 assign_task?: {
>                   name?: string,
>                   id: string
>                 } | null
>               },
>               apply_restriction?: boolean | null,
>               id?: string
>             },
>             related_details?: {
>               best_time?: boolean
>             } | {
>               followup_details?: {
>                 condition?: string,
>                 unit?: number | string,
>                 period?: string
>               }
>             } | {
>               lookup_field?: {
>                 api_name: string,
>                 id: string
>               }
>             } | null,
>             id?: string,
>             _delete?: null
>           } | {
>             name?: string,
>             type: schedule_call,
>             details: {
>               module: {
>                 api_name?: string,
>                 id?: string
>               },
>               layout: {
>                 id: string,
>                 name?: string | null,
>                 display_label?: string
>               },
>               field_mappings: (
>                 {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: static,
>                   value: string | string[] | {
>                     id: string,
>                     name?: string
>                   }
>                 } | {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: merge_field,
>                   value: string,
>                   allow_agent_user?: boolean
>                 } | {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: execution_time,
>                   value: {
>                     period: days | business_days | hours | minutes,
>                     unit: string,
>                     sign?: plus | minus,
>                     trigger_field: string,
>                     time?: string,
>                     notify_type?: popup | email | emailandpopup
>                   }
>                 } | {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: composite,
>                   value: {
>                   }
>                 }
>               )[],
>               apply_restriction?: boolean | null,
>               id?: string
>             },
>             related_details?: {
>               best_time?: boolean
>             } | {
>               followup_details?: {
>                 condition?: string,
>                 unit?: number | string,
>                 period?: string
>               }
>             } | {
>               lookup_field?: {
>                 api_name: string,
>                 id: string
>               }
>             } | null,
>             id?: string,
>             _delete?: null
>           } | {
>             name?: string,
>             type: add_tags,
>             details: {
>               over_write?: boolean,
>               tags: {
>                 id: string,
>                 name: string,
>                 color_code?: string
>               }[],
>               module?: {
>                 api_name?: string,
>                 id?: string
>               },
>               id?: string
>             },
>             related_details?: {
>               best_time?: boolean
>             } | {
>               followup_details?: {
>                 condition?: string,
>                 unit?: number | string,
>                 period?: string
>               }
>             } | {
>               lookup_field?: {
>                 api_name: string,
>                 id: string
>               }
>             } | null,
>             id?: string,
>             _delete?: null
>           } | {
>             name?: string,
>             type: remove_tags,
>             details: {
>               tags: {
>                 id: string,
>                 name: string,
>                 color_code?: string
>               }[],
>               module?: {
>                 api_name?: string,
>                 id?: string
>               },
>               over_write?: boolean,
>               id?: string
>             },
>             related_details?: {
>               best_time?: boolean
>             } | {
>               followup_details?: {
>                 condition?: string,
>                 unit?: number | string,
>                 period?: string
>               }
>             } | {
>               lookup_field?: {
>                 api_name: string,
>                 id: string
>               }
>             } | null,
>             id?: string,
>             _delete?: null
>           } | {
>             name?: string,
>             type: convert,
>             details: {
>               add_to_existing_contact?: boolean,
>               add_to_existing_account?: boolean,
>               move_attachment_to?: {
>                 api_name?: string,
>                 id?: string
>               },
>               carry_tags?: {
>                 api_name?: string,
>                 id?: string
>               }[],
>               field_mappings?: (
>                 {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: static,
>                   value: string | string[] | {
>                     id: string,
>                     name?: string
>                   }
>                 } | {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: merge_field,
>                   value: string,
>                   allow_agent_user?: boolean
>                 } | {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: execution_time,
>                   value: {
>                     period: days | business_days | hours | minutes,
>                     unit: string,
>                     sign?: plus | minus,
>                     trigger_field: string,
>                     time?: string,
>                     notify_type?: popup | email | emailandpopup
>                   }
>                 } | {
>                   display_value?: string,
>                   field: {
>                     api_name: string,
>                     id: string
>                   },
>                   type: composite,
>                   value: {
>                   }
>                 }
>               )[],
>               create_deal?: boolean,
>               change_owner?: {
>                 id: string,
>                 name?: string,
>                 related_modules?: {
>                   api_name: Events | Calls | Tasks | Contacts | Deals,
>                   id?: string
>                 }[],
>                 apply_assignment_threshold?: boolean
>               },
>               contact_role?: string,
>               convert_to?: {
>                 api_name: string,
>                 id: string
>               },
>               portal_user_type?: {
>                 id: string,
>                 name: string
>               },
>               apply_restriction?: boolean | null,
>               id?: string
>             },
>             related_details?: {
>               best_time?: boolean
>             } | {
>               followup_details?: {
>                 condition?: string,
>                 unit?: number | string,
>                 period?: string
>               }
>             } | {
>               lookup_field?: {
>                 api_name: string,
>                 id: string
>               }
>             } | null,
>             id?: string,
>             _delete?: null
>           } | {
>             name: string,
>             type: slack_notifications | cliq_notifications | cisco_notifications | google_chat_notifications | microsoft_teams_notifications,
>             details: {
>               message: string,
>               notify_to: {
>                 type: user | channel | fields,
>                 id?: string,
>                 name?: string,
>                 module?: {
>                   id?: string,
>                   api_name?: string
>                 },
>                 notify_fields?: {
>                   fields?: {
>                     id?: string,
>                     api_name?: string
>                   }[],
>                   static_fields?: {
>                     id?: string,
>                     api_name?: string
>                   }[]
>                 }
>               },
>               id?: string
>             },
>             id?: string,
>             _delete?: null
>           } | {
>             name: string,
>             type: circuits,
>             details: {
>               circuit_id: string,
>               id?: string
>             },
>             id?: string,
>             _delete?: null
>           } | {
>             name: string,
>             type: flow,
>             details: {
>               custom_action_id: string,
>               custom_action_name: string,
>               id?: string
>             },
>             id?: string,
>             _delete?: null
>           } | {
>             name?: string,
>             type: comment_to_post | reply_to_comment | like_to_comment | reply_to_message | retweet | reply_to_tweet,
>             details?: {
>               content?: string,
>               id?: string
>             },
>             id?: string,
>             _delete?: null
>           } | {
>             name?: string,
>             type: create_record_email,
>             details: {
>               module: {
>                 api_name: Leads | Contacts
>               },
>               field_mappings: {
>                 field: {
>                   api_name?: string,
>                   id?: string
>                 },
>                 value: {
>                   type: user | role | group | country,
>                   resource?: {
>                     id?: string
>                   }
>                 }
>               }[],
>               id?: string
>             },
>             id?: string,
>             _delete?: null
>           } | {
>             id: string,
>             name?: string,
>             type: email_notifications,
>             details?: {
>               module?: {
>                 api_name: string,
>                 id: string
>               }
>             },
>             related_details?: {
>               best_time?: boolean
>             } | null,
>             _delete?: null
>           } | {
>             id: string,
>             name?: string,
>             type: field_updates,
>             details?: {
>               module?: {
>                 api_name: string,
>                 id: string
>               }
>             },
>             related_details?: {
>               lookup_field?: {
>                 api_name: string,
>                 id: string
>               }
>             } | null,
>             _delete?: null
>           } | {
>             id: string,
>             name?: string,
>             type: tasks,
>             details?: {
>               module?: {
>                 api_name: string,
>                 id: string
>               }
>             },
>             related_details?: {
>               followup_details?: {
>                 condition?: string,
>                 unit?: number | string,
>                 period?: string
>               }
>             } | null,
>             _delete?: null
>           } | {
>             id: string,
>             name?: string,
>             type: webhooks | functions | sms | whatsapp,
>             details?: {
>               module?: {
>                 api_name: string,
>                 id: string
>               }
>             },
>             _delete?: null
>           }
>         )[],
>         id?: string
>       } | null
>     )[] | null,
>     criteria_details?: {
>       criteria?: {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: string,
>         value: (string | number | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         })[] | string | number | boolean | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         } | ${
>           EMPTY
>         } | ${
>           NOTEMPTY
>         } | ${
>           TODAY
>         } | ${
>           TOMORROW
>         } | ${
>           TOMORROWPLUS
>         } | ${
>           YESTERDAY
>         } | ${
>           YESTERDAYMINUS
>         } | ${
>           LASTMONTH
>         } | ${
>           THISMONTH
>         } | ${
>           NEXTMONTH
>         } | ${
>           LASTWEEK
>         } | ${
>           THISWEEK
>         } | ${
>           NEXTWEEK
>         } | ${
>           THISYEAR
>         } | ${
>           THISFY
>         } | ${
>           THISFQ
>         } | ${
>           LASTYEAR
>         } | ${
>           PREVFY
>         } | ${
>           PREVFQ
>         } | ${
>           NEXTYEAR
>         } | ${
>           NEXTFY
>         } | ${
>           NEXTFQ
>         } | ${
>           EMPTY
>         } | ${
>           NOTEMPTY
>         } | string | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: string,
>         value: (string | number | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         })[] | string | number | boolean | {
>           id: string & any,
>           name?: string
>         } | {
>           name: string
>         } | {
>           id: string,
>           name?: string
>         } | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>         value: string[] | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: less_than | less_equal | greater_than | greater_equal,
>         value: string | number | string,
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: between | not_between,
>         value: (string | number)[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: in | not_in,
>         value: (string | number)[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         field: {
>           id?: string,
>           api_name: string
>         },
>         comparator: include_all | include_any | exclude_all | exclude_any,
>         value: {
>           id: string & any,
>           name?: string
>         }[],
>         type?: merge_field | pre_defined | value | field
>       } | {
>         group: (
>           {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: string,
>             value: (string | number | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             })[] | string | number | boolean | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             } | ${
>               EMPTY
>             } | ${
>               NOTEMPTY
>             } | ${
>               TODAY
>             } | ${
>               TOMORROW
>             } | ${
>               TOMORROWPLUS
>             } | ${
>               YESTERDAY
>             } | ${
>               YESTERDAYMINUS
>             } | ${
>               LASTMONTH
>             } | ${
>               THISMONTH
>             } | ${
>               NEXTMONTH
>             } | ${
>               LASTWEEK
>             } | ${
>               THISWEEK
>             } | ${
>               NEXTWEEK
>             } | ${
>               THISYEAR
>             } | ${
>               THISFY
>             } | ${
>               THISFQ
>             } | ${
>               LASTYEAR
>             } | ${
>               PREVFY
>             } | ${
>               PREVFQ
>             } | ${
>               NEXTYEAR
>             } | ${
>               NEXTFY
>             } | ${
>               NEXTFQ
>             } | ${
>               EMPTY
>             } | ${
>               NOTEMPTY
>             } | string | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: string,
>             value: (string | number | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             })[] | string | number | boolean | {
>               id: string & any,
>               name?: string
>             } | {
>               name: string
>             } | {
>               id: string,
>               name?: string
>             } | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>             value: string[] | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: less_than | less_equal | greater_than | greater_equal,
>             value: string | number | string,
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: between | not_between,
>             value: (string | number)[],
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: in | not_in,
>             value: (string | number)[],
>             type?: merge_field | pre_defined | value | field
>           } | {
>             field: {
>               id?: string,
>               api_name: string
>             },
>             comparator: include_all | include_any | exclude_all | exclude_any,
>             value: {
>               id: string & any,
>               name?: string
>             }[],
>             type?: merge_field | pre_defined | value | field
>           } | {
>             group: (
>               {
>                 field: {
>                   id?: string,
>                   api_name: string
>                 },
>                 comparator: string,
>                 value: (string | number | {
>                   id: string & any,
>                   name?: string
>                 } | {
>                   name: string
>                 } | {
>                   id: string,
>                   name?: string
>                 })[] | string | number | boolean | {
>                   id: string & any,
>                   name?: string
>                 } | {
>                   name: string
>                 } | {
>                   id: string,
>                   name?: string
>                 } | ${
>                   EMPTY
>                 } | ${
>                   NOTEMPTY
>                 } | ${
>                   TODAY
>                 } | ${
>                   TOMORROW
>                 } | ${
>                   TOMORROWPLUS
>                 } | ${
>                   YESTERDAY
>                 } | ${
>                   YESTERDAYMINUS
>                 } | ${
>                   LASTMONTH
>                 } | ${
>                   THISMONTH
>                 } | ${
>                   NEXTMONTH
>                 } | ${
>                   LASTWEEK
>                 } | ${
>                   THISWEEK
>                 } | ${
>                   NEXTWEEK
>                 } | ${
>                   THISYEAR
>                 } | ${
>                   THISFY
>                 } | ${
>                   THISFQ
>                 } | ${
>                   LASTYEAR
>                 } | ${
>                   PREVFY
>                 } | ${
>                   PREVFQ
>                 } | ${
>                   NEXTYEAR
>                 } | ${
>                   NEXTFY
>                 } | ${
>                   NEXTFQ
>                 } | ${
>                   EMPTY
>                 } | ${
>                   NOTEMPTY
>                 } | string | string,
>                 type?: merge_field | pre_defined | value | field
>               } | {
>                 field: {
>                   id?: string,
>                   api_name: string
>                 },
>                 comparator: string,
>                 value: (string | number | {
>                   id: string & any,
>                   name?: string
>                 } | {
>                   name: string
>                 } | {
>                   id: string,
>                   name?: string
>                 })[] | string | number | boolean | {
>                   id: string & any,
>                   name?: string
>                 } | {
>                   name: string
>                 } | {
>                   id: string,
>                   name?: string
>                 } | string,
>                 type?: merge_field | pre_defined | value | field
>               } | {
>                 field: {
>                   id?: string,
>                   api_name: string
>                 },
>                 comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>                 value: string[] | string,
>                 type?: merge_field | pre_defined | value | field
>               } | {
>                 field: {
>                   id?: string,
>                   api_name: string
>                 },
>                 comparator: less_than | less_equal | greater_than | greater_equal,
>                 value: string | number | string,
>                 type?: merge_field | pre_defined | value | field
>               } | {
>                 field: {
>                   id?: string,
>                   api_name: string
>                 },
>                 comparator: between | not_between,
>                 value: (string | number)[],
>                 type?: merge_field | pre_defined | value | field
>               } | {
>                 field: {
>                   id?: string,
>                   api_name: string
>                 },
>                 comparator: in | not_in,
>                 value: (string | number)[],
>                 type?: merge_field | pre_defined | value | field
>               } | {
>                 field: {
>                   id?: string,
>                   api_name: string
>                 },
>                 comparator: include_all | include_any | exclude_all | exclude_any,
>                 value: {
>                   id: string & any,
>                   name?: string
>                 }[],
>                 type?: merge_field | pre_defined | value | field
>               } | (recursive)
>             )[],
>             group_operator: AND | OR | and | or
>           }
>         )[],
>         group_operator: AND | OR | and | or
>       } | null,
>       relational_criteria?: {
>         criteria?: {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: string,
>           value: (string | number | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           })[] | string | number | boolean | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           } | ${
>             EMPTY
>           } | ${
>             NOTEMPTY
>           } | ${
>             TODAY
>           } | ${
>             TOMORROW
>           } | ${
>             TOMORROWPLUS
>           } | ${
>             YESTERDAY
>           } | ${
>             YESTERDAYMINUS
>           } | ${
>             LASTMONTH
>           } | ${
>             THISMONTH
>           } | ${
>             NEXTMONTH
>           } | ${
>             LASTWEEK
>           } | ${
>             THISWEEK
>           } | ${
>             NEXTWEEK
>           } | ${
>             THISYEAR
>           } | ${
>             THISFY
>           } | ${
>             THISFQ
>           } | ${
>             LASTYEAR
>           } | ${
>             PREVFY
>           } | ${
>             PREVFQ
>           } | ${
>             NEXTYEAR
>           } | ${
>             NEXTFY
>           } | ${
>             NEXTFQ
>           } | ${
>             EMPTY
>           } | ${
>             NOTEMPTY
>           } | string | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: string,
>           value: (string | number | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           })[] | string | number | boolean | {
>             id: string & any,
>             name?: string
>           } | {
>             name: string
>           } | {
>             id: string,
>             name?: string
>           } | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>           value: string[] | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: less_than | less_equal | greater_than | greater_equal,
>           value: string | number | string,
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: between | not_between,
>           value: (string | number)[],
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: in | not_in,
>           value: (string | number)[],
>           type?: merge_field | pre_defined | value | field
>         } | {
>           field: {
>             id?: string,
>             api_name: string
>           },
>           comparator: include_all | include_any | exclude_all | exclude_any,
>           value: {
>             id: string & any,
>             name?: string
>           }[],
>           type?: merge_field | pre_defined | value | field
>         } | {
>           group: (
>             {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: string,
>               value: (string | number | {
>                 id: string & any,
>                 name?: string
>               } | {
>                 name: string
>               } | {
>                 id: string,
>                 name?: string
>               })[] | string | number | boolean | {
>                 id: string & any,
>                 name?: string
>               } | {
>                 name: string
>               } | {
>                 id: string,
>                 name?: string
>               } | ${
>                 EMPTY
>               } | ${
>                 NOTEMPTY
>               } | ${
>                 TODAY
>               } | ${
>                 TOMORROW
>               } | ${
>                 TOMORROWPLUS
>               } | ${
>                 YESTERDAY
>               } | ${
>                 YESTERDAYMINUS
>               } | ${
>                 LASTMONTH
>               } | ${
>                 THISMONTH
>               } | ${
>                 NEXTMONTH
>               } | ${
>                 LASTWEEK
>               } | ${
>                 THISWEEK
>               } | ${
>                 NEXTWEEK
>               } | ${
>                 THISYEAR
>               } | ${
>                 THISFY
>               } | ${
>                 THISFQ
>               } | ${
>                 LASTYEAR
>               } | ${
>                 PREVFY
>               } | ${
>                 PREVFQ
>               } | ${
>                 NEXTYEAR
>               } | ${
>                 NEXTFY
>               } | ${
>                 NEXTFQ
>               } | ${
>                 EMPTY
>               } | ${
>                 NOTEMPTY
>               } | string | string,
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: string,
>               value: (string | number | {
>                 id: string & any,
>                 name?: string
>               } | {
>                 name: string
>               } | {
>                 id: string,
>                 name?: string
>               })[] | string | number | boolean | {
>                 id: string & any,
>                 name?: string
>               } | {
>                 name: string
>               } | {
>                 id: string,
>                 name?: string
>               } | string,
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>               value: string[] | string,
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: less_than | less_equal | greater_than | greater_equal,
>               value: string | number | string,
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: between | not_between,
>               value: (string | number)[],
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: in | not_in,
>               value: (string | number)[],
>               type?: merge_field | pre_defined | value | field
>             } | {
>               field: {
>                 id?: string,
>                 api_name: string
>               },
>               comparator: include_all | include_any | exclude_all | exclude_any,
>               value: {
>                 id: string & any,
>                 name?: string
>               }[],
>               type?: merge_field | pre_defined | value | field
>             } | {
>               group: (
>                 {
>                   field: {
>                     id?: string,
>                     api_name: string
>                   },
>                   comparator: string,
>                   value: (string | number | {
>                     id: string & any,
>                     name?: string
>                   } | {
>                     name: string
>                   } | {
>                     id: string,
>                     name?: string
>                   })[] | string | number | boolean | {
>                     id: string & any,
>                     name?: string
>                   } | {
>                     name: string
>                   } | {
>                     id: string,
>                     name?: string
>                   } | ${
>                     EMPTY
>                   } | ${
>                     NOTEMPTY
>                   } | ${
>                     TODAY
>                   } | ${
>                     TOMORROW
>                   } | ${
>                     TOMORROWPLUS
>                   } | ${
>                     YESTERDAY
>                   } | ${
>                     YESTERDAYMINUS
>                   } | ${
>                     LASTMONTH
>                   } | ${
>                     THISMONTH
>                   } | ${
>                     NEXTMONTH
>                   } | ${
>                     LASTWEEK
>                   } | ${
>                     THISWEEK
>                   } | ${
>                     NEXTWEEK
>                   } | ${
>                     THISYEAR
>                   } | ${
>                     THISFY
>                   } | ${
>                     THISFQ
>                   } | ${
>                     LASTYEAR
>                   } | ${
>                     PREVFY
>                   } | ${
>                     PREVFQ
>                   } | ${
>                     NEXTYEAR
>                   } | ${
>                     NEXTFY
>                   } | ${
>                     NEXTFQ
>                   } | ${
>                     EMPTY
>                   } | ${
>                     NOTEMPTY
>                   } | string | string,
>                   type?: merge_field | pre_defined | value | field
>                 } | {
>                   field: {
>                     id?: string,
>                     api_name: string
>                   },
>                   comparator: string,
>                   value: (string | number | {
>                     id: string & any,
>                     name?: string
>                   } | {
>                     name: string
>                   } | {
>                     id: string,
>                     name?: string
>                   })[] | string | number | boolean | {
>                     id: string & any,
>                     name?: string
>                   } | {
>                     name: string
>                   } | {
>                     id: string,
>                     name?: string
>                   } | string,
>                   type?: merge_field | pre_defined | value | field
>                 } | {
>                   field: {
>                     id?: string,
>                     api_name: string
>                   },
>                   comparator: like | not_like | starts_with | ends_with | contains | not_contains,
>                   value: string[] | string,
>                   type?: merge_field | pre_defined | value | field
>                 } | {
>                   field: {
>                     id?: string,
>                     api_name: string
>                   },
>                   comparator: less_than | less_equal | greater_than | greater_equal,
>                   value: string | number | string,
>                   type?: merge_field | pre_defined | value | field
>                 } | {
>                   field: {
>                     id?: string,
>                     api_name: string
>                   },
>                   comparator: between | not_between,
>                   value: (string | number)[],
>                   type?: merge_field | pre_defined | value | field
>                 } | {
>                   field: {
>                     id?: string,
>                     api_name: string
>                   },
>                   comparator: in | not_in,
>                   value: (string | number)[],
>                   type?: merge_field | pre_defined | value | field
>                 } | {
>                   field: {
>                     id?: string,
>                     api_name: string
>                   },
>                   comparator: include_all | include_any | exclude_all | exclude_any,
>                   value: {
>                     id: string & any,
>                     name?: string
>                   }[],
>                   type?: merge_field | pre_defined | value | field
>                 } | (recursive)
>               )[],
>               group_operator: AND | OR | and | or
>             }
>           )[],
>           group_operator: AND | OR | and | or
>         } | null,
>         module_selection?: all | specific | unknown | null,
>         module?: {
>           api_name: string,
>           id: string
>         } | null
>       }
>     },
>     id?: string,
>     _delete?: null
>   }[],
>   lock?: {
>     message?: string,
>     status?: true | false
>   },
>   module?: {
>     api_name: string,
>     id: string
>   }
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `workflow_rules` | `object[] \| null` | No | Represents the array of workflow rule objects returned in the success response. |

> [accordion] workflow\_rules full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

## Workflow Tasks

### create

`workflowTasks.create`

Create an Automation Task. PURPOSE: Creates an automation task definition used by workflow rules, approval processes, blueprints, kiosks, scoring rules, and case escalation rules. PREREQUISITES: (1) Call GET /settings/automation/tasks to check existing task definitions and avoid duplicates.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.workflowTasks.create({
	tasks: [{
		name: 'example',
		module: { api_name: 'example' },
		field_mappings: [{
			field: { api_name: 'example', id: '4876876000000333001' },
			type: 'static',
			value: 'example',
		}],
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `tasks` | `object[]` | Yes | REQUIRED. Array containing exactly 1 automation task object. Multiple tasks per request are not supported. |

> [accordion] tasks full type
>
> ```ts theme={null}
> {
>   name: string,
>   module: {
>     api_name: string,
>     id?: string
>   },
>   notify?: boolean,
>   feature_type?: workflow | approval_process | blueprint | blueprint_transition | blueprint_state | review_process | orchestration | assignment_rules | kiosks | pathfinder | connected_workflows | commandcenter_service | cadences | scoring_rule | case_escalation_rule,
>   field_mappings: (
>     {
>       display_value?: string,
>       field: {
>         api_name: string,
>         id: string
>       },
>       type: static,
>       value: string | string[] | {
>         id: string,
>         name?: string
>       }
>     } | {
>       display_value?: string,
>       field: {
>         api_name: string,
>         id: string
>       },
>       type: merge_field,
>       value: string,
>       allow_agent_user?: boolean
>     } | {
>       display_value?: string,
>       field: {
>         api_name: string,
>         id: string
>       },
>       type: execution_time,
>       value: {
>         period: days | business_days | hours | minutes,
>         unit: string,
>         sign?: plus | minus,
>         trigger_field: string,
>         time?: string,
>         notify_type?: popup | email | emailandpopup
>       }
>     } | {
>       display_value?: string,
>       field: {
>         api_name: string,
>         id: string
>       },
>       type: composite,
>       value: {
>       }
>     }
>   )[],
>   id?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tasks` | `object[] \| null` | No | Array containing the created task result. |

> [accordion] tasks full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     resource_path_index?: string | null,
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### delete

`workflowTasks.delete`

Automation Task. PURPOSE: Deletes a single automation task definition by its ID. MANDATORY: id path parameter (string - automation task definition ID, not a Task record ID). KEY CONSTRAINTS: Tasks associated with active workflow rules, approval processes, or blueprints cannot be deleted (returns NOT\_ALLOWED). Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.workflowTasks.delete({ id: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Represents the unique ID of the task that you want to delete. Skip this parameter if you have specified the ID in the request URL. You can pass upto 10 comma-separated IDs in this parameter. Tasks associated with active workflow rules, approval processes, or blueprints cannot be deleted. Use the [Workflow Tasks API](workflow_tasks.yaml#\$.paths./settings/automation/tasks.get) to retrieve the ID. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tasks` | `object[] \| null` | No | Contains one success result object for the deleted task. |

> [accordion] tasks full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     resource_path_index?: string | null,
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### deleteMany

`workflowTasks.deleteMany`

Delete automation task definitions by IDs (bulk). PURPOSE: Deletes one or more automation task definitions by their IDs. MANDATORY: ids query parameter (comma-separated task IDs, max 10). KEY CONSTRAINTS: Tasks associated with active workflow rules, approval processes, or blueprints cannot be deleted (returns NOT\_ALLOWED error). Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.workflowTasks.deleteMany({ ids: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `ids` | `string` | Yes | Comma-separated automation task definition IDs to delete in bulk. Maximum 10 IDs per request. Each ID must be a numeric string (e.g., "111111000000200035,111111000000190030"). Tasks associated with active automation cannot be deleted - returns NOT\_ALLOWED per task. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   tasks?: {
>     code?: string | null,
>     details?: {
>       id?: string | null
>     } | null,
>     message?: string | null,
>     status?: string | null
>   }[] | null
> } | {
>   tasks?: (
>     {
>       code?: string | null,
>       details?: {
>         id?: string | null
>       } | null,
>       message?: string | null,
>       status?: string | null
>     } | {
>       code?: string | null,
>       details?: {
>         id?: string | null
>       } | null,
>       message?: string | null,
>       status?: string | null
>     }
>   )[] | null
> }
> ```

***

### get

`workflowTasks.get`

Automation Task. PURPOSE: Retrieves the full details of a specific automation task definition including field mappings, module association, lock status, and metadata. MANDATORY: id path parameter (string - automation task definition ID, not a Task record ID). Returns 204 if the task does not exist.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.workflowTasks.get({ id: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The unique ID of the automation task definition to retrieve (not a Task record ID). |
| `include_inner_details` | `related_module.module_name \| related_module.plural_label \| related_module.singular_label \| display_value \| module.module_name \| module.plural_label \| module.singular_label` | No | Include additional nested labels/display metadata in task responses. Pass exactly one value per request (not comma-separated). Use "display\_value" to include field\_mapping display labels. Use "module.module\_name" or "module.singular\_label" to include module display names. Omit this parameter if you only need the raw task configuration. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   tasks?: {
>     created_time?: string | null,
>     lock_status?: {
>       locked?: boolean | null
>     } | null,
>     editable?: boolean | null,
>     module?: {
>       singular_label?: string | null,
>       moduleName?: string | null,
>       id?: string | null,
>       plural_label?: string | null,
>       api_name?: string | null,
>       module_name?: string | null
>     } | null,
>     related_module?: {
>       singular_label?: string | null,
>       moduleName?: string | null,
>       id?: string | null,
>       plural_label?: string | null,
>       api_name?: string | null,
>       module_name?: string | null
>     } | null | null,
>     deletable?: boolean | null,
>     source?: string | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     notify?: boolean | null,
>     feature_type?: string | null,
>     field_mappings?: (
>       {
>         display_value?: string | null,
>         field?: {
>           api_name?: string | null,
>           id?: string | null
>         } | null,
>         type?: string | null,
>         value?: string | string[] | {
>           id?: string | null,
>           name?: string | null
>         } | null
>       } | {
>         display_value?: string | null,
>         field?: {
>           api_name?: string | null,
>           id?: string | null
>         } | null,
>         type?: string | null,
>         value?: string | null,
>         allow_agent_user?: boolean | null
>       } | {
>         display_value?: string | null,
>         field?: {
>           api_name?: string | null,
>           id?: string | null
>         } | null,
>         type?: string | null,
>         value?: {
>           period?: string | null,
>           unit?: string | null,
>           sign?: string | null,
>           trigger_field?: string | null,
>           time?: string | null,
>           notify_type?: string | null
>         } | null
>       } | {
>         display_value?: string | null,
>         field?: {
>           api_name?: string | null,
>           id?: string | null
>         } | null,
>         type?: string | null,
>         value?: {
>         } | null
>       }
>     )[] | null,
>     modified_time?: string | null,
>     associated?: boolean | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     name?: string | null,
>     id?: string | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### list

`workflowTasks.list`

List automation task definitions with optional filters. PURPOSE: Retrieves a paginated list of automation task definitions. Supports filtering by module, feature\_type, and name (via filter param). PAGINATION: page (default 1), per\_page (default 200, max 200). Use info.more\_records to determine if additional pages exist.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.workflowTasks.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `filter` | `string` | No | Filter object to search tasks by name. Supported shape: field.api\_name must be 'name', comparator must be 'contains', and value is the search string. Example: \{"field":\{"api\_name":"name"},"comparator":"contains","value":"follow up"} |
| `feature_type` | `workflow \| approval_process \| blueprint \| kiosks \| scoring_rule \| case_escalation_rule \| blueprint_transition \| blueprint_state \| review_process \| orchestration \| assignment_rules \| pathfinder \| connected_workflows \| commandcenter_service \| cadences` | No | Filter tasks by automation feature type. The filter accepts more values than POST does - values like `blueprint_transition`, `review_process`, and `orchestration` are system-created task types that can be retrieved but not created via POST. For POST, only `workflow`, `approval_process`, `Blueprint`, `kiosks`, `scoring_rule`, and `case_escalation_rule` are valid. |
| `module` | `string` | No | Filter tasks by CRM module API name (for example: Leads, Contacts, Deals). |
| `per_page` | `number \| string` | No | Specify how many tasks to return per page. The default and the maximum possible value is 200. |
| `page` | `number \| string` | No | To get the list of tasks from the respective pages. The default value is 1. Possible values: Positive integer values only. |
| `sort_by` | `string` | No | Sort field. Currently only modified\_time supported. |
| `sort_order` | `desc \| asc` | No | Sort order for the results based on sort\_by. Possible values: desc, asc. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   tasks?: {
>     created_time?: string | null,
>     lock_status?: {
>       locked?: boolean | null
>     } | null,
>     editable?: boolean | null,
>     module?: {
>       singular_label?: string | null,
>       moduleName?: string | null,
>       id?: string | null,
>       plural_label?: string | null,
>       api_name?: string | null,
>       module_name?: string | null
>     } | null,
>     related_module?: {
>       singular_label?: string | null,
>       moduleName?: string | null,
>       id?: string | null,
>       plural_label?: string | null,
>       api_name?: string | null,
>       module_name?: string | null
>     } | null | null,
>     deletable?: boolean | null,
>     source?: string | null,
>     created_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     notify?: boolean | null,
>     feature_type?: string | null,
>     field_mappings?: (
>       {
>         display_value?: string | null,
>         field?: {
>           api_name?: string | null,
>           id?: string | null
>         } | null,
>         type?: string | null,
>         value?: string | string[] | {
>           id?: string | null,
>           name?: string | null
>         } | null
>       } | {
>         display_value?: string | null,
>         field?: {
>           api_name?: string | null,
>           id?: string | null
>         } | null,
>         type?: string | null,
>         value?: string | null,
>         allow_agent_user?: boolean | null
>       } | {
>         display_value?: string | null,
>         field?: {
>           api_name?: string | null,
>           id?: string | null
>         } | null,
>         type?: string | null,
>         value?: {
>           period?: string | null,
>           unit?: string | null,
>           sign?: string | null,
>           trigger_field?: string | null,
>           time?: string | null,
>           notify_type?: string | null
>         } | null
>       } | {
>         display_value?: string | null,
>         field?: {
>           api_name?: string | null,
>           id?: string | null
>         } | null,
>         type?: string | null,
>         value?: {
>         } | null
>       }
>     )[] | null,
>     modified_time?: string | null,
>     associated?: boolean | null,
>     modified_by?: {
>       name?: string | null,
>       id?: string | null
>     } | null,
>     name?: string | null,
>     id?: string | null
>   }[] | null,
>   info?: {
>     per_page?: number | null,
>     count?: number | null,
>     page?: number | null,
>     more_records?: boolean | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### update

`workflowTasks.update`

Automation Task. PURPOSE: Updates an existing automation task definition identified by the path parameter ID. PREREQUISITES: (1) Call GET /settings/automation/tasks/\{id} to obtain the current task structure.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.workflowTasks.update({
	id: '4876876000000333001',
	tasks: [{
		name: 'example',
		module: { api_name: 'example' },
		field_mappings: [{
			field: { api_name: 'example', id: '4876876000000333001' },
			type: 'static',
			value: 'example',
		}],
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The unique ID of the automation task definition to update (not a Task record ID). Use the [Workflow Tasks API](workflow_tasks.yaml#\$.paths./settings/automation/tasks.get) to retrieve the ID. |
| `tasks` | `object[]` | Yes | REQUIRED. Array containing exactly 1 automation task object. Multiple tasks per request are not supported. |

> [accordion] tasks full type
>
> ```ts theme={null}
> {
>   name: string,
>   module: {
>     api_name: string,
>     id?: string
>   },
>   notify?: boolean,
>   feature_type?: workflow | approval_process | blueprint | blueprint_transition | blueprint_state | review_process | orchestration | assignment_rules | kiosks | pathfinder | connected_workflows | commandcenter_service | cadences | scoring_rule | case_escalation_rule,
>   field_mappings: (
>     {
>       display_value?: string,
>       field: {
>         api_name: string,
>         id: string
>       },
>       type: static,
>       value: string | string[] | {
>         id: string,
>         name?: string
>       }
>     } | {
>       display_value?: string,
>       field: {
>         api_name: string,
>         id: string
>       },
>       type: merge_field,
>       value: string,
>       allow_agent_user?: boolean
>     } | {
>       display_value?: string,
>       field: {
>         api_name: string,
>         id: string
>       },
>       type: execution_time,
>       value: {
>         period: days | business_days | hours | minutes,
>         unit: string,
>         sign?: plus | minus,
>         trigger_field: string,
>         time?: string,
>         notify_type?: popup | email | emailandpopup
>       }
>     } | {
>       display_value?: string,
>       field: {
>         api_name: string,
>         id: string
>       },
>       type: composite,
>       value: {
>       }
>     }
>   )[],
>   id?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tasks` | `object[] \| null` | No | Array containing exactly one result for the updated task. |

> [accordion] tasks full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     resource_path_index?: string | null,
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### updateMany

`workflowTasks.updateMany`

Update an automation task definition by ID (full replacement). PURPOSE: Updates an existing automation task definition identified by the path parameter ID. PREREQUISITES: (1) Call GET /settings/automation/tasks/\{id} to obtain the current task structure.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.workflowTasks.updateMany({
	tasks: [{
		name: 'example',
		module: { api_name: 'example' },
		field_mappings: [{
			field: { api_name: 'example', id: '4876876000000333001' },
			type: 'static',
			value: 'example',
		}],
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `tasks` | `object[]` | Yes | REQUIRED. Array containing exactly 1 automation task object. Multiple tasks per request are not supported. |

> [accordion] tasks full type
>
> ```ts theme={null}
> {
>   name: string,
>   module: {
>     api_name: string,
>     id?: string
>   },
>   notify?: boolean,
>   feature_type?: workflow | approval_process | blueprint | blueprint_transition | blueprint_state | review_process | orchestration | assignment_rules | kiosks | pathfinder | connected_workflows | commandcenter_service | cadences | scoring_rule | case_escalation_rule,
>   field_mappings: (
>     {
>       display_value?: string,
>       field: {
>         api_name: string,
>         id: string
>       },
>       type: static,
>       value: string | string[] | {
>         id: string,
>         name?: string
>       }
>     } | {
>       display_value?: string,
>       field: {
>         api_name: string,
>         id: string
>       },
>       type: merge_field,
>       value: string,
>       allow_agent_user?: boolean
>     } | {
>       display_value?: string,
>       field: {
>         api_name: string,
>         id: string
>       },
>       type: execution_time,
>       value: {
>         period: days | business_days | hours | minutes,
>         unit: string,
>         sign?: plus | minus,
>         trigger_field: string,
>         time?: string,
>         notify_type?: popup | email | emailandpopup
>       }
>     } | {
>       display_value?: string,
>       field: {
>         api_name: string,
>         id: string
>       },
>       type: composite,
>       value: {
>       }
>     }
>   )[],
>   id?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tasks` | `object[] \| null` | No | Array containing exactly one result for the updated task. |

> [accordion] tasks full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     resource_path_index?: string | null,
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

## Zia

### enrichment.create

`zia.enrichment.create`

Zia Data Enrichment Configuration. Creates Zia Enrichment Configurations for a specific module. Use the Get Fields Metadata API to get CRM field IDs and API names, and the Get Modules API to get module IDs and API names.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.zia.enrichment.create({
	data_enrichment: [{
		type: 'example',
		module: { id: '4876876000000333001', api_name: 'example' },
		input_data_field_mapping: [{
			enrich_field: { name: 'example' },
			crm_field: { id: '4876876000000333001', api_name: 'example' },
		}],
		output_data_field_mapping: [{
			enrich_field: { name: 'example' },
			crm_field: { id: '4876876000000333001', api_name: 'example' },
		}],
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `data_enrichment` | `object[]` | Yes | Array of data enrichment configurations. |

> [accordion] data\_enrichment full type
>
> ```ts theme={null}
> {
>   type: string,
>   module: {
>     id: string,
>     api_name: string
>   },
>   input_data_field_mapping: {
>     enrich_field: {
>       name: string
>     },
>     crm_field: {
>       id: string,
>       api_name: string
>     } | null
>   }[],
>   output_data_field_mapping: {
>     enrich_field: {
>       name: string
>     },
>     crm_field: {
>       id: string,
>       api_name: string
>     } | null
>   }[]
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data_enrichment` | `object[] \| null` | No | Array of creation results for each configuration. |

> [accordion] data\_enrichment full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     created_time?: string | null,
>     id?: string | null,
>     created_by?: {
>       id?: string | null,
>       name?: string | null
>     } | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### enrichment.delete

`zia.enrichment.delete`

Delete Zia Enrichment Configuration for a specific module. Deletes a Zia Enrichment Configuration for a specific module by ID. Use the Get Modules API to retrieve module ID. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.zohocrm.api.zia.enrichment.delete({ id: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Data Enrichment configuration ID |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data_enrichment` | `object[] \| null` | No | Array of deletion results for each configuration. |

> [accordion] data\_enrichment full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### enrichment.get

`zia.enrichment.get`

Get Zia Enrichment Configuration for a specific module. Retrieves a specific Zia Enrichment Configuration by ID. Use the Get Fields Metadata API to get CRM field IDs and API names, and the Get Modules API to get module IDs and API names for reference.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.zia.enrichment.get({ id: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Data Enrichment configuration ID |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data_enrichment?: {
>     id?: string | null,
>     type?: string | null,
>     module?: {
>       id?: string | null,
>       api_name?: string | null
>     } | null,
>     status?: boolean | null,
>     input_data_field_mapping?: {
>       enrich_field?: {
>         name?: string | null,
>         display_label?: string | null
>       } | null,
>       crm_field?: {
>         id?: string | null,
>         api_name?: string | null,
>         name?: string | null
>       } | null | null
>     }[] | null,
>     output_data_field_mapping?: {
>       enrich_field?: {
>         name?: string | null,
>         display_label?: string | null
>       } | null,
>       crm_field?: {
>         id?: string | null,
>         api_name?: string | null,
>         name?: string | null
>       } | null | null
>     }[] | null,
>     created_time?: string | null,
>     created_by?: {
>       id?: string | null,
>       name?: string | null
>     } | null,
>     modified_time?: string | null,
>     modified_by?: {
>       id?: string | null,
>       name?: string | null
>     } | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### enrichment.list

`zia.enrichment.list`

Data Enrichment. Use this API to get the details of configuration for data enrichment. This API gives you the mapping of the enrich fields with their corresponding CRM fields for enriching data. Use the Get Modules API to get module IDs and API names for filtering or reference.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.zia.enrichment.list({});
```

**Input:** *empty object*

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   data_enrichment?: {
>     id?: string | null,
>     type?: string | null,
>     module?: {
>       id?: string | null,
>       api_name?: string | null
>     } | null,
>     status?: boolean | null,
>     input_data_field_mapping?: {
>       enrich_field?: {
>         name?: string | null,
>         display_label?: string | null
>       } | null,
>       crm_field?: {
>         id?: string | null,
>         api_name?: string | null,
>         name?: string | null
>       } | null | null
>     }[] | null,
>     created_time?: string | null,
>     created_by?: {
>       id?: string | null,
>       name?: string | null
>     } | null,
>     modified_time?: string | null,
>     modified_by?: {
>       id?: string | null,
>       name?: string | null
>     } | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### enrichment.update

`zia.enrichment.update`

Update Zia Enrichment Configurations for a specific module. Updates Zia Enrichment Configurations for a specific module by ID. Use the Get Fields Metadata API to get CRM field IDs and API names, and the Get Modules API to get module IDs and API names.

**Risk:** `write`

```ts theme={null}
await corsair.zohocrm.api.zia.enrichment.update({
	id: '4876876000000333001',
	data_enrichment: [{
		output_data_field_mapping: [{
			enrich_field: { name: 'example' },
			crm_field: { id: '4876876000000333001', api_name: 'example' },
		}],
		input_data_field_mapping: [{
			enrich_field: { name: 'example' },
			crm_field: { id: '4876876000000333001', api_name: 'example' },
		}],
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Data Enrichment configuration ID |
| `data_enrichment` | `object[]` | Yes | Array of updated data enrichment configurations. |

> [accordion] data\_enrichment full type
>
> ```ts theme={null}
> {
>   status?: boolean,
>   output_data_field_mapping: {
>     enrich_field: {
>       name: string
>     },
>     crm_field: {
>       id: string,
>       api_name: string
>     } | null
>   }[],
>   input_data_field_mapping: {
>     enrich_field: {
>       name: string
>     },
>     crm_field: {
>       id: string,
>       api_name: string
>     } | null
>   }[]
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data_enrichment` | `object[] \| null` | No | Array of update results for each configuration. |

> [accordion] data\_enrichment full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   message?: string | null,
>   details?: {
>     id?: string | null,
>     modified_time?: string | null,
>     modified_by?: {
>       id?: string | null,
>       name?: string | null
>     } | null
>   } | null,
>   status?: string | null
> }[] | null
> ```

***

### orgEnrichment.create

`zia.orgEnrichment.create`

Trigger organization-level enrichment for a CRM record. To submit a request that schedules a Zia organization enrichment job in your Zoho CRM organization.

**Risk:** `destructive`

```ts theme={null}
await corsair.zohocrm.api.zia.orgEnrichment.create({
	module: 'Leads',
	__zia_org_enrichment: [{
		enrich_based_on: { name: 'example' },
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `module` | `string` | Yes | Specify the API name of the CRM module for which enrichment is to be triggered. Use the [Get Modules API](modules.yaml#\$.paths./settings/modules.get) to retrieve the list of valid module API names. |
| `record_id` | `string` | No | Specify the unique identifier of the record for which enrichment is to be triggered. When omitted, the job runs at the module level. Use the records API of the target module to retrieve record identifiers. |
| `__zia_org_enrichment` | `object[]` | Yes | Specify the list of enrichment requests to schedule. You can supply up to 50 entries in a single call. |

> [accordion] \_\_zia\_org\_enrichment full type
>
> ```ts theme={null}
> {
>   enrich_based_on: {
>     name: string,
>     email?: string,
>     website?: string
>   }
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `__zia_org_enrichment` | `object[] \| null` | No | Contains the list of scheduling results, one entry per submitted enrichment request. |

> [accordion] \_\_zia\_org\_enrichment full type
>
> ```ts theme={null}
> {
>   code?: string | null,
>   details?: {
>     id?: string | null
>   } | null,
>   message?: string | null,
>   status?: string | null
> }[] | null
> ```

***

### orgEnrichment.get

`zia.orgEnrichment.get`

Org Enrichment Details. Fetches the enrichment status and enriched organization data for a specific enrichment job using its unique ID. Returns completed, scheduled, or failed enrichment information along with enriched fields such as name, website, email, address, CEO, revenue, employees, social media, and industries.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.zia.orgEnrichment.get({ id: '4876876000000333001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | Specify the unique identifier of the Zia organization enrichment job to retrieve. Obtain this value from the response of POST `/__zia_org_enrichment` or from the listing returned by GET `/__zia_org_enrichment`. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   __zia_org_enrichment?: {
>     id?: string | null,
>     status?: string | null,
>     enrich_based_on?: {
>       name?: string | null,
>       email?: string | null,
>       website?: string | null
>     } | null,
>     enriched_data?: {
>     } | null | null
>   }[] | null
> } | {
>   success: true
> }
> ```

***

### orgEnrichment.list

`zia.orgEnrichment.list`

Get Zia Org Enrichment. To retrieve the paginated list of Zia organization enrichment jobs that have been scheduled in your Zoho CRM organization. Each entry includes the job identifier, current status, creation timestamp, and the user who triggered the job.

**Risk:** `read`

```ts theme={null}
await corsair.zohocrm.api.zia.orgEnrichment.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `page` | `1 \| 2` | No | Specify the page number to retrieve the list of records from the paginated results. Default value is 1. Accepts only positive integer values. |
| `per_page` | `number \| string` | No | Specify the number of records to retrieve per page. Default and maximum value is 100. |
| `sort_by` | `string` | No | Specify the field to use for sorting the response based on created time. Accepts the literal value `created_time`. |
| `sort_order` | `asc \| desc` | No | Specify the direction(ascending or descending) in which to sort the response. Possible values: **asc** - Sort results in ascending order. **desc** - Sort results in descending order. |
| `status` | `COMPLETED \| FAILED \| DATA_NOT_FOUND \| SCHEDULED` | No | Filter the response by the status of the scheduled enrichment job, using the create org enrichment API. Possible values: **COMPLETED** - Returns jobs that finished and produced enriched data. **FAILED** - Returns jobs that ended with a failure. **DATA\_NOT\_FOUND** - Returns jobs that completed but could not locate any public data to enrich. **SCHEDULED** - Returns jobs that are queued and yet to run. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   __zia_org_enrichment?: {
>     id?: string | null,
>     status?: string | null,
>     created_time?: string | null,
>     created_by?: {
>       id?: string | null,
>       name?: string | null
>     } | null
>   }[] | null,
>   info?: {
>     per_page?: number | null,
>     count?: number | null,
>     page?: number | null,
>     more_records?: boolean | null
>   } | null
> } | {
>   success: true
> }
> ```

***


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.