Skip to main content

Add Reaction to Content

Add an emoji reaction to a content item (post).

Endpoint

POST /api/content/:id/react

Authentication

Required. The request must include a valid authentication token.

Path Parameters

ParameterTypeDescription
idintegerThe content item ID

Request Body

ParameterTypeRequiredDescription
emojistringYesThe emoji identifier (see supported emoji)

Response

Success Response — Reaction Added

Status Code: 201 Created

{
"success": true
}

Success Response — Already Exists

If the user has already reacted with the same emoji, the endpoint is idempotent:

Status Code: 200 OK

{
"success": true,
"alreadyExists": true
}

Error Responses

Status CodeBody
400{ "error": "Emoji is required" }
401Unauthorized
403Forbidden — no access to content
404Content not found

Example

Request

curl -X POST "https://api.tribesocial.io/api/content/4212/react" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_AUTH_TOKEN" \
-d '{ "emoji": "heart" }'

Response

{
"success": true
}