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

# Add Task Comment

> Post a comment on a task, attributed to the authenticated account. Comments are append-only plain text: there is no edit and no delete.



## OpenAPI

````yaml api-reference/openapi/projects.json POST /api/projects/{projectId}/tasks/{taskId}/comments
openapi: 3.0.1
info:
  title: Recoup API - Projects
  description: >-
    Client-facing project status: the tasks on a client engagement, who they are
    waiting on, and the comment thread against each one.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.recoupable.dev
security: []
paths:
  /api/projects/{projectId}/tasks/{taskId}/comments:
    post:
      summary: Add task comment
      description: >-
        Post a comment on a task, attributed to the authenticated account.
        Comments are append-only plain text: there is no edit and no delete.
      parameters:
        - name: projectId
          in: path
          required: true
          description: The project's UUID.
          schema:
            type: string
            format: uuid
        - name: taskId
          in: path
          required: true
          description: The task's UUID.
          schema:
            type: string
            format: uuid
      requestBody:
        description: The comment to post.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateProjectCommentRequest'
            examples:
              comment:
                summary: A client reply
                value:
                  body: Got it. Sending the login over this week.
      responses:
        '201':
          description: Comment posted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectCommentResponse'
        '400':
          description: Bad request — invalid path parameter or request body.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized — missing or invalid credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: >-
            Not found — either no project or task with this id exists, or the
            authenticated account is not a collaborator on it. The two cases are
            deliberately indistinguishable so the response cannot be used to
            discover which project ids are real.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - apiKeyAuth: []
        - bearerAuth: []
components:
  schemas:
    CreateProjectCommentRequest:
      type: object
      required:
        - body
      properties:
        body:
          type: string
          minLength: 1
          maxLength: 4000
          description: >-
            Plain text. No markdown, no mentions, no attachments. Comments are
            append-only: there is no edit or delete.
    ProjectCommentResponse:
      type: object
      required:
        - status
        - comment
      properties:
        status:
          type: string
          example: success
        comment:
          $ref: '#/components/schemas/ProjectComment'
    Error:
      type: object
      required:
        - status
        - error
      properties:
        status:
          type: string
          enum:
            - error
          description: Always `"error"` for error responses.
        error:
          type: string
          description: Human-readable error message.
        message:
          type: string
          description: >-
            Carries the message in place of `error` when the failure comes from
            the authentication layer, so a 401 raised while verifying the
            credential reads `message` and every other error reads `error`.
    ProjectComment:
      type: object
      required:
        - id
        - task_id
        - account_id
        - body
        - created_at
      properties:
        id:
          type: string
          format: uuid
        task_id:
          type: string
          format: uuid
        account_id:
          type: string
          format: uuid
        author_name:
          type: string
          nullable: true
          description: >-
            The author's `accounts.name`, resolved server-side. Frequently null;
            render a fallback.
        body:
          type: string
        created_at:
          type: string
          format: date-time
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Your Recoup API key. [Learn more](/quickstart#api-keys).
    bearerAuth:
      type: http
      scheme: bearer
      description: A Recoup API key or a Privy access token. [Learn more](/authentication).

````