لوكلاء AI: ملف markdown لهذه الصفحة — /docs-content-en/openlines/config.md فهرس التوثيق — /llms.txt
مقالات التوثيق متاحة حاليًا باللغة الإنجليزية فقط.
Open Channel configurations
Manage Bitrix24 Open Channel configurations: set up inbound inquiries from messengers and social networks, operator queues, working hours, CRM integration, welcome messages, and service-quality ratings.
Bitrix24 API: imopenlines.config.*
Scope: imopenlines
Create Open Channel configuration
POST /v1/openline-configs
Creates a new Open Channel configuration. At least one recognised writable field is enough to create one — the remaining parameters take their default values. The full record with identifiers and all fields is available via GET /v1/openline-configs/:id.
Request fields (body)
Minimum to create: at least one recognised writable field (see Configuration fields).
Field names. Pass every field in camelCase — name, active, queueType, crmCreate, workTimeFrom, and the others from Configuration fields. This is the canonical case — both the response and GET /v1/openline-configs/fields return fields in it. UPPER_SNAKE_CASE names are also accepted for backward compatibility. The example below uses camelCase.
Boolean fields (active, crm, workTimeEnable, welcomeMessage, …) accept true / false — the value is automatically coerced to the "Y"/"N" values Bitrix24 expects.
| Field | Type | Required | Description |
|---|---|---|---|
Fieldname |
Typestring | Requiredno | DescriptionOpen Channel name |
Fieldactive |
Typeboolean | Requiredno | DescriptionWhether the channel is active (true / false) |
FieldqueueType |
Typestring | Requiredno | DescriptionQueue distribution: all — to all operators at once, evenly — evenly across operators, strictly — strictly in the queue order |
FieldqueueTime |
Typenumber | Requiredno | DescriptionWait time in the queue (seconds) before transfer |
FieldnoAnswerTime |
Typenumber | Requiredno | DescriptionTime without a response (seconds) after which noAnswerRule triggers |
Fieldcrm |
Typeboolean | Requiredno | DescriptionEnable CRM integration |
FieldcrmCreate |
Typestring | Requiredno | DescriptionType of CRM record created on first contact. Allowed values: none, lead, deal |
FieldworkTimeEnable |
Typeboolean | Requiredno | DescriptionEnable the working-hours schedule |
FieldworkTimeFrom |
Typestring | Requiredno | DescriptionStart of the working day (for example, "9" or "9.30") |
FieldworkTimeTo |
Typestring | Requiredno | DescriptionEnd of the working day (for example, "18" or "18.30") |
FieldworkTimeTimezone |
Typestring | Requiredno | DescriptionSchedule time zone (for example, "UTC") |
FieldwelcomeMessage |
Typeboolean | Requiredno | DescriptionEnable the welcome message |
FieldwelcomeMessageText |
Typestring | Requiredno | DescriptionWelcome message text |
FieldlanguageId |
Typestring | Requiredno | DescriptionChannel language (for example, "en", "de") |
Full field list — GET /v1/openline-configs/fields.
Examples
curl — personal key
curl -X POST https://vibecode.bitrix24.com/v1/openline-configs \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Customer support",
"active": true,
"queueType": "evenly",
"workTimeEnable": true,
"workTimeFrom": "9",
"workTimeTo": "18"
}'
curl — OAuth application
curl -X POST https://vibecode.bitrix24.com/v1/openline-configs \
-H "X-Api-Key: YOUR_APP_KEY" \
-H "Authorization: Bearer USER_SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Customer support",
"active": true,
"queueType": "evenly",
"workTimeEnable": true,
"workTimeFrom": "9",
"workTimeTo": "18"
}'
JavaScript — personal key
const res = await fetch('https://vibecode.bitrix24.com/v1/openline-configs', {
method: 'POST',
headers: {
'X-Api-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
name: 'Customer support',
active: true,
queueType: 'evenly',
workTimeEnable: true,
workTimeFrom: '9',
workTimeTo: '18',
}),
})
const { success, data } = await res.json()
console.log('New configuration ID:', data)
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/openline-configs', {
method: 'POST',
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
'Content-Type': 'application/json',
},
body: JSON.stringify({
name: 'Customer support',
active: true,
queueType: 'evenly',
workTimeEnable: true,
workTimeFrom: '9',
workTimeTo: '18',
}),
})
const { success, data } = await res.json()
console.log('New configuration ID:', data)
Response fields
| Field | Type | Description |
|---|---|---|
Fieldsuccess |
Typeboolean | DescriptionAlways true on success |
Fielddata |
Typenumber | DescriptionIdentifier of the created configuration |
Fieldmeta.warnings |
Typestring[] | DescriptionOptional. Present when some passed fields are unrecognised — lists the keys Bitrix24 ignored |
Response example
{
"success": true,
"data": 29
}
Error response example
400 — the body has no recognised field:
{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "No recognised openline-configs field in the body. Unrecognised: bogusField. Provide at least one known field (e.g. lineName, queueType, active) — see GET /v1/openline-configs/fields."
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| HTTP400 | CodeVALIDATION_ERROR |
DescriptionThe request body is empty — no field was passed |
| HTTP400 | CodeVALIDATION_ERROR |
DescriptionThe body has no recognised field (all keys are unknown) — the message lists the unrecognised fields |
| HTTP400 | CodeVALIDATION_ERROR |
DescriptionThe crmCreate value is not none, lead, or deal |
| HTTP400 | CodeREADONLY_FIELD |
DescriptionA read-only field (id, queue, dateCreate, and others) was passed in the body |
| HTTP401 | CodeTOKEN_MISSING |
DescriptionThe X-Api-Key header was not passed |
| HTTP403 | CodeSCOPE_DENIED |
DescriptionThe API key lacks the imopenlines scope |
Full list of common API errors — Errors.
Known specifics
data in the response is a number (the identifier of the new configuration), not a record object. To get the created configuration with all fields, make a separate request: GET /v1/openline-configs/:id.
Request body validation. Unknown keys in the request body are not saved. Vibecode checks the body against the full field schema (Configuration fields) and reacts as follows:
- no field is recognised (e.g.
{ "bogusField": "x" }) — the request is rejected with400 VALIDATION_ERRORbefore the Bitrix24 call, and the message lists the unrecognised fields. - at least one field is recognised but some keys are unknown — the configuration is created, and the response carries
meta.warningswith the list of ignored keys. crmCreatehas a value other thannone,lead, ordeal— the whole body is rejected with400 VALIDATION_ERRORbefore Bitrix24 is called, and the configuration is not created.- a read-only field (
id,queue,dateCreate, and others) is passed in the body — the request is rejected with400 READONLY_FIELD.