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
| Parameter | Type | Description |
|---|---|---|
id | integer | The content item ID |
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
emoji | string | Yes | The 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 Code | Body |
|---|---|
| 400 | { "error": "Emoji is required" } |
| 401 | Unauthorized |
| 403 | Forbidden — no access to content |
| 404 | Content 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
}