Get Content Reactions
Retrieve reaction data for a specific content item (post, video, article, etc.). Supports two modes:
- Without
emojifilter: returns aggregated counts per emoji, plus the authenticated user's own reactions. - With
emojifilter: returns the list of users who reacted with that specific emoji, including user profile data.
Endpoint
GET /api/content/:id/reactions
Authentication
Optional. When authenticated, the aggregated response includes myReactions.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | integer | The content item ID |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
emoji | string | No | Filter to a specific emoji to get the list of reactor users |
Response
Aggregated Counts (no emoji filter)
Status Code: 200 OK
{
"reactions": [
{ "emoji": "heart", "count": 12 },
{ "emoji": "fire", "count": 5 },
{ "emoji": "thumbs_up", "count": 3 }
],
"myReactions": ["heart"]
}
| Field | Type | Description |
|---|---|---|
reactions | array | Array of { emoji, count } — one entry per emoji with at least one reaction |
myReactions | string[] | Emoji identifiers the authenticated user has reacted with (empty if unauthenticated) |
Per-Emoji User List (with emoji filter)
Status Code: 200 OK
{
"emoji": "heart",
"users": [
{ "id": 6604, "name": "Bruce van Zyl", "photoUrl": "1639671861952.png" },
{ "id": 6605, "name": "Jane Smith", "photoUrl": "1639672045123.png" }
]
}
| Field | Type | Description |
|---|---|---|
emoji | string | The emoji that was queried |
users | array | List of users who reacted, with id, name, photoUrl |
Error Response
Status Code: 404 Not Found — Content item does not exist.
Notes
- This endpoint mirrors the pattern of
GET /api/chat/:id/reactionsbut operates on content items instead of chat messages. - For inline reaction data on posts (returned alongside other post fields), see Inline Reactions.
Examples
Get aggregated reaction counts
curl -X GET "https://api.tribesocial.io/api/content/4212/reactions" \
-H "Authorization: Bearer YOUR_AUTH_TOKEN"
Get users who reacted with a specific emoji
curl -X GET "https://api.tribesocial.io/api/content/4212/reactions?emoji=heart"