## Get field

`GET /v1/userfields/tasks/:id`

Returns one task user field by ID: its type, settings, labels in all languages and list options.

## Parameters

| Parameter | Type | Required | Description |
|----------|-----|:-----:|---------|
| `:id` (path) | number | yes | Numeric field ID from the [`GET /v1/userfields/tasks`](/docs/userfields/tasks/list) or [`POST /v1/userfields/tasks`](/docs/userfields/tasks/create) response. A positive integer |

## Examples

### curl — personal key

```bash
curl "https://vibecode.bitrix24.com/v1/userfields/tasks/6007967" \
  -H "X-Api-Key: YOUR_API_KEY"
```

### curl — OAuth application

```bash
curl "https://vibecode.bitrix24.com/v1/userfields/tasks/6007967" \
  -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/userfields/tasks/6007967', {
  headers: { 'X-Api-Key': 'YOUR_API_KEY' },
})
const { success, data } = await res.json()
console.log(data.fieldName, data.items?.map((item) => item.value))
```

### JavaScript — OAuth application

```javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/userfields/tasks/6007967', {
  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` | object | Field object |
| `data.id` | number | Numeric field ID |
| `data.entityId` | string | Entity the field belongs to — always `TASKS_TASK` |
| `data.fieldName` | string | System field name in the `UF_*` format |
| `data.userTypeId` | string | Field type. Values — [Field types](/docs/userfields/tasks/types) |
| `data.xmlId` | string\|null | External field ID. Cannot be set through the API |
| `data.sort` | string | Field order — a number as a string |
| `data.multiple` | string | Multiple values in one task: `"Y"` or `"N"` |
| `data.mandatory` | string | Required field: `"Y"` or `"N"` |
| `data.showFilter` | string | Show in the filter. For fields created through the API — `"N"` |
| `data.showInList` | string | Show in the list. For fields created through the API — `"Y"` |
| `data.editInList` | string | Allow editing from the list. For fields created through the API — `"Y"` |
| `data.isSearchable` | string | Included in search. For fields created through the API — `"N"` |
| `data.settings` | object | Field settings; the set of keys depends on `userTypeId`. For `enumeration` — `DISPLAY`, `LIST_HEIGHT`, `CAPTION_NO_VALUE`, `SHOW_NO_VALUE`. For `string` — `SIZE`, `ROWS`, `REGEXP`, `MIN_LENGTH`, `MAX_LENGTH`, `DEFAULT_VALUE` |
| `data.editFormLabel` | object | Label in the task form per language: the key is a language code, the value is a string |
| `data.listColumnLabel` | object | Column label in the task list per language |
| `data.listFilterLabel` | object | Label in the filter per language |
| `data.errorMessage` | object | Validation error message per language. For a field created through the API — the field name; for system fields the values are `null` |
| `data.helpMessage` | object | Hint per language. For a field created through the API — the field name; for system fields the values are `null` |
| `data.system` | boolean | `true` for the system fields `UF_CRM_TASK`, `UF_TASK_WEBDAV_FILES`, `UF_MAIL_MESSAGE` |
| `data.items` | array | Options of an `enumeration` field. Absent for other types |
| `data.items[].id` | number | Option ID. Pass it in `items[].id` when [updating the field](/docs/userfields/tasks/update) and as the field value in a task |
| `data.items[].value` | string | Option name |
| `data.items[].sort` | string | Option order — a number as a string |
| `data.items[].def` | string | Default option: `"Y"` or `"N"` |
| `data.items[].xmlId` | string | External option ID. Generated automatically if it was not passed at creation |

## Response example

The labels in the example are trimmed to two languages — `en` and `ru`. The response has more keys: one per language.

```json
{
  "success": true,
  "data": {
    "id": 6007967,
    "entityId": "TASKS_TASK",
    "fieldName": "UF_REVIEW_STAGE",
    "userTypeId": "enumeration",
    "xmlId": null,
    "sort": "500",
    "multiple": "N",
    "mandatory": "Y",
    "showFilter": "N",
    "showInList": "Y",
    "editInList": "Y",
    "isSearchable": "N",
    "settings": {
      "DISPLAY": "LIST",
      "LIST_HEIGHT": 1,
      "CAPTION_NO_VALUE": "",
      "SHOW_NO_VALUE": "Y"
    },
    "editFormLabel": {
      "en": "Review stage",
      "ru": "Review stage"
    },
    "listColumnLabel": {
      "en": "Review stage",
      "ru": "Review stage"
    },
    "listFilterLabel": {
      "en": "Review stage",
      "ru": "Review stage"
    },
    "errorMessage": {
      "en": "UF_REVIEW_STAGE",
      "ru": "UF_REVIEW_STAGE"
    },
    "helpMessage": {
      "en": "UF_REVIEW_STAGE",
      "ru": "UF_REVIEW_STAGE"
    },
    "system": false,
    "items": [
      {
        "id": 4045,
        "value": "New",
        "sort": "10",
        "def": "Y",
        "xmlId": "new"
      },
      {
        "id": 4047,
        "value": "Under review",
        "sort": "20",
        "def": "N",
        "xmlId": "review"
      },
      {
        "id": 4049,
        "value": "Accepted",
        "sort": "30",
        "def": "N",
        "xmlId": "accepted"
      }
    ]
  }
}
```

## Error response example

404 — no field with this `id`:

```json
{
  "success": false,
  "error": {
    "code": "ENTITY_NOT_FOUND",
    "message": "Task custom field not found"
  }
}
```

## Errors

| HTTP | Code | Description |
|------|-----|---------|
| 400 | `INVALID_ID` | `:id` is not a positive integer — the request is rejected before it reaches Bitrix24 |
| 404 | `ENTITY_NOT_FOUND` | No field with this `id` exists, or it belongs to another entity, such as an employee |
| 403 | `TASK_CUSTOM_FIELDS_UNAVAILABLE` | The portal plan does not include task user fields |
| 403 | `SCOPE_DENIED` | The API key does not have the `task` scope |
| 401 | `TOKEN_MISSING` | The key has no Bitrix24 tokens. For an application key, the `Authorization: Bearer USER_SESSION_TOKEN` header was not passed |
| 401 | `MISSING_API_KEY` | The `X-Api-Key` header is missing |

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

## Known specifics

**Labels come as an object keyed by language.** Reading a single field returns labels in all languages at once, while the [field list](/docs/userfields/tasks/list) returns each label as a string in the one language set by the `lang` parameter.

**The field value is stored in the task.** In [`GET /v1/tasks/:id`](/docs/entities/tasks/get) the field arrives under its camelCase name: `UF_REVIEW_STAGE` as `ufReviewStage`. The value is passed under the same name in the body of [`POST /v1/tasks`](/docs/entities/tasks/create). For an `enumeration` field the value is the `id` of an option from `items`.

## See also

- [List fields](/docs/userfields/tasks/list)
- [Update field](/docs/userfields/tasks/update)
- [Delete field](/docs/userfields/tasks/delete)
- [Task fields](/docs/userfields/tasks)
- [Tasks](/docs/entities/tasks)
- [User fields](/docs/userfields)
