# Smart process types

Manage smart process types: create, get, update, delete, search. A type is a template (entity definition), not a record inside it. To work with items inside a type, use [`/v1/items/:entityTypeId`](/docs/entities/items).

Bitrix24 API: `crm.type.*`
Scope: `crm`

## Operations

- [Create type](./smart-processes/create.md) — `POST /v1/smart-processes`
- [List types](./smart-processes/list.md) — `GET /v1/smart-processes`
- [Get type](./smart-processes/get.md) — `GET /v1/smart-processes/:entityTypeId`
- [Update type](./smart-processes/update.md) — `PATCH /v1/smart-processes/:entityTypeId`
- [Delete type](./smart-processes/delete.md) — `DELETE /v1/smart-processes/:entityTypeId`
- [Search types](./smart-processes/search.md) — `POST /v1/smart-processes/search`
- [Type fields](./smart-processes/fields.md) — `GET /v1/smart-processes/fields`
- [Aggregate types](./smart-processes/aggregate.md) — `POST /v1/smart-processes/aggregate`

## Key fields

| Field | Description |
|------|---------|
| `entityTypeId` | **Primary type identifier.** Used in all item requests via `/v1/items/:entityTypeId`. Generated automatically on creation, immutable |
| `title` | Type name shown to users in the Bitrix24 interface |
| `isCategoriesEnabled` | Whether custom pipelines and sales tunnels are enabled |
| `isStagesEnabled` | Whether custom stages and kanban are enabled |
| `isClientEnabled` | Whether the "Client" field (contacts and companies) is present |
| `isLinkWithProductsEnabled` | Whether catalog products can be linked |
| `relations` | Relations with other CRM entities (deals, contacts, other smart processes) |

Full list of 27 fields — [Type fields](./smart-processes/fields.md).

## What you need to know before working

1. **Type ≠ item.** `/v1/smart-processes` manages **definitions** (templates). For records inside a type — `/v1/items/:entityTypeId`.
2. **`entityTypeId` is the link key to items.** After creating a type, save it and pass it to all item requests. `entityTypeId` cannot be changed.
3. **A new type is not initialized.** Right after `POST /v1/smart-processes` the field is `isInitialized: false`. To make it ready for use, add pipelines and stages via [`/v1/categories/:entityTypeId`](/docs/entities/categories).
4. **`relations` are bidirectional.** A relation created in the `parent` of one type automatically appears in the `child` of the related entity.

## Typical scenario

1. See which types already exist: [`GET /v1/smart-processes`](./smart-processes/list.md).
2. Create a new type with all the capabilities you need: [`POST /v1/smart-processes`](./smart-processes/create.md) with the `isStagesEnabled`, `isCategoriesEnabled`, etc. flags.
3. Save the `entityTypeId` from the response — you will need it for all subsequent calls.
4. Configure pipelines for the type: [`POST /v1/categories/:entityTypeId`](/docs/entities/categories).
5. Work with items inside the type: [`/v1/items/:entityTypeId`](/docs/entities/items) — CRUD, search, products, user fields.

## Limits

| Limit | Value |
|-------|----------|
| Maximum types per Bitrix24 account | Depends on the Bitrix24 plan (on exceeding — `CREATE_DYNAMIC_TYPE_RESTRICTED`) |
| `entityTypeId` range on auto-generation | Even numbers `≥ 1030` |
| `entityTypeId` range when passed explicitly | from `128` to `191` — `≥ 128` and `< 192` |
| Deleting a type with items | Forbidden — first delete the items via [`DELETE /v1/items/:entityTypeId/:id`](/docs/entities/items) |
| Rate limit | Shared across the Vibecode API — see [Limits and optimization](/docs/optimization) |

## See also

- [Smart process items](/docs/entities/items)
- [Pipelines and stages](/docs/entities/categories)
- [User fields](/docs/userfields)
- [Entity API](/docs/entity-api)
- [Filtering syntax](/docs/filtering)
- [Entities reference](/docs/entities-index)
