Перейти к основному содержимому

GET /api/v1/events/{event_id}/comments

Returns top-level comments for an event, with pagination. If authenticated, each comment includes the current user's reaction (like/dislike).

Authentication

Optional. When authenticated, user_reaction is populated on each comment.

Request

Path Parameters

ParameterTypeRequiredDescription
event_idintegerYesEvent ID

Query Parameters

ParameterTypeDefaultDescription
limitinteger50Maximum number of comments to return (max 100)
offsetinteger0Number of comments to skip

Example

curl -X GET "https://intotes.com/api/v1/events/42/comments?limit=10&offset=0"

Response

200 OK

Returns an object with comments array.

{
"comments": [
{
"id": 1,
"event_id": 42,
"user_id": 7,
"content": "I think this will resolve YES based on recent trends",
"likes_count": 12,
"dislikes_count": 2,
"replies_count": 3,
"created_at": "2026-04-04T10:00:00Z",
"user": {
"id": 7,
"name": "trader42",
"nickname": "trader42",
"profile_hidden": false,
"avatar_url": "https://cdn.intotes.com/avatars/7.jpg"
},
"user_reaction": "like"
},
{
"id": 2,
"event_id": 42,
"user_id": 15,
"content": "Disagree, the odds are overpriced",
"likes_count": 5,
"dislikes_count": 8,
"replies_count": 0,
"created_at": "2026-04-04T09:30:00Z",
"user": {
"id": 15,
"name": "betKing",
"nickname": "betking",
"profile_hidden": false,
"avatar_url": "https://cdn.intotes.com/avatars/15.jpg"
},
"user_reaction": null
}
]
}

Errors

StatusCodeDescription
404not_foundEvent not found
500internal_errorServer failed to retrieve comments