asyncapi: 3.0.0 info: title: Retail CRM Bot API version: 1.0.0 description: WebSocket API для получения событий от платформы Retail CRM Bot. servers: production: host: mg.rcrm-tech.ru pathname: /api/bot/v1/ws protocol: wss description: Рабочий сервер для WebSocket подключений bindings: ws: method: GET headers: type: object properties: Authorization: type: string description: Токен авторизации для WebSocket подключения channels: events: address: events={events}&options={options} description: Канал для получения различных событий от системы. parameters: events: description: Список событий через запятую, на которые нужно подписаться examples: - message_new,dialog_opened,user_joined_chat options: description: Список дополнительных опций для подключения через запятую bindings: ws: method: GET query: type: object properties: events: type: string description: Список событий через запятую, на которые нужно подписаться options: type: string description: Список дополнительных опций для подключения через запятую messages: event: name: event title: Event from Retail CRM Bot summary: Общий интерфейс для всех событий от системы description: Единый тип сообщения, представляющий все события от системы. Конкретный тип определяется полем `type` contentType: application/json payload: $ref: '#/components/schemas/Event' operations: receiveEvents: action: receive channel: $ref: '#/channels/events' summary: Получение событий от платформы Retail CRM Bot description: Подключение для получения различных типов событий в режиме реального времени messages: - $ref: '#/channels/events/messages/event' components: schemas: Event: description: Событие type: object discriminator: type oneOf: - $ref: '#/components/schemas/EventMessageNew' - $ref: '#/components/schemas/EventMessageUpdated' - $ref: '#/components/schemas/EventFileUpdated' - $ref: '#/components/schemas/EventMessageDeleted' - $ref: '#/components/schemas/EventMessageRestored' - $ref: '#/components/schemas/EventChatCreated' - $ref: '#/components/schemas/EventChatUpdated' - $ref: '#/components/schemas/EventChatDeleted' - $ref: '#/components/schemas/EventDialogOpened' - $ref: '#/components/schemas/EventDialogAssign' - $ref: '#/components/schemas/EventDialogClosed' - $ref: '#/components/schemas/EventUserOnlineUpdated' - $ref: '#/components/schemas/EventUserJoinedChat' - $ref: '#/components/schemas/EventUserLeftChat' - $ref: '#/components/schemas/EventUserUpdated' - $ref: '#/components/schemas/EventCustomerUpdated' - $ref: '#/components/schemas/EventBotUpdated' - $ref: '#/components/schemas/EventChannelUpdated' required: - type - meta - data properties: type: $ref: '#/components/schemas/EventType' meta: $ref: '#/components/schemas/Meta' data: type: object description: Данные в зависимости от типа события Meta: description: Метаданные события type: object required: - timestamp properties: timestamp: type: integer description: Unix-timestamp времени возникновения события EventMessageNew: description: Событие нового сообщения type: object required: - type - data properties: type: type: string enum: - message_new data: $ref: '#/components/schemas/MessageData' EventMessageUpdated: description: Событие обновления сообщения type: object required: - type - data properties: type: type: string enum: - message_updated data: $ref: '#/components/schemas/MessageData' EventFileUpdated: description: Событие обновления файла type: object required: - type - data properties: type: type: string enum: - file_updated data: $ref: '#/components/schemas/FileUpdatedData' EventMessageDeleted: description: Событие удаления сообщения type: object required: - type - data properties: type: type: string enum: - message_deleted data: $ref: '#/components/schemas/MessageData' EventMessageRestored: description: Событие восстановления сообщения type: object required: - type - data properties: type: type: string enum: - message_restored data: $ref: '#/components/schemas/MessageData' EventChatCreated: description: Событие создания чата type: object required: - type - data properties: type: type: string enum: - chat_created data: $ref: '#/components/schemas/ChatData' EventChatUpdated: description: Событие обновления чата type: object required: - type - data properties: type: type: string enum: - chat_updated data: $ref: '#/components/schemas/ChatData' EventChatDeleted: description: Событие удаления чата type: object required: - type - data properties: type: type: string enum: - chats_deleted data: $ref: '#/components/schemas/ChatsDeletedData' EventDialogOpened: description: Событие открытия диалога type: object required: - type - data properties: type: type: string enum: - dialog_opened data: $ref: '#/components/schemas/DialogData' EventDialogAssign: description: Событие назначения диалога type: object required: - type - data properties: type: type: string enum: - dialog_assign data: $ref: '#/components/schemas/DialogAssignData' EventDialogClosed: description: Событие закрытия диалога type: object required: - type - data properties: type: type: string enum: - dialog_closed data: $ref: '#/components/schemas/DialogData' EventUserOnlineUpdated: description: Событие обновления статуса пользователя (онлайн/оффлайн) type: object required: - type - data properties: type: type: string enum: - user_online_updated data: $ref: '#/components/schemas/UserOnlineUpdatedData' EventUserJoinedChat: description: Событие присоединения пользователя к чату type: object required: - type - data properties: type: type: string enum: - user_joined_chat data: $ref: '#/components/schemas/UserJoinedChatData' EventUserLeftChat: description: Событие выхода пользователя из чата type: object required: - type - data properties: type: type: string enum: - user_left_chat data: $ref: '#/components/schemas/UserLeftChatData' EventUserUpdated: description: Событие обновления данных пользователя type: object required: - type - data properties: type: type: string enum: - user_updated data: $ref: '#/components/schemas/UserUpdatedData' EventCustomerUpdated: description: Событие обновления данных клиента type: object required: - type - data properties: type: type: string enum: - customer_updated data: $ref: '#/components/schemas/CustomerUpdatedData' EventBotUpdated: description: Событие обновления данных бота type: object required: - type - data properties: type: type: string enum: - bot_updated data: $ref: '#/components/schemas/BotUpdatedData' EventChannelUpdated: description: Событие обновления данных канала type: object required: - type - data properties: type: type: string enum: - channel_updated data: $ref: '#/components/schemas/ChannelUpdatedData' MessageData: description: Данные сообщения type: object required: - message properties: message: allOf: - $ref: '#/components/schemas/Message' - $ref: '#/components/schemas/MessageAdditional' ChatData: description: Данные чата type: object required: - chat properties: chat: $ref: '#/components/schemas/Chat' DialogData: description: Данные диалога type: object required: - dialog properties: dialog: $ref: '#/components/schemas/DialogEvent' ChatsDeletedData: description: Данные о удаленных чатах type: object required: - chat_ids properties: chat_ids: type: array items: type: integer DialogAssignData: description: Данные о назначении диалога type: object required: - dialog - chat properties: dialog: $ref: '#/components/schemas/DialogEvent' chat: $ref: '#/components/schemas/Chat' UserOnlineUpdatedData: description: Данные о обновлении статуса пользователя type: object required: - user - online - connected properties: user: $ref: '#/components/schemas/UserRef' online: description: Флаг, указывающий, что пользователь онлайн type: boolean connected: description: Флаг, указывающий, что пользователь подключен type: boolean UserJoinedChatData: description: Данные о присоединении пользователя к чату type: object required: - chat - user properties: chat: $ref: '#/components/schemas/Chat' user: $ref: '#/components/schemas/UserRef' UserLeftChatData: description: Данные о выходе пользователя из чата type: object required: - reason properties: reason: description: Причина выхода пользователя из чата type: string chat: $ref: '#/components/schemas/ChatID' user: $ref: '#/components/schemas/UserID' UserUpdatedData: description: Данные о обновлении информации о пользователе type: object allOf: - $ref: '#/components/schemas/UserRef' - required: - is_active properties: is_active: description: Признак активности пользователя type: boolean CustomerUpdatedData: description: Данные о обновлении информации о клиенте $ref: '#/components/schemas/UserRef' BotUpdatedData: description: Данные о обновлении информации о боте $ref: '#/components/schemas/UserRef' ChannelUpdatedData: description: Данные о обновлении канала type: object properties: channel: $ref: '#/components/schemas/Channel' Chat: type: object required: - id - last_activity - created_at properties: id: description: Идентификатор чата type: integer name: description: Наименование чата type: string avatar: description: URL аватара type: string format: uri unread: description: Признак непрочитанного чата type: boolean not_read_messages_count: description: Количество непрочитанных сообщений type: integer last_activity: description: Дата и время последней активности type: string format: date-time author_id: description: Идентификатор автора type: integer deprecated: true customer: $ref: '#/components/schemas/UserRef' channel: $ref: '#/components/schemas/Channel' last_message: description: Последнее сообщение в чате $ref: '#/components/schemas/Message' last_user_message: description: Последнее сообщение пользователя в чате $ref: '#/components/schemas/MessageID' last_dialog: description: Последний диалог в чате $ref: '#/components/schemas/Dialog' members: description: Участники чата type: array items: $ref: '#/components/schemas/Member' waiting_level: $ref: '#/components/schemas/WaitingLevel' waiting_level_transition_time: description: Время перехода на следующий уровень ожидания type: string format: date-time reply_deadline: description: Крайнее время ответа type: string format: date-time created_at: description: Дата и время создания type: string format: date-time DialogEvent: type: object required: - id - created_at properties: id: description: Идентификатор диалога type: integer begin_message_id: description: Идентификатор начального сообщения диалога type: integer ending_message_id: description: Идентификатор конечного сообщения диалога type: integer chat: $ref: '#/components/schemas/Chat' responsible: $ref: '#/components/schemas/Responsible' created_at: description: Дата и время создания диалога type: string format: date-time assigned_at: description: Дата и время назначения диалога type: string format: date-time closed_at: description: Дата и время закрытия диалога type: string format: date-time utm: description: UTM метки $ref: '#/components/schemas/Utm' Dialog: type: object required: - id - created_at properties: id: description: Идентификатор диалога type: integer responsible: $ref: '#/components/schemas/UserRef' created_at: description: Дата и время создания диалога type: string format: date-time assigned_at: description: Дата и время назначения диалога type: string format: date-time closed_at: description: Дата и время закрытия диалога type: string format: date-time utm: description: UTM метки $ref: '#/components/schemas/Utm' Utm: type: object properties: source: description: Источник type: string maxLength: 255 minLength: 1 medium: description: Канал type: string maxLength: 255 minLength: 1 campaign: description: Кампания type: string maxLength: 255 minLength: 1 term: description: Ключевое слово type: string maxLength: 255 minLength: 1 content: description: Содержание кампании type: string maxLength: 255 minLength: 1 Message: type: object required: - id - time - type - scope - chat_id - is_read - is_edit - status - created_at properties: id: description: Идентификатор сообщения type: integer type: $ref: '#/components/schemas/MessageType' time: description: Время создания сообщения type: string format: date-time chat_id: description: Идентификатор чата type: integer is_read: description: Признак прочтения сообщения type: boolean is_edit: description: Признак редактирования сообщения type: boolean scope: $ref: '#/components/schemas/MessageScope' status: $ref: '#/components/schemas/MessageStatus' actions: description: Действия, доступные для данного сообщения type: array items: type: string from: $ref: '#/components/schemas/UserRef' content: description: Текст сообщения type: string note: description: Аннотация к медиа данным (для медиа сообщения) type: string quote: $ref: '#/components/schemas/MessageQuote' dialog: $ref: '#/components/schemas/MessageDialog' items: description: Вложения сообщения type: array items: $ref: '#/components/schemas/MessageFile' transport_attachments: description: Вложения транспорта сообщения $ref: '#/components/schemas/MessageTransportAttachments' order: description: Информация о заказе в сообщении $ref: '#/components/schemas/MessageOrder' product: description: Информация о товаре в сообщении $ref: '#/components/schemas/MessageProduct' error: description: Информация об ошибке сообщения $ref: '#/components/schemas/MessageError' action: description: Системное действие сообщения $ref: '#/components/schemas/MessageAction' responsible: description: Информация об ответственном лице сообщения $ref: '#/components/schemas/UserRef' reactions: description: Эмодзи реакции, добавленные к сообщению type: array items: $ref: '#/components/schemas/MessageReaction' MessageAdditional: type: object properties: chat: $ref: '#/components/schemas/Chat' created_at: description: Дата создания сообщения type: string format: date-time edited_at: description: Дата изменения сообщения type: string format: date-time template_code: description: Код шаблона для шаблонного сообщения type: string Responsible: description: Информация об ответственном лице type: object required: - type - id properties: type: $ref: '#/components/schemas/ResponsibleType' id: description: Идентификатор ответственного type: integer assigned_at: description: Дата/время назначения type: string format: date-time UserRef: type: object required: - id - external_id - type - name properties: id: description: Идентификатор пользователя type: integer external_id: description: Внешний идентификатор пользователя type: string type: $ref: '#/components/schemas/UserType' name: description: Никнейм пользователя type: string avatar: description: Аватар пользователя type: string format: uri first_name: description: Имя пользователя (только для пользователя типа customer и user) type: string last_name: description: Фамилия пользователя (только для пользователя типа customer и user) type: string available: description: Признак доступности клиента по статусу (только для пользователя типа user) type: boolean is_blocked: description: Признак блокировки пользователя (только для пользователя типа customer) type: boolean is_system: description: Признак системного пользователя (только для пользователя типа bot) type: boolean is_technical_account: description: Признак технического аккаунта (только для пользователя типа user) type: boolean username: description: Имя пользователя (только для пользователя типа customer) type: string email: description: E-mail пользователя (только для пользователя типа customer) type: string format: email phone: description: Номер телефона пользователя type: string MessageProduct: type: object required: - id - name properties: id: description: Идентификатор товара type: integer name: description: Наименование товара type: string maxLength: 255 minLength: 1 article: description: Описание товара type: string maxLength: 128 cost: $ref: '#/components/schemas/Cost' img: description: URL изображения товара type: string format: uri maxLength: 2048 url: description: URL товара type: string format: uri maxLength: 2048 unit: description: Единицы измерения товара type: string maxLength: 16 revoked_at: description: Дата/время отзыва регистрации type: string Cost: description: Информация о стоимости type: object properties: value: description: Числовое значение стоимости type: number format: double minimum: 0 currency: description: Код валюты type: string maxLength: 3 minLength: 3 MessageOrder: description: Информация о заказе в сообщении type: object properties: external_id: description: Внешний идентификатор заказа type: integer number: description: Номер заказа type: string maxLength: 255 url: description: URL заказа type: string format: uri maxLength: 2048 cost: $ref: '#/components/schemas/Cost' discount: $ref: '#/components/schemas/Cost' date: description: Дата создания заказа type: string format: date-time status: $ref: '#/components/schemas/MessageOrderStatus' items: description: Массив товаров заказа type: array items: $ref: '#/components/schemas/MessageOrderItem' delivery: $ref: '#/components/schemas/MessageOrderDelivery' payments: description: Массив платежей type: array items: $ref: '#/components/schemas/MessageOrderPayment' MessageOrderStatus: description: Статус заказа type: object properties: code: $ref: '#/components/schemas/MessageOrderStatusCode' name: description: Наименование статуса type: string maxLength: 255 MessageOrderItem: description: Информация о товаре в заказе type: object properties: external_id: description: Внешний идентификатор товара заказа type: integer name: description: Наименование товара type: string maxLength: 255 url: description: URL товара type: string format: uri maxLength: 2048 img: description: Изображение товара type: string format: uri maxLength: 2048 price: $ref: '#/components/schemas/Cost' quantity: $ref: '#/components/schemas/Quantity' Quantity: description: Информация о количестве type: object properties: value: description: Количественное значение type: number format: double minimum: 0 unit: description: Единицы измерения type: string maxLength: 16 MessageOrderDelivery: description: Данные о доставке заказа type: object properties: name: description: Наименование способа доставки type: string price: $ref: '#/components/schemas/Cost' address: description: Адрес доставки type: string comment: description: Комментарий к доставке type: string MessageOrderPayment: description: Данные о платеже заказа type: object properties: name: description: Наименование способа оплаты type: string amount: $ref: '#/components/schemas/Cost' status: $ref: '#/components/schemas/MessageOrderPaymentStatus' MessageOrderPaymentStatus: description: Статус платежа заказа type: object properties: name: description: Наименование платежа type: string payed: description: Признак проведения оплаты type: boolean MessageFile: description: Информация о файле в сообщении type: object required: - id - kind properties: id: description: UUID вложенного файла type: string kind: $ref: '#/components/schemas/MessageFileKind' type: description: Тип вложения type: string preview_url: description: URL файла для загрузки type: string format: uri size: description: Размер вложения (в байтах) type: integer caption: description: Текстовое описание медиа вложения type: string width: description: Ширина изображения в пикселях (только для сообщений с типом image) type: integer height: description: Высота изображения в пикселях (только для сообщений с типом image) type: integer duration: description: Длительность аудио записи (только для сообщений с типом audio) type: integer histogram: description: Диаграмма звука (только для сообщений с типом audio) type: array items: type: integer transcription: description: Транскрипция загруженного файла type: string FileUpdatedData: description: Данные обновленного файла type: object required: - file properties: file: $ref: '#/components/schemas/File' File: description: Информация о файле type: object required: - id properties: id: description: UUID файла type: string transcription: description: Транскрипция файла type: string transcription_status: $ref: '#/components/schemas/FileTranscriptionStatus' MessageDialog: description: Данные о диалоге в сообщении type: object properties: id: description: Идентификатор диалога type: integer MessageError: description: Информация об ошибке сообщения type: object properties: code: $ref: '#/components/schemas/MessageErrorCode' message: description: Текстовое описание ошибки type: string MessageQuote: description: Данные о цитируемом сообщении type: object properties: id: description: Идентификатор цитируемого сообщения type: integer type: $ref: '#/components/schemas/MessageType' content: description: Текст сообщения type: string from: $ref: '#/components/schemas/UserRef' time: description: Время отправки сообщений type: string format: date-time items: description: Медиа вложения цитируемого сообщения type: array items: $ref: '#/components/schemas/MessageFile' MessageTransportAttachments: description: Вложения транспорта сообщения type: object properties: suggestions: description: Быстрые ответы type: array items: $ref: '#/components/schemas/Suggestion' Suggestion: description: Быстрый ответ type: object properties: title: description: Наименование быстрого ответа type: string payload: description: Содержание быстрого ответа type: string type: $ref: '#/components/schemas/SuggestionType' Channel: type: object required: - id - transport_id - type - is_active properties: id: description: Идентификатор канала type: integer transport_id: description: Идентификатор транспорта канала type: integer type: $ref: '#/components/schemas/ChannelType' name: description: Наименование канала type: string avatar: description: Аватар канала type: string format: uri is_active: description: Признак активности канала type: boolean settings: $ref: '#/components/schemas/ChannelSettings' ChannelSettings: description: Настройки канала type: object properties: text: $ref: '#/components/schemas/TextMessageSetting' audio: $ref: '#/components/schemas/AudioMessageSetting' file: $ref: '#/components/schemas/FileMessageSetting' image: $ref: '#/components/schemas/ImageMessageSetting' order: $ref: '#/components/schemas/OrderMessageSetting' product: $ref: '#/components/schemas/ProductMessageSetting' customer_external_id: $ref: '#/components/schemas/CustomerExternalId' sending_policy: $ref: '#/components/schemas/SendingPolicy' status: $ref: '#/components/schemas/StatusSetting' suggestions: $ref: '#/components/schemas/Suggestions' template: $ref: '#/components/schemas/TemplateSetting' whatsapp: $ref: '#/components/schemas/WAChannelProperties' reactions: $ref: '#/components/schemas/Reactions' TextMessageSetting: description: Поддержка текстовых сообщений type: object properties: creating: $ref: '#/components/schemas/ChannelFeature' deleting: $ref: '#/components/schemas/ChannelFeature' editing: $ref: '#/components/schemas/ChannelFeature' quoting: $ref: '#/components/schemas/ChannelFeature' reaction: $ref: '#/components/schemas/ChannelFeature' max_chars_count: description: Максимальное количество символов в текстовом сообщении type: integer markup_formats: description: Поддерживаемые форматы разметки текста. Пустой или отсутствующий список означает, что разметка не поддерживается. type: array items: $ref: '#/components/schemas/MarkupFormat' MarkupFormat: description: Поддерживаемый формат разметки текста type: string enum: - bold - italic - underline - strikethrough - inline_monospace - block_monospace - link AudioMessageSetting: description: Поддержка аудио сообщений type: object properties: creating: $ref: '#/components/schemas/ChannelFeature' deleting: $ref: '#/components/schemas/ChannelFeature' quoting: $ref: '#/components/schemas/ChannelFeature' reaction: $ref: '#/components/schemas/ChannelFeature' max_item_size: description: Максимальный размер аудио для отправки type: integer max_items_count: description: Максимальное количество аудио вложений в сообщении type: integer FileMessageSetting: description: Поддержка файловых сообщений type: object properties: creating: $ref: '#/components/schemas/ChannelFeature' deleting: $ref: '#/components/schemas/ChannelFeature' editing: $ref: '#/components/schemas/ChannelFeature' quoting: $ref: '#/components/schemas/ChannelFeature' reaction: $ref: '#/components/schemas/ChannelFeature' max_item_size: description: Максимальный размер файла для отправки type: integer max_items_count: description: Максимальное количество файловых вложений в сообщении type: integer note_max_chars_count: description: Максимальное количество символов в аннотации к файловому сообщению type: integer ImageMessageSetting: description: Поддержка медиа сообщений type: object properties: creating: $ref: '#/components/schemas/ChannelFeature' deleting: $ref: '#/components/schemas/ChannelFeature' editing: $ref: '#/components/schemas/ChannelFeature' quoting: $ref: '#/components/schemas/ChannelFeature' reaction: $ref: '#/components/schemas/ChannelFeature' max_item_size: description: Максимальный размер изображения для отправки type: integer max_items_count: description: Максимальное количество медиа вложений в сообщении type: integer note_max_chars_count: description: Максимальное количество символов в аннотации к медиа сообщению type: integer OrderMessageSetting: description: Поддержка сообщений с заказами type: object properties: creating: $ref: '#/components/schemas/ChannelFeature' deleting: $ref: '#/components/schemas/ChannelFeature' editing: $ref: '#/components/schemas/ChannelFeature' reaction: $ref: '#/components/schemas/ChannelFeature' quoting: $ref: '#/components/schemas/ChannelFeature' ProductMessageSetting: description: Поддержка сообщений с товарами type: object properties: creating: $ref: '#/components/schemas/ChannelFeature' deleting: $ref: '#/components/schemas/ChannelFeature' editing: $ref: '#/components/schemas/ChannelFeature' reaction: $ref: '#/components/schemas/ChannelFeature' quoting: $ref: '#/components/schemas/ChannelFeature' StatusSetting: description: Передача информации о статусе сообщения type: object properties: delivered: $ref: '#/components/schemas/ChannelFeature' read: $ref: '#/components/schemas/ChannelFeature' SendingPolicy: description: Политика отправки сообщений type: object properties: after_reply_timeout: $ref: '#/components/schemas/SendingPolicyAfterReplyTimeout' new_customer: $ref: '#/components/schemas/SendingPolicyNewCustomer' outgoing: $ref: '#/components/schemas/SendingPolicyOutgoing' Suggestions: description: Поддержка типов быстрых ответов type: object properties: email: $ref: '#/components/schemas/ChannelFeature' phone: $ref: '#/components/schemas/ChannelFeature' text: $ref: '#/components/schemas/ChannelFeature' url: $ref: '#/components/schemas/ChannelFeature' TemplateSetting: description: Поддержка шаблонов сообщений type: object properties: creation: description: Поддержка создания шаблонов в системе type: boolean sending: description: Поддержка отправки шаблонов из системы type: boolean WAChannelProperties: description: Свойства канала WhatsApp type: object properties: channel_quality: $ref: '#/components/schemas/WAChannelQuality' channel_status: $ref: '#/components/schemas/WAChannelStatus' tier: type: integer Reactions: description: Поддержка работы с реакциями для сообщений type: object required: - dictionary - max_count properties: dictionary: description: Словарь доступных реакций type: array items: type: string max_count: description: Максимальное количество реакций, добавляемых из системы type: integer Member: description: Участник чата type: object required: - is_author - state properties: is_author: description: Признак авторства чата type: boolean deprecated: true state: $ref: '#/components/schemas/MemberState' user: $ref: '#/components/schemas/UserRef' ChatID: description: Объект с идентификатором чата type: object required: - id properties: id: description: Идентификатор чата type: integer UserID: description: Объект с идентификатором пользователя type: object required: - id properties: id: description: Идентификатор пользователя type: integer MessageID: description: Объект с идентификатором сообщения type: object required: - id properties: id: description: Идентификатор сообщения type: integer EventType: type: string description: Тип события, определяющий структуру поля data enum: - message_new - message_updated - file_updated - message_deleted - message_restored - chat_created - chat_updated - chats_deleted - dialog_opened - dialog_assign - dialog_closed - user_online_updated - user_joined_chat - user_left_chat - user_updated - customer_updated - bot_updated - channel_updated WaitingLevel: description: Уровень ожидания type: string enum: - warning - danger - none MessageType: description: Тип сообщения type: string enum: - text - system - command - order - product - file - image - audio MessageScope: description: Область видимости сообщения type: string enum: - undefined - public - private MessageStatus: description: Статус сообщения type: string enum: - undefined - received - sending - sent - failed - seen ResponsibleType: type: string description: Тип ответственного enum: - user - bot UserType: description: Тип пользователя type: string enum: - user - bot - customer - channel MessageOrderStatusCode: description: Код статуса type: string enum: - new - approval - assembling - delivery - complete - cancel MessageFileKind: description: Тип файла type: string enum: - none - image - video - file - audio FileTranscriptionStatus: description: Статус транскрипции файла type: string enum: - in_progress - ready - error MessageErrorCode: description: Код ошибки type: string enum: - unknown - network_error - malformed_response - async_send_timeout - general - customer_not_exists - reply_timed_out - spam_suspicion - access_restricted MessageAction: description: Системное действие сообщения (только для сообщений с типом system) type: string enum: - dialog_opened - dialog_closed - user_joined - user_left - dialog_assign - customer_blocked - customer_unblocked - dialog_unassign - dialog_tag_added - dialog_tag_removed SuggestionType: description: Тип быстрого ответа type: string enum: - text - email - phone - url ChannelType: description: Тип канала type: string enum: - telegram - tiktok - fbmessenger - viber - whatsapp - skype - vk - instagram - consultant - yandex_chat - odnoklassniki - max - ozon - wildberries - yandex_market - mega_market - avito - drom - youla - custom ChannelFeature: description: Поддержка операций с сообщениями данного типа type: string enum: - none - receive - send - both CustomerExternalId: description: Поддержка внешних идентификаторов клиентов type: string enum: - any - phone SendingPolicyAfterReplyTimeout: description: Типы сообщений для отправки после истечения времени ответа type: string enum: - no - template SendingPolicyNewCustomer: description: Типы сообщений для отправки новому клиенту type: string enum: - no - template - text SendingPolicyOutgoing: description: Поддержка исходящих сообщений type: string enum: - allowed - restricted WAChannelQuality: description: Качество канала WhatsApp type: string enum: - high - medium - low WAChannelStatus: description: Статус канала WhatsApp type: string enum: - connected - flagged - offline - pending - restricted MemberState: description: Состояние участника чата type: string enum: - active - kicked - leaved - undefined MessageReaction: description: Объект реакции, добавленной к сообщению type: object required: - content - created_at properties: content: type: string description: Эмодзи реакции user_id: type: integer description: Идентификатор пользователя, добавившего реакцию created_at: type: string format: date-time description: Время создания реакции