Skip to main content

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:

  1. Top-level comments — fetched with GET /api/chat?contentId=...
  2. Threaded replies — fetched with GET /api/replies?parentCommentId=...

Data Model​

Each comment/reply is a ChatMessage record in the database, identified by:

FieldTypeDescription
idintegerUnique comment ID
messagestringRich text / HTML body
messagePlainstringPlain text version (auto-generated)
displayNamestringAuthor display name (falls back to User.name)
deletedbooleanSoft-delete flag — deleted comments still appear in results
moderationCategorystringModeration label (Profanity/Spam comments are excluded)
isEditedbooleanWhether the comment has been edited
editedAtdatetimeTimestamp of last edit
createdAtdatetimeCreation timestamp
replyCountintegerNumber of threaded replies (top-level comments only)
parentCommentIdintegerParent 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 emoji
  • myReactions — 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​

MethodEndpointDescription
GET/api/chat?contentId=...List top-level comments on content
GET/api/replies?parentCommentId=...List replies to a comment
POST/api/chatCreate a comment or reply
PUT/api/chat/:id/editEdit your own comment
DELETE/api/chat/:id/:deleteDelete a comment (admin only)