For AI agents: markdown of this page — /docs-content-en/openlines/config.md documentation index — /llms.txt
Open Channel configurations
Manage Bitrix24 Open Channel configurations: handling inbound messages 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, etc. — see Configuration fields) — the canonical case, as it appears in responses and in GET /v1/openline-configs/fields. B24-native UPPER_SNAKE_CASE names are also accepted for backward compatibility and mapped to the right Bitrix24 name automatically. The example below uses camelCase.
Boolean fields (active, crm, workTimeEnable, welcomeMessage, …) accept true / false — the value is coerced to Bitrix24's expected "Y"/"N" automatically.
| Field | Type | Req. | Description |
|---|---|---|---|
name |
string | no | Open Channel name |
active |
boolean | no | Whether the channel is active (true / false) |
queueType |
string | no | Queue distribution: all — to everyone at once, evenly — evenly, strictly — strictly in order |
queueTime |
number | no | Wait time in the queue (seconds) before transfer |
noAnswerTime |
number | no | Time without a response (seconds) after which the noAnswerRule rule triggers |
crm |
boolean | no | Enable CRM integration |
crmCreate |
string | no | Mode for creating CRM entities on a new inquiry |
workTimeEnable |
boolean | no | Enable the working-hours schedule |
workTimeFrom |
string | no | Start of the working day (for example, "9" or "9.30") |
workTimeTo |
string | no | End of the working day (for example, "18" or "18.30") |
workTimeTimezone |
string | no | Schedule time zone (for example, "UTC") |
welcomeMessage |
boolean | no | Enable the welcome message |
welcomeMessageText |
string | no | Welcome message text |
languageId |
string | no | Channel 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 |
|---|---|---|
success |
boolean | Always true on success |
data |
number | Identifier of the created configuration |
meta.warnings |
string[] | Optional. 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 |
|---|---|---|
| 400 | VALIDATION_ERROR |
The request body is empty — no field was passed |
| 400 | VALIDATION_ERROR |
The body has no recognised field (all keys are unknown) — the message lists the unrecognised fields |
| 400 | READONLY_FIELD |
A read-only field (id, queue, dateCreate, and others) was passed in the body |
| 401 | TOKEN_MISSING |
The X-Api-Key header was not passed |
| 403 | SCOPE_DENIED |
The 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.
Unrecognised fields. Bitrix24 silently ignores unknown keys of the imopenlines.config.add method. The wrapper 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. - a read-only field (
id,queue,dateCreate, and others) is passed in the body — the request is rejected with400 READONLY_FIELD.