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

# Delete Chat History

> Deletes all message history for a chat session. The chat session itself is preserved.

Deletes all message history for a chat session. The chat session itself is preserved.

## Usage

<CodeGroup>
  ```bash cURL theme={null}
  curl -X DELETE https://app.splox.io/api/v1/chat-history/0199f200-a11b-7c8d-4444-888890abcdef \
    -H "Authorization: Bearer YOUR_TOKEN"
  ```

  ```python Python theme={null}
  from splox import SploxClient

  client = SploxClient(api_key="YOUR_API_KEY")
  client.chats.delete_history("CHAT_ID")
  ```

  ```typescript Node.js theme={null}
  import Splox from "splox";

  const client = new Splox("YOUR_API_KEY");
  await client.chats.deleteHistory("CHAT_ID");
  ```

  ```go Go theme={null}
  client := splox.NewClient("YOUR_API_KEY")
  err := client.Chats.DeleteHistory(ctx, "CHAT_ID")
  ```
</CodeGroup>

## Path Parameters

| Parameter | Type          | Description |
| --------- | ------------- | ----------- |
| `chatId`  | string (uuid) | Chat ID     |

## Response

```json theme={null}
{
  "message": "Chat history deleted successfully"
}
```

## Notes

<Info>
  **Authentication required.** The authenticated user must own the chat session.
</Info>

<Info>
  This deletes all `chat_history` message rows for the chat. The chat session itself and any node-level memory are not affected.
</Info>


## OpenAPI

````yaml DELETE /chat-history/{chatId}
openapi: 3.1.0
info:
  title: Splox API
  description: >-
    Run workflows, manage chats, receive events, and monitor execution via the
    Splox API
  version: 1.0.0
  contact:
    name: Splox Support
    email: support@splox.io
    url: https://community.splox.io
servers:
  - url: https://app.splox.io/api/v1
    description: Production API
security: []
tags:
  - name: MCP
    description: Discover MCP servers, manage connections, and execute MCP tools
  - name: Workflows
    description: List, get, and inspect workflows, versions, and nodes
  - name: Workflow Requests
    description: Run workflows, monitor execution, and retrieve results
  - name: Events
    description: Receive external events via Event Hub webhooks
  - name: Chats
    description: Manage chat sessions for workflow interactions
paths:
  /chat-history/{chatId}:
    delete:
      tags:
        - Chats
      summary: Delete Chat History
      description: >-
        Deletes all message history for a chat session. The chat session itself
        is preserved.
      operationId: deleteChatHistory
      parameters:
        - name: chatId
          in: path
          required: true
          description: Chat ID
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Chat history deleted successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API token generated from your Splox account settings. Create tokens at
        https://app.splox.io/account?tab=settings

````