Comments API
Comment threads on pages and entries
GET /orgs/{org}/comments/{ref}
One comment, with its replies when it starts a thread.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
org required | path | string | The org slug. |
ref required | path | string | The 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
| Name | In | Type | Description |
|---|---|---|---|
org required | path | string | The org slug. |
ref required | path | string | The comment's short ID or UUID. |
Request body
application/json, PatchComment.
| Field | Type | Description |
|---|---|---|
anchor | string | null | A new anchor (after the editor re-anchors it), base64. |
body | string | null | The 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
| Name | In | Type | Description |
|---|---|---|---|
org required | path | string | The org slug. |
ref required | path | string | The 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
| Name | In | Type | Description |
|---|---|---|---|
org required | path | string | The org slug. |
ref required | path | string | The 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
| Name | In | Type | Description |
|---|---|---|---|
org required | path | string | The org slug. |
ref required | path | string | The 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
| Name | In | Type | Description |
|---|---|---|---|
org required | path | string | The org slug. |
ref required | path | string | The page's short ID or UUID. |
entry | query | string | Only the threads on this entry (short ID or UUID). |
resolved | query | boolean | true 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
| Name | In | Type | Description |
|---|---|---|---|
org required | path | string | The org slug. |
ref required | path | string | The page's short ID or UUID. |
Request body
application/json, CreateComment.
| Field | Type | Description |
|---|---|---|
anchor | string | null | The Yjs relative-position pair, base64. |
body required | string | The text; @handle mentions notify people, agents and teams. |
entry | string | null | The entry it's on (short ID or UUID). |
parent | string | null | The comment it replies to (replies join the thread's root). |
quote | string | null | The text it's about. |
Responses
201- Created. CommentView
application/json 403- Forbidden. ProblemBody
application/json 422- Invalid. ProblemBody
application/json