[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-userfields\u002Ftasks\u002Fupdate":3,"docs-tabs-userfields\u002Ftasks\u002Fupdate":6},{"content":4,"lastmod":5},"## Update field\n\n`PATCH \u002Fv1\u002Fuserfields\u002Ftasks\u002F:id`\n\nChanges the label, required flag, sort order, settings, and list options of a task user field. The name, type, and multiplicity of a field cannot be changed after creation.\n\n## Parameters\n\n| Parameter | Type | Required | Description |\n|----------|-----|:-----:|---------|\n| `:id` (path) | number | yes | Numeric identifier of the field from the response of [`GET \u002Fv1\u002Fuserfields\u002Ftasks`](\u002Fdocs\u002Fuserfields\u002Ftasks\u002Flist) or [`POST \u002Fv1\u002Fuserfields\u002Ftasks`](\u002Fdocs\u002Fuserfields\u002Ftasks\u002Fcreate) |\n\n## Request fields (body)\n\nPass at least one property. Properties are passed flat at the JSON root — without a `fields` wrapper.\n\n| Field | Type | Required | Description |\n|------|-----|:-----:|---------|\n| `label` | string \\| object | no | Field label. A string is written to `editFormLabel`, `listColumnLabel`, and `listFilterLabel` in all languages. An object sets labels per language — `{ \"ru\": \"Approval stage\", \"en\": \"Approval stage\" }`; labels in the other languages become empty |\n| `mandatory` | boolean | no | Required field |\n| `sort` | integer | no | Field order — a non-negative integer |\n| `settings` | object | no | Field settings; the set of keys depends on the type — [Get field](\u002Fdocs\u002Fuserfields\u002Ftasks\u002Fget) |\n| `items` | array | no | Changes to the options of an `enumeration` field |\n| `items[].id` | number | no | Identifier of an existing option from [`GET \u002Fv1\u002Fuserfields\u002Ftasks\u002F:id`](\u002Fdocs\u002Fuserfields\u002Ftasks\u002Fget). An element without `id` adds a new option |\n| `items[].value` | string | yes | Option name — a non-empty string. Can be omitted only in an element with `del: true` |\n| `items[].del` | boolean | no | `true` — delete the option with the specified `id` |\n| `items[].sort` | integer | no | Option order — an integer greater than `0` |\n| `items[].def` | boolean | no | Default option. To clear it on a field without `multiple`, mark another option with `def: true` in the same request |\n| `items[].xmlId` | string | no | External identifier of the option. If omitted, an existing option keeps its current value |\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -X PATCH \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fuserfields\u002Ftasks\u002F6007967\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"label\": { \"ru\": \"Approval stage\", \"en\": \"Approval stage\" },\n    \"items\": [\n      { \"id\": 4047, \"value\": \"Pending approval\" },\n      { \"id\": 4049, \"del\": true },\n      { \"value\": \"Approved\", \"xmlId\": \"approved\", \"sort\": 40 }\n    ]\n  }'\n```\n\n### curl — OAuth application\n\n```bash\ncurl -X PATCH \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fuserfields\u002Ftasks\u002F6007967\" \\\n  -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"label\": { \"ru\": \"Approval stage\", \"en\": \"Approval stage\" },\n    \"items\": [\n      { \"id\": 4047, \"value\": \"Pending approval\" },\n      { \"id\": 4049, \"del\": true },\n      { \"value\": \"Approved\", \"xmlId\": \"approved\", \"sort\": 40 }\n    ]\n  }'\n```\n\n### JavaScript — personal key\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fuserfields\u002Ftasks\u002F6007967', {\n  method: 'PATCH',\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: JSON.stringify({\n    label: { ru: 'Approval stage', en: 'Approval stage' },\n    items: [\n      { id: 4047, value: 'Pending approval' },\n      { id: 4049, del: true },\n      { value: 'Approved', xmlId: 'approved', sort: 40 },\n    ],\n  }),\n})\n\nconst { success, data } = await res.json()\nconsole.log(data.items.map((item) => item.value))\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fuserfields\u002Ftasks\u002F6007967', {\n  method: 'PATCH',\n  headers: {\n    'X-Api-Key': 'YOUR_APP_KEY',\n    'Authorization': 'Bearer USER_SESSION_TOKEN',\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: JSON.stringify({\n    label: { ru: 'Approval stage', en: 'Approval stage' },\n    items: [\n      { id: 4047, value: 'Pending approval' },\n      { id: 4049, del: true },\n      { value: 'Approved', xmlId: 'approved', sort: 40 },\n    ],\n  }),\n})\n\nconst { success, data } = await res.json()\n```\n\n## Response fields\n\n| Field | Type | Description |\n|------|-----|---------|\n| `success` | boolean | Always `true` on success |\n| `data` | object | The whole field after the change — in the same shape as in the [Get field](\u002Fdocs\u002Fuserfields\u002Ftasks\u002Fget) response |\n| `data.items` | array | All options of the field after the change, including those not mentioned in the request |\n\n## Response example\n\nLabels in the example are shortened to two languages — `en` and `ru`. In the other languages, the `editFormLabel`, `listColumnLabel`, and `listFilterLabel` labels in this response are empty: the `label` object in the request set only two languages.\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"id\": 6007967,\n    \"entityId\": \"TASKS_TASK\",\n    \"fieldName\": \"UF_REVIEW_STAGE\",\n    \"userTypeId\": \"enumeration\",\n    \"xmlId\": null,\n    \"sort\": \"500\",\n    \"multiple\": \"N\",\n    \"mandatory\": \"Y\",\n    \"showFilter\": \"N\",\n    \"showInList\": \"Y\",\n    \"editInList\": \"Y\",\n    \"isSearchable\": \"N\",\n    \"settings\": {\n      \"DISPLAY\": \"LIST\",\n      \"LIST_HEIGHT\": 1,\n      \"CAPTION_NO_VALUE\": \"\",\n      \"SHOW_NO_VALUE\": \"Y\"\n    },\n    \"editFormLabel\": {\n      \"en\": \"Approval stage\",\n      \"ru\": \"Approval stage\"\n    },\n    \"listColumnLabel\": {\n      \"en\": \"Approval stage\",\n      \"ru\": \"Approval stage\"\n    },\n    \"listFilterLabel\": {\n      \"en\": \"Approval stage\",\n      \"ru\": \"Approval stage\"\n    },\n    \"errorMessage\": {\n      \"en\": \"UF_REVIEW_STAGE\",\n      \"ru\": \"UF_REVIEW_STAGE\"\n    },\n    \"helpMessage\": {\n      \"en\": \"UF_REVIEW_STAGE\",\n      \"ru\": \"UF_REVIEW_STAGE\"\n    },\n    \"system\": false,\n    \"items\": [\n      {\n        \"id\": 4045,\n        \"value\": \"New\",\n        \"sort\": \"10\",\n        \"def\": \"Y\",\n        \"xmlId\": \"new\"\n      },\n      {\n        \"id\": 4047,\n        \"value\": \"Pending approval\",\n        \"sort\": \"20\",\n        \"def\": \"N\",\n        \"xmlId\": \"review\"\n      },\n      {\n        \"id\": 4051,\n        \"value\": \"Approved\",\n        \"sort\": \"40\",\n        \"def\": \"N\",\n        \"xmlId\": \"approved\"\n      }\n    ]\n  }\n}\n```\n\n## Error response example\n\n400 — the body contains the immutable property `fieldName`:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"IMMUTABLE_FIELD\",\n    \"message\": \"fieldName, userTypeId and multiple cannot be changed\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|---------|\n| 400 | `INVALID_ID` | `:id` is not a positive integer — the request is rejected before it reaches Bitrix24 |\n| 400 | `IMMUTABLE_FIELD` | The body contains `fieldName`, `userTypeId`, or `multiple` |\n| 400 | `INVALID_PARAMS` | Empty body, an unknown key, or a value of the wrong type |\n| 400 | `INVALID_PARAMS` | An `items` element without `value` and without `del: true`, or an option `sort` less than `1` |\n| 400 | `INVALID_PARAMS` | The option `id` belongs to another field |\n| 400 | `INVALID_PARAMS` | On a field without `multiple`, `def` is cleared from the default option and no other option is marked, or more than one option is marked |\n| 400 | `INVALID_PARAMS` | `items` is passed for a field whose type is not `enumeration` |\n| 404 | `ENTITY_NOT_FOUND` | There is no field with this `id`, or it belongs to another entity |\n| 403 | `SYSTEM_FIELD_PROTECTED` | System field `UF_CRM_TASK`, `UF_TASK_WEBDAV_FILES`, or `UF_MAIL_MESSAGE` |\n| 403 | `BITRIX_ACCESS_DENIED` | The key owner is not a Bitrix24 account administrator |\n| 403 | `WRITE_BLOCKED_READONLY_KEY` | The key is in read-only mode |\n| 403 | `TASK_CUSTOM_FIELDS_UNAVAILABLE` | The portal plan does not include task user fields |\n| 403 | `SCOPE_DENIED` | The API key does not have the `task` scope |\n| 502 | `TASK_USERFIELD_OUTCOME_UNKNOWN` | The connection to Bitrix24 dropped, or Bitrix24 returned a server error during the write — whether the change was applied is unknown. The request was not retried automatically: read the field before changing it again |\n| 502 | `TASK_USERFIELD_READBACK_FAILED` | The change was written, but the field could not be read after the write. The response contains `error.fieldId` — the field ID — and `error.writeConfirmed: true`. Retry the read, not the update |\n| 401 | `TOKEN_MISSING` | The key has no Bitrix24 tokens. For an application key, the `Authorization: Bearer USER_SESSION_TOKEN` header was not passed |\n| 401 | `MISSING_API_KEY` | The `X-Api-Key` header is missing |\n\nFull list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## Known specifics\n\n**`items` describes only the changes.** An option that is not in the array stays unchanged. In the example, the \"New\" option was kept, \"Accepted\" was deleted, \"In review\" was renamed and kept its `xmlId`, and \"Approved\" was added.\n\n## See also\n\n- [Get field](\u002Fdocs\u002Fuserfields\u002Ftasks\u002Fget)\n- [Create field](\u002Fdocs\u002Fuserfields\u002Ftasks\u002Fcreate)\n- [Delete field](\u002Fdocs\u002Fuserfields\u002Ftasks\u002Fdelete)\n- [Task fields](\u002Fdocs\u002Fuserfields\u002Ftasks)\n- [User fields](\u002Fdocs\u002Fuserfields)\n","2026-10-15",{},1795415519963]