
## List smart process fields

`GET /v1/items/:entityTypeId/userfields`

Returns the list of a smart process's user fields. Supports filtering by field type and by name.

## Parameters

| Parameter | Type | Required | Description |
|----------|-----|:-----:|---------|
| `:entityTypeId` (path) | number | yes | Smart process type identifier. Source: [`GET /v1/smart-processes`](/docs/entities/smart-processes) — the `entityTypeId` field on each element of the `data` array |
| `userTypeId` (query) | string | no | Filter by field type. List of allowed values — [`GET /v1/items/:entityTypeId/userfields/types`](/docs/userfields/smart-processes/types). Example: `?userTypeId=string` |
| `fieldName` (query) | string | no | Filter by the system field name. Example: `?fieldName=UF_CRM_3_1628508847` |

The result is ordered by the `sort` field ascending. A sort parameter is not accepted.

## Examples

### curl — personal key

```bash
curl "https://vibecode.bitrix24.com/v1/items/174/userfields?userTypeId=string" \
  -H "X-Api-Key: YOUR_API_KEY"
```

### curl — OAuth application

```bash
curl "https://vibecode.bitrix24.com/v1/items/174/userfields?userTypeId=string" \
  -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/items/174/userfields?userTypeId=string',
  {
    headers: { 'X-Api-Key': 'YOUR_API_KEY' },
  }
)
const { success, data, meta } = await res.json()
console.log(`Fields of type string: ${meta.total}`)
```

### JavaScript — OAuth application

```javascript
const res = await fetch(
  'https://vibecode.bitrix24.com/v1/items/174/userfields?userTypeId=string',
  {
    headers: {
      'X-Api-Key': 'YOUR_APP_KEY',
      'Authorization': 'Bearer USER_SESSION_TOKEN',
    },
  }
)
const { success, data, meta } = await res.json()
```

## Response fields

| Field | Type | Description |
|------|-----|---------|
| `success` | boolean | Always `true` on success |
| `data` | array | Array of smart process fields. All element fields — see [Get field](/docs/userfields/smart-processes/get) |
| `meta.total` | number | Total number of fields matching the filter |

## Response example

```json
{
  "success": true,
  "data": [
    {
      "id": 3349,
      "entityId": "CRM_3",
      "fieldName": "UF_CRM_3_1628508847",
      "userTypeId": "crm",
      "xmlId": null,
      "sort": "100",
      "multiple": "Y",
      "mandatory": "N",
      "showFilter": "E",
      "showInList": "Y",
      "editInList": "Y",
      "isSearchable": "Y",
      "settings": {
        "DEAL": "Y"
      }
    },
    {
      "id": 3351,
      "entityId": "CRM_3",
      "fieldName": "UF_CRM_3_1628508893",
      "userTypeId": "string",
      "xmlId": null,
      "sort": "100",
      "multiple": "N",
      "mandatory": "N",
      "showFilter": "E",
      "showInList": "Y",
      "editInList": "Y",
      "isSearchable": "Y",
      "settings": {
        "SIZE": 20,
        "ROWS": 1,
        "REGEXP": "",
        "MIN_LENGTH": 0,
        "MAX_LENGTH": 0,
        "DEFAULT_VALUE": ""
      }
    }
  ],
  "meta": {
    "total": 7
  }
}
```

The list returns base fields. Language labels (`editFormLabel`, etc.) and `enum` options come only in [`GET /v1/items/:entityTypeId/userfields/:id`](/docs/userfields/smart-processes/get).

## Error response example

403 — the key has no `userfieldconfig` scope:

```json
{
  "success": false,
  "error": {
    "code": "BITRIX_ACCESS_DENIED",
    "message": "The request requires higher privileges than provided by the webhook token"
  }
}
```

## Errors

| HTTP | Code | Description |
|------|-----|---------|
| 400 | `INVALID_ENTITY_TYPE_ID` | `:entityTypeId` is not a positive integer |
| 403 | `BITRIX_ACCESS_DENIED` | The key has no `userfieldconfig` scope — reissue the key with this scope |
| 403 | `SCOPE_DENIED` | The API key has no `crm` scope |
| 404 | `SMART_PROCESS_NOT_FOUND` | A smart process with the given `entityTypeId` was not found on the portal |
| 401 | `MISSING_API_KEY` | The `X-Api-Key` header is missing |
| 401 | `TOKEN_MISSING` | The API key has no configured tokens |

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

## Known specifics

**No pagination.** The endpoint returns all of the smart process's fields without splitting into pages. `meta.total` reflects the final number of fields in the response.

## See also

- [Field type catalog](/docs/userfields/smart-processes/types)
- [Get field](/docs/userfields/smart-processes/get)
- [Create field](/docs/userfields/smart-processes/create)
- [Smart process fields](/docs/userfields/smart-processes)
- [User fields](/docs/userfields)
