GET /v1/documents/:id/comments retrieves the most recent 80 comments on a document. POST /v1/documents/:id/comments appends a new comment to the thread. Both endpoints require that the document belongs to your account.
The comment feature requires the Safeclose real-time service to be active. If the service is unavailable,
POST requests return 503 Service Unavailable. Contact your workspace administrator if comments are consistently unavailable.List comments
Request headers
string
required
Bearer token obtained from your Clerk session. Example:
Bearer eyJhbGc...Path parameters
string
required
The unique identifier of the document whose comments you want to retrieve.
Response
object[]
required
Array of comment objects. Returns at most 80 items, ordered from oldest to newest within that window.
Example
Post a comment
503 if the real-time service is unavailable.
Request headers
string
required
Bearer token obtained from your Clerk session.
string
required
Must be
application/json.Path parameters
string
required
The unique identifier of the document to comment on.
Request body
string
required
The comment text. Minimum 1 character, maximum 2000 characters.
Response
Returns201 Created with the newly created comment object.
object
required
The comment that was just appended to the thread.
