Comments
Inline comments anchored to a doc range, table cell, row, or whole workspace. The universal create endpoint accepts a discriminated target union; the legacy row-only endpoint is kept for older clients.
Generated from src/lib/api-paths/comments.ts. Body schemas come from CreateUniversalCommentSchema and CreateCommentSchema in the runtime.
post/api/workspaces/{slug}/comments
Create a comment (universal)
Create a comment anchored to a doc range, table cell, row, or whole workspace. The `target` discriminated union picks the anchor type.
Auth: Bearer token (API key or OAuth access token).
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
slug | string | yes |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
target | object | object | object | object | object | yes | |
body | string | yes | |
parentId | string | no | |
mentions | object[] | no | |
correlationId | string | no |
Responses
| Status | Body | Description |
|---|---|---|
200 | object | Created. |
post/api/workspaces/{slug}/rows/{id}/comments
Create a comment on a row (legacy)
Legacy row-only comment endpoint. New clients should use the universal endpoint above with `target: { kind: "row", rowId }`.
Auth: Bearer token (API key or OAuth access token).
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
slug | string | yes | |
id | string | yes |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
body | string | yes | |
parentId | string | no | |
mentions | string[] | no |
Responses
| Status | Body | Description |
|---|---|---|
200 | object | Created. |
get/api/comments/{id}
Get a single comment
Auth: Bearer token (API key or OAuth access token).
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes |
Responses
| Status | Body | Description |
|---|---|---|
200 | object | Comment detail. |
404 | Error | Not found. |
delete/api/comments/{id}
Delete a comment
Author only.
Auth: Bearer token (API key or OAuth access token).
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes |
Responses
| Status | Body | Description |
|---|---|---|
200 | object | Deleted. |
403 | Error | Not the author. |
post/api/comments/{id}/resolve
Resolve a comment thread
Auth: Bearer token (API key or OAuth access token).
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes |
Responses
| Status | Body | Description |
|---|---|---|
200 | object | Resolved. |
post/api/comments/{id}/unresolve
Re-open a resolved comment
Auth: Bearer token (API key or OAuth access token).
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes |
Responses
| Status | Body | Description |
|---|---|---|
200 | object | Re-opened. |
post/api/comments/{id}/reactions
Add an emoji reaction
Auth: Bearer token (API key or OAuth access token).
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
emoji | string | yes | example: "👍" |
Responses
| Status | Body | Description |
|---|---|---|
200 | object | Reacted. |
delete/api/comments/{id}/reactions/{emoji}
Remove your reaction
Auth: Bearer token (API key or OAuth access token).
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
emoji | string | yes |
Responses
| Status | Body | Description |
|---|---|---|
200 | object | Reaction removed. |
Related
- Web → Comments — UI flow + visibility model + reactions.
- Web → Inbox — every comment routed to a recipient lands here.
- Rows API — anchor a comment on a cell or row.
- Doc body API — anchor a comment on a doc range.
- Webhooks API —
comment.added/comment.deletedevents. - Agent attribution — every comment write is stamped with
authorPrincipalType+authorId.