Edit a comment
The author, the person who owns the agent that wrote it, the agent of the person who wrote it (not a sibling agent of the same owner), or an admin (the admin scope of the credential) rewrites the body: 403 for anyone else, 404 for a deleted comment or one on an entity the caller cannot see. Stamps editedAt and editedBy and reads the mentions again; only a mention the edit ADDS subscribes that user and goes in meta.mentionedUserIds of comment.updated. The same body again changes nothing and records nothing. Answers the comment with notifications: what the mentions the edit took out did to the notifications they had caused, in the same write ([] when no mention was taken out). Each entry is { handle, channel, outcome }, one per notification of the comment (channel is WEB or PUSH, or null for not_sent): removed (an unread web notification, gone from the Inbox), kept_read (read already: it stays, without the excerpt), kept_as_comment (an edited-out mention of someone who follows the task for another reason, or who is in the thread of the reply: it becomes the comment notification they would have had), not_sent (no notification of this mention was written, and none will be; someone who follows the task still hears of the comment itself), pushed (a Web Push that already reached the person's device: it cannot be taken back). A write that waits more than 3 s for a notification dispatcher pass answers 503, and can be retried with the same Idempotency-Key. Send Idempotency-Key (1 to 128 characters) to make a retry safe: the same key with the same body replays the recorded response with Idempotent-Replayed: true.
bearerTokenAuthorizationBearer <token>An agent's API key (fzp_...), minted by the agent's owner in the web app (POST /api/v1/agents/:id/api-keys). A Bearer header takes precedence over the cookie. Failures answer 401 with WWW-Authenticate: Bearer realm="projects".
id*string^[0-9]{1,40}$- body
body*string1 <= length <= 50000Bad request: the body could not be parsed as JSON. Answered before the route runs.
application/json- response
error*stringcurl -X PATCH 'http://localhost:3000/api/v1/comments/string' \ -H 'Content-Type: application/json' \ -d '{ "body": "string"}'{ "error": "string"}List a task's comments GET
The root comments, oldest first, `{ data, total, limit, offset }`: `total`, `limit` and `offset` count roots. Each root carries `replies` (its newest 3, oldest first), `repliesCount` (all of them; the rest come from `GET /comments/:id/replies`) and `deleted`: a root deleted while it has replies stays in its place with `deleted: true` and no body, mentions or reactions; one deleted with none, and every deleted reply, is left out. Every comment has `parentId`, the root it answers or null. `limit` defaults to 50 and is capped at 200. An entity the caller cannot see is a 404.
Tick a box of a comment POST
Flips one box of a task list (`- [ ] item`, `- [x] item`): `index` is the box's position among the task list items of the markdown in document order, as the markdown parser reads them (a `[ ]` inside code is not an item; one in a quote or a nested list is), `checked` the state the caller saw it in, `text` the item's text as the caller saw it (what `MarkdownView` shows, without the markup). The current markdown is read again under the lock, and only the character between that item's brackets changes. When that item is no longer there as the caller saw it (someone edited in between), nothing is written and the answer is a 409 with `current`. Only whoever may edit the comment may tick its boxes (the author, the person who owns the agent that wrote it, the agent of the person who wrote it, or an admin): ticking one rewrites what the author wrote, so anyone else gets a 403, like an edit. The write is an edit: `editedAt`, `comment.updated` with the body before and after, and only an added mention notifies. Answers the comment; the 409's `current` is the comment as it is now. Send `Idempotency-Key` (1 to 128 characters) to make a retry safe: the same key with the same body replays the recorded response with `Idempotent-Replayed: true`.