Skip to main content
Add Comment Reaction
Adds a reaction of the specified type to a comment. If the user already has a reaction on this comment, it is replaced with the new type. The comment’s reactionCounts map is updated accordingly. Sending the reaction the user already has changes nothing: the response is the same 200 with the comment, counts stay as they are, and no notification is sent. Authentication required.

Path Parameters

string
required
The UUID of the comment to react to.

Body Parameters

string
required
The type of reaction to add. One of: upvote, downvote, like, love, wow, sad, angry, funny.
string
Service key only, and required with one: the user this request acts as, who the reaction is attributed to. A key has no user of its own, so leaving it out returns 400 comment/missing-user-id. A user token always acts as its own user and must not send it (400 comment/acting-user-not-allowed).An actingUserId that doesn’t match a user returns 404 comment/user-not-found.

Blocks

When the moderation bundle is installed:
  • If the reacting user blocked the comment’s author, the reaction is allowed — the block is their own choice. The author gets no reaction notification for it; if the reaction completes a milestone, the milestone notification is still sent, with the reacting user left out of its lastThreeUsers.
  • If the comment’s author blocked the reacting user (or both blocked each other), the request returns 404 comment/not-found. These comments are marked isUnavailable in threads.
  • If the author of the comment’s entity blocked the reacting user, the request returns 404 comment/not-found — for every comment on that entity, the reacting user’s own included.
A refused reaction looks exactly like a missing comment and changes nothing.

Spaces

Reacting to a comment takes part in its entity’s space (see Who can post and take part). The reacting user must be able to read the space’s content — otherwise 404 comment/not-found — and must not be banned in the space or any space above it (403 space/posting-not-allowed). The space’s postingPermission isn’t consulted. Both are checked before anything is written.

Deleted and removed comments

A comment its author deleted can’t be reacted to: the request returns 404 comment/not-found, as for a missing comment (and as editing it does), and changes nothing. This applies to everyone, including the comment’s author, and covers changing an existing reaction to another type too. Removing your own reaction still works (Remove Reaction). Reacting to a moderator-removed comment returns 404 comment/not-found — for everyone, including the removed comment’s author. Reactions already on a deleted or removed comment can still be taken off with Remove Comment Reaction.

Response

Returns the updated Comment object with the new reactionCounts map, shaped for the reacting user (with isAuthorBlocked and isUnavailable flags), the same way Fetch Comment returns it.

Error Responses

Returned when commentId isn’t a valid UUID.
Returned when reactionType is missing or isn’t one of the eight types, or when actingUserId isn’t a valid UUID.
Returned when a user token sends actingUserId, even naming its own user. Only a service key names the user it acts as; a user token always acts as its own user.
Returned when the request sends userId. On this route the user a service key acts as is actingUserId.With a service key:
With a user token, or with no credentials:
Returned when a service key sends no actingUserId.
Returned when a service key names an actingUserId that isn’t a user in this project.
Returned when the comment doesn’t exist, when its author deleted it or a moderator removed it, when its entity is in a space the reacting user can’t read (see Spaces), or when a block refuses the reaction (see Blocks).
The reacting user can read the comment but is banned in its entity’s space or in a space above it. Nothing is written.