
## Smart process type fields

`GET /v1/smart-processes/fields`

Returns the field schema of a smart process type: which fields can be passed on create and update, and which are read-only.

## Examples

### curl — personal key

```bash
curl "https://vibecode.bitrix24.com/v1/smart-processes/fields" \
  -H "X-Api-Key: YOUR_API_KEY"
```

### curl — OAuth application

```bash
curl "https://vibecode.bitrix24.com/v1/smart-processes/fields" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN"
```

### JavaScript — personal key

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/smart-processes/fields', {
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
  },
})

const { success, data } = await res.json()
console.log('Fields:', Object.keys(data.fields).length)
```

### JavaScript — OAuth application

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/smart-processes/fields', {
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})

const { success, data } = await res.json()
```

## Response fields

| Field | Type | RO | Description |
|------|-----|:--:|---------|
| `id` | number | yes | Internal ID of the type record |
| `entityTypeId` | number | | Entity type ID. Passed to `/v1/items/:entityTypeId` to work with items. If not passed on create, Bitrix24 assigns a free value automatically |
| `title` | string | | Smart process type name |
| `code` | string \| null | | Symbolic code of the type (for programmatic identification). `null` if not set |
| `customSectionId` | number \| null | | ID of the custom workspace the type is bound to. `null` if not bound. Written on create but not updated |
| `isCategoriesEnabled` | boolean | | Use custom pipelines and sales tunnels in the smart process |
| `isStagesEnabled` | boolean | | Use custom stages and kanban in the smart process |
| `isBeginCloseDatesEnabled` | boolean | | "Start date" and "End date" fields |
| `isClientEnabled` | boolean | | "Client" field linked to contacts and companies |
| `isLinkWithProductsEnabled` | boolean | | Catalog product linking |
| `isMycompanyEnabled` | boolean | | "Your company details" field |
| `isObserversEnabled` | boolean | | "Observers" field |
| `isSourceEnabled` | boolean | | "Source" and "Source details" fields |
| `isAutomationEnabled` | boolean | | Automation rules and triggers |
| `isBizProcEnabled` | boolean | | Workflow designer |
| `isDocumentsEnabled` | boolean | | Document printing |
| `isRecyclebinEnabled` | boolean | | Recycle bin usage |
| `isSetOpenPermissions` | boolean | | Make new pipelines available to everyone |
| `isUseInUserfieldEnabled` | boolean | | Use the smart process in a custom field |
| `isRecurringEnabled` | boolean | | "Recurrence" field |
| `isPaymentsEnabled` | boolean | | Online payment |
| `isCountersEnabled` | boolean | | Counters (notifications and badges) |
| `isInitialized` | boolean | yes | Type fully initialized in the Bitrix24 account |
| `createdBy` | number | yes | Who created it. Lookup: `GET /v1/users` |
| `updatedBy` | number | yes | Who changed it. Lookup: `GET /v1/users` |
| `createdTime` | datetime | yes | Creation date |
| `updatedTime` | datetime | yes | Update date |

The response also contains an `aggregatable` array — the fields that support grouping in [aggregation](/docs/entities/smart-processes/aggregate) — and a `batch` array listing the operations available for batch processing: `create`, `update`, `delete`.

> **datetime format.** `createdTime`/`updatedTime` arrive in ISO 8601, but the exact representation (with a `+03:00` offset or UTC `…Z` with milliseconds) depends on the Bitrix24 account — parse as ISO 8601, do not compare strings byte by byte.

## Response example

```json
{
  "success": true,
  "data": {
    "fields": {
      "id": { "type": "number", "readonly": true, "label": "Internal ID", "description": "Internal numeric identifier of the smart-process type record." },
      "entityTypeId": { "type": "number", "readonly": false, "label": "Entity type ID", "description": "Smart-process type identifier used in /v1/items/:entityTypeId; assigned automatically if not passed on creation." },
      "title": { "type": "string", "readonly": false, "label": "Name", "description": "Smart-process type name shown in the Bitrix24 interface." },
      "isCategoriesEnabled": { "type": "boolean", "readonly": false, "label": "Own pipelines", "description": "Enables its own sales pipelines and tunnels." },
      "isStagesEnabled": { "type": "boolean", "readonly": false, "label": "Own stages and kanban", "description": "Enables its own stages and a kanban board." },
      "isLinkWithProductsEnabled": { "type": "boolean", "readonly": false, "label": "Product binding", "description": "Enables binding catalog products to items." },
      "code": { "type": "string", "readonly": false, "label": "Symbolic code", "description": "Symbolic code of the smart-process type; may be absent (null)." },
      "createdBy": { "type": "number", "readonly": true, "label": "Created by", "description": "ID of the user who created the smart-process type." },
      "customSectionId": { "type": "number", "readonly": false, "label": "Digital workspace", "description": "ID of the digital workspace the type is bound to; set only on creation and not updated." },
      "createdTime": { "type": "datetime", "readonly": true, "label": "Creation date", "description": "Date and time the smart-process type was created." }
    },
    "aggregatable": ["customSectionId", "createdBy", "updatedBy", "isCategoriesEnabled", "isStagesEnabled", "isAutomationEnabled", "isBizProcEnabled", "isPaymentsEnabled", "isCountersEnabled", "isLinkWithProductsEnabled"],
    "batch": ["create", "update", "delete"]
  }
}
```

10 of 27 fields are shown. Full list — in the table above.

## Error response example

401 — key not passed:

```json
{
  "success": false,
  "error": {
    "code": "MISSING_API_KEY",
    "message": "API key required. Pass via X-Api-Key header."
  }
}
```

## Errors

| HTTP | Code | Description |
|------|-----|---------|
| 401 | `MISSING_API_KEY` | The `X-Api-Key` header was not passed |
| 401 | `INVALID_API_KEY` | The key was not found or was revoked |
| 403 | `SCOPE_DENIED` | The API key does not have the `crm` scope |
| 401 | `TOKEN_MISSING` | The API key has no configured tokens |

Full list of general API errors — [Errors](/docs/errors).

## Known specifics

**Nested structures.** On create and update you can pass the `relations` (links to other CRM types) and `linkedUserFields` (linked custom fields) fields. They are not described in the `/fields` response, but Bitrix24 accepts and stores them unchanged. More details — in [Create a type](/docs/entities/smart-processes/create).

**Difference from `GET /v1/{entity}/fields` of standard entities.** This endpoint describes the fields of the **smart process type** (`crm.type.*`), not of the items inside it. For item fields use `GET /v1/items/:entityTypeId/fields`.

## See also

- [Type list](/docs/entities/smart-processes/list)
- [Create a type](/docs/entities/smart-processes/create)
- [Update a type](/docs/entities/smart-processes/update)
- [Smart process items](/docs/entities/items)
- [Item fields](/docs/entities/items/fields)
- [Custom fields](/docs/userfields)
- [Limits and optimization](/docs/optimization)
