---
title: "Create a comment"
method: POST
path: "/api/cards/{cardId}/comments"
tags: ["Comments"]
---

# Create a comment

`POST /api/cards/{cardId}/comments`

## Request

- Base URL: `https://tre-app.com`
- URL: `https://tre-app.com/api/cards/{cardId}/comments`
- Auth: HTTP bearer

## Headers

- `Idempotency-Key` string

## Request body

- CommentCreate
  - `content` string, required

## Response `201`

Success

- CardComment
  - `id` string, uuid, required
  - `cardId` string, uuid, required
  - `userId` string, uuid, required
  - `authorName` string, nullable, required
  - `authorEmail` string, email, required
  - `content` string, required
  - `mentions` string[], required
  - `resolvedAt` string, date-time, nullable, required
  - `resolvedBy` string, uuid, nullable, required
  - `createdAt` string, date-time, required
  - `updatedAt` string, date-time, required
  - `editedAt` string, date-time, nullable, required
  - `actorVia` 'ui' | 'rest' | 'mcp', required: Surface that created the comment.
  - `actorToken` string, nullable, required: API token name snapshot for agent writers; null for UI.
  - `system` boolean, required: True on a comment the server wrote before 2026-10-03, when a replaced STATUS/STATO was also kept as a comment carrying the replaced text; no write sets it now (the description history keeps that text). Clients render such a row quietly. Its content cannot be edited by anyone (403, the attributed author included); it can be resolved; only an owner or admin of the board's workspace can delete it.

## Other responses

- `400`: Invalid request
- `401`: Unauthenticated
- `403`: Forbidden: insufficient role or token scope; scope denials name the held scope and the operation
- `404`: Not found
- `409`: Conflict
- `422`: Idempotency-Key reused with a different request body (IDEMPOTENCY_KEY_REUSED)
- `429`: Rate limited
- `500`: Internal server error
- `503`: Temporarily unavailable

---

[API](https://skmtc.dev/tre-app/apis/tre-rest-api.md) · [All operations](https://skmtc.dev/tre-app/apis/tre-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/tre-app/apis/tre-rest-api/revisions/26a7187a05fc?raw)
