Add Open Channel imopenlines.config.add
If you are developing integrations for Bitrix24 using AI tools (Codex, Claude Code, Cursor), connect to the MCP server so that the assistant can utilize the official REST documentation.
Scope:
imopenlinesWho can execute the method: any user
The method imopenlines.config.add adds a new open channel.
To allow users to write to the open channel, set the connector settings using the method imconnector.connector.data.set.
Method Parameters
|
Name |
Description |
|
PARAMS |
Object with open channel settings (detailed description) |
PARAMS Parameter
|
Name |
Description |
|
LINE_NAME |
Name of the open channel |
|
ACTIVE |
Channel activity. Possible values:
|
|
QUEUE |
Queue of operators. An array of objects with fields Possible values:
Example:
|
|
QUEUE_TYPE |
Request distribution mode. Possible values:
|
|
QUEUE_TIME |
Time in seconds before the request is passed to the next operator |
|
NO_ANSWER_TIME |
Time in seconds before the no-answer scenario is triggered |
|
WELCOME_MESSAGE |
Send a welcome message. Possible values:
|
|
WELCOME_MESSAGE_TEXT |
Text of the welcome message |
|
WORKTIME_ENABLE |
Consider the channel's working hours. Possible values:
|
|
WORKTIME_FROM |
Start of working hours in |
|
WORKTIME_TO |
End of working hours in |
|
WORKTIME_TIMEZONE |
Time zone, for example |
|
CRM |
Search for the client in CRM. Possible values:
|
|
CRM_CREATE |
What to create in CRM for a new client |
|
VOTE_MESSAGE |
Request service quality rating. Possible values:
|
|
LANGUAGE_ID |
Language of the channel, for example |
|
CRM_CREATE_SECOND |
Additional mode for creating a CRM entity |
|
CRM_CREATE_THIRD |
Create a third CRM entity. Possible values:
|
|
CRM_CHAT_TRACKER |
Enable chat tracker for CRM. Possible values:
|
|
CRM_FORWARD |
Forward the request to the responsible person in CRM. Possible values:
|
|
CRM_TRANSFER_CHANGE |
Change the responsible person in CRM when transferring the dialogue. Possible values:
|
|
CRM_SOURCE |
Source for the created CRM entity |
|
MAX_CHAT |
Maximum number of simultaneous dialogues for the operator |
|
TYPE_MAX_CHAT |
Type of
|
|
CATEGORY_ENABLE |
Enable categories. Possible values:
|
|
CATEGORY_ID |
Identifier of the category |
|
SESSION_PRIORITY |
Session priority in the queue |
|
WELCOME_BOT_ENABLE |
Enable welcome chatbot. Possible values:
|
|
WELCOME_BOT_JOIN |
When to connect the bot. Possible values:
|
|
WELCOME_BOT_ID |
Identifier of the chatbot |
|
WELCOME_BOT_TIME |
After how many seconds to transfer the dialogue from the bot to the queue |
|
WELCOME_BOT_LEFT |
When to disconnect the bot. Possible values:
|
|
CHECK_AVAILABLE |
Check the availability of the operator during distribution. Possible values:
|
|
WATCH_TYPING |
Show typing indicator. Possible values:
|
|
SEND_WELCOME_EACH_SESSION |
Send a greeting in each session. Possible values:
|
|
OPERATOR_DATA |
Format of operator data. Possible values:
|
|
DEFAULT_OPERATOR_DATA |
Default operator data. Possible fields:
|
|
NO_ANSWER_RULE |
Scenario if the operator did not respond. Possible values:
|
|
NO_ANSWER_FORM_ID |
Identifier of the CRM form for the no-answer scenario |
|
NO_ANSWER_BOT_ID |
Identifier of the chatbot for the no-answer scenario |
|
NO_ANSWER_TEXT |
Text for the no-answer scenario |
|
WORKTIME_DAYOFF |
Days off. Possible values of elements:
|
|
WORKTIME_HOLIDAYS |
Holidays in string format, listed as |
|
WORKTIME_DAYOFF_RULE |
Scenario during non-working hours. Possible values:
|
|
WORKTIME_DAYOFF_FORM_ID |
Identifier of the CRM form for non-working hours |
|
WORKTIME_DAYOFF_BOT_ID |
Identifier of the chatbot for non-working hours |
|
WORKTIME_DAYOFF_TEXT |
Text message during non-working hours |
|
CLOSE_RULE |
Scenario upon closure. Possible values:
|
|
CLOSE_FORM_ID |
Identifier of the CRM form upon closure |
|
CLOSE_BOT_ID |
Identifier of the chatbot upon closure |
|
CLOSE_TEXT |
Text message upon closure |
|
VOTE_TIME_LIMIT |
Time limit for voting |
|
VOTE_CLOSING_DELAY |
Close the session immediately after rating. Possible values:
|
|
VOTE_BEFORE_FINISH |
Request rating before completion. Possible values:
|
|
VOTE_MESSAGE_1_TEXT |
Text for rating request in the widget |
|
VOTE_MESSAGE_1_LIKE |
Text after positive rating in the widget |
|
VOTE_MESSAGE_1_DISLIKE |
Text after negative rating in the widget |
|
VOTE_MESSAGE_2_TEXT |
Text for rating request in external channels |
|
VOTE_MESSAGE_2_LIKE |
Text after positive rating in external channels |
|
VOTE_MESSAGE_2_DISLIKE |
Text after negative rating in external channels |
|
AUTO_CLOSE_RULE |
Auto-closing scenario. Possible values:
|
|
FULL_CLOSE_TIME |
Time for full closure after manual closure |
|
AUTO_CLOSE_TIME |
Time until auto-closure |
|
AUTO_CLOSE_FORM_ID |
Identifier of the CRM form for auto-closure |
|
AUTO_CLOSE_BOT_ID |
Identifier of the chatbot for auto-closure |
|
AUTO_CLOSE_TEXT |
Text upon auto-closure |
|
AUTO_EXPIRE_TIME |
Lifetime of automatically closed session |
|
TEMPORARY |
Create a temporary channel. Possible values:
|
|
QUICK_ANSWERS_IBLOCK_ID |
Identifier of the quick answers info block |
|
KPI_FIRST_ANSWER_TIME |
Control of the first response time |
|
KPI_FIRST_ANSWER_ALERT |
Enable notification for the first response. Possible values:
|
|
KPI_FIRST_ANSWER_LIST |
List of recipients for the first response notification |
|
KPI_FIRST_ANSWER_TEXT |
Text of the first response notification |
|
KPI_FURTHER_ANSWER_TIME |
Control of subsequent response times |
|
KPI_FURTHER_ANSWER_ALERT |
Enable notification for subsequent responses. Possible values:
|
|
KPI_FURTHER_ANSWER_LIST |
List of recipients for subsequent response notifications |
|
KPI_FURTHER_ANSWER_TEXT |
Text of the subsequent response notification |
|
KPI_CHECK_OPERATOR_ACTIVITY |
Monitor operator activity. Possible values:
|
|
USE_WELCOME_FORM |
Use welcome CRM form. Possible values:
|
|
WELCOME_FORM_ID |
Identifier of the welcome CRM form |
|
WELCOME_FORM_DELAY |
Show the form with a delay. Possible values:
|
|
CONFIRM_CLOSE |
Request confirmation for closure. Possible values:
|
|
IGNORE_WELCOME_FORM_RESPONSIBLE |
Ignore the responsible person in the welcome form. Possible values:
|
Code Examples
How to Use Examples in Documentation
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"PARAMS": {
"LINE_NAME": "Online Store Support Line",
"QUEUE": [
{
"ENTITY_TYPE": "user",
"ENTITY_ID": "1"
},
{
"ENTITY_TYPE": "user",
"ENTITY_ID": "15"
},
{
"ENTITY_TYPE": "user",
"ENTITY_ID": "23"
}
],
"QUEUE_TYPE": "strictly",
"QUEUE_TIME": 45,
"NO_ANSWER_TIME": 120,
"WELCOME_MESSAGE": "Y",
"WELCOME_MESSAGE_TEXT": "Hello! We will respond within a couple of minutes",
"CRM": "Y",
"CRM_CREATE": "deal",
"CRM_SOURCE": "openline_web",
"CRM_FORWARD": "Y",
"MAX_CHAT": 4,
"TYPE_MAX_CHAT": "answered_new",
"WORKTIME_ENABLE": "Y",
"WORKTIME_FROM": "09:00",
"WORKTIME_TO": "21:00",
"WORKTIME_TIMEZONE": "Europe/Berlin",
"WORKTIME_DAYOFF": [
"SA",
"SU"
],
"WORKTIME_DAYOFF_RULE": "text",
"WORKTIME_DAYOFF_TEXT": "The line is currently closed. Please write, and we will respond during working hours"
}
}' \
https://**put_your_bitrix24_address**/rest/**put_your_user_id_here**/**put_your_webhook_here**/imopenlines.config.add
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"PARAMS": {
"LINE_NAME": "Online Store Support Line",
"QUEUE": [
{
"ENTITY_TYPE": "user",
"ENTITY_ID": "1"
},
{
"ENTITY_TYPE": "user",
"ENTITY_ID": "15"
},
{
"ENTITY_TYPE": "user",
"ENTITY_ID": "23"
}
],
"QUEUE_TYPE": "strictly",
"QUEUE_TIME": 45,
"NO_ANSWER_TIME": 120,
"WELCOME_MESSAGE": "Y",
"WELCOME_MESSAGE_TEXT": "Hello! We will respond within a couple of minutes",
"CRM": "Y",
"CRM_CREATE": "deal",
"CRM_SOURCE": "openline_web",
"CRM_FORWARD": "Y",
"MAX_CHAT": 4,
"TYPE_MAX_CHAT": "answered_new",
"WORKTIME_ENABLE": "Y",
"WORKTIME_FROM": "09:00",
"WORKTIME_TO": "21:00",
"WORKTIME_TIMEZONE": "Europe/Berlin",
"WORKTIME_DAYOFF": [
"SA",
"SU"
],
"WORKTIME_DAYOFF_RULE": "text",
"WORKTIME_DAYOFF_TEXT": "The line is currently closed. Please write, and we will respond during working hours"
},
"auth": "**put_access_token_here**"
}' \
https://**put_your_bitrix24_address**/rest/imopenlines.config.add
try
{
const response = await $b24.callMethod(
'imopenlines.config.add',
{
PARAMS: {
LINE_NAME: 'Online Store Support Line',
QUEUE: [
{
ENTITY_TYPE: 'user',
ENTITY_ID: '1'
},
{
ENTITY_TYPE: 'user',
ENTITY_ID: '15'
},
{
ENTITY_TYPE: 'user',
ENTITY_ID: '23'
}
],
QUEUE_TYPE: 'strictly',
QUEUE_TIME: 45,
NO_ANSWER_TIME: 120,
WELCOME_MESSAGE: 'Y',
WELCOME_MESSAGE_TEXT: 'Hello! We will respond within a couple of minutes',
CRM: 'Y',
CRM_CREATE: 'deal',
CRM_SOURCE: 'openline_web',
CRM_FORWARD: 'Y',
MAX_CHAT: 4,
TYPE_MAX_CHAT: 'answered_new',
WORKTIME_ENABLE: 'Y',
WORKTIME_FROM: '09:00',
WORKTIME_TO: '21:00',
WORKTIME_TIMEZONE: 'Europe/Berlin',
WORKTIME_DAYOFF: ['SA', 'SU'],
WORKTIME_DAYOFF_RULE: 'text',
WORKTIME_DAYOFF_TEXT: 'The line is currently closed. Please write, and we will respond during working hours'
}
}
);
const result = response.getData().result;
console.log(result);
}
catch (error)
{
console.error(error);
}
try {
$response = $b24Service
->core
->call(
'imopenlines.config.add',
[
'PARAMS' => [
'LINE_NAME' => 'Online Store Support Line',
'QUEUE' => [
[
'ENTITY_TYPE' => 'user',
'ENTITY_ID' => '1',
],
[
'ENTITY_TYPE' => 'user',
'ENTITY_ID' => '15',
],
[
'ENTITY_TYPE' => 'user',
'ENTITY_ID' => '23',
],
],
'QUEUE_TYPE' => 'strictly',
'QUEUE_TIME' => 45,
'NO_ANSWER_TIME' => 120,
'WELCOME_MESSAGE' => 'Y',
'WELCOME_MESSAGE_TEXT' => 'Hello! We will respond within a couple of minutes',
'CRM' => 'Y',
'CRM_CREATE' => 'deal',
'CRM_SOURCE' => 'openline_web',
'CRM_FORWARD' => 'Y',
'MAX_CHAT' => 4,
'TYPE_MAX_CHAT' => 'answered_new',
'WORKTIME_ENABLE' => 'Y',
'WORKTIME_FROM' => '09:00',
'WORKTIME_TO' => '21:00',
'WORKTIME_TIMEZONE' => 'Europe/Berlin',
'WORKTIME_DAYOFF' => ['SA', 'SU'],
'WORKTIME_DAYOFF_RULE' => 'text',
'WORKTIME_DAYOFF_TEXT' => 'The line is currently closed. Please write, and we will respond during working hours',
],
]
);
$result = $response
->getResponseData()
->getResult();
print_r($result);
} catch (Throwable $e) {
echo $e->getMessage();
}
BX24.callMethod(
'imopenlines.config.add',
{
PARAMS: {
LINE_NAME: 'Online Store Support Line',
QUEUE: [
{
ENTITY_TYPE: 'user',
ENTITY_ID: '1'
},
{
ENTITY_TYPE: 'user',
ENTITY_ID: '15'
},
{
ENTITY_TYPE: 'user',
ENTITY_ID: '23'
}
],
QUEUE_TYPE: 'strictly',
QUEUE_TIME: 45,
NO_ANSWER_TIME: 120,
WELCOME_MESSAGE: 'Y',
WELCOME_MESSAGE_TEXT: 'Hello! We will respond within a couple of minutes',
CRM: 'Y',
CRM_CREATE: 'deal',
CRM_SOURCE: 'openline_web',
CRM_FORWARD: 'Y',
MAX_CHAT: 4,
TYPE_MAX_CHAT: 'answered_new',
WORKTIME_ENABLE: 'Y',
WORKTIME_FROM: '09:00',
WORKTIME_TO: '21:00',
WORKTIME_TIMEZONE: 'Europe/Berlin',
WORKTIME_DAYOFF: ['SA', 'SU'],
WORKTIME_DAYOFF_RULE: 'text',
WORKTIME_DAYOFF_TEXT: 'The line is currently closed. Please write, and we will respond during working hours'
}
},
function(result)
{
if (result.error())
{
console.error(result.error());
}
else
{
console.log(result.data());
}
}
);
require_once('crest.php');
$result = CRest::call(
'imopenlines.config.add',
[
'PARAMS' => [
'LINE_NAME' => 'Online Store Support Line',
'QUEUE' => [
[
'ENTITY_TYPE' => 'user',
'ENTITY_ID' => '1',
],
[
'ENTITY_TYPE' => 'user',
'ENTITY_ID' => '15',
],
[
'ENTITY_TYPE' => 'user',
'ENTITY_ID' => '23',
],
],
'QUEUE_TYPE' => 'strictly',
'QUEUE_TIME' => 45,
'NO_ANSWER_TIME' => 120,
'WELCOME_MESSAGE' => 'Y',
'WELCOME_MESSAGE_TEXT' => 'Hello! We will respond within a couple of minutes',
'CRM' => 'Y',
'CRM_CREATE' => 'deal',
'CRM_SOURCE' => 'openline_web',
'CRM_FORWARD' => 'Y',
'MAX_CHAT' => 4,
'TYPE_MAX_CHAT' => 'answered_new',
'WORKTIME_ENABLE' => 'Y',
'WORKTIME_FROM' => '09:00',
'WORKTIME_TO' => '21:00',
'WORKTIME_TIMEZONE' => 'Europe/Berlin',
'WORKTIME_DAYOFF' => ['SA', 'SU'],
'WORKTIME_DAYOFF_RULE' => 'text',
'WORKTIME_DAYOFF_TEXT' => 'The line is currently closed. Please write, and we will respond during working hours',
],
]
);
print_r($result);
Response Handling
HTTP Status: 200
{
"result": 15,
"time": {
"start": 1741688359.737944,
"finish": 1741688360.028349,
"duration": 0.2904050350189209,
"processing": 0.16270899772644043,
"date_start": "2025-03-11T10:25:59+01:00",
"date_finish": "2025-03-11T10:26:00+01:00",
"operating_reset_at": 1741688960,
"operating": 0
}
}
Returned Data
|
Name |
Description |
|
result |
Identifier of the created open channel |
|
time |
Information about the request execution time |
Error Handling
|
Name |
Description |
|
error |
String error code. It may consist of digits, Latin letters, and underscores |
|
error_description |
Textual description of the error. The description is not intended to be shown to the end user in its raw form |
Statuses and System Error Codes
HTTP Status: 20x, 40x, 50x
The errors described below may occur when calling any method.
|
Status |
Code |
Description |
|
|
|
An internal server error has occurred. Please contact the server administrator or Bitrix24 technical support |
|
|
|
An internal server error has occurred. Please contact the server administrator or Bitrix24 technical support |
|
|
|
The request intensity limit has been exceeded |
|
|
|
The current method is not permitted for calls using batch |
|
|
|
The maximum length of parameters passed to the batch method has been exceeded |
|
|
|
Invalid access token or webhook code |
|
|
|
The HTTPS protocol is required for method calls |
|
|
|
The REST API is blocked due to overload. This is a manual individual block; please contact Bitrix24 technical support to lift it |
|
|
|
The REST API is only available on commercial plans |
|
|
|
The user associated with the access token or webhook used to call the method lacks the necessary permissions |
|
|
|
The manifest is not available |
|
|
|
The request requires higher privileges than those provided by the webhook token |
|
|
|
The provided access token has expired |
|
|
|
The user does not have access to the application. This means that the application is installed, but the portal administrator has restricted access to this application to specific users only |
|
|
|
The public part of the site is closed. To open the public part of the site on an on-premise installation, disable the "Temporary closure of the public part of the site" option. Path to the setting: Desktop > Settings > Product Settings > Module Settings > Main Module > Temporary closure of the public part of the site |
Continue Learning
- Open Channels: Overview of Methods and Events
- Update Open Channel imopenlines.config.update
- Get Open Line by ID imopenlines.config.get
- Get the List of Open Channels imopenlines.config.list.get
- Delete Open Channel imopenlines.config.delete
- хХ№ЕЪъ(ю.шьщзутдштуы-сщташп-зфер-пуеюьв)