Axiomatic

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

MethodPathDescription
GET/api/comments?entityId=List comments
POST/api/commentsCreate comment
DELETE/api/comments/[id]Delete comment
POST/api/comments/[id]/reactionsAdd 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.