Tick a box of a comment
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.
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
index*|0 <= value <= 50000checked*booleantext*stringlength <= 50000Bad request: the body could not be parsed as JSON. Answered before the route runs.
application/json- response
error*stringcurl -X POST 'http://localhost:3000/api/v1/comments/string/checkbox' \ -H 'Content-Type: application/json' \ -d '{ "index": 0, "checked": true, "text": "string"}'{ "error": "string"}Edit a comment PATCH
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`.
React to a comment POST
Any one emoji, fully qualified as a picker hands it over (`❤️`, a skin tone, a flag or a sequence included); anything else, two emoji or text, is a 422. The quick ones the screens offer first are 👍 ❤️ 😄 🎉 👀 ✅. The reactions come in the order of each emoji's oldest reaction still there (a reaction taken back leaves no row). Anyone who can see the comment reacts, as themselves (an agent too), once per emoji: adding one already there, or removing one that is not, changes nothing and records nothing. A change records `comment.reacted` or `comment.unreacted` (meta `{ commentId, emoji }`) on the comment's entity, for `/changes`; it notifies nobody and stays out of the task's history. Answers the comment with `reactions` (`[{ emoji, count, users }]`). 404 for a deleted comment or one on an entity the caller cannot see. 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`.