docs
Comments

Reply to a comment

POST
/v1/comments/{id}/replies

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.

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
body*string
Length1 <= length <= 50000

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/replies' \  -H 'Content-Type: application/json' \  -d '{  "body": "string"}'
Example Response
{  "error": "string"}

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

Comment on a project POST

The same rules as a task's comments. 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. Records `comment.created` on the project. 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`.