لوكلاء AI: ملف markdown لهذه الصفحة — /docs-content-en/entities/statuses.md فهرس التوثيق — /llms.txt
مقالات التوثيق متاحة حاليًا باللغة الإنجليزية فقط.
CRM dictionaries
Deal stages, sources, contact types, industries and other classifiers. A reference list of values for CRM fields.
Bitrix24 API: crm.status.*
Scope: crm
To fetch a specific type, use the filter: ?filter[entityId]=DEAL_STAGE
Create dictionary record
POST /v1/statuses
Creates a new record in a CRM dictionary.
Request fields (body)
| Field | Type | Required | Description |
|---|---|---|---|
FieldentityId |
Typestring | Requiredyes | DescriptionDictionary type, for example SOURCE or DEAL_STAGE. List: GET /v1/statuses/entity-types |
FieldstatusId |
Typestring | Requiredyes | DescriptionSymbolic code of the value, unique within the dictionary |
Fieldname |
Typestring | Requiredyes | DescriptionName |
Fielddescription |
Typestring | Requiredno | DescriptionEntry description. The field is not available on every Bitrix24 account |
Fieldsort |
Typenumber | Requiredno | DescriptionSort order |
Fieldcolor |
Typestring | Requiredno | DescriptionColor in HEX, for example #22B9FF. The # may be omitted |
Fieldsemantics |
Typestring | Requiredno | DescriptionSemantics: S — success, F — failure |
Examples
curl — personal key
curl -X POST "https://vibecode.bitrix24.com/v1/statuses" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"entityId": "SOURCE", "statusId": "PARTNER", "name": "Partner", "sort": 50}'
curl — OAuth application
curl -X POST "https://vibecode.bitrix24.com/v1/statuses" \
-H "X-Api-Key: YOUR_APP_KEY" \
-H "Authorization: Bearer USER_SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{"entityId": "SOURCE", "statusId": "PARTNER", "name": "Partner", "sort": 50}'
JavaScript — personal key
const res = await fetch('https://vibecode.bitrix24.com/v1/statuses', {
method: 'POST',
headers: { 'X-Api-Key': 'YOUR_API_KEY', 'Content-Type': 'application/json' },
body: JSON.stringify({ entityId: 'SOURCE', statusId: 'PARTNER', name: 'Partner', sort: 50 }),
})
const { success, data } = await res.json()
console.log('ID:', data.id)
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/statuses', {
method: 'POST',
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
'Content-Type': 'application/json',
},
body: JSON.stringify({ entityId: 'SOURCE', statusId: 'PARTNER', name: 'Partner', sort: 50 }),
})
const { success, data } = await res.json()
Response fields
| Field | Type | Description |
|---|---|---|
Fieldsuccess |
Typeboolean | DescriptionAlways true on success |
Fielddata |
Typeobject | DescriptionThe created dictionary record |
Fielddata.id |
Typenumber | DescriptionRecord ID |
Fielddata.entityId |
Typestring | DescriptionDictionary type |
Fielddata.statusId |
Typestring | DescriptionSymbolic code |
Fielddata.name |
Typestring | DescriptionName |
Fielddata.nameInit |
Typestring/null | DescriptionOriginal name |
Fielddata.description |
Typestring | DescriptionEntry description. Not available on every Bitrix24 account |
Fielddata.sort |
Typenumber | DescriptionSort order |
Fielddata.system |
Typeboolean | DescriptionSystem value. Read-only |
Fielddata.categoryId |
Typenumber/null | DescriptionPipeline ID. Set for dictionaries of the form DEAL_STAGE_N, otherwise 0 or null |
Fielddata.color |
Typestring/null | DescriptionColor in HEX with a leading # |
Fielddata.semantics |
Typestring/null | DescriptionSemantics: S — success, F — failure. null — an in-progress stage or a dictionary without semantics |
Fielddata.extra |
Typeobject/null | DescriptionAdditional data for dictionaries with stages — STATUS, DEAL_STAGE, DEAL_STAGE_N, QUOTE_STATUS. Nested keys SEMANTICS and COLOR. The SEMANTICS values are listed in Dictionary fields. Read-only, absent for other dictionaries |
Response example
{
"success": true,
"data": {
"id": 801,
"entityId": "SOURCE",
"statusId": "PARTNER",
"name": "Partner",
"nameInit": null,
"description": "",
"sort": 50,
"system": false,
"categoryId": 0,
"color": null,
"semantics": null
}
}
Error response example
422 — duplicate code:
{
"success": false,
"error": { "code": "BITRIX_ERROR", "message": "The specified status ID already exists.", "b24Code": "ERROR_CORE" }
}
Errors
| HTTP | Code | Description |
|---|---|---|
| HTTP422 | CodeBITRIX_ERROR |
DescriptionThe dictionary already has a record with this statusId |
| HTTP422 | CodeBITRIX_ERROR |
DescriptionentityId or statusId is missing. The message names the field: The field ENTITY_ID is required. |
| HTTP422 | CodeBITRIX_ERROR |
Descriptionname is missing. The message names the required field |
| HTTP403 | CodeWRITE_BLOCKED_READONLY_KEY |
DescriptionThe key is read-only — see access rights |
| HTTP403 | CodeSCOPE_DENIED |
DescriptionAPI key does not have the crm scope |
| HTTP401 | CodeMISSING_API_KEY |
DescriptionThe X-Api-Key header is missing |
Full list of errors — Errors.