# Commands

Register bot slash commands, update and delete them, answer invocations. Users invoke commands via `/` in chat. Commands also fire through the `COMMAND` field in [keyboard](/docs/bots/messages/keyboard) buttons — both ways generate the same `ONIMBOTV2COMMANDADD` event.

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

## Operations

- [Register a command](./commands/register.md) — `POST /v1/bots/:botId/commands`
- [List commands](./commands/list.md) — `GET /v1/bots/:botId/commands`
- [Update a command](./commands/update.md) — `PATCH /v1/bots/:botId/commands/:commandId`
- [Delete a command](./commands/delete.md) — `DELETE /v1/bots/:botId/commands/:commandId`
- [Answer a command](./commands/answer.md) — `POST /v1/bots/:botId/commands/:commandId/answer`

## Possible write-to-read lag

Reading the command list (`GET /v1/bots/:botId/commands`) is not cached on the Vibecode side. However, Bitrix24 itself caches the list: after registering, updating or deleting a command, `GET` may return the previous values for several seconds (sometimes minutes). See [List commands](./commands/list.md) for details.
