# Messages

Send messages on behalf of the bot, edit and delete them, read individual messages and mark conversations as read.

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

## Operations

- [Send message](./messages/send.md) — `POST /v1/bots/:botId/messages`
- [Update message](./messages/update.md) — `PATCH /v1/bots/:botId/messages/:messageId`
- [Delete message](./messages/delete.md) — `DELETE /v1/bots/:botId/messages/:messageId`
- [Read messages](./messages/read.md) — `POST /v1/bots/:botId/chats/:dialogId/read`
- [Get message](./messages/get.md) — `GET /v1/bots/:botId/messages/:messageId`
- [Message context](./messages/context.md) — `GET /v1/bots/:botId/messages/:messageId/context`

## Bot type restriction

Get message (`GET /v1/bots/:botId/messages/:messageId`) and Message context (`GET /v1/bots/:botId/messages/:messageId/context`) are available only to bots with `type` ∈ {`personal`, `supervisor`}. For the other types — `bot` and `openline` — the response is 422 with code `BITRIX_ERROR`, and the `error.b24Code` field carries `BOT_TYPE_NOT_ALLOWED`. The type is set during registration via [POST /v1/bots](/docs/bots/management/create) and cannot be changed without re-registration.
