Open Channels in Bitrix24: API for Lines and Connectors
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.
This section describes two related areas of the API.
- Open Channels — rules for processing inquiries within Bitrix24: operator queues, sessions, messages, chatbots, events, and CRM integration.
- Connectors — connecting and maintaining external communication channels through which clients write to open channels.
Quick navigation: all methods and events
User documentation: Contact Center and Open Channels
How to Choose a Section
|
Scenario |
What to Use |
|
Set up a line, operator queues, and inquiry processing rules |
Methods from the Open Channels section |
|
Connect your own external communication channel to Bitrix24 |
Methods from the Open Channels Connectors section |
|
Connect an external open channel from another Bitrix24 to the current account |
Method imopenlines.network.join |
|
Subscribe to message, dialog, and status events |
Events from the Connectors Events and Open Channels Events sections |
How Open Channels and Connectors are Related
Both sets of methods are used for your own external channel: imconnector.* for registering and maintaining the connector, and imopenlines.* for configuring the line and processing dialogs. If you need to connect an external open channel from another Bitrix24 account without registering your own connector, use the method imopenlines.network.join.
Relationships of Open Channels and Connectors with Other Objects
Chat. The system processes inquiries as an open channel chat. Operations with messages, operators, and sessions are performed through the chat.
Session. Within the chat, the inquiry proceeds as a session. To start a session, read history, connect an operator, and manage modes, use the group of methods imopenlines.session.*.
Operator. The line distributes inquiries among operators from the queue. Queue configuration is done through imopenlines.config.*, while operator actions in an active dialog are handled through the group of methods imopenlines.operator.*. To transfer a dialog to an operator, use USER_ID, which can be obtained through the methods user.get and user.search.
External User. A client from the external channel is linked to the dialog through USER_CODE. This identifier allows the system to determine which chat and session the inquiry belongs to.
Message. The correspondence between the client and the operator is associated with the chat and session. To send messages and save quick replies, use the methods from the Messages section, and for reacting to message changes — the Events section.
Chatbot. The bot can send messages, transfer the dialog to an operator, and end the session using methods from the group imopenlines.bot.*.
CRM. Open channel dialogs can be linked to CRM objects. To retrieve CRM chats, use the group of methods imopenlines.crm.chat.*, and to create a lead based on the dialog outcome — the method imopenlines.crm.lead.create.
Universal Lists. Quick replies are associated with the identifier QUICK_ANSWERS_IBLOCK_ID. You can obtain it using the method imopenlines.config.get, and set it when creating or updating a line using the methods imopenlines.config.add and imopenlines.config.update.
Key Identifiers
|
Identifier |
Description |
How to Obtain |
|
|
Identifier of the open channel chat. Needed for actions with dialogs, messages, operators, and chatbots |
|
|
|
Identifier of the session within the chat. Needed for reading history and managing the inquiry processing flow |
|
|
|
External code of the user from the communication channel. Needed to uniquely link the external client with the chat and session in the line |
Generated by the external channel, used in imopenlines.session.open |
|
|
Identifier of the Bitrix24 user. Needed for routing the dialog between operators and operator actions |
|
|
|
Identifier of the open channel. In the methods |
imopenlines.config.get, imopenlines.config.list.get, imopenlines.config.update |
|
|
Identifier of the connector. Needed for the methods |
Set during registration in imconnector.register in the |
How to Get Started
Connect Your Own External Channel via Connector
- Register and activate the connector: imconnector.register, imconnector.activate
- Create an open channel and link it to the channel: imopenlines.config.add, imconnector.connector.data.set
- Check message sending and connector status: imconnector.send.messages, imconnector.status
Connect an External Open Channel from Another Bitrix24
- Connect the line using the method imopenlines.network.join
- Check dialog processing: imopenlines.session.open, imopenlines.operator.answer, imopenlines.crm.message.add
To automate, connect events: Open Channels Events, Connectors Events
Overview of Methods and Events
Scope:
imopenlinesWho can perform methods: depending on the method and access permissions to open channels
Open Channels
|
Section |
When to Use |
Key Methods |
|
Line Settings |
Create a line, update settings, and retrieve parameters |
imopenlines.config.add, imopenlines.config.update, imopenlines.config.get |
|
Dialogs and Sessions |
Find a chat, start a session, read history, and manage modes |
imopenlines.session.open, imopenlines.session.start, imopenlines.session.history.get |
|
Operators |
Transfer and finish a dialog, distribute inquiries among operators |
imopenlines.operator.answer, imopenlines.operator.transfer, imopenlines.operator.finish |
|
Messages |
Send a message and save a quick reply |
|
|
CRM Chats |
Find a CRM chat and add participants |
|
|
Chatbots |
Automate the dialog using a chatbot |
imopenlines.bot.session.message.send, imopenlines.bot.session.transfer |
Events: Open Channels Events
Open Channels Connectors
|
Section |
When to Use |
Key Methods |
|
Registration and Connection |
Register a channel and activate it in the account |
imconnector.register, imconnector.activate, imconnector.connector.data.set |
|
Message Exchange |
Send, modify, and delete messages from the external channel |
imconnector.send.messages, imconnector.update.messages, imconnector.delete.messages |
|
Service Operations |
Check the connector status, get a list, and disconnect channels |
imconnector.status, imconnector.list, imconnector.unregister |
All connector methods: Open Channels Connectors
Events: Connectors Events