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

# Create a task comment

> Add a comment as the authenticated user. Supply parent_id to reply to an active comment on this task.



## OpenAPI

````yaml /api-reference/openapi.yaml post /v1/tasks/{task_id}/comments
openapi: 3.0.1
info:
  title: Slant Public API V1
  version: v1
  description: Public API for creating and managing resources in Slant
  contact:
    name: Slant API Support
    email: api@slant.com
servers:
  - url: https://api.slant.app
security:
  - bearer: []
paths:
  /v1/tasks/{task_id}/comments:
    parameters:
      - name: task_id
        in: path
        required: true
        schema:
          type: string
    post:
      tags:
        - Tasks
      summary: Create a task comment
      description: >-
        Add a comment as the authenticated user. Supply parent_id to reply to an
        active comment on this task.
      parameters:
        - name: Idempotency-Key
          in: header
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - content
              properties:
                content:
                  type: string
                  minLength: 1
                  maxLength: 50000
                  description: Comment content as plaintext or Markdown.
                parent_id:
                  type: string
        required: true
      responses:
        '201':
          description: Comment created
          content:
            application/json:
              schema:
                type: object
                required:
                  - id
                  - task_id
                  - content
                  - parent_id
                  - user_id
                properties:
                  id:
                    type: string
                  task_id:
                    type: string
                  content:
                    type: string
                  parent_id:
                    type: string
                    nullable: true
                  user_id:
                    type: string
                    nullable: true
                  user_name:
                    type: string
                    nullable: true
                  automation_id:
                    type: string
                    nullable: true
                  automation_name:
                    type: string
                    nullable: true
                  created_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
                  content_edited_at:
                    type: string
                    format: date-time
                    nullable: true
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
      security:
        - bearer: []
components:
  responses:
    BadRequest:
      description: >-
        Bad Request - malformed JSON, invalid filters, or missing required book
        context
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            invalid_json:
              value:
                error: invalid_json
                detail: Request body must be valid JSON
    Unauthorized:
      description: Unauthorized - missing or invalid token
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            token_missing:
              value:
                error: token_missing
                detail: Authorization header is required
            token_invalid:
              value:
                error: token_invalid
                detail: Access token could not be verified
    Forbidden:
      description: >-
        Access denied. Policy and membership failures may have an empty body. A
        read-only personal token cannot perform writes.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            token_read_only:
              value:
                error: token_read_only
                detail: This token only allows read (GET) requests
            connection_revoked:
              value:
                error: connection_revoked
                detail: This connection has been revoked.
    TooManyRequests:
      description: >-
        An hourly API rate limit was exceeded. Wait Retry-After seconds before
        retrying.
      headers:
        Retry-After:
          schema:
            type: string
          description: Seconds until the rate-limit window resets
      content:
        application/json:
          schema:
            type: object
            required:
              - error
              - status
              - detail
            properties:
              error:
                type: string
                example: Too Many Requests
              status:
                type: integer
                example: 429
              detail:
                type: string
  schemas:
    Error:
      type: object
      required:
        - error
        - detail
      properties:
        error:
          type: string
          description: Error code
        detail:
          type: string
          description: Human-readable error description
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      bearerFormat: OAuth or personal access token
      description: >-
        OAuth access token or Slant personal access token (slnt_pat_...).
        Read-only personal tokens allow GET requests only.

````

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