Comment on a project
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.
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 <= 50000parentId?not (unknown)replyToCommentId?not (unknown)Bad 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/projects/string/comments' \ -H 'Content-Type: application/json' \ -d '{ "body": "string"}'{ "error": "string"}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`.
Comment on a task POST
201 with the comment and its `mentionedHandles`. 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. A body with no text is a 422, and so is a `parentId` or `replyToCommentId`: a comment here is a root, and a reply goes to `POST /comments/:id/replies`. Records `comment.created` on the task, with `meta.commentId`, `meta.mentionedUserIds` and `meta.excerpt` (the first 200 characters). 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`.