Messages: Overview of Methods

If you are developing integrations for Bitrix24 using AI tools (Codex, Claude Code, Cursor), connect to the MCP server so the assistant can utilize the official REST documentation.

The messaging methods allow you to send and modify messages, work with dialogue history, context menus, and service actions in chats.

Quick navigation: all methods

Messaging Capabilities

  • Formatting — which BB codes are supported in MESSAGE and how to use them to highlight text, add links, and command inserts
  • Attachments — how to create structured content ATTACH: blocks with text, links, files, and media elements
  • Keyboards — how to add KEYBOARD with interactive buttons and handle user actions in messages
  • Context Menu — how to configure MENU with additional actions and commands for a specific message

Getting Started

  1. Send a message using the im.message.add method.
  2. If necessary, modify or delete the message using the im.message.update and im.message.delete methods.
  3. Retrieve dialogue messages using the im.dialog.messages.get method.
  4. Find the desired message using the im.dialog.messages.search method.
  5. Manage the "read" status using the im.dialog.read, im.dialog.unread methods, and the "User is typing" indicator through im.dialog.writing.

Interaction with Other Objects

User. To send a message in a personal dialogue, specify the user ID in DIALOG_ID in the format XXX. You can obtain the user ID using the user.get and user.search methods.

Chat. To work with group chats, use DIALOG_ID in the format chatXXX or sgXXX. The CHAT_ID is used in message search methods. You can obtain the chat ID using the im.chat.get method.

Chatbot. To execute chatbot commands in the context of a message, use the im.message.command method and pass BOT_ID, COMMAND. The bot ID can be obtained using the imbot.bot.list method.

Overview of Methods

Scope: im

Who can execute the methods: depends on the method

Method

Description

im.message.add

Adds a message to the chat

im.message.update

Modifies the sent message

im.message.delete

Deletes a message

im.message.like

Changes the "Like" status of a message

im.message.share

Creates an object based on a message

im.message.command

Executes a chatbot command

im.dialog.messages.get

Retrieves a list of recent messages

im.dialog.messages.search

Searches for a message in the chat

im.dialog.read

Sets the "read" status for messages

im.dialog.unread

Sets the "unread" status for messages

im.dialog.writing

Sends the "User is typing" indicator