Skip to main content
Two endpoints manage the comment thread attached to a chattel document. 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

Returns the most recent 80 comments on the specified document, in the order they were stored. The document must be owned by your authenticated account.

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

Appends a new comment to the document’s comment thread. The comment is attributed to your authenticated account. Returns 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

Returns 201 Created with the newly created comment object.
object
required
The comment that was just appended to the thread.

Example


Error cases