لوكلاء AI: ملف markdown لهذه الصفحة — /docs-content-en/chats.md فهرس التوثيق — /llms.txt

مقالات التوثيق متاحة حاليًا باللغة الإنجليزية فقط.

Chats and messages

Work with the Bitrix24 messenger on behalf of the authorized user: find CRM entity chats, read and send messages, manage members, upload files, and receive events via polling.

Scope: im | Base URL: https://vibecode.bitrix24.com/v1 | Authorization: X-Api-Key

Quick start | Full example | Endpoint reference | Error codes

Documentation sections

  • Links and guests — chat links for employees, joining by code, guest links and invitations by email and SMS
  • Chat discovery — recent dialogs, unread counters, folders, access checks and external IDs, channels, collabs and external chats, shared chats, changes since a given time, CRM entity chats, search and dialog details
  • Messages — reading, loading, context, sending, editing, deleting, marking as read, "read later", bulk loading
  • Chat management — group chats, ownership, notifications, the unread mark, joining, parent chats, deletion, pinning, marking all chats or a list section as read, leaving
  • Members — members, mentionable users, membership checks and managers, adding and removing
  • Files — uploading files to a chat, uploading without posting and publishing uploaded files, saving them to Drive, transcribing audio, file metadata, the chat folder on Drive
  • CoPilot — the CoPilot draft chat, the assistant's model and role, regenerating and rating answers
  • Stickers — sticker packs, adding other users' packs, deletion, recent stickers
  • Messenger settings — the user's general settings, status
  • Service methods — task and flow forms, context for bots, Zoom, the state of updates, plan restrictions, promo hints, the user's department, desktop app logout
  • Events — subscribing, polling messenger events, unsubscribing

Message formatting

References for formatting text when sending and editing messages:

Chat identifiers

Two kinds of identifiers appear in requests:

  • dialogId — the dialog identifier: a number (user ID) for a private conversation, or a string of the form chatN (for example, chat123) for group chats.
  • chatId — the numeric chat ID without the chat prefix. Required for managing the chat, members, and files.

Instead of your own identifier, you can pass the literal me — it is replaced with the ID of the current user who owns the key. This lets you send a message to yourself without requesting your own ID with a separate call. The literal is written in lowercase and works everywhere dialogId is accepted. The exception is marking as read, which accepts me only in v2 mode.

Example — send yourself a notification:

Terminal
curl -X POST "https://vibecode.bitrix24.com/v1/chats/me/messages" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"message": "Quarterly report is ready"}'

Direct message to a user

To send a direct message to a specific user, pass their numeric Bitrix24 user ID as the dialogId. No separate lookup or dialog creation is needed — POST /v1/chats/:dialogId/messages with a numeric dialogId delivers the message to a private conversation with that user. The chat lookup GET /v1/chats/find finds CRM entity chats and is not required for a private dialog.

A user's numeric ID comes from the user list GET /v1/users.

Terminal
curl -X POST "https://vibecode.bitrix24.com/v1/chats/42/messages" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"message": "Sales digest for today is ready"}'

Quick start

Find the chat of a CRM deal, read the messages, and send a reply.

1. Find the deal chat

Terminal
curl -H "X-Api-Key: YOUR_API_KEY" \
  "https://vibecode.bitrix24.com/v1/chats/find?entityType=CRM&entityId=DEAL|123"

Response:

JSON
{
  "success": true,
  "data": {
    "id": 2741
  }
}

data.id is the numeric chatId. To build the dialogId when calling the message endpoints, add the chat prefix: chat2741.

2. Read the messages

Terminal
curl -H "X-Api-Key: YOUR_API_KEY" \
  "https://vibecode.bitrix24.com/v1/chats/chat2741/messages?limit=5"

Response:

JSON
{
  "success": true,
  "data": {
    "chatId": 2741,
    "messages": [
      {
        "id": 9357,
        "chatId": 2741,
        "authorId": 1,
        "date": "2026-04-26T18:10:54+00:00",
        "text": "Team, the proposal is approved. We can issue the invoice.",
        "unread": false
      }
    ],
    "users": [
      {
        "id": 1,
        "name": "John Brown",
        "firstName": "John",
        "lastName": "Brown"
      }
    ],
    "files": []
  }
}

3. Send a reply

Terminal
curl -X POST "https://vibecode.bitrix24.com/v1/chats/chat2741/messages" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"message": "Invoice issued. Number: INV-2026-0458"}'

Response:

JSON
{
  "success": true,
  "data": 36889
}

data is the ID of the sent message.

Full example

An end-to-end scenario: create a group chat, send a greeting, mark the conversation as read, rename the chat, and leave it.

javascript
const VIBE_KEY = process.env.VIBE_KEY
const BASE = 'https://vibecode.bitrix24.com/v1'

async function api(method, path, body = null) {
  const opts = { method, headers: { 'X-Api-Key': VIBE_KEY } }
  if (body) {
    opts.headers['Content-Type'] = 'application/json'
    opts.body = JSON.stringify(body)
  }
  const res = await fetch(`${BASE}${path}`, opts)
  return res.json()
}

// 1. Create a group chat
const created = await api('POST', '/chats', {
  title: 'Working group',
  users: [1, 5, 12],
})
const chatId = created.data            // numeric chatId
const dialogId = `chat${chatId}`       // dialogId for the message endpoints
console.log('Chat created, ID:', chatId)

// 2. Send a greeting
const sent = await api('POST', `/chats/${dialogId}/messages`, {
  message: 'Welcome to the working group!',
})
console.log('Message sent, ID:', sent.data)

// 3. Mark the conversation as read
const read = await api('POST', `/chats/${dialogId}/read`, {})
console.log('Unread remaining:', read.data.counter)

// 4. Rename the chat — management calls use the numeric chatId, without the chat prefix
await api('PATCH', `/chats/${chatId}`, {
  title: 'Project: Equipment delivery',
})

// 5. Leave the chat
await api('POST', `/chats/${chatId}/leave`, {})
console.log('Done')

If you are the chat owner, first transfer ownership via POST /v1/chats/:chatId/owner, then leave the chat — otherwise you will leave the chat but remain its owner.

Endpoint reference

All 150 endpoints in this section:

Method Path Bitrix24 method Description
MethodGET Path/v1/chats/recent Bitrix24 methodim.recent.list; with format=v2 — im.v2.Recent.load, im.v2.Recent.tail DescriptionRecent dialogs
MethodGET Path/v1/chats/counters Bitrix24 methodim.v2.Counter.get DescriptionUnread counters
MethodGET Path/v1/chats/recent/channels Bitrix24 methodim.v2.Recent.Channel.tail DescriptionChannel list
MethodGET Path/v1/chats/recent/collabs Bitrix24 methodim.v2.Recent.Collab.tail DescriptionCollab list
MethodGET Path/v1/chats/projects/:projectId/recent Bitrix24 methodim.v2.Recent.load, im.v2.Recent.tail DescriptionProject chats
MethodGET Path/v1/chats/recent/external Bitrix24 methodim.v2.Recent.ExternalChat.tail DescriptionExternal chats of a section
MethodGET Path/v1/chats/shared Bitrix24 methodim.v2.Chat.listShared DescriptionShared chats with a user
MethodGET Path/v1/chats/sync Bitrix24 methodim.v2.Sync.list DescriptionChat changes since a given time
MethodGET Path/v1/chats/find Bitrix24 methodim.chat.get DescriptionFind a CRM entity chat
MethodGET Path/v1/chats/search Bitrix24 methodim.search.chat.list DescriptionSearch chats by text
MethodGET Path/v1/chats/folders Bitrix24 methodim.v2.Folder.list DescriptionChat folders
MethodGET Path/v1/chats/folders/:folderId/recent Bitrix24 methodim.v2.Folder.Recent.tail DescriptionFolder chats
MethodGET Path/v1/chats/:dialogId Bitrix24 methodim.dialog.get; with format=v2 — im.v2.Chat.get DescriptionDialog details
MethodGET Path/v1/chats/:dialogId/messages Bitrix24 methodim.dialog.messages.get; with format=v2 — im.v2.Chat.Message.tail DescriptionRead messages
MethodGET Path/v1/chats/:dialogId/load Bitrix24 methodim.v2.Chat.load; with shallow=true — im.v2.Chat.shallowLoad DescriptionLoad a chat
MethodGET Path/v1/chats/messages/:messageId/context Bitrix24 methodim.v2.Chat.Message.getContext DescriptionMessages around a message
MethodGET Path/v1/chats/:dialogId/messages/initial Bitrix24 methodim.v2.Chat.Message.list DescriptionFirst page of a chat
MethodGET Path/v1/chats/messages/:messageId/viewers Bitrix24 methodim.v2.Chat.Message.tailViewers DescriptionWho viewed a message
MethodPOST Path/v1/chats/:dialogId/messages Bitrix24 methodim.message.add; with format=v2 — im.v2.Chat.Message.send DescriptionSend a message
MethodPATCH Path/v1/chats/:dialogId/messages/:messageId Bitrix24 methodim.message.update; with format=v2 — im.v2.Chat.Message.update DescriptionEdit a message
MethodDELETE Path/v1/chats/:dialogId/messages/:messageId Bitrix24 methodim.message.delete; with format=v2 — im.v2.Chat.Message.delete DescriptionDelete a message
MethodPOST Path/v1/chats/messages/:messageId/disappear Bitrix24 methodim.v2.Chat.Message.disappear DescriptionDisappearing message
MethodPOST Path/v1/chats/messages/:messageId/inform Bitrix24 methodim.v2.Chat.Message.inform DescriptionNotify a recipient in Do Not Disturb mode
MethodDELETE Path/v1/chats/messages/:messageId/url-preview Bitrix24 methodim.v2.Chat.Message.deleteRichUrl DescriptionRemove a link preview
MethodPOST Path/v1/chats/:dialogId/read Bitrix24 methodim.dialog.read; with format=v2 — im.v2.Chat.read DescriptionMark as read
MethodPOST Path/v1/chats/messages/read Bitrix24 methodim.v2.Chat.Message.read DescriptionMark messages as read
MethodPOST Path/v1/chats/messages/:messageId/mark Bitrix24 methodim.v2.Chat.Message.mark DescriptionRead later
MethodPOST Path/v1/chats/messages/bulk Bitrix24 methodbatch (im.dialog.messages.get) DescriptionBulk loading from several dialogs
MethodGET Path/v1/chats/:dialogId/messages/search Bitrix24 methodim.v2.Chat.Message.search DescriptionSearch messages in a chat
MethodPOST Path/v1/chats/:dialogId/forward Bitrix24 methodim.v2.Chat.Message.send DescriptionForward messages
MethodGET Path/v1/chats/messages/:messageId/reactions Bitrix24 methodim.v2.Chat.Message.Reaction.tail DescriptionList reactions
MethodPOST Path/v1/chats/messages/:messageId/reactions Bitrix24 methodim.v2.Chat.Message.Reaction.add DescriptionAdd a reaction
MethodDELETE Path/v1/chats/messages/:messageId/reactions/:reaction Bitrix24 methodim.v2.Chat.Message.Reaction.delete DescriptionRemove a reaction
MethodGET Path/v1/chats/:dialogId/pins Bitrix24 methodim.v2.Chat.Pin.tail DescriptionList pins
MethodPOST Path/v1/chats/messages/:messageId/pin Bitrix24 methodim.v2.Chat.Message.pin DescriptionPin a message
MethodDELETE Path/v1/chats/messages/:messageId/pin Bitrix24 methodim.v2.Chat.Message.unpin DescriptionUnpin a message
MethodGET Path/v1/chats/:dialogId/pins/count Bitrix24 methodim.v2.Chat.Pin.count DescriptionNumber of pinned messages
MethodPOST Path/v1/chats/:dialogId/typing Bitrix24 methodim.v2.Chat.InputAction.notify DescriptionTyping indicator
MethodPOST Path/v1/chats/:dialogId/anchors/read Bitrix24 methodim.v2.Chat.Anchor.read DescriptionRemove chat anchors
MethodPOST Path/v1/chats/anchors/read Bitrix24 methodim.v2.Anchor.read DescriptionRemove message anchors
MethodGET Path/v1/chats/messages/comments Bitrix24 methodim.v2.Chat.Message.CommentInfo.list DescriptionComment summary for posts
MethodPOST Path/v1/chats/:dialogId/comments/read-all Bitrix24 methodim.v2.Chat.Comment.readAll DescriptionMark all channel comments as read
MethodPOST Path/v1/chats/messages/:messageId/comments/subscription Bitrix24 methodim.v2.Chat.Comment.subscribe DescriptionFollow the comments of a post
MethodDELETE Path/v1/chats/messages/:messageId/comments/subscription Bitrix24 methodim.v2.Chat.Comment.unsubscribe DescriptionStop following the comments of a post
MethodPOST Path/v1/chats/messages/:messageId/blocks Bitrix24 methodim.v2.Chat.Message.Block.Element.append DescriptionAdd a block to a message
MethodPATCH Path/v1/chats/messages/:messageId/blocks/:blockId Bitrix24 methodim.v2.Chat.Message.Block.Element.update DescriptionReplace a block of a message
MethodDELETE Path/v1/chats/messages/:messageId/blocks/:blockId Bitrix24 methodim.v2.Chat.Message.Block.Element.delete DescriptionRemove a block from a message
MethodGET Path/v1/chats/:dialogId/commands Bitrix24 methodim.v2.Chat.Command.list DescriptionBot commands in a chat
MethodPOST Path/v1/chats/messages/:messageId/command Bitrix24 methodim.message.command DescriptionExecute a bot command
MethodPOST Path/v1/chats/messages/:messageId/unread Bitrix24 methodim.dialog.unread DescriptionMark as unread from a message
MethodPOST Path/v1/chats Bitrix24 methodim.chat.add; with format=v2 — im.v2.Chat.add DescriptionCreate a group chat
MethodPATCH Path/v1/chats/:chatId Bitrix24 methodim.chat.updateTitle; with format=v2 — im.v2.Chat.update DescriptionRename a chat
MethodPOST Path/v1/chats/:chatId/owner Bitrix24 methodim.chat.setOwner; with format=v2 — im.v2.Chat.setOwner DescriptionTransfer ownership
MethodPOST Path/v1/chats/:chatId/leave Bitrix24 methodim.chat.leave DescriptionLeave a chat
MethodPOST Path/v1/chats/:chatId/mute Bitrix24 methodim.chat.mute DescriptionMute or unmute chat notifications
MethodPUT Path/v1/chats/:dialogId/description Bitrix24 methodim.v2.Chat.setDescription DescriptionChange a chat description
MethodPUT Path/v1/chats/:dialogId/color Bitrix24 methodim.v2.Chat.setColor DescriptionChange a chat color
MethodPUT Path/v1/chats/:dialogId/avatar Bitrix24 methodim.v2.Chat.setAvatar; with the avatarId field — im.v2.Chat.setAvatarId DescriptionChange a chat avatar
MethodPUT Path/v1/chats/:dialogId/permissions/messages Bitrix24 methodim.v2.Chat.setManageMessages DescriptionWho posts messages
MethodPUT Path/v1/chats/:dialogId/permissions/guest-invites Bitrix24 methodim.v2.Chat.setManageGuestInvites DescriptionWho invites guests
MethodPUT Path/v1/chats/:dialogId/permissions/settings Bitrix24 methodim.v2.Chat.setManageSettings DescriptionWho changes chat permissions
MethodPUT Path/v1/chats/:dialogId/permissions/ui Bitrix24 methodim.v2.Chat.setManageUI DescriptionWho changes the chat's appearance
MethodPUT Path/v1/chats/:dialogId/permissions/users-add Bitrix24 methodim.v2.Chat.setManageUsersAdd DescriptionWho adds members
MethodPUT Path/v1/chats/:dialogId/permissions/users-delete Bitrix24 methodim.v2.Chat.setManageUsersDelete DescriptionWho removes members
MethodPUT Path/v1/chats/:dialogId/auto-delete Bitrix24 methodim.v2.Chat.setMessagesAutoDeleteDelay DescriptionConfigure message auto-delete
MethodGET Path/v1/chats/:dialogId/users Bitrix24 methodim.dialog.users.list; with format=v2 — im.v2.Chat.Member.tail DescriptionList of members
MethodPOST Path/v1/chats/:chatId/users Bitrix24 methodim.chat.user.add; with format=v2 — im.v2.Chat.addUsers DescriptionAdd members
MethodDELETE Path/v1/chats/:chatId/users Bitrix24 methodim.chat.user.delete; with format=v2 — im.v2.Chat.deleteUser DescriptionRemove a member
MethodPOST Path/v1/chats/:dialogId/managers Bitrix24 methodim.v2.Chat.addManagers DescriptionAdd managers
MethodPUT Path/v1/chats/:dialogId/managers Bitrix24 methodim.v2.Chat.setManagers DescriptionReplace managers
MethodDELETE Path/v1/chats/:dialogId/managers Bitrix24 methodim.v2.Chat.deleteManagers DescriptionRemove managers
MethodGET Path/v1/chats/:dialogId/member-entities Bitrix24 methodim.v2.Chat.MemberEntities.list DescriptionChat members as entities
MethodGET Path/v1/chats/:dialogId/users/active Bitrix24 methodim.v2.Chat.User.list DescriptionActive members
MethodGET Path/v1/chats/:dialogId/users/relations Bitrix24 methodim.v2.Chat.Member.filterUsersByParticipation DescriptionMembership records
MethodGET Path/v1/chats/access Bitrix24 methodim.v2.Access.check DescriptionCheck access to a chat or message
MethodPOST Path/v1/chats/dialog-id Bitrix24 methodim.v2.Chat.getDialogId DescriptionDialog ID by external identifier
MethodGET Path/v1/chats/messages/:messageId/load Bitrix24 methodim.v2.Chat.loadInContext DescriptionLoad around a message
MethodPOST Path/v1/chats/:dialogId/join Bitrix24 methodim.v2.Chat.join DescriptionJoin a chat
MethodPUT Path/v1/chats/:dialogId/parent Bitrix24 methodim.v2.Chat.attachToParent DescriptionAttach to a parent chat
MethodDELETE Path/v1/chats/:dialogId/parent Bitrix24 methodim.v2.Chat.detachFromParent DescriptionDetach from the parent chat
MethodDELETE Path/v1/chats/:dialogId Bitrix24 methodim.v2.Chat.delete DescriptionDelete a chat — irreversible
MethodPOST Path/v1/chats/:dialogId/history/clear Bitrix24 methodim.v2.Chat.clearHistory / im.v2.Chat.clearHistoryForAll DescriptionClear history for the caller or everyone
MethodPOST Path/v1/chats/:dialogId/unread Bitrix24 methodim.v2.Chat.unread DescriptionSet the "unread" mark
MethodDELETE Path/v1/chats/:dialogId/unread Bitrix24 methodim.v2.Chat.read DescriptionClear the "unread" mark
MethodPOST Path/v1/chats/folders Bitrix24 methodim.v2.Folder.add DescriptionCreate a chat folder
MethodGET Path/v1/chats/folders/:folderId Bitrix24 methodim.v2.Folder.get DescriptionA folder with its chats
MethodPATCH Path/v1/chats/folders/:folderId Bitrix24 methodim.v2.Folder.update DescriptionRename a folder, replace its contents
MethodDELETE Path/v1/chats/folders/:folderId Bitrix24 methodim.v2.Folder.delete DescriptionDelete a folder
MethodPUT Path/v1/chats/folders/order Bitrix24 methodim.v2.Folder.sort DescriptionFolder order
MethodPOST Path/v1/chats/folders/:folderId/chats Bitrix24 methodim.v2.Folder.addChats DescriptionAdd chats to a folder
MethodDELETE Path/v1/chats/folders/:folderId/chats Bitrix24 methodim.v2.Folder.deleteChats DescriptionRemove chats from a folder
MethodPUT Path/v1/chats/:dialogId/folders Bitrix24 methodim.v2.Folder.setChatFolders DescriptionSet the folders of a chat
MethodGET Path/v1/chats/folders/:folderId/sources Bitrix24 methodim.v2.Folder.getSources DescriptionSources of the "All" folder (not available on every Bitrix24 account)
MethodPUT Path/v1/chats/folders/:folderId/sources Bitrix24 methodim.v2.Folder.updateSources DescriptionSet the sources of the "All" folder (not available on every Bitrix24 account)
MethodPOST Path/v1/chats/:dialogId/pin Bitrix24 methodim.v2.Chat.pin DescriptionPin a chat
MethodPUT Path/v1/chats/:dialogId/pin Bitrix24 methodim.v2.Chat.sortPin DescriptionPinned chat order
MethodDELETE Path/v1/chats/:dialogId/pin Bitrix24 methodim.v2.Chat.unpin DescriptionUnpin a chat
MethodPOST Path/v1/chats/read-all Bitrix24 methodim.v2.Chat.readAll DescriptionMark all chats as read
MethodPOST Path/v1/chats/recent/read Bitrix24 methodim.v2.Chat.readByRecentSection DescriptionMark a list section as read
MethodGET Path/v1/chats/:dialogId/users/mentionable Bitrix24 methodim.v2.Chat.Mention.list DescriptionUsers to mention
MethodGET Path/v1/chats/:dialogId/users/membership Bitrix24 methodim.v2.Chat.Member.checkMembership DescriptionMembership check
MethodPOST Path/v1/chats/:chatId/files Bitrix24 methodim.disk.folder.get + disk.folder.uploadfile + im.disk.file.commit; with format=v2 — im.v2.File.upload DescriptionUpload a file to a chat
MethodPOST Path/v1/chats/:chatId/files/uploads Bitrix24 methodim.v2.File.uploadToFolder DescriptionUpload a file to a chat folder without posting
MethodPOST Path/v1/chats/files/uploads/status Bitrix24 methodim.v2.File.download DescriptionCheck whether an uploaded file exists
MethodPOST Path/v1/chats/:chatId/files/uploads/discard Bitrix24 methodim.disk.file.delete DescriptionDiscard an uploaded file
MethodPOST Path/v1/chats/:chatId/files/uploads/publish Bitrix24 methodim.disk.file.commit DescriptionPublish uploaded files
MethodGET Path/v1/chats/files/:fileId Bitrix24 methoddisk.file.get DescriptionFile metadata
MethodGET Path/v1/chats/:chatId/folder Bitrix24 methodim.disk.folder.get DescriptionChat folder on Drive
MethodPOST Path/v1/chats/:dialogId/sharing-links/primary Bitrix24 methodim.v2.Chat.SharingLink.getPrimary DescriptionGet the primary chat link
MethodPOST Path/v1/chats/:dialogId/sharing-links/individual Bitrix24 methodim.v2.Chat.SharingLink.getIndividual DescriptionGet an individual chat link
MethodPOST Path/v1/chats/:dialogId/sharing-links/individual/regenerate Bitrix24 methodim.v2.Chat.SharingLink.regenerateIndividual DescriptionRegenerate an individual link
MethodGET Path/v1/chats/sharing-links/:code Bitrix24 methodim.v2.SharingLink.get DescriptionGet a link by code
MethodDELETE Path/v1/chats/sharing-links/:code Bitrix24 methodim.v2.Chat.SharingLink.revoke DescriptionRevoke a link by code
MethodPOST Path/v1/chats/join-by-code Bitrix24 methodim.v2.Chat.joinByCode DescriptionJoin a chat by code
MethodPOST Path/v1/chats/:dialogId/guest-links Bitrix24 methodim.v2.Guest.Link.generate DescriptionGet a guest link
MethodPOST Path/v1/chats/:dialogId/guest-links/regenerate Bitrix24 methodim.v2.Guest.Link.regenerate DescriptionRegenerate a guest link
MethodDELETE Path/v1/chats/:dialogId/guest-links Bitrix24 methodim.v2.Guest.Link.revoke DescriptionRevoke a guest link
MethodPOST Path/v1/chats/:dialogId/guest-invites/email Bitrix24 methodim.v2.Guest.Link.inviteByEmail DescriptionInvite guests by email
MethodPOST Path/v1/chats/:dialogId/guest-invites/phone Bitrix24 methodim.v2.Guest.Link.inviteByPhoneNumber DescriptionInvite guests by SMS
MethodGET Path/v1/chats/stickers/packs Bitrix24 methodim.v2.Sticker.Pack.load; with a cursor — im.v2.Sticker.Pack.tail DescriptionList sticker packs
MethodGET Path/v1/chats/stickers/packs/:packId Bitrix24 methodim.v2.Sticker.Pack.get DescriptionSticker pack
MethodPATCH Path/v1/chats/stickers/packs/:packId Bitrix24 methodim.v2.Sticker.Pack.rename DescriptionRename a pack
MethodDELETE Path/v1/chats/stickers/packs/:packId Bitrix24 methodim.v2.Sticker.Pack.delete DescriptionDelete a pack
MethodPOST Path/v1/chats/stickers/packs/:packId/link Bitrix24 methodim.v2.Sticker.Pack.link DescriptionAdd a pack
MethodDELETE Path/v1/chats/stickers/packs/:packId/link Bitrix24 methodim.v2.Sticker.Pack.unlink DescriptionRemove a pack
MethodDELETE Path/v1/chats/stickers/packs/:packId/stickers Bitrix24 methodim.v2.Sticker.delete DescriptionDelete stickers from a pack
MethodDELETE Path/v1/chats/stickers/recent Bitrix24 methodim.v2.Sticker.Recent.deleteAll DescriptionClear recent stickers
MethodDELETE Path/v1/chats/stickers/recent/:stickerId Bitrix24 methodim.v2.Sticker.Recent.delete DescriptionRemove a recent sticker
MethodPOST Path/v1/chats/files/save Bitrix24 methodim.v2.Disk.File.save DescriptionSave files to Drive
MethodPOST Path/v1/chats/files/:fileId/transcribe Bitrix24 methodim.v2.Disk.File.transcribe DescriptionTranscribe an audio file
MethodPOST Path/v1/chats/copilot/draft Bitrix24 methodim.v2.Copilot.DraftChat.get DescriptionCoPilot draft chat
MethodPUT Path/v1/chats/:dialogId/copilot/engine Bitrix24 methodim.v2.Chat.Copilot.updateEngine DescriptionChange the CoPilot model
MethodPUT Path/v1/chats/:dialogId/copilot/role Bitrix24 methodim.v2.Chat.Copilot.updateRole DescriptionChange the CoPilot role
MethodPOST Path/v1/chats/messages/:messageId/regenerate Bitrix24 methodim.v2.Copilot.Message.regenerate DescriptionRegenerate a CoPilot answer
MethodPOST Path/v1/chats/messages/:messageId/vote Bitrix24 methodim.v2.Chat.Message.Vote.send DescriptionRate an answer
MethodGET Path/v1/chats/settings Bitrix24 methodim.v2.Settings.General.list DescriptionGeneral messenger settings
MethodPATCH Path/v1/chats/settings Bitrix24 methodim.v2.Settings.General.update DescriptionChange a setting
MethodPUT Path/v1/chats/settings/status Bitrix24 methodim.v2.Settings.Status.update DescriptionSet the status
MethodGET Path/v1/chats/:dialogId/task-form Bitrix24 methodim.v2.Chat.Task.prepare DescriptionTask form for a chat
MethodPOST Path/v1/chats/messages/:messageId/task-form Bitrix24 methodim.v2.Chat.Task.prepare DescriptionTask form for a message
MethodGET Path/v1/chats/:dialogId/flow-form Bitrix24 methodim.v2.Chat.Flow.prepare DescriptionCollab flow form
MethodPOST Path/v1/chats/:dialogId/bot-context Bitrix24 methodim.v2.Chat.Bot.sendContext DescriptionContext for chat bots
MethodPOST Path/v1/chats/:dialogId/zoom Bitrix24 methodim.v2.Call.Zoom.create DescriptionZoom meeting
MethodGET Path/v1/chats/state Bitrix24 methodim.v2.UpdateState.getStateData DescriptionState of updates
MethodGET Path/v1/chats/tariff-restrictions Bitrix24 methodim.v2.Tariff.Restriction.get DescriptionPlan restrictions
MethodGET Path/v1/chats/promotions Bitrix24 methodim.v2.Promotion.listActive DescriptionPromo hints
MethodGET Path/v1/chats/users/:userId/department Bitrix24 methodim.v2.User.getDepartment DescriptionUser department
MethodPOST Path/v1/chats/desktop/logout Bitrix24 methodim.v2.Desktop.logout DescriptionDesktop app logout
MethodPOST Path/v1/chats/events/subscribe Bitrix24 methodim.v2.Event.subscribe DescriptionSubscribe to events
MethodPOST Path/v1/chats/events/unsubscribe Bitrix24 methodim.v2.Event.unsubscribe DescriptionUnsubscribe from events
MethodGET Path/v1/chats/events Bitrix24 methodim.v2.Event.get DescriptionGet events

Error codes

Chat errors

Code HTTP Description
CodeMISSING_PARAMS HTTP400 DescriptionRequired parameters were not passed, for example entityType/entityId when finding a CRM entity chat, filename/content when uploading a file, users or userId when adding and removing members
CodeINVALID_REQUEST HTTP400 DescriptionMalformed request body (for example, an empty dialogs array in bulk loading)
CodeBATCH_LIMIT_EXCEEDED HTTP400 DescriptionBulk loading exceeds the limit of 50 dialogs
CodeINVALID_CHAT_ID HTTP400 DescriptionchatId is not a positive integer
CodeINVALID_PARAMS HTTP400 DescriptionInvalid messageId or fileId. For format=v2, load, counters, context, links and guests, folders, unread and read-later marks, mentions, membership checks, list sections, shared chats, sync, chat pinning, settings and service methods — an unknown, repeated or invalid query parameter or body field. CoPilot, file saving and transcription also reject missing or invalid body fields. Checked before calling Bitrix24.
CodeMESSAGE_REQUIRED HTTP400 DescriptionEmpty text when sending or editing a message
CodeTITLE_EMPTY HTTP400 DescriptionEmpty title when renaming a chat
CodeINVALID_OFFSET HTTP400 DescriptionInvalid offset when polling events
CodeINVALID_LIMIT HTTP400 Descriptionlimit when polling events is not an integer from 1 to 1000
CodeWRONG_PATH HTTP400 DescriptionGET /v1/chats was called — there is no such endpoint. message lists recent dialogs, text search and finding a CRM entity chat
CodePAYLOAD_TOO_LARGE HTTP413 DescriptionThe request body exceeds the limit: 40 MiB when uploading a file, 1 MiB when setting an avatar from an image
CodeBITRIX_ACCESS_DENIED HTTP403 DescriptionBitrix24 refused to change the chat settings: the user is not a chat member, or a chat permission does not allow it
CodeCHAT_NOT_FOUND_OR_NO_ACCESS HTTP404 DescriptionThe chat does not exist or you do not have permission for the operation
CodeDIALOG_NOT_FOUND_OR_NO_ACCESS HTTP404 DescriptionThe dialog does not exist or you do not have access to it
CodeFILE_NOT_FOUND HTTP404 DescriptionA file with the given fileId was not found
CodeFOLDER_NOT_FOUND HTTP404 DescriptionThe chat folder on Drive was not found
CodeUPLOAD_FAILED HTTP500 DescriptionFailed to upload the file to Drive
CodeME_ALIAS_RESOLUTION_FAILED HTTP502 DescriptionFailed to resolve the current user for the me alias

Bitrix24 error codes arrive in error.b24Code with 422 BITRIX_ERROR. For chat pinning these are FOLDER_PINS_LIMIT_EXCEEDED — 45 chats are already pinned, and INVALID_PIN_POSITION — position is greater than 45 when changing the pinned chat order.

System errors

Code HTTP Description
CodeSCOPE_DENIED HTTP403 DescriptionThe API key does not have the im scope
CodeTOKEN_MISSING HTTP401 DescriptionThe API key has no Bitrix24 tokens configured
CodeWRITE_BLOCKED_READONLY_KEY HTTP403 DescriptionA read-only key called an operation that changes data
CodeINVALID_JSON_BODY HTTP400 DescriptionThe request body is not valid JSON
CodeENTITY_NOT_FOUND HTTP404 DescriptionThe requested object was not found
CodeBITRIX_ERROR HTTP422 DescriptionBitrix24 returned an error (text in the message field)
CodeMETHOD_NOT_YET_AVAILABLE HTTP422 DescriptionThe method is rolling out and is not available on the portal yet — the page of such a method opens with a notice about it
CodeBITRIX_UNAVAILABLE HTTP502 DescriptionBitrix24 is unavailable or returned a server error
CodeBITRIX_TIMEOUT HTTP503 DescriptionBitrix24 did not respond in time. The outcome of the call is unknown — the method page says how to proceed

General codes for authorization, keys, and limits are on the Errors page.

See also