Skip to main content

Get Content Reactions

Retrieve reaction data for a specific content item (post, video, article, etc.). Supports two modes:

  • Without emoji filter: returns aggregated counts per emoji, plus the authenticated user's own reactions.
  • With emoji filter: 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

ParameterTypeDescription
idintegerThe content item ID

Query Parameters

ParameterTypeRequiredDescription
emojistringNoFilter 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"]
}
FieldTypeDescription
reactionsarrayArray of { emoji, count } — one entry per emoji with at least one reaction
myReactionsstring[]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" }
]
}
FieldTypeDescription
emojistringThe emoji that was queried
usersarrayList 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/reactions but 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"