[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-entities\u002Fitems\u002Fupdate":3,"docs-tabs-entities\u002Fitems\u002Fupdate":6},{"content":4,"lastmod":5},"\n## Update a smart process item\n\n`PATCH \u002Fv1\u002Fitems\u002F:entityTypeId\u002F:id`\n\nUpdates the fields of a smart process item. Pass only the fields you are changing.\n\nUse the `entityTypeId` field from [`GET \u002Fv1\u002Fsmart-processes`](\u002Fdocs\u002Fentities\u002Fsmart-processes\u002Flist) in the `\u002Fv1\u002Fitems\u002F:entityTypeId` path. The type record's internal `id` is a different identifier. For example, if a type is returned as `{ \"id\": 3, \"entityTypeId\": 174 }`, the path starts with `\u002Fv1\u002Fitems\u002F174`. Use the returned value rather than assuming all type IDs start at 1030.\n\n## Parameters\n\n| Parameter | Type | Required | Description |\n|----------|-----|:-----:|---------|\n| `entityTypeId` (path) | number | yes | Smart process type ID. List: [`GET \u002Fv1\u002Fsmart-processes`](\u002Fdocs\u002Fentities\u002Fsmart-processes\u002Flist) |\n| `id` (path) | number | yes | Item ID. List: [`GET \u002Fv1\u002Fitems\u002F:entityTypeId`](\u002Fdocs\u002Fentities\u002Fitems\u002Flist) |\n\n## Request fields (body)\n\n| Field | Type | Description |\n|------|-----|---------|\n| `title` | string | Name |\n| `stageId` | string | Stage. List: [`GET \u002Fv1\u002Fstatuses?filter[entityId]=DYNAMIC_{entityTypeId}_STAGE_{categoryId}`](\u002Fdocs\u002Fentities\u002Fstatuses\u002Flist) |\n| `contactId` | number | Contact ID. Search: [`GET \u002Fv1\u002Fcontacts`](\u002Fdocs\u002Fentities\u002Fcontacts\u002Flist) |\n| `companyId` | number | Company ID. Search: [`GET \u002Fv1\u002Fcompanies`](\u002Fdocs\u002Fentities\u002Fcompanies\u002Flist) |\n| `opportunity` | number | Amount. Stored only on types with product rows enabled (`isLinkWithProductsEnabled: true`). Check with [`GET \u002Fv1\u002Fsmart-processes\u002F:entityTypeId`](\u002Fdocs\u002Fentities\u002Fsmart-processes\u002Fget) |\n| `isManualOpportunity` | boolean | Amount set manually. A `true` value on a type with product rows disabled is refused with `422 AMOUNT_NOT_APPLIED` |\n| `currencyId` | string | Currency. List: [`GET \u002Fv1\u002Fcurrencies`](\u002Fdocs\u002Fentities\u002Fcurrencies\u002Flist) |\n| `assignedById` | number | Responsible person. List: [`GET \u002Fv1\u002Fusers`](\u002Fdocs\u002Fentities\u002Fusers\u002Flist) |\n| `opened` | boolean | Available to everyone |\n| `begindate` | datetime | Start date. Accepts ISO 8601, but only the date is stored — the time is dropped |\n| `closedate` | datetime | End date. Accepts ISO 8601, but only the date is stored — the time is dropped |\n| `observers` | array | Observer IDs — employees. List: [`GET \u002Fv1\u002Fusers`](\u002Fdocs\u002Fentities\u002Fusers\u002Flist) |\n\nFull field list: [GET \u002Fv1\u002Fitems\u002F:entityTypeId\u002Ffields](\u002Fdocs\u002Fentities\u002Fitems\u002Ffields). User fields (`ufCrmN_*`) are also accepted. Pass fields flat at the JSON root, without a `fields` object: it is rejected with `400 NESTED_FIELDS_ENVELOPE` before the update.\n\n## Examples\n\nThe examples use `entityTypeId = 156` and `id = 783`; replace them with your values.\n\n### curl — personal key\n\n```bash\ncurl -X PATCH https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fitems\u002F156\u002F783 \\\n  -H \"X-Api-Key: YOUR_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"stageId\": \"DT156_41:WON\",\n    \"opportunity\": 750000\n  }'\n```\n\n### curl — OAuth application\n\n```bash\ncurl -X PATCH https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fitems\u002F156\u002F783 \\\n  -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"stageId\": \"DT156_41:WON\",\n    \"opportunity\": 750000\n  }'\n```\n\n### JavaScript — personal key\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fitems\u002F156\u002F783', {\n  method: 'PATCH',\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: JSON.stringify({\n    stageId: 'DT156_41:WON',\n    opportunity: 750000,\n  }),\n})\n\nconst { success, data } = await res.json()\nconsole.log('Updated:', data.id)\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fitems\u002F156\u002F783', {\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    stageId: 'DT156_41:WON',\n    opportunity: 750000,\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 full item after the update. All fields — see [Item fields](\u002Fdocs\u002Fentities\u002Fitems\u002Ffields) |\n\n## Response example\n\nThe main fields are shown. Full list: [Item fields](\u002Fdocs\u002Fentities\u002Fitems\u002Ffields).\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"id\": 783,\n    \"title\": \"Supply contract\",\n    \"stageId\": \"DT156_41:WON\",\n    \"categoryId\": 41,\n    \"companyId\": 15,\n    \"contactId\": 42,\n    \"opportunity\": 750000,\n    \"currencyId\": \"USD\",\n    \"assignedById\": 1,\n    \"createdBy\": 1,\n    \"updatedBy\": 1,\n    \"movedBy\": 1,\n    \"createdTime\": \"2026-04-15T14:30:00+00:00\",\n    \"updatedTime\": \"2026-04-15T16:45:00+00:00\",\n    \"movedTime\": \"2026-04-15T16:45:00+00:00\"\n  }\n}\n```\n\n## Error response example\n\n404 — item not found:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"ENTITY_NOT_FOUND\",\n    \"message\": \"Item not found\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|---------|\n| 400 | `INVALID_DYNAMIC_PARAM` | `entityTypeId` is not a positive integer or is reserved (1, 2, 3, 4, 7, 31) |\n| 400 | `NESTED_FIELDS_ENVELOPE` | The body contains an object under `fields` instead of flat fields at the JSON root; the item is not updated |\n| 400 | `READONLY_FIELD` | A read-only field was passed in the body (`id`, `createdTime`, `updatedTime` and others) |\n| 400 | `CLIENT_BLOCK_DISABLED` | The body carries a client (`contactId`, `contactIds` or `companyId`) while the smart process has the \"Client\" block disabled. Check `GET \u002Fv1\u002Fsmart-processes\u002F:entityTypeId`, field `isClientEnabled` |\n| 404 | `ENTITY_NOT_FOUND` | An item with the specified ID was not found |\n| 422 | `AMOUNT_NOT_APPLIED` | The body carried `isManualOpportunity: true` while the smart process type has product rows disabled, so neither the manual mode nor the amount was stored. The item itself has already been updated: its actual state is returned in `data`, and the fields that were not applied are listed in `error.details.unappliedFields`, with their actual values in `error.details.currentValues`. An amount sent without that flag is not checked — the response does not let you tell it apart from a recalculation based on product rows |\n| 422 | `BITRIX_ERROR` | Field validation error from Bitrix24. The specific reason is in the `message` field |\n| 403 | `SCOPE_DENIED` | The API key does not have the `crm` scope |\n| 401 | `TOKEN_MISSING` | The API key has no configured tokens |\n\nFull list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## See also\n\n- [Working with files in CRM fields](\u002Fdocs\u002Frecipes\u002Fcrm-files)\n- [Get a smart process item](\u002Fdocs\u002Fentities\u002Fitems\u002Fget)\n- [Item fields](\u002Fdocs\u002Fentities\u002Fitems\u002Ffields)\n- [Create a smart process item](\u002Fdocs\u002Fentities\u002Fitems\u002Fcreate)\n- [Entity API](\u002Fdocs\u002Fentity-api)\n","2026-10-16",{},1794739384938]