## Status dictionary types

`GET /v1/statuses/entity-types`

Returns every CRM dictionary in the Bitrix24 account: lead, deal, quote and smart process stages, sources, contact and company types. Pass a dictionary's `id` as `entityId` when requesting that dictionary's records.

## Examples

### curl — personal key

```bash
curl "https://vibecode.bitrix24.com/v1/statuses/entity-types" \
  -H "X-Api-Key: YOUR_API_KEY"
```

### curl — OAuth application

```bash
curl "https://vibecode.bitrix24.com/v1/statuses/entity-types" \
  -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/statuses/entity-types', {
  headers: { 'X-Api-Key': 'YOUR_API_KEY' },
})
const { success, data } = await res.json()
```

### JavaScript — OAuth application

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/statuses/entity-types', {
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})
const { success, data } = await res.json()
```

## Response fields

| Field | Type | Description |
|------|-----|---------|
| `success` | boolean | Always `true` on success |
| `data` | array | Array of dictionaries. There is no pagination; the whole array is returned |
| `data[].id` | string | Dictionary identifier, for example `STATUS`, `SOURCE`, `DEAL_STAGE`, `DEAL_STAGE_3`, `DYNAMIC_174_STAGE_3`. Pass it as `entityId` in [`GET /v1/statuses?filter[entityId]=<id>`](/docs/entities/statuses/list) |
| `data[].name` | string | Dictionary name |
| `data[].entityTypeId` | number | CRM object type the stage dictionary belongs to: `1` — lead, `2` — deal, `7` — quote, `31` — invoice; for smart processes, their `entityTypeId`. Type list: [`GET /v1/smart-processes`](/docs/entities/smart-processes/list) |
| `data[].parentId` | string | Identifier of the general dictionary the pipeline dictionary derives from. Returned for the stages of additional deal pipelines, for example `DEAL_STAGE` for `DEAL_STAGE_1` |
| `data[].categoryId` | number \| string | Pipeline ID. A string for the stages of additional deal pipelines, a number for other dictionaries. Deal pipelines: [`GET /v1/deal-categories`](/docs/entities/deal-categories/list) |
| `data[].categoryName` | string | Pipeline name. Returned for smart process stages |
| `data[].categorySort` | number | Pipeline sort order. Returned for smart process stages |
| `data[].isDefaultCategory` | boolean | Default pipeline. Returned for smart process stages |
| `data[].isEnabled` | boolean | The dictionary's `isEnabled` flag. Returned for invoice, smart document and smart process stages |
| `data[].prefix` | string | Stage code prefix of the pipeline: the `DEAL_STAGE_1` dictionary has the prefix `C1`, and its stages have codes such as `C1:NEW` |
| `data[].fieldAttributeScope` | string | Pipeline code for field attributes, for example `category_1`. An empty string for the general deal pipeline |
| `data[].semanticInfo` | object | Codes of the initial and final stages. An empty object `{}` for invoice, smart document and smart process stage dictionaries |
| `data[].semanticInfo.startField` | string | Initial stage code |
| `data[].semanticInfo.finalSuccessField` | string | Successful final stage code |
| `data[].semanticInfo.finalUnsuccessField` | string | Unsuccessful final stage code |
| `data[].semanticInfo.finalSort` | number | The `finalSort` value from the dictionary settings |

Fields other than `id` and `name` are returned only for the dictionaries they apply to. Classifiers such as `SOURCE` and `CONTACT_TYPE` carry only `id` and `name`.

## Response example

Three of 37 dictionaries are shown.

```json
{
  "success": true,
  "data": [
    {
      "id": "STATUS",
      "name": "Lead stages",
      "entityTypeId": 1,
      "semanticInfo": {
        "startField": "NEW",
        "finalSuccessField": "CONVERTED",
        "finalUnsuccessField": "JUNK",
        "finalSort": 0
      }
    },
    {
      "id": "SOURCE",
      "name": "Sources"
    },
    {
      "id": "DEAL_STAGE_1",
      "name": "Deal stages Retail",
      "entityTypeId": 2,
      "parentId": "DEAL_STAGE",
      "categoryId": "1",
      "prefix": "C1",
      "fieldAttributeScope": "category_1",
      "semanticInfo": {
        "startField": "C1:NEW",
        "finalSuccessField": "C1:WON",
        "finalUnsuccessField": "C1:LOSE",
        "finalSort": 0
      }
    }
  ]
}
```

## Error response example

401 — the key is not passed:

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

## Errors

| HTTP | Code | Description |
|------|-----|---------|
| 422 | `BITRIX_ERROR` | Bitrix24 rejected the request. The reason is in `error.message` |
| 403 | `BITRIX_ACCESS_DENIED` | The key's user has no permission to read CRM dictionaries in Bitrix24 |
| 502 | `BITRIX_RESPONSE_INVALID` | Bitrix24 returned a response of an unexpected shape |
| 502 | `BITRIX_UNAVAILABLE` | Bitrix24 is unavailable |
| 403 | `SCOPE_DENIED` | The key lacks the `crm` scope |
| 401 | `TOKEN_MISSING` | The key has no configured tokens |
| 401 | `MISSING_API_KEY` | The `X-Api-Key` header is not passed |
| 401 | `INVALID_API_KEY` | The key is not found or has been revoked |

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

## Known specifics

**A read-only key works.** The method only reads data, so a key without write access gets the same response as a full-access key.

**One stage dictionary per pipeline.** Each deal pipeline and smart process pipeline has its own stage dictionary: `DEAL_STAGE` is the general pipeline, `DEAL_STAGE_<pipeline ID>` are additional ones, `DYNAMIC_<entityTypeId>_STAGE_<pipeline ID>` are smart process pipelines, `SMART_INVOICE_STAGE_<pipeline ID>` is the invoice pipeline. To get the stages of a specific pipeline, pass its dictionary identifier in `filter[entityId]`.

## See also

- [Dictionary list](/docs/entities/statuses/list)
- [Dictionary fields](/docs/entities/statuses/fields)
- [CRM dictionaries](/docs/entities/statuses)
- [Deal pipelines](/docs/entities/deal-categories)
