For AI agents: markdown of this page — /docs-content-en/bots/commands/list.md documentation index — /llms.txt
List commands
GET /v1/bots/:botId/commands
Returns the commands registered for the bot together with the system commands of the Bitrix24 account.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ParameterbotId (path) |
Typenumber | Requiredyes | DescriptionBot ID. List: GET /v1/bots |
Examples
curl — personal key
curl https://vibecode.bitrix24.com/v1/bots/42/commands \
-H "X-Api-Key: YOUR_API_KEY"
curl — OAuth application
curl https://vibecode.bitrix24.com/v1/bots/42/commands \
-H "X-Api-Key: YOUR_APP_KEY" \
-H "Authorization: Bearer USER_SESSION_TOKEN"
JavaScript — personal key
const res = await fetch('https://vibecode.bitrix24.com/v1/bots/42/commands', {
headers: {
'X-Api-Key': 'YOUR_API_KEY',
},
})
const { success, data } = await res.json()
console.log('Commands:', data.commands)
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/bots/42/commands', {
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
},
})
const { success, data } = await res.json()
Response fields
| Field | Type | Description |
|---|---|---|
Fieldsuccess |
Typeboolean | DescriptionAlways true on success |
Fielddata |
Typeobject | DescriptionRequest result |
Fielddata.commands |
Typearray | DescriptionThe bot's commands and the system commands of the Bitrix24 account |
Fielddata.commands[].id |
Typenumber | string | DescriptionCommand ID. A number for a bot command, a string such as def0 for a system command of the Bitrix24 account |
Fielddata.commands[].botId |
Typenumber | DescriptionID of the bot that owns the command. 0 for a system command of the Bitrix24 account |
Fielddata.commands[].command |
Typestring | DescriptionCommand text, starts with /, for example /help |
Fielddata.commands[].category |
Typestring | DescriptionName of the command group in the command list. For a bot command, the bot name |
Fielddata.commands[].common |
Typestring | DescriptionY — the command is available in all chats, N — only in a private chat with the bot and in chats with the bot |
Fielddata.commands[].context |
Typestring | DescriptionCommand context. An empty string if not set |
Fielddata.commands[].title |
Typestring | DescriptionCommand description in the Bitrix24 account language |
Fielddata.commands[].params |
Typestring | DescriptionHint for the command parameters in the Bitrix24 account language. An empty string if not set |
Fielddata.commands[].extranet |
Typestring | DescriptionY — the command is available to extranet users, N — it is not |
Response example
Two of the six system commands of the Bitrix24 account and one bot command are shown:
{
"success": true,
"data": {
"commands": [
{
"id": "def0",
"botId": 0,
"command": "/me",
"category": "Chat and calls",
"common": "Y",
"context": "",
"title": "Text will be shown in italics",
"params": "text",
"extranet": "Y"
},
{
"id": "def3",
"botId": 0,
"command": "/rename",
"category": "Chats",
"common": "Y",
"context": "chat",
"title": "Change the chat title",
"params": "new title",
"extranet": "Y"
},
{
"id": 229,
"botId": 42,
"command": "/help",
"category": "Support",
"common": "Y",
"context": "",
"title": "Help",
"params": "topic",
"extranet": "N"
}
]
}
}
Error response example
404 — bot not found:
{
"success": false,
"error": {
"code": "BOT_NOT_FOUND",
"message": "Bot 999 not found. Register it first via POST /v1/bots."
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| HTTP400 | CodeINVALID_BOT_ID |
DescriptionbotId is not a number |
| HTTP404 | CodeBOT_NOT_FOUND |
DescriptionNo bot found with this ID |
| HTTP403 | CodeBOT_ACCESS_DENIED |
DescriptionThe bot belongs to a different API key |
| HTTP403 | CodeSCOPE_DENIED |
DescriptionAPI key lacks the imbot scope |
| HTTP410 | CodeBOT_DISABLED |
DescriptionThe bot is disabled and does not process API calls. How to restore it — Bot disabled |
| HTTP401 | CodeTOKEN_MISSING |
DescriptionAPI key has no configured tokens |
Full list of common API errors — Errors.
Known specifics
Pick the bot's commands out of the shared list. The system commands of the Bitrix24 account come in every response, and their botId is 0. To get only your bot's commands, filter data.commands to the items whose botId matches the bot ID.
The list may lag behind changes. Vibecode does not cache this response, but Bitrix24 updates the command list with a delay after a command is registered, updated or deleted: from several seconds to several minutes. During this time, GET may return:
- deleted commands — their IDs are still visible in the list.
- stale
title,paramsandcommonvalues for a command that was just updated. - a list without a command that was just registered.
The command itself is already active at that point: its call arrives as an ONIMBOTV2COMMANDADD event, and the bot handles it. The discrepancy is visible only in this GET. The list cache cannot be force-reset.
How to work with the delay. Right after a change, rely on the response of the change request itself: POST returns the data with the new ID, PATCH returns the updated command, DELETE returns a success flag. If you need to reconcile the list with the actual state, repeat GET after 10–30 seconds.