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

# Comment on a task

> Create a comment on a task via `action` (create). Reversible authoring action.



## OpenAPI

````yaml https://mcp.agent.writesonic.com/openapi.json post /api/v1/business/tasks/comments
openapi: 3.1.0
info:
  title: hq-backend — Business API
  description: Public business tool endpoints (API-key auth).
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/business/tasks/comments:
    post:
      tags:
        - business
      summary: Comment on a task
      description: >-
        Create a comment on a task via `action` (create). Reversible authoring
        action.
      operationId: comment_on_task_api_v1_business_tasks_comments_post
      parameters:
        - name: x-project-id
          in: header
          required: true
          schema:
            type: string
            format: uuid
            description: Project ID for tenant scoping
            title: X-Project-Id
          description: Project ID for tenant scoping
        - name: X-Workspace-Id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            description: Overrides the key's workspace
            title: X-Workspace-Id
          description: Overrides the key's workspace
        - name: X-API-Key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: User API key
            title: X-Api-Key
          description: User API key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CommentArgs'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommentResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    CommentArgs:
      properties:
        action:
          $ref: '#/components/schemas/CommentAction'
          description: Create a comment.
        task_id:
          type: string
          format: uuid
          title: Task Id
          description: Task the comment belongs to.
        body:
          anyOf:
            - type: string
            - type: 'null'
          title: Body
          description: Comment text.
      type: object
      required:
        - action
        - task_id
      title: CommentArgs
    CommentResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        task_id:
          type: string
          format: uuid
          title: Task Id
        author_type:
          $ref: '#/components/schemas/ActorType'
        author_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Author Id
        body:
          type: string
          title: Body
        created_at:
          type: string
          format: date-time
          title: Created At
        edited_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Edited At
        attachments:
          items:
            $ref: '#/components/schemas/CommentAttachment'
          type: array
          title: Attachments
      type: object
      required:
        - id
        - task_id
        - author_type
        - author_id
        - body
        - created_at
      title: CommentResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    CommentAction:
      type: string
      enum:
        - create
      title: CommentAction
    ActorType:
      type: string
      enum:
        - human
        - ai_agent
        - system
      title: ActorType
    CommentAttachment:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        filename:
          type: string
          title: Filename
        content_type:
          type: string
          title: Content Type
        size_bytes:
          type: integer
          title: Size Bytes
        uploader_type:
          $ref: '#/components/schemas/ActorType'
        uploader_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Uploader Id
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - id
        - filename
        - content_type
        - size_bytes
        - uploader_type
        - uploader_id
        - created_at
      title: CommentAttachment
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````