Skip to main content

Inline Reactions on List Endpoints

You do not always need to call a dedicated reactions endpoint. Reaction data is already included inline when you fetch posts or chat messages from their standard list/detail endpoints.

Posts

Both GET /api/posts and GET /api/posts/:id include reaction data on every post object:

{
"id": 4212,
"title": "Welcome to the community!",
"commentCount": 5,
"reactionCounts": [
{ "emoji": "heart", "count": 12 },
{ "emoji": "fire", "count": 5 }
],
"myReactions": ["heart"],
...
}
FieldTypeDescription
reactionCountsarrayArray of { emoji, count } objects for each emoji used on this post
myReactionsstring[]Emoji identifiers the authenticated user has reacted with

Chat Messages

Both GET /api/chat (paginated comments) and GET /api/replies include reaction data on every message:

{
"id": 1693,
"message": "So glad to hear that!",
"reactions": [
{ "emoji": "thumbs_up", "count": 3 },
{ "emoji": "heart", "count": 1 }
],
"myReactions": ["thumbs_up"],
...
}
FieldTypeDescription
reactionsarrayArray of { emoji, count } objects for each emoji used on this message
myReactionsstring[]Emoji identifiers the authenticated user has reacted with (empty if unauthenticated)
tip

If you are already polling or paginating through posts or chat messages, you can use the inline reactionCounts/reactions fields to aggregate reaction data without making additional API calls.