Add a reaction

POST/chat-rooms/:roomId/messages/:messageId/reactions

Add an emoji reaction to a message. One user can add several different emojis. Sending the same emoji twice does not add a duplicate (idempotent). Only emojis from a fixed allow list are accepted.

AuthLogin required

Path parameters

roomIdstringrequired

Chat room ID.

messageIdstringrequired

Message ID.

Request body

emojistringrequired

The emoji. Anything outside the allow list returns 400.

Response

FieldTypeDescription
messageIdstringThe message ID.
reactionsobject[]Aggregated reactions (emoji / count / userIds). userIds is capped at 100 entries.
Request
curl https://api.4s.link/chat-rooms/ROOM_ID/messages/MESSAGE_ID/reactions \
-X POST \
-H "Authorization: Bearer 4s_at_..." \
-H "Content-Type: application/json" \
-d '{
"emoji": "👍"
}'
Example response
{
"messageId": "m1a2b3c4-...",
"reactions": [
{ "emoji": "👍", "count": 2, "userIds": ["a1b2c3d4-...", "b2c3d4e5-..."] }
]
}