لوكلاء AI: ملف markdown لهذه الصفحة — /docs-content-en/bots/ui.md فهرس التوثيق — /llms.txt
مقالات التوثيق متاحة حاليًا باللغة الإنجليزية فقط.
Interface
Add reactions to messages, show a typing indicator, and control the input field in a chat.
Scope: imbot | Base URL: https://vibecode.bitrix24.com/v1 | Auth: X-Api-Key
Add reaction
POST /v1/bots/:botId/messages/:messageId/reactions
Adds a bot reaction to a message.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ParameterbotId (path) |
Typenumber | Requiredyes | DescriptionBot ID. List: GET /v1/bots |
ParametermessageId (path) |
Typenumber | Requiredyes | DescriptionMessage ID. It arrives in the data.id field of the POST /v1/bots/:botId/messages response and in the message.id field of bot events |
Request fields (body)
| Field | Type | Required | Description |
|---|---|---|---|
Fieldreaction |
Typestring | Requiredyes | DescriptionReaction code. List: Reaction codes |
Examples
curl — personal key
curl -X POST https://vibecode.bitrix24.com/v1/bots/42/messages/1501/reactions \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "reaction": "like" }'
curl — OAuth application
curl -X POST https://vibecode.bitrix24.com/v1/bots/42/messages/1501/reactions \
-H "X-Api-Key: YOUR_APP_KEY" \
-H "Authorization: Bearer USER_SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "reaction": "like" }'
JavaScript — personal key
const res = await fetch('https://vibecode.bitrix24.com/v1/bots/42/messages/1501/reactions', {
method: 'POST',
headers: {
'X-Api-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({ reaction: 'like' }),
})
const { success, data } = await res.json()
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/bots/42/messages/1501/reactions', {
method: 'POST',
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
'Content-Type': 'application/json',
},
body: JSON.stringify({ reaction: 'like' }),
})
const { success, data } = await res.json()
Response fields
| Field | Type | Description |
|---|---|---|
Fielddata.result |
Typeboolean | Descriptiontrue on successful addition |
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 |
DescriptionmessageId 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 (error.b24Code: REACTION_NOT_FOUND) |
DescriptionThe reaction code is not in the list of codes |
| HTTP422 | CodeBITRIX_ERROR |
DescriptionBitrix24 error (error text in message) |
| HTTP403 | CodeSCOPE_DENIED |
DescriptionThe API 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 |
DescriptionThe API key has no configured tokens |
Full list of common API errors — Errors.