For AI agents: markdown of this page — /docs-content-en/chats/messages/reactions-create.md documentation index — /llms.txt

Add a reaction

POST /v1/chats/messages/:messageId/reactions

Adds the current user's reaction to a message. The chat is resolved from the message, so no dialogId is needed.

A reaction is set by a camelCase code: like, fire, laugh, faceWithThermometer. The set of codes is defined by Bitrix24 and may grow. In version im 26.1300 there are 48: like, faceWithTearsOfJoy, redHeart, neutralFace, fire, cry, slightlySmilingFace, winkingFace, laugh, kiss, wonder, slightlyFrowningFace, loudlyCryingFace, faceWithStuckOutTongue, faceWithStuckOutTongueAndWinkingEye, smilingFaceWithSunglasses, confusedFace, flushedFace, thinkingFace, angry, smilingFaceWithHorns, faceWithThermometer, facepalm, poo, flexedBiceps, clappingHands, raisedHand, dislike, smilingFaceWithHeartEyes, smilingFaceWithHearts, pleadingFace, relievedFace, foldedHands, okHand, signHorns, loveYouGesture, clownFace, partyingFace, questionMark, exclamationMark, lightBulb, bomb, sleepingSymbol, crossMark, whiteHeavyCheckMark, eyes, handshake, hundredPoints.

Parameters

Parameter Type Required Description
ParametermessageId (path) Typenumber Requiredyes DescriptionMessage ID, a positive integer — from the chat feed (GET /v1/chats/:dialogId/messages) or from the send response

Request fields (body)

Field Type Required Description
Fieldreaction Typestring Requiredyes DescriptionReaction code in camelCase

Any other body field and any query parameter are rejected with 400 INVALID_PARAMS.

Examples

curl — personal key

Terminal
curl -X POST "https://vibecode.bitrix24.com/v1/chats/messages/1001/reactions" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"reaction":"like"}'

curl — OAuth application

Terminal
curl -X POST "https://vibecode.bitrix24.com/v1/chats/messages/1001/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

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/chats/messages/1001/reactions', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ reaction: 'like' }),
})

const { data } = await res.json()
console.log('Reaction added:', data.result)

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/chats/messages/1001/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 { data } = await res.json()
console.log('Reaction added:', data.result)

Response fields

Field Type Description
Fieldsuccess Typeboolean DescriptionAlways true on success
Fielddata.result Typeboolean Descriptiontrue — the reaction is added

Response example

JSON
{
  "success": true,
  "data": {
    "result": true
  }
}

Error response example

422 — this reaction is already on the message:

JSON
{
  "success": false,
  "error": {
    "code": "BITRIX_ERROR",
    "message": "REACTION_ALREADY_SET",
    "b24Code": "REACTION_ALREADY_SET"
  }
}

Errors

HTTP Code Description
HTTP400 CodeINVALID_PARAMS DescriptionmessageId is not a positive integer, reaction is missing, the reaction code is not in camelCase (LIKE, face_with), or an extra body field or a query parameter is passed. Checked before any call to Bitrix24
HTTP404 CodeENTITY_NOT_FOUND DescriptionBitrix24 reported "not found"; the portal code is in error.b24Code
HTTP422 CodeBITRIX_ERROR DescriptionBitrix24 returned an error; the code is in error.b24Code: REACTION_ALREADY_SET — the reaction is already set, REACTION_NOT_FOUND — the code is unknown to Bitrix24, MESSAGE_NOT_FOUND — there is no such message
HTTP403 CodeSCOPE_DENIED DescriptionThe API key does not have the im scope
HTTP403 CodeWRITE_BLOCKED_READONLY_KEY DescriptionA read-only key cannot add reactions — see access rights
HTTP401 CodeTOKEN_MISSING DescriptionThe API key has no Bitrix24 tokens configured

Full list of common API errors — Errors.

Known specifics

One reaction per code. Different codes on the same message are added independently. Repeating the same code returns the REACTION_ALREADY_SET error.

See also