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

# Create a comment on a task



## OpenAPI

````yaml /api-reference/endpoint/workspaces/openapi.json post /workspaces/task/{task_id}/comment
openapi: 3.0.3
info:
  title: Workspaces Service API
  version: 1.0.0
  description: API for managing workspaces, tasks, and comments
servers:
  - url: https://api.quiva.ai
    description: Production API server
security:
  - bearerAuth: []
  - apiKeyAuth: []
paths:
  /workspaces/task/{task_id}/comment:
    post:
      summary: Create a comment on a task
      operationId: createComment
      parameters:
        - name: task_id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCommentRequest'
      responses:
        '200':
          description: Created comment
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Comment'
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    CreateCommentRequest:
      type: object
      required:
        - body
      properties:
        body:
          type: string
          description: Plain text or markdown content
        attachments:
          type: array
          items:
            type: string
        reply_id:
          type: string
    Comment:
      type: object
      properties:
        id:
          type: string
          readOnly: true
        url:
          type: string
          readOnly: true
          description: UI URL to navigate directly to this comment
        body:
          type: string
        attachments:
          type: array
          items:
            type: string
        author:
          type: string
          readOnly: true
          description: User ID of the comment author, set by the backend
        reactions:
          type: object
          readOnly: true
          description: Reactions aggregated by emoji. Keys are emoji characters.
          additionalProperties:
            $ref: '#/components/schemas/CommentReactionEntry'
        reply_id:
          type: string
        created_at:
          type: string
          format: date-time
          readOnly: true
        updated_at:
          type: string
          format: date-time
          readOnly: true
        external_author:
          $ref: '#/components/schemas/ExternalAuthor'
    CommentReactionEntry:
      type: object
      properties:
        count:
          type: integer
          description: Number of users who reacted with this emoji
        users:
          type: array
          description: IDs of users who reacted with this emoji
          items:
            type: string
    ExternalAuthor:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 200
        url:
          type: string
          format: uri
          maxLength: 2048
      required:
        - name
      description: >-
        The person in the other system a comment speaks for. Integration callers
        only; cleared for everyone else.
    Error:
      type: object
      properties:
        error:
          type: string
        code:
          type: string
          description: Stable machine code. Branch on this, not on `error`.
      required:
        - error
  responses:
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Not Found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT Authorization header using the Bearer scheme
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key

````

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