Skip to main content
Add Entity Reaction
Requires the entities bundle. A project without the entities bundle returns 403 database/tables-not-available. See Bundles.
Adds a reaction of the specified type to an entity. If the user already has a reaction on this entity, it is replaced with the new type. The entity’s reactionCounts map is updated accordingly. Sending the reaction the user already has changes nothing: the response is the same 200 with the entity, counts stay as they are, and no notification is sent. Authentication required. Reacting to an entity in a space takes part in it (see Who can post and take part): the user must be able to read the space’s content, and not be banned in it or any space above it. The space’s postingPermission isn’t consulted.

Path Parameters

string
required
The UUID of the entity 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. Useful for backfilling reactions from an external system. A user token always acts as its own user and must not send it (400 entity/acting-user-not-allowed).

Response

Returns the updated Entity object with the new reactionCounts map.
The entity owner receives an in-app notification when someone reacts to their entity. Milestone notifications are also sent at reaction count thresholds (e.g., 10, 50, 100 reactions).

Error Responses

Returned when a service key sends no actingUserId.
A user token sent 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 a service key names an actingUserId that isn’t a user in this project.
The request sent 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 the entity doesn’t exist or a moderator removed it, its author and the user have blocked each other (either direction), or it is in a space the user can’t read (see who can read content). Nothing is written.
The user can read the entity but is banned in its space or in a space above it. Nothing is written.