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

> Delete a session comment — Removes an internal note from a chat session. Only the agent who authored the note may delete it.

# Delete a session comment

Deletes an internal note. The note stops appearing in the inbox and in [List history](/api-reference/chat-sessions/list_history), and the endpoint answers `204` with no body.

The acting agent is passed as the `agent_id` **query parameter**, since a `DELETE` carries no body:

```bash theme={"dark"}
curl -X DELETE "https://api.open.cx/chat/sessions/{session_id}/comments/{comment_uuid}?agent_id=42" \
  -H "Authorization: Bearer $OPENCX_API_KEY"
```

Only the note's author may delete it — anyone else receives a `403`. A `comment_uuid` that belongs to a different session returns a `404`.


## OpenAPI

````yaml delete /chat/sessions/{session_id}/comments/{comment_uuid}
openapi: 3.1.0
info:
  title: OpenCX API
  description: >

    OpenCX is an AI-powered, all-in-one platform for customer support and
    outbound communications.


    Use this API to manage your OpenCX organization's AI agents, actions,
    conversations, contacts, and more.


    To get started, generate a new API key from the dashboard.


    ## Authentication

    All API endpoints require authentication using a Bearer token. You can
    generate an API key from your OpenCX dashboard.


    ## Rate Limiting

    API requests are rate limited to ensure fair usage. The current limits are:

    - 100 requests per minute for standard endpoints

    - 1000 requests per minute for streaming endpoints


    ## Error Handling

    The API uses standard HTTP status codes and returns detailed error messages
    in the response body.
  version: 1.0-beta
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
  - url: http://localhost:8080
    description: Development
  - url: https://api.open.cx
    description: Production
security:
  - bearerAuth: []
paths:
  /chat/sessions/{session_id}/comments/{comment_uuid}:
    delete:
      summary: Delete a session comment
      description: >-
        Soft-deletes an internal comment. Only the comment's author may delete
        it. The acting agent is passed as the `agent_id` query parameter.
      operationId: deleteChatSessionComment
      parameters:
        - schema:
            type: integer
            exclusiveMinimum: 0
            maximum: 9007199254740991
          in: query
          name: agent_id
          required: true
          description: >-
            Agent user ID performing the deletion. Only the note's author may
            delete it.
        - schema:
            type: string
          in: path
          name: session_id
          required: true
          description: The unique identifier of the chat session
        - schema:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
          in: path
          name: comment_uuid
          required: true
          description: The unique identifier of the comment
      responses:
        '204':
          description: Default Response
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDto'
components:
  schemas:
    ErrorDto:
      type: object
      properties:
        statusCode:
          type: integer
        message:
          type: string
        error:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````