> ## 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.1.0
info:
  title: Workspaces API
  version: 1.1.0
  description: >-
    Spaces, tasks, task actions, comments, folders and the task-sync routes.
    Task-sync routes also accept an integration token (`oauth2`); every other
    route needs a user session or API key.
servers:
  - url: https://api.quiva.ai
    description: Production API server
security:
  - bearerAuth: []
  - apiKeyAuth: []
tags:
  - name: Tasks
  - name: Files
  - name: Folders
  - name: Task Schedules
  - name: Distribution
paths:
  /workspaces/task/{task_id}/comment:
    post:
      tags:
        - Spaces
      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'
      security:
        - bearerAuth: []
        - apiKeyAuth: []
        - oauth2: []
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
          description: Id of the comment this replies to.
        mentions:
          type: array
          maxItems: 50
          items:
            type: string
          description: User ids mentioned in the comment (max 50).
        internal:
          type: boolean
          description: Marks the comment as team-only, hidden from client users.
    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
          description: Id of the comment this replies to.
        created_at:
          type: string
          format: date-time
          readOnly: true
        updated_at:
          type: string
          format: date-time
          readOnly: true
        external_author:
          $ref: '#/components/schemas/ExternalAuthor'
        mentions:
          type: array
          maxItems: 50
          items:
            type: string
          description: User ids mentioned in the comment (max 50).
        internal:
          type: boolean
          description: Marks the comment as team-only, hidden from client users.
    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
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
    oauth2:
      type: oauth2
      description: >-
        API integration client credentials. Tokens only work on the task-sync
        routes in workspaces.
      flows:
        clientCredentials:
          tokenUrl: https://api.quiva.ai/oauth/token
          scopes: {}

````

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