Comments
Comments and reactions
Authentication
Requires session cookie (web app) or API key (x-api-key header). All endpoints are tenant-scoped via entityId.
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /api/comments?entityId= | List comments |
| POST | /api/comments | Create comment |
| DELETE | /api/comments/[id] | Delete comment |
| POST | /api/comments/[id]/reactions | Add reaction |
List comments
GET /api/comments?entityId={entityId}
Returns comments for the entity. Supports entityType, entityId, threadId, and other filters.
Create comment
POST /api/comments
Body: { "entityId", "content", "entityType?", "entityRefId?", "threadId?", ... }
Delete comment
DELETE /api/comments/[id]
Deletes a comment. Requires entityId query param.
Add reaction
POST /api/comments/[id]/reactions
Body: { "entityId", "emoji" } — Adds a reaction to the comment.