لوكلاء AI: ملف markdown لهذه الصفحة — /docs-content-en/entities/deal-categories.md فهرس التوثيق — /llms.txt

مقالات التوثيق متاحة حاليًا باللغة الإنجليزية فقط.

Sales pipelines

Sales pipelines (deal categories). Each pipeline has its own set of stages.

Bitrix24 API: crm.dealcategory.* Scope: crm

Pipeline stages: GET /v1/statuses?filter[entityId]=DEAL_STAGE_{categoryId}

The main pipeline with id 0 is not returned by /v1/deal-categories and is not addressable by id here — use the universal endpoint /v1/categories/2 for it.

Create a pipeline

POST /v1/deal-categories

Creates a new sales pipeline. After creation, add stages via reference data with entityId = DEAL_STAGE_{id}.

Request body parameters

Parameter Type Required Description
Parametername Typestring Requiredyes DescriptionPipeline name
Parametersort Typenumber Required DescriptionSort order

Examples

curl — personal key

Terminal
curl -X POST "https://vibecode.bitrix24.com/v1/deal-categories" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "Corporate sales", "sort": 200}'

curl — OAuth application

Terminal
curl -X POST "https://vibecode.bitrix24.com/v1/deal-categories" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "Corporate sales", "sort": 200}'

JavaScript — personal key

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/deal-categories', {
  method: 'POST',
  headers: { 'X-Api-Key': 'YOUR_API_KEY', 'Content-Type': 'application/json' },
  body: JSON.stringify({ name: 'Corporate sales', sort: 200 }),
})
const { success, data } = await res.json()

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/deal-categories', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ name: 'Corporate sales', sort: 200 }),
})
const { success, data } = await res.json()

Response fields

Field Type Description
Fieldsuccess Typeboolean DescriptionAlways true on success
Fielddata Typeobject DescriptionThe created pipeline with all fields
Fielddata.id Typenumber DescriptionPipeline ID
Fielddata.name Typestring DescriptionName
Fielddata.sort Typenumber DescriptionSort
Fielddata.isLocked Typeboolean DescriptionWhether the pipeline is locked — unavailable on the current plan
Fielddata.createdAt Typedatetime DescriptionCreation date

Response example

JSON
{
  "success": true,
  "data": {
    "id": 5,
    "createdAt": "2026-06-01T10:00:00.000Z",
    "name": "Wholesale sales",
    "sort": 200,
    "isLocked": false
  }
}

Error response example

422 — name is missing:

JSON
{
  "success": false,
  "error": { "code": "BITRIX_ERROR", "message": "Field 'NAME' is required." }
}

Errors

HTTP Code Description
HTTP422 CodeBITRIX_ERROR Descriptionname is missing — message Field 'NAME' is required.
HTTP422 CodeBITRIX_ERROR DescriptionOther Bitrix24 refusals — the reason is in message
HTTP403 CodeSCOPE_DENIED DescriptionThe API key lacks the crm scope
HTTP401 CodeMISSING_API_KEY DescriptionThe X-Api-Key header is missing

Full list of errors — Errors.

See also