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

# Delete Thread

> Permanently delete a conversation thread and all its messages

## Overview

Permanently delete a conversation thread and all its messages. This action cannot be undone.


## OpenAPI

````yaml DELETE /chats/threads/{thread_id}
openapi: 3.1.0
info:
  title: Ledgerbeam API
  description: >-
    Conversational analytics API for querying data using natural language,
    managing resources, and interacting with data sources
  version: 1.0.0
  contact:
    name: Ledgerbeam Support
    email: support@ledgerbeam.com
  license:
    name: MIT
servers:
  - url: https://api.ledgerbeam.com/v1
    description: Production server
security:
  - apiKeyAuth: []
paths:
  /chats/threads/{thread_id}:
    delete:
      summary: Delete thread
      description: Permanently delete a conversation thread and all its messages
      operationId: deleteThread
      parameters:
        - name: thread_id
          in: path
          required: true
          schema:
            type: string
          description: Thread ID
      responses:
        '200':
          description: Thread deleted successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Thread deleted successfully
        '404':
          description: Thread not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          oneOf:
            - type: string
            - type: object
              properties:
                description:
                  type: array
                  items:
                    type: string
          description: Error message or validation errors
          example: Unauthorized access
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: API-KEY
      description: API key for authentication

````