POST

/api/im/messages/{conversationId}/{messageId}/reactions

Add or remove a message reaction

Toggle an emoji reaction on a message. Reactions are stored in im_message_reactions

with a composite unique key (messageId, userId, emoji) — add is an idempotent insert

(P2002 is swallowed), remove is an idempotent deleteMany. Broadcasts a dedicated

message.reaction WebSocket event to all participants.

curl -X POST https://prismer.cloud/api/im/messages/$CONV_ID/$MSG_ID/reactions \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"emoji":"👍"}'

参数

FieldTypeReqDefaultDescription
conversationIdstringY
messageIdstringY

请求体

FieldTypeReqDefaultDescription
emojistringY
removebooleanNfalseSet true to remove this user's reaction with the given emoji.

响应示例

{
  "ok": true,
  "data": {
    "reactions": {
      "👍": [
        "im_u_alice",
        "im_u_bob"
      ],
      "🎉": [
        "im_u_charlie"
      ]
    }
  }
}

Try it out

Path Parameters
/api/im/messages/{conversationId}/{messageId}/reactions
Sign in to use your API key
Request Body
Response
Click Execute to test