Skip to main content
Bot is allowed — every endpoint on this page accepts bot authentication via the Authorization: <user_id> <token> header. See the Bots guide.
Clody lets you attach emoji reactions to both Branch messages and Picnic posts. Each reaction is tied to a specific message, an emoji character, and the user who placed it. When you add or remove a reaction, Clody broadcasts a Socket.IO event to every member of the relevant channel so all clients stay in sync instantly.

The Reaction Object

Every reaction endpoint returns one or more reaction objects with the following fields.
integer
Unique row identifier for this reaction.
integer
ID of the Branch message or Picnic post this reaction belongs to.
boolean
true if the reaction is on a Picnic post; false if it is on a Branch message.
string
The Unicode emoji character, e.g. "👍".
integer
User ID of the person who added this reaction.
A message can have at most 50 reactions across all users and emoji. Reacting with the same emoji you have already used on a message is a no-op — the server returns your existing reaction without creating a duplicate.

Endpoints

Fetch reactions — POST /api/reactions/get

Returns all reactions for one or more messages in a single request. You can pass a single message ID or an array of up to 200 IDs; the response is keyed by message ID string so you can merge it into your local state efficiently. Request body
boolean
required
true to query Picnic post reactions; false for Branch message reactions.
array of integers
Batch of message IDs to fetch reactions for. Mutually exclusive with id. Maximum 200 IDs per request.
integer
Single message ID. Use this as a shorthand when you only need one message. Ignored when ids is present.
Response 200 An object whose keys are message ID strings and whose values are arrays of reaction objects.
Error responses

Add a reaction — POST /api/reaction/create

Adds an emoji reaction to a message. If you have already reacted with that emoji, the server returns the existing reaction unchanged (idempotent). Request body
boolean
required
true for a Picnic post; false for a Branch message.
integer
required
ID of the message you are reacting to.
string
required
A single valid Unicode emoji character, e.g. "🔥". Non-emoji strings are rejected.
Response 200 — the reaction object.
Error responses

Remove a reaction — POST /api/reaction/delete

Deletes a reaction you own. You can identify the reaction either by its row id (option A) or by the combination of message + emoji (option B) — useful when your UI stores the emoji but not the reaction row ID. Request body — option A (by reaction ID)
integer
required
The reaction row ID returned when the reaction was created.
Request body — option B (by message + emoji)
integer
required
ID of the message the reaction is on.
string
required
The emoji character of the reaction to remove.
boolean
required
true for a Picnic post; false for a Branch message.
Response 200"Success" Error responses

Real-Time Events

Clody pushes reaction changes over Socket.IO on the main / namespace. You receive these events only for channels you are a member of.

new_reaction

Fires when any member adds a reaction. The payload is the full reaction object.

delete_reaction

Fires when any member removes a reaction. The payload is the reaction object that was deleted.