palbaseDocs

Palbase Messaging · API

PUT/messaging/conversations/{conversation_id}/messages/{message_id}/reactions/{emoji}

React to a message

The reader reacts to a message with an emoji, beside their other reactions to it (Slack's); with replace, in their place (one a person, WhatsApp's). Again with the same emoji, nothing more. A person gives one message 20 emoji at most.

Called by a signed-in user of your app, with their token and the publishable key.

Path

conversation_idstring (uuid) · requiredThe conversation.
message_idstring (uuid) · requiredThe message.
emojistring · requiredThe emoji, percent-encoded in the path.

Request body

replaceboolean · optionalThe reader's other reactions to the message go: one a person (WhatsApp's).
curl
curl -X PUT "https://<your-ref>.palbase.studio/messaging/conversations/<conversation_id>/messages/<message_id>/reactions/<emoji>" \
  -H "apikey: $PALBASE_PUBLISHABLE_KEY" \
  -H "authorization: Bearer $USER_ACCESS_TOKEN" \
  -H "content-type: application/json" \
  -d '{"replace":false}'

Responses

200The message

400Not a message that takes a reaction (`cannot_react`), or `emoji` out of bounds (`invalid_emoji`)

401No key, a key of no project, a token not valid (the edge's answer), or no person's session (`user_required`)

403The project's server made the conversation read-only (`read_only`)

404No such message (`message_not_found`)

40920 emoji of the reader's on it already (`too_many_reactions`)

413The request body is too large (`request_too_large`)

429Over the project's request limit; Retry-After says when to try again

503Temporarily unavailable; retrying is safe after Retry-After

defaultAn error: the envelope names it (`error`) and explains it (`error_description`).

Operation React of messaging's contract.