---
title: "Create a Comment."
method: POST
path: "/comments"
tags: ["comments"]
---

# Create a Comment.

`POST /comments`

## Request

- Base URL: `https://restivity.ai/api/v1`
- URL: `https://restivity.ai/api/v1/comments`
- Auth: OAuth 2 (authorization code, authorization URL `https://restivity.ai/oauth/authorize`, token URL `https://restivity.ai/api/oauth/token`, scopes: `comments:write`)

## Request body

- CreateCommentInput
  - `task_id` string, uuid, required
  - `content_text` string: Plain-text body; this or `content` (TipTap doc) is required. The server parses its structure into the doc (blank-line paragraphs, `- ` bullet lists, `### ` headings, **bold** and `code` marks) and auto-extracts mentions.
  - `content` CommentContentDoc: TipTap ProseMirror JSON document.
    - `type` 'doc', required
    - `content` unknown[], required
      - unknown
  - `mentions` string[]: Optional override of the auto-extracted mention list. When omitted, the server extracts mentions from the doc.
  - `is_internal` boolean

## Response `201`

The created Comment.

- Comment
  - `id` string, uuid, required
  - `task_id` string, uuid, required
  - `user_id` string, uuid, required
  - `content` CommentContentDocOutput, required: TipTap ProseMirror JSON document.
    - `type` 'doc', required
    - `content` unknown[], required
      - unknown
  - `content_text` string, required
  - `mentions` string[], required
  - `is_edited` boolean, required
  - `is_internal` boolean, required
  - `created_at` string, required
  - `updated_at` string, required
  - `deleted_at` string, nullable, required
  - `edited_at` string, nullable
  - `author` CommentAuthorRef
    - `id` string, uuid, required
    - `display_name` string, nullable, required
    - `photo_url` string, nullable, required
  - `author_kind` 'user' | 'agent' | 'assistant', required: Who wrote it — derived by the server from the credential used, never from the payload: `user` (the person in the app), `agent` (an OAuth client over MCP/REST, e.g. Claude or Codex), `assistant` (the in-app Restivity AI). Read-only.
  - `author_client_id` string, nullable, required: For `agent` rows: the OAuth client id the token was issued to. Read-only.
  - `author_client_name` string, nullable, required: For `agent` rows: the OAuth client name at write time (e.g. "Claude", "Codex"), shown as "via <name>" in the thread. Read-only.

## Other responses

- `400`: Invalid request shape.
- `401`: Missing or invalid access token.
- `403`: Token lacks the required scope.
- `422`: Request body failed schema validation.
- `429`: Rate-limit exceeded for this tier.

---

[API](https://skmtc.dev/restivity/apis/restivity-rest-api.md) · [All operations](https://skmtc.dev/restivity/apis/restivity-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/restivity/apis/restivity-rest-api/revisions/5764e41ebb3a?raw)
