For AI agents: markdown of this page — /docs-content-en/entities/statuses/update.md documentation index — /llms.txt

Update dictionary record

PATCH /v1/statuses/:id

Updates the fields of a CRM dictionary record by ID.

Path parameters

Parameter Type Description
id number Dictionary record ID

Request body parameters

Parameter Type Description
name string Name
sort number Sort order
color string Color in HEX, e.g. #22B9FF. The # may be omitted

Examples

curl — personal key

Terminal
curl -X PATCH "https://vibecode.bitrix24.com/v1/statuses/42" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "Prepayment received", "sort": 35}'

curl — OAuth application

Terminal
curl -X PATCH "https://vibecode.bitrix24.com/v1/statuses/42" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "Prepayment received", "sort": 35}'

JavaScript — personal key

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/statuses/42', {
  method: 'PATCH',
  headers: { 'X-Api-Key': 'YOUR_API_KEY', 'Content-Type': 'application/json' },
  body: JSON.stringify({ name: 'Prepayment received', sort: 35 }),
})
const { success, data } = await res.json()

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/statuses/42', {
  method: 'PATCH',
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ name: 'Prepayment received', sort: 35 }),
})
const { success, data } = await res.json()

Response fields

The full updated record is returned.

Field Type Description
id number Record ID
entityId string Dictionary type (DEAL_STAGE, SOURCE, CONTACT_TYPE, etc.)
statusId string Symbolic code of the value
name string Name
nameInit string/null Original name
sort number Sort order
system boolean System value. Read-only
categoryId number/null Pipeline ID. Set for dictionaries of the form DEAL_STAGE_N, otherwise 0 or null
color string/null Color in HEX with a leading #
semantics string/null Semantics: S — success, F — failure. null — an in-progress stage or a dictionary without semantics
extra object/null Additional data for stage dictionaries DEAL_STAGE, QUOTE_STATUS, DEAL_STAGE_N — nested keys SEMANTICS and COLOR. Read-only, absent for other dictionaries

Response example

JSON
{
  "success": true,
  "data": {
    "id": 42,
    "entityId": "DEAL_STAGE",
    "statusId": "PREPAYMENT_INVOICE",
    "name": "Prepayment received",
    "nameInit": null,
    "sort": 35,
    "system": false,
    "categoryId": null,
    "color": "#39A8EF",
    "semantics": null,
    "extra": {
      "SEMANTICS": "process",
      "COLOR": "#39A8EF"
    }
  }
}

Error response example

JSON
{
  "success": false,
  "error": { "code": "ENTITY_NOT_FOUND", "message": "Status is not found." }
}

Errors

HTTP Code Description
404 ENTITY_NOT_FOUND No record with the given id
403 SCOPE_DENIED API key does not have the crm scope
401 TOKEN_MISSING API key was not provided

Full list of errors — Errors.

See also