## List enumeration field values

`GET /v1/userfields/:entity/enum-values`

Lists the options of one CRM enumeration field so you can use their IDs when setting record values.

> **This feature is rolling out.** It requires a CRM update after `26.2200.0` and activation by an administrator. The release version has not been published. Until available, requests return `422 METHOD_NOT_YET_AVAILABLE` with `error.release`.

For Smart Process Automation (SPA) fields, use the same contract at `GET /v1/items/:entityTypeId/userfields/enum-values`. Invoices are also available through `entityTypeId=31`.

## Parameters

| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| `entity` (path) | string | yes | — | `deals` — deals, `leads` — leads, `contacts` — contacts, `companies` — companies, `quotes` — estimates, `invoices` — invoices |
| `entityTypeId` (path) | integer | for the alternate path | — | [SPA type](/docs/entities/smart-processes/list) ID, or `31` for invoices |
| `fieldId` (query) | integer / string | yes | — | ID or `UF_*` code of an enumeration field. Sources: [CRM fields](/docs/userfields/crm/list), [SPA fields](/docs/userfields/smart-processes/list) |
| `limit` (query) | integer | no | `50` | Positive page size, up to `1000` |
| `offset` (query) | integer | no | `0` | Nonnegative offset from the start of the list |

Pagination: increase `offset` by `limit` until a partial or empty page is returned. No total count is calculated. Other query parameters are not accepted.

## Examples

### curl — personal key

```bash
curl "https://vibecode.bitrix24.com/v1/userfields/deals/enum-values?fieldId=6008145" \
  -H "X-Api-Key: YOUR_API_KEY"
```

### curl — OAuth application

```bash
curl "https://vibecode.bitrix24.com/v1/userfields/deals/enum-values?fieldId=6008145" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN"
```

### JavaScript — personal key

```javascript
const response = await fetch(
  'https://vibecode.bitrix24.com/v1/userfields/deals/enum-values?fieldId=6008145',
  {
    "method": "GET",
    "headers": {
      "X-Api-Key": "YOUR_API_KEY"
    }
  }
)
const { success, data, meta } = await response.json()
```

### JavaScript — OAuth application

```javascript
const response = await fetch(
  'https://vibecode.bitrix24.com/v1/userfields/deals/enum-values?fieldId=6008145',
  {
    "method": "GET",
    "headers": {
      "X-Api-Key": "YOUR_APP_KEY",
      "Authorization": "Bearer USER_SESSION_TOKEN"
    }
  }
)
const { success, data, meta } = await response.json()
```

## Response fields

HTTP `200 OK`.

| Field | Type | Description |
|---|---|---|
| `success` | boolean | `true` on success |
| `data` | array | Field options |
| `data[].id` | integer | Option ID for [retrieval](/docs/entities/crm-field-enum/get) |
| `data[].fieldId` | integer | Field ID. See [CRM fields](/docs/userfields/crm/list) and [SPA fields](/docs/userfields/smart-processes/list) |
| `data[].value` | string | Option label |
| `data[].isDefault` | boolean | Used as a default option |
| `data[].sort` | integer | Sort order |
| `data[].xmlId` | string / null | External integration ID |
| `meta.limit` | integer | Requested page size |
| `meta.offset` | integer | Page offset |

## Response example

```json
{
  "success": true,
  "data": [
    {
      "id": 4119,
      "fieldId": 6008145,
      "value": "VIBE-PROBE option",
      "isDefault": false,
      "sort": 500,
      "xmlId": "VIBE-PROBE-X"
    }
  ],
  "meta": {
    "limit": 50,
    "offset": 0
  }
}
```

## Error response example

400 — invalid request:

```json
{
  "success": false,
  "error": {
    "code": "MISSING_REQUIRED_PARAMS",
    "message": "fieldId must name a field by positive ID or UF code"
  }
}
```

## Errors

| HTTP | Code | Description |
|---|---|---|
| 400 | `INVALID_PARAMS` | Invalid request shape or parameter type |
| 400 | `UNKNOWN_FILTER_FIELD` | Unknown or repeated query parameter |
| 400 | `MISSING_REQUIRED_PARAMS` | A valid `fieldId` is missing |
| 422 | `METHOD_NOT_YET_AVAILABLE` | The feature is not yet available. Update information is provided in `error.release` |
| 502 | `BITRIX_UNAVAILABLE` | Invalid response from Bitrix24 |
| 401 | `MISSING_API_KEY` | Missing `X-Api-Key` |
| 401 | `TOKEN_MISSING` | No Bitrix24 tokens are configured |
| 403 | `SCOPE_DENIED` | The key requires the `crm` scope |

For shared API errors, see [Errors](/docs/errors).

## See also

- [Get an enumeration field value](/docs/entities/crm-field-enum/get)
- [Create an enumeration field value](/docs/entities/crm-field-enum/create)
- [Update an enumeration field value](/docs/entities/crm-field-enum/update)
- [Delete an enumeration field value](/docs/entities/crm-field-enum/delete)
- [CRM enumeration field values](/docs/entities/crm-field-enum)
