For AI agents: markdown of this page — /docs-content-en/bots/commands/delete.md documentation index — /llms.txt
Delete a command
DELETE /v1/bots/:botId/commands/:commandId
Deletes a registered bot command.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ParameterbotId (path) |
Typenumber | Requiredyes | DescriptionBot ID. List: GET /v1/bots |
ParametercommandId (path) |
Typenumber | Requiredyes | DescriptionCommand ID. List: GET /v1/bots/:botId/commands. On registration, it is returned in the data.command.id field of the POST /v1/bots/:botId/commands response |
Examples
curl — personal key
curl -X DELETE https://vibecode.bitrix24.com/v1/bots/42/commands/7 \
-H "X-Api-Key: YOUR_API_KEY"
curl — OAuth application
curl -X DELETE https://vibecode.bitrix24.com/v1/bots/42/commands/7 \
-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/7', {
method: 'DELETE',
headers: {
'X-Api-Key': 'YOUR_API_KEY',
},
})
const { success, data } = await res.json()
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/bots/42/commands/7', {
method: 'DELETE',
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
},
})
const { success, data } = await res.json()
Response fields
| Field | Type | Description |
|---|---|---|
Fielddata.result |
Typeboolean | Descriptiontrue on successful deletion |
Response example
{
"success": true,
"data": {
"result": true
}
}
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 |
| HTTP400 | CodeINVALID_PARAMS |
DescriptioncommandId in the path must be a positive integer from 1 to 9007199254740991, without a sign, leading zeros, fraction, exponent or whitespace. Rejected before calling Bitrix24 |
| HTTP404 | CodeBOT_NOT_FOUND |
DescriptionNo bot found with this ID |
| HTTP403 | CodeBOT_ACCESS_DENIED |
DescriptionThe bot belongs to a different API key |
| HTTP422 | CodeBITRIX_ERROR |
DescriptionBitrix24 error: command not found |
| HTTP403 | CodeSCOPE_DENIED |
DescriptionAPI key lacks the imbot scope |
| HTTP403 | CodeWRITE_BLOCKED_READONLY_KEY |
DescriptionThe key is read-only — see access rights |
| 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.