Objects and Fields of Chatbots 2.0
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.
Description of the objects returned in the responses of the im.v2 and imbot.v2 methods, as well as in event data and webhook notifications.
Quick navigation: User | Bot | Chat | Message | File | Command
Field types depend on the context:
— in method responses and FETCH events of Event.get, types are preserved as they are
— in webhook events, all scalar values come as strings due to serialization via http_build_query: integer → "123", boolean → "1"/"0", null → ""
— in online events, the fields of the User object idle, lastActivityDate, mobileLastDate, desktopLastDate are always equal to false
User
A user of the system. Returned in the user fields and in the users collections.
|
Field |
Description |
|
id |
Unique identifier of the user |
|
active |
Is the user active in the system |
|
name |
Full name |
|
firstName |
First name |
|
lastName |
Last name |
|
workPosition |
Job title |
|
color |
Avatar placeholder color in HEX format, e.g., |
|
avatar |
Avatar URL. Empty string if no avatar is set |
|
gender |
Gender: |
|
birthday |
Date of birth. Empty string if not specified |
|
extranet |
Is the user an extranet user |
|
bot |
Is the user a bot |
|
connector |
Is the user a connector of Open Channels |
|
externalAuthId |
Type of external authorization: |
|
status |
Status: |
|
idle |
Start time of inactivity in ISO 8601 format, or |
|
lastActivityDate |
Date of last activity in ISO 8601 format, or |
|
mobileLastDate |
Date of last mobile login in ISO 8601 format, or |
|
desktopLastDate |
Date of last desktop login in ISO 8601 format, or |
|
absent |
Date of start of absence in ISO 8601 format, or |
|
departments |
Array of department IDs |
|
phones |
Object with phone numbers ( |
|
type |
Type: |
|
website |
Personal website |
|
email |
|
Example of User Object
{
"id": 1,
"active": true,
"name": "John Smith",
"firstName": "John",
"lastName": "Smith",
"workPosition": "Developer",
"color": "#df532d",
"avatar": "",
"gender": "M",
"birthday": "",
"extranet": false,
"bot": false,
"connector": false,
"externalAuthId": "default",
"status": "online",
"idle": false,
"lastActivityDate": "2025-01-15T10:29:00+01:00",
"absent": false,
"departments": [1, 5],
"phones": false,
"type": "employee",
"website": "",
"email": "john@example.com"
}
Bot
Chatbot. Returned in the bot field of the responses from the methods imbot.v2.Bot.get, imbot.v2.Bot.list, as well as in event data.
It has two formats: brief (public) and extended (for the bot owner only).
Common Fields
|
Field |
Description |
|
id |
ID of the bot user |
|
code |
Unique string code of the bot |
|
type |
Type of bot. Description of types — Bot Types |
|
isHidden |
Is the bot hidden from the contact list |
|
isSupportOpenline |
Does the bot support working with Open Channels |
|
isReactionsEnabled |
Are reactions to bot messages enabled |
|
backgroundId |
ID of the bot chat background or |
|
language |
Default language of the bot, e.g., |
Additional Fields (for owner only)
|
Field |
Description |
|
moduleId |
ID of the module to which the bot belongs |
|
appId |
ID of the application that registered the bot |
|
eventMode |
Event delivery mode: |
|
countMessage |
Number of processed messages |
|
countCommand |
Number of registered commands |
|
countChat |
Number of chats the bot is in |
|
countUser |
Number of unique users |
Example of Bot Object (extended format)
{
"id": 456,
"code": "support_bot",
"type": "bot",
"isHidden": false,
"isSupportOpenline": false,
"isReactionsEnabled": true,
"backgroundId": null,
"language": "en",
"moduleId": "rest",
"appId": "custom123abc",
"eventMode": "fetch",
"countMessage": 150,
"countCommand": 3,
"countChat": 12,
"countUser": 45
}
Chat
Chat. Returned in the chat field of the responses from the methods imbot.v2.Chat.get, imbot.v2.Chat.add, as well as in event data.
|
Field |
Description |
|
id |
Unique identifier of the chat |
|
dialogId |
Identifier of the dialog: |
|
name |
Name of the chat |
|
type |
Type: |
|
messageType |
Internal type: |
|
owner |
ID of the chat owner |
|
color |
Color of the chat in HEX format |
|
avatar |
URL of the chat avatar. Empty string if not set |
|
description |
Description of the chat |
|
extranet |
Does the chat contain extranet users |
|
role |
Role of the current user: |
|
containsCollaber |
Does the chat contain collaborators |
|
muteList |
List of user IDs who have disabled notifications. Absent in events — depends on the specific user |
|
entityType |
Type of the object, e.g., |
|
entityId |
Identifier of the element |
|
entityData1 |
Additional data of the object (field 1) |
|
entityData2 |
Additional data of the object (field 2) |
|
entityData3 |
Additional data of the object (field 3) |
|
entityLink |
Data link to an external object |
|
diskFolderId |
ID of the folder on Drive for chat files |
|
permissions |
Access permissions for the current user |
|
parentChatId |
ID of the parent chat for threads |
|
parentMessageId |
ID of the parent message for threads |
|
isNew |
Is the chat newly created |
|
textFieldEnabled |
Is the text input field enabled: |
|
backgroundId |
ID of the chat background or |
Additional Fields (only in method responses)
Fields that are returned in method responses (e.g., imbot.v2.Chat.get), but are not passed in events.
|
Field |
Description |
|
dateCreate |
Date of chat creation in ISO 8601 format |
|
lastMessageId |
ID of the last message |
|
lastId |
ID of the last read message |
|
managerList |
Array of chat manager IDs |
|
messageCount |
Number of messages in the chat |
|
userCounter |
Number of participants in the chat |
|
unreadId |
ID of the first unread message |
|
lastMessageViews |
JSON string with data on views of the last message |
|
markedId |
ID of the marked message |
|
public |
Public access settings |
Example of Chat Object
{
"id": 5,
"dialogId": "chat5",
"name": "Support Chat",
"type": "chat",
"messageType": "C",
"owner": 1,
"color": "#ab7761",
"avatar": "",
"description": "",
"extranet": false,
"role": "member",
"containsCollaber": false,
"diskFolderId": 42,
"textFieldEnabled": "Y",
"backgroundId": null,
"dateCreate": "2025-01-10T09:00:00+01:00",
"lastMessageId": 789,
"managerList": [1, 3],
"messageCount": 42,
"userCounter": 5,
"unreadId": null
}
Message
Message. Returned in the message field of method responses and event data.
|
Field |
Description |
|
id |
Unique identifier of the message |
|
chatId |
ID of the chat |
|
authorId |
ID of the author. |
|
date |
Creation date in ISO 8601 format |
|
text |
Text of the message. Maximum length — 20,000 characters. Longer messages are truncated with the suffix |
|
isSystem |
Is the message a system message |
|
uuid |
UUID for deduplication |
|
forward |
Information about forwarding: |
|
params |
Additional parameters: attach, keyboard, files, etc. |
|
viewedByOthers |
Has the message been read by other participants |
Additional Fields (only in method responses)
|
Field |
Description |
|
unread |
Unread for the current user |
|
viewed |
Viewed by the current user |
Example of Message Object
{
"id": 789,
"chatId": 5,
"authorId": 1,
"date": "2025-01-15T10:30:00+01:00",
"text": "Hello bot!",
"isSystem": false,
"uuid": "",
"forward": null,
"params": {},
"viewedByOthers": false
}
File
File attached to a message. Returned in the file field of the response from the method imbot.v2.File.upload.
|
Field |
Description |
|
id |
ID of the file on Drive |
|
chatId |
ID of the chat |
|
date |
Upload date in ISO 8601 format |
|
type |
Content type: |
|
name |
File name with extension |
|
extension |
File extension in lowercase |
|
size |
File size in bytes |
|
image |
Preview sizes for images: |
|
authorId |
ID of the user who uploaded the file |
|
authorName |
Name of the user who uploaded the file |
|
isTranscribable |
Is transcription of the file possible |
|
isVideoNote |
Is the file a video note |
|
isVoiceNote |
Is the file a voice message |
Example of File Object
{
"id": 138,
"chatId": 5,
"date": "2025-01-15T10:30:00+01:00",
"type": "file",
"name": "report.pdf",
"extension": "pdf",
"size": 35341,
"image": false,
"authorId": 1,
"authorName": "John Smith",
"isTranscribable": false,
"isVideoNote": false,
"isVoiceNote": false
}
Command
Slash command of the bot. Returned in the responses from the methods imbot.v2.Command.register, imbot.v2.Command.update, imbot.v2.Command.list.
|
Field |
Description |
|
id |
Unique identifier of the command |
|
botId |
ID of the bot that owns the command |
|
command |
Command text with leading slash, e.g., |
|
common |
Is the command available in all chats ( |
|
hidden |
Is the command hidden from the suggestions list |
|
extranetSupport |
Is the command available for extranet users |
|
title |
Title of the command in the portal language. Only in method responses |
|
params |
Description of the command parameters in the portal language. Only in method responses |
|
category |
Name of the bot that owns the command. Only in method responses |
|
context |
Context of the command call. Only in method responses |
Example of Command Object
{
"id": 78,
"botId": 456,
"command": "/help",
"common": false,
"hidden": false,
"extranetSupport": false,
"title": "Show help",
"params": "[query]",
"category": "Support Bot",
"context": "chat"
}
Continue Learning
- API imbot.v2 Change Log
- Chatbots 2.0: Overview of Methods
- Bots: Overview of Methods
- Event Formats for imbot.v2
- Event Formats im.v2