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

# Zoho CRM: README

> Create Territories. Zoho CRM Territories Create Territories reference includes SDK V2 and CLI requests, input constraints, response fields, and Deepline cost.

Create Territories.

<Info>
  Tool ID: `zoho_crm_territories_create_territories`
</Info>

## Run this action

Use the TypeScript SDK for a single call. Put `ctx.tools.execute(...)` inside a Play when the call should be durable, scheduled, or run across a CSV.

```ts theme={null}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'zoho_crm_territories_create_territories',
  {
    "territories": [
      {
        "reporting_to": {
          "id": "id_123"
        },
        "permission_type": "read_write_delete",
        "name": "Example"
      }
    ]
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={null}
deepline tools execute zoho_crm_territories_create_territories --input '{
  "territories": [
    {
      "reporting_to": {
        "id": "id_123"
      },
      "permission_type": "read_write_delete",
      "name": "Example"
    }
  ]
}' --json
```

## Example response

The SDK exposes this shape at `result.toolResponse.raw`. Values below are representative.

```json theme={null}
{
  "data": {
    "territories": [
      {
        "code": "SUCCESS",
        "details": {
          "id": "id_123"
        },
        "message": "Example message",
        "status": "success"
      }
    ]
  }
}
```

Use `deepline tools get zoho_crm_territories_create_territories --json` for the latest machine-readable contract.

## Input reference

The `schema` field of type `object`.

| Name                  | Type    | Required | Default | Details                                         |
| --------------------- | ------- | -------- | ------- | ----------------------------------------------- |
| `payload.territories` | `array` | No       | —       | The `territories` property. Maximum items: 100. |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "The `schema` field of type `object`.",
    "properties": {
      "territories": {
        "type": "array",
        "description": "The `territories` property.",
        "maxItems": 100,
        "items": {
          "type": "object",
          "description": "The `items` field of type `object`.",
          "properties": {
            "manager": {
              "type": "object",
              "additionalProperties": true
            },
            "reporting_to": {
              "type": "object",
              "description": "The `reporting_to` property.",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The `id` property.",
                  "maxLength": 100
                }
              },
              "required": [
                "id"
              ],
              "additionalProperties": false
            },
            "permission_type": {
              "type": "string",
              "description": "The `permission_type` property.",
              "enum": [
                "read_write_delete",
                "read_only"
              ]
            },
            "description": {
              "type": "string",
              "description": "The `description` property.",
              "maxLength": 100
            },
            "account_rule_criteria": {
              "type": "object",
              "description": "The `account_rule_criteria` property.",
              "additionalProperties": true
            },
            "deal_rule_criteria": {
              "type": "object",
              "description": "The `deal_rule_criteria` property.",
              "additionalProperties": true
            },
            "lead_rule_criteria": {
              "type": "object",
              "description": "The `lead_rule_criteria` property.",
              "additionalProperties": true
            },
            "name": {
              "type": "string",
              "description": "The `name` property.",
              "maxLength": 50
            }
          },
          "required": [
            "reporting_to",
            "permission_type",
            "name"
          ],
          "additionalProperties": false
        }
      }
    },
    "required": [],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name                                   | Type                                | Required | Default | Details                                                                                                 |
| -------------------------------------- | ----------------------------------- | -------- | ------- | ------------------------------------------------------------------------------------------------------- |
| `result.data`                          | `object`                            | Yes      | —       | Schema representing the API response for territory creation.                                            |
| `result.data.territories`              | `array`                             | Yes      | —       | List of territories created or processed by the API. Maximum items: 10.                                 |
| `result.data.territories[].code`       | `"SUCCESS" \| "ERROR"`              | Yes      | —       | Status code indicating the result of the operation (e.g., SUCCESS, ERROR). Allowed: `SUCCESS`, `ERROR`. |
| `result.data.territories[].details`    | `object`                            | Yes      | —       | Additional information about the created territory.                                                     |
| `result.data.territories[].details.id` | `string`                            | Yes      | —       | Unique identifier of the created territory. Format: `string`.                                           |
| `result.data.territories[].message`    | `string`                            | Yes      | —       | Human-readable message describing the outcome of the operation. Format: `string`.                       |
| `result.data.territories[].status`     | `"success" \| "failure" \| "error"` | Yes      | —       | Indicates whether the operation succeeded or failed. Allowed: `success`, `failure`, `error`.            |
| `result.meta`                          | `object`                            | No       | —       | Additional response metadata (status, paging).                                                          |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Schema representing the API response for territory creation.",
        "properties": {
          "territories": {
            "type": "array",
            "description": "List of territories created or processed by the API.",
            "maxItems": 10,
            "items": {
              "type": "object",
              "description": "Details of each territory operation.",
              "properties": {
                "code": {
                  "type": "string",
                  "description": "Status code indicating the result of the operation (e.g., SUCCESS, ERROR).",
                  "enum": [
                    "SUCCESS",
                    "ERROR"
                  ]
                },
                "details": {
                  "type": "object",
                  "description": "Additional information about the created territory.",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "Unique identifier of the created territory.",
                      "format": "string"
                    }
                  },
                  "required": [
                    "id"
                  ],
                  "additionalProperties": false
                },
                "message": {
                  "type": "string",
                  "description": "Human-readable message describing the outcome of the operation.",
                  "format": "string"
                },
                "status": {
                  "type": "string",
                  "description": "Indicates whether the operation succeeded or failed.",
                  "enum": [
                    "success",
                    "failure",
                    "error"
                  ]
                }
              },
              "required": [
                "code",
                "details",
                "message",
                "status"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "territories"
        ],
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.

## Related documentation

* [SDK V2 quickstart](/docs/sdk-v2/quickstart)
* [SDK reference](/docs/sdk-v2/sdk-reference)
* [Run tools across a CSV](/docs/sdk-v2/batch-csv)
