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

# Post comment

> Create a new comment on a resource (project, client, plan, file, etc.). Supports replies and mentions. Creates activity record and sends notifications.



## OpenAPI

````yaml /api-reference/cx/swagger.json post /comments
openapi: 3.0.0
info:
  description: CX API.
  title: CX API
  contact:
    name: API Support
    url: https://stax.ai
    email: support@stax.ai
  version: '1.0'
servers:
  - url: https://api.cx.stax.ai
security: []
paths:
  /comments:
    post:
      tags:
        - comments
      summary: Post comment
      description: >-
        Create a new comment on a resource (project, client, plan, file, etc.).
        Supports replies and mentions. Creates activity record and sends
        notifications.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
        description: >-
          Comment data (content, on_type, on_id required; client and reply_to
          optional)
        required: true
      responses:
        '200':
          description: Created comment
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/types.Comment'
        '400':
          description: Bad request - invalid request body or parent ID
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
      security:
        - ApiKeyAuth: []
components:
  schemas:
    types.Comment:
      type: object
      properties:
        _id:
          type: string
        client:
          type: string
        content:
          type: string
        deleted_at:
          type: string
        likes:
          type: array
          items:
            type: string
        on_id:
          type: string
        on_type:
          type: string
        reply_to:
          type: string
        team:
          type: string
        timestamp:
          type: string
        user:
          type: string
  securitySchemes:
    ApiKeyAuth:
      description: CX API key. Create one in CX under Settings → Advanced → API Keys.
      in: header
      name: x-api-key
      type: apiKey

````

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