[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-chats\u002Fmessages\u002Freactions-create":3,"docs-tabs-chats\u002Fmessages\u002Freactions-create":6},{"content":4,"lastmod":5},"## Add a reaction\n\n`POST \u002Fv1\u002Fchats\u002Fmessages\u002F:messageId\u002Freactions`\n\nAdds the current user's reaction to a message. The chat is resolved from the message, so no `dialogId` is needed.\n\nA 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`.\n\n## Parameters\n\n| Parameter | Type | Required | Description |\n|----------|-----|:-----:|---------|\n| `messageId` (path) | number | yes | Message ID, a positive integer — from the [chat feed](\u002Fdocs\u002Fchats\u002Fmessages\u002Flist) (`GET \u002Fv1\u002Fchats\u002F:dialogId\u002Fmessages`) or from the [send](\u002Fdocs\u002Fchats\u002Fmessages\u002Fsend) response |\n\n## Request fields (body)\n\n| Field | Type | Required | Description |\n|------|-----|:-----:|---------|\n| `reaction` | string | yes | Reaction code in camelCase |\n\nAny other body field and any query parameter are rejected with `400 INVALID_PARAMS`.\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -X POST \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fchats\u002Fmessages\u002F1001\u002Freactions\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"reaction\":\"like\"}'\n```\n\n### curl — OAuth application\n\n```bash\ncurl -X POST \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fchats\u002Fmessages\u002F1001\u002Freactions\" \\\n  -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"reaction\":\"like\"}'\n```\n\n### JavaScript — personal key\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fchats\u002Fmessages\u002F1001\u002Freactions', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: JSON.stringify({ reaction: 'like' }),\n})\n\nconst { data } = await res.json()\nconsole.log('Reaction added:', data.result)\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fchats\u002Fmessages\u002F1001\u002Freactions', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': 'YOUR_APP_KEY',\n    'Authorization': 'Bearer USER_SESSION_TOKEN',\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: JSON.stringify({ reaction: 'like' }),\n})\n\nconst { data } = await res.json()\nconsole.log('Reaction added:', data.result)\n```\n\n## Response fields\n\n| Field | Type | Description |\n|------|-----|---------|\n| `success` | boolean | Always `true` on success |\n| `data.result` | boolean | `true` — the reaction is added |\n\n## Response example\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"result\": true\n  }\n}\n```\n\n## Error response example\n\n422 — this reaction is already on the message:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"BITRIX_ERROR\",\n    \"message\": \"REACTION_ALREADY_SET\",\n    \"b24Code\": \"REACTION_ALREADY_SET\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|---------|\n| 400 | `INVALID_PARAMS` | `messageId` 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 |\n| 404 | `ENTITY_NOT_FOUND` | Bitrix24 reported \"not found\"; the portal code is in `error.b24Code` |\n| 422 | `BITRIX_ERROR` | Bitrix24 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 |\n| 403 | `SCOPE_DENIED` | The API key does not have the `im` scope |\n| 403 | `WRITE_BLOCKED_READONLY_KEY` | A read-only key cannot add reactions — see [access rights](\u002Fdocs\u002Faccess-rights) |\n| 401 | `TOKEN_MISSING` | The API key has no Bitrix24 tokens configured |\n\nFull list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## Known specifics\n\n**One reaction per code.** Different codes on the same message are added independently. Repeating the same code returns the `REACTION_ALREADY_SET` error.\n\n## See also\n\n- [List reactions to a message](\u002Fdocs\u002Fchats\u002Fmessages\u002Freactions-list)\n- [Remove a reaction](\u002Fdocs\u002Fchats\u002Fmessages\u002Freactions-delete)\n- [Read messages](\u002Fdocs\u002Fchats\u002Fmessages\u002Flist)\n- [Messages](\u002Fdocs\u002Fchats\u002Fmessages)\n","2026-10-06",{},1795415438760]