docs
Comments

React to a comment

POST
/v1/comments/{id}/reactions

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.

Authorization

bearerToken
headerAuthorizationBearer <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".

Path Parameters

id*string
Match^[0-9]{1,40}$

Request Body

  1. body
emoji*string
Length1 <= length <= 40

Response Body

Bad request: the body could not be parsed as JSON. Answered before the route runs.

application/json
  1. response
error*string
Example Request
curl -X POST 'http://localhost:3000/api/v1/comments/string/reactions' \  -H 'Content-Type: application/json' \  -d '{  "emoji": "string"}'
Example Response
{  "error": "string"}

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`.

Reply to a comment POST

201 with the reply, whose `parentId` is the root of the thread (fazer-ai/projects#458): replies are one level deep, so answering a reply adds to the same root. The body is markdown. Every `@handle` of an existing, active user (a person or an agent) outside code (inline backticks or a fenced block) is a mention, case-insensitive and counted once: it lands in `mentionUserIds` and `mentionedHandles`, and subscribes that user to the entity. An unknown handle stays text. The author is subscribed as COMMENTER. Anyone who can see the comment may reply. A deleted root whose replies are not all deleted still takes replies (it stays in the thread as a placeholder); a deleted reply, a deleted root with no live reply, or a comment on an entity the caller cannot see is a 404; a body with no text is a 422. Records `comment.created` on the entity with `meta.parentId` and `meta.threadUserIds` (the root's author and whoever replied in the thread, an agent standing for its owner, the replier aside), who hear of it besides the entity's subscribers. 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`.