Comments Overview
Comments (also called "chat messages" internally) are threaded discussions attached to content items such as posts, videos, and articles. The API uses a two-level model:
- Top-level comments — fetched with
GET /api/chat?contentId=... - Threaded replies — fetched with
GET /api/replies?parentCommentId=...
Data Model
Each comment/reply is a ChatMessage record in the database, identified by:
| Field | Type | Description |
|---|---|---|
id | integer | Unique comment ID |
message | string | Rich text / HTML body |
messagePlain | string | Plain text version (auto-generated) |
displayName | string | Author display name (falls back to User.name) |
deleted | boolean | Soft-delete flag — deleted comments still appear in results |
moderationCategory | string | Moderation label (Profanity/Spam comments are excluded) |
isEdited | boolean | Whether the comment has been edited |
editedAt | datetime | Timestamp of last edit |
createdAt | datetime | Creation timestamp |
replyCount | integer | Number of threaded replies (top-level comments only) |
parentCommentId | integer | Parent comment ID (replies only; null for top-level) |
Inline Reactions
Both comments and replies include inline reaction data:
reactions— array of{ emoji, count }aggregated per emojimyReactions— array of emoji identifiers the authenticated user has reacted with (empty if unauthenticated)
Relationship to Posts
Posts return commentCount and adminHasReplied in their response. To fetch the actual comment content, use the post's id as the contentId parameter in GET /api/chat.
Available Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/chat?contentId=... | List top-level comments on content |
| GET | /api/replies?parentCommentId=... | List replies to a comment |
| POST | /api/chat | Create a comment or reply |
| PUT | /api/chat/:id/edit | Edit your own comment |
| DELETE | /api/chat/:id/:delete | Delete a comment (admin only) |