Chats in Bitrix24: Overview of Methods
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.
A chat in Bitrix24 helps you:
- communicate one-on-one
- discuss tasks in a group
- work with notifications, files, and messages within a single messenger interface
Chats are managed by the im.* methods. Individual scenarios — participants, messages, notifications, search, files, and special operations — are placed in subsections.
Quick navigation: all methods
User documentation: Chats in Bitrix24: Interface and Capabilities
How to Choose a Subsection
|
If You Need To |
Open the Subsection |
|
Change the title, color, avatar, or owner of a chat |
|
|
Add, retrieve, or remove participants |
|
|
Send, modify, and read messages |
|
|
Format a message, build an attachment, a keyboard, or a context menu |
|
|
Send notifications and manage their read status |
|
|
Upload and download chat files |
|
|
Search chats, employees, and departments |
|
|
Retrieve user data and manage the status |
|
|
Retrieve the composition of company departments |
|
|
Pin, hide, and mute chats |
|
|
Understand the mechanisms of the previous generation of chat applications |
Chat Identifiers
A group chat and a private dialog differ by the DIALOG_ID identifier:
|
Format |
What It Means |
Example |
|
|
A private dialog, where |
|
|
|
A group chat, where |
|
|
|
A workgroup or project chat, where |
|
Some methods accept not DIALOG_ID but a numeric CHAT_ID — the same value without the chat prefix.
Chats linked to CRM, tasks, the calendar, and Open Channels are found by the ENTITY_TYPE and ENTITY_ID pair with the im.chat.get method.
Authorization and Limits
- the
im.*andim.v2.*methods work in theimscope. The exception is theimbot.app.*methods from the Deprecated subsection — they require theimbotscope - the notification sending methods im.notify, im.notify.personal.add, and im.notify.system.add cannot be called with session authorization — call them via a webhook or with an application token
- when calling via a webhook, the
TAGandSUB_TAGtags are passed together withCLIENT_ID - the size of the serialized
ATTACHattachment is limited to 60,000 characters - in the search methods, the search phrase must be at least two characters, and
LIMITis 50 at most - the chat avatar is passed as a Base64 string, and the maximum image size is 5000×5000 pixels
- the content of a file uploaded to a chat is passed as a Base64 string, with a maximum size of 100 MB
How to Get Started
- Create a chat with the im.chat.add method or obtain an existing identifier through im.chat.get
- Retrieve the basic dialog data with the im.dialog.get method and, if necessary, the list of recent chats through im.recent.list
- Add participants to the chat with the im.chat.user.add method
- Configure the chat if needed: change the title, color, avatar, or owner with the methods of the Chat Update subsection
- Send a message through im.message.add or a notification through im.notify
Interaction with Other Objects
User. Most methods operate on behalf of the current user or use the identifiers USER_ID, USERS. You can obtain a user identifier with the user.get method. You can work with users using the methods of the Users subsection.
Company departments. The methods for searching and working with departments use the department identifier ID. You can obtain a department identifier with the get department list method or the search departments by name method.
Files. A chat file is stored on Drive and linked to a message. How to upload and download a file is described in the Files subsection.
CRM, tasks, and the calendar. A chat can be linked to an external object. The link is set by the ENTITY_TYPE and ENTITY_ID pair when creating the chat with the im.chat.add method, and you can find the linked chat by this pair with the im.chat.get method.
Chatbots. The same operations on behalf of a bot are performed by the methods of the Chatbots section.
Current API Version
For new integrations, use the im.* methods from this section and the im.v2 methods wherever the scenario has already been migrated to the new generation of the API.
What is replaced by what:
|
Deprecated Path |
Current Replacement |
|
im.disk.folder.get + upload through Drive methods + im.disk.file.commit |
im.v2.File.upload — a single call instead of a chain |
|
There is no replacement yet, use these methods |
|
|
im.search.last.add, im.search.last.get, im.search.last.delete |
There is no replacement: the methods work, but the result is not displayed in the M1 chat interface |
|
There is no replacement: the methods work, but the result is not displayed in the M1 chat interface |
|
|
The previous generation of chat applications — the Deprecated subsection |
The user events of the messenger are collected in the im.v2: Events section.
The remaining im.* methods from this section are current and have no deprecated variants.
Widgets
You can embed an application into the chat interface. An embedding adds an action next to the input field, an item in the chat sidebar, an action in the context menu of a message, or your own section in the messenger navigation menu.
- Item in the panel above the input field
IM_TEXTAREA - Item in the chat sidebar
IM_SIDEBAR - Item in the context menu of a message
IM_CONTEXT_MENU - Item in the messenger navigation menu
IM_NAVIGATION
To register an embedding point, use the method placement.bind and pass the required code in the PLACEMENT parameter. All placements of the section, with the setup order and the call context, are collected in the overview Widgets in Messenger: Overview of Embedding Points.
Overview of Methods
Scope:
imWho can execute the method: depending on the method
Main Chat Methods
|
Method |
Description |
|
Creates a chat |
|
|
Retrieves the chat identifier |
|
|
Retrieves chat data |
|
|
Retrieves a shortened list of recent chats |
|
|
Retrieves a list of chats |
|
|
Retrieves message and notification counters |
|
|
Retrieves API revisions for the IM module |
Chat Update
|
Method |
Description |
|
Changes the chat owner |
|
|
Changes the chat title |
|
|
Changes the chat avatar |
|
|
Changes the chat color |
Chat Participants
|
Method |
Description |
|
Adds participants to the chat |
|
|
Retrieves participant identifiers of the chat |
|
|
Retrieves the list of participants |
|
|
Removes participants from the chat |
|
|
Allows the current user to leave the chat |
Messages
|
Method |
Description |
|
Adds a message |
|
|
Modifies a sent message |
|
|
Deletes a message |
|
|
Changes the "like" status of a message |
|
|
Creates a chat, task, post, or calendar event based on a message |
|
|
Executes a chatbot command |
|
|
Retrieves the list of recent messages |
|
|
Searches for messages in the chat |
|
|
Marks messages as "read" |
|
|
Marks messages as "unread" |
|
|
Sends the "User is typing" status |
Notifications
|
Method |
Description |
|
Sends a notification |
|
|
Sends a personal notification |
|
|
Sends a system notification |
|
|
Returns user notifications |
|
|
Returns the schema of notification types |
|
|
Marks a list of notifications as read |
|
|
Marks a notification as read or returns it to unread |
|
|
Marks all notifications as read |
|
|
Replies to a notification with a quick response |
|
|
Interacts with notification buttons |
|
|
Deletes notifications |
|
|
Searches through notification history |
Search
|
Method |
Description |
|
Searches chats by name |
|
|
Searches departments |
|
|
Searches users |
Methods of the Previous Version of the Chat
|
Method |
Description |
|
Adds search to history |
|
|
Retrieves search history |
|
|
Deletes search from history |
Departments
|
Method |
Description |
|
Retrieves information about a department |
|
|
Retrieves a list of department managers |
|
|
Retrieves a list of department employees |
|
|
Retrieves a list of colleagues of the current user |
Users
|
Method |
Description |
|
Retrieves user data |
|
|
Retrieves data about a list of users |
|
|
Sets the user's status in the chat |
|
|
Retrieves the user's set status |
Methods of the Previous Version of the Chat
|
Method |
Description |
|
Sets the automatic status "Away" |
|
|
Disables the automatic status "Away" |
Special Operations
|
Method |
Description |
|
Pins the chat at the top of the list |
|
|
Sets or removes the "unread" label on the chat |
|
|
Marks all chats of the user as "read" |
|
|
Disables notifications from the chat |
|
|
Removes the chat from the recent list |
Files
|
Method |
Description |
|
Uploads a file to the chat |
|
|
Returns a link to download the file |
|
|
Saves a file to your Drive |
|
|
Deletes a file from the chat folder |
Methods of the Previous Generation of the API
|
Method |
Description |
|
Adds a file to the chat. Replaced by the im.v2.File.upload method |
|
|
Retrieves the folder for storing chat files. The folder is no longer needed to upload a file |
Previous Generation of Chat Applications
The methods work in the imbot scope and are kept only to support existing integrations. For new development, use chatbots and messenger widgets.
|
Method |
Description |
|
Registers a chat application |
|
|
Updates the data of a chat application |
|
|
Deletes a chat application |
Working with Messenger Events
|
Method |
Description |
|
Subscribes the current user to event logging |
|
|
Returns accumulated events |
|
|
Stops event logging |