Docs Open org

API reference

Comments API

Comment threads on pages and entries

GET /orgs/{org}/comments/{ref}

One comment, with its replies when it starts a thread.

Parameters

NameInTypeDescription
org requiredpathstringThe org slug.
ref requiredpathstringThe comment's short ID or UUID.

Responses

200
OK. CommentView application/json
404
Not found. ProblemBody application/json

PATCH /orgs/{org}/comments/{ref}

Edits a comment (the author only). New mentions are notified.

Parameters

NameInTypeDescription
org requiredpathstringThe org slug.
ref requiredpathstringThe comment's short ID or UUID.

Request body

application/json, PatchComment.

FieldTypeDescription
anchorstring | nullA new anchor (after the editor re-anchors it), base64.
bodystring | nullThe new text.

Responses

200
OK. CommentView application/json
403
Forbidden. ProblemBody application/json

DELETE /orgs/{org}/comments/{ref}

Deletes a comment (the author only). A thread root with replies stays as a placeholder.

Parameters

NameInTypeDescription
org requiredpathstringThe org slug.
ref requiredpathstringThe comment's short ID or UUID.

Responses

204
No content
403
Forbidden. ProblemBody application/json

POST /orgs/{org}/comments/{ref}/reopen

Reopens a resolved thread.

Parameters

NameInTypeDescription
org requiredpathstringThe org slug.
ref requiredpathstringThe comment's short ID or UUID.

Responses

200
OK. CommentView application/json

POST /orgs/{org}/comments/{ref}/resolve

Resolves a thread (given its root or any reply).

Parameters

NameInTypeDescription
org requiredpathstringThe org slug.
ref requiredpathstringThe comment's short ID or UUID.

Responses

200
OK. CommentView application/json

GET /orgs/{org}/pages/{ref}/comments

A page's comment threads, oldest first, with replies.

Parameters

NameInTypeDescription
org requiredpathstringThe org slug.
ref requiredpathstringThe page's short ID or UUID.
entryquerystringOnly the threads on this entry (short ID or UUID).
resolvedquerybooleantrue for resolved threads only, false for open ones.

Responses

200
OK. Paged_CommentView application/json
404
Not found. ProblemBody application/json

POST /orgs/{org}/pages/{ref}/comments

Adds a comment (or a reply) to a page.

Parameters

NameInTypeDescription
org requiredpathstringThe org slug.
ref requiredpathstringThe page's short ID or UUID.

Request body

application/json, CreateComment.

FieldTypeDescription
anchorstring | nullThe Yjs relative-position pair, base64.
body requiredstringThe text; @handle mentions notify people, agents and teams.
entrystring | nullThe entry it's on (short ID or UUID).
parentstring | nullThe comment it replies to (replies join the thread's root).
quotestring | nullThe text it's about.

Responses

201
Created. CommentView application/json
403
Forbidden. ProblemBody application/json
422
Invalid. ProblemBody application/json