Authenticated list, newest-first, scoped to one (collection, doc_id) pair.
The viewer's username gates the privacy filter — public comments
return for everyone authenticated, private comments only to their
author. Anonymous callers get 401 from
:func:api.auth.get_current_user.
Batched {<collection>:<doc_id>: <count>} map for the
per-row "N comments" badge. Privacy-filtered against the viewer
— counts reflect what they would see in
:func:list_comments.
comments
5 endpoints at a glance
GET/comments/POST/comments/DELETE/comments/{comment_id}PATCH/comments/{comment_id}POST/comments/counts/comments
List Comments
Authenticated list, newest-first, scoped to one
(collection, doc_id)pair.The viewer's username gates the privacy filter — public comments
return for everyone authenticated, private comments only to their
author. Anonymous callers get 401 from
:func:
api.auth.get_current_user.Parameters
Header Parameters
Query Parameters
Responses
Successful Response
Playground
Headers
Variables
Samples
Create Comment
Authenticated. Validates the target row exists in its collection
so a typo can't create an orphan comment.
Parameters
Header Parameters
Request Body
Responses
Successful Response
Playground
Headers
Body
Samples
Counts For Targets
Batched
{<collection>:<doc_id>: <count>}map for theper-row "N comments" badge. Privacy-filtered against the viewer
— counts reflect what they would see in
:func:
list_comments.Parameters
Header Parameters
Request Body
Responses
Successful Response
Playground
Headers
Body
Samples
Delete Comment
Author OR admin. Hard-delete; no tombstone.
Parameters
Header Parameters
Path Parameters
Responses
Successful Response
Playground
Headers
Variables
Samples
Update Comment
Author-only edit. Patches
bodyand/orprivate—model_fields_setlets the caller change either independently.editedflips on body changes only.Parameters
Header Parameters
Path Parameters
Request Body
Responses
Successful Response
Playground
Headers
Variables
Body
Samples