> ## Documentation Index
> Fetch the complete documentation index at: https://www.mill.fyi/llms.txt
> Use this file to discover all available pages before exploring further.

# Add a comment or reply

> Add a Markdown comment or a nested reply using `parentId`. Top-level comments have depth zero; replies support at most three nested levels. Mention with `@email`, `@[Name](user:UUID)`, or `mentionIds`. Reuse the `Idempotency-Key` header on retries.

Write access: a member/administrator with a write-enabled credential, or an authorized signed-in user.

Add a Markdown comment or a nested reply using `parentId`. Top-level comments have depth zero; replies support at most three nested levels. Mention with `@email`, `@[Name](user:UUID)`, or `mentionIds`. Reuse the `Idempotency-Key` header on retries.

Body is nonempty and at most 10,000 characters. Supports `@email`, `user:UUID` links and `mentionIds`. Root depth is zero; a fourth reply level returns 400 `COMMENT_DEPTH_LIMIT`. Comments advance board activity but do not produce activity-table rows.

MCP clients can use [`add_comment`](https://www.mill.fyi/mcp-reference/add_comment) for this operation.

[Request conventions](https://www.mill.fyi/api-reference/overview.md) · [API keys](https://www.mill.fyi/api-keys.md) · [MCP connections](https://www.mill.fyi/mcp-connections.md)


## OpenAPI

````yaml api-reference/openapi.json POST /api/tasks/{taskId}/comments
openapi: 3.1.0
info:
  title: Mill HTTP API
  version: 1.0.6
  description: >-
    All registered task-board, account, OAuth, MCP transport and health
    operations. MCP tool schemas come from runtime validators; account
    operations follow their server handlers. Example data is fictional.
    Generation imports routes without issuing requests or connecting to a
    database.
servers:
  - url: https://mill-api.example.com
security: []
paths:
  /api/tasks/{taskId}/comments:
    post:
      tags:
        - Comments and activity
      summary: Add a comment or reply
      description: >-
        Add a Markdown comment or a nested reply using `parentId`. Top-level
        comments have depth zero; replies support at most three nested levels.
        Mention with `@email`, `@[Name](user:UUID)`, or `mentionIds`. Reuse the
        `Idempotency-Key` header on retries.


        Body is nonempty and at most 10,000 characters. Supports `@email`,
        `user:UUID` links and `mentionIds`. Root depth is zero; a fourth reply
        level returns 400 `COMMENT_DEPTH_LIMIT`. Comments advance board activity
        but do not produce activity-table rows.


        Write access: a member/administrator with a write-enabled credential, or
        an authorized signed-in user.
      operationId: post_api_tasks_by_taskId_comments
      parameters:
        - name: taskId
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: >-
            The taskId from the corresponding list, record or authorization
            response.
        - name: Origin
          in: header
          required: false
          schema:
            type: string
            format: uri
          description: >-
            The exact configured Mill UI origin. Required for browser mutations
            carrying session cookies.
        - name: Idempotency-Key
          in: header
          required: false
          schema:
            type: string
            minLength: 8
            maxLength: 128
            pattern: ^[A-Za-z0-9._:-]+$
          description: >-
            Reuse the same key and exact request bytes for retries of one
            logical mutation; different content conflicts.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                parentId:
                  type: string
                  format: uuid
                  pattern: >-
                    ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                body:
                  type: string
                  minLength: 1
                  maxLength: 10000
                mentionIds:
                  default: []
                  maxItems: 50
                  type: array
                  items:
                    type: string
                    format: uuid
                    pattern: >-
                      ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
              required:
                - body
              additionalProperties: false
            example:
              parentId: 33333333-3333-4333-8333-333333333333
              body: The isolated restore passed.
      responses:
        '201':
          description: >-
            Successful response. Examples are illustrative; field values vary by
            record.
          content:
            application/json:
              schema:
                type: object
                properties:
                  comment:
                    type: object
                    properties:
                      id:
                        type: string
                      taskId:
                        type: string
                      parentId:
                        type: string
                      replyCount:
                        type: integer
                      authorId:
                        type: string
                      authorKind:
                        type: string
                      authorName:
                        type: string
                      body:
                        type: string
                      version:
                        type: integer
                      createdAt:
                        type: string
                      updatedAt:
                        type: string
                    additionalProperties: true
                additionalProperties: true
                description: >-
                  Illustrative response shape. Fields can be absent in alternate
                  successful flows; see the operation description and example.
              example:
                comment:
                  id: 88888888-8888-4888-8888-888888888888
                  taskId: 22222222-2222-4222-8222-222222222222
                  parentId: 33333333-3333-4333-8333-333333333333
                  replyCount: 0
                  authorId: 66666666-6666-4666-8666-666666666666
                  authorKind: human
                  authorName: Alex Morgan
                  body: The isolated restore passed.
                  version: 1
                  createdAt: '2027-01-18T09:30:00.000Z'
                  updatedAt: '2027-01-18T09:30:00.000Z'
        default:
          description: >-
            Request failure. Inspect code, message and requestId; respect
            Retry-After on HTTP 429.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
        - sessionCookie: []
components:
  schemas:
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
            - requestId
          properties:
            code:
              type: string
            message:
              type: string
            requestId:
              type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Personal or team Mill REST API key
    sessionCookie:
      type: apiKey
      in: cookie
      name: mill_session
      description: >-
        Signed-in human browser session; mutation requests also need the exact
        UI Origin

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.