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

# Delete a Thread by ID

> Deletes a thread by its ID.

This endpoint softly removes a thread by its unique identifier. It marks the thread and all associated messages as deleted in the system, but does not permanently erase them.


## OpenAPI

````yaml DELETE /v2/threads/{threadId}
openapi: 3.0.0
info:
  version: 1.0.0
  title: Langtail prompt endpoint
servers: []
security: []
paths:
  /v2/threads/{threadId}:
    delete:
      description: Deletes a thread by its ID.
      parameters:
        - schema:
            type: string
            example: <LANGTAIL_API_KEY>
          required: true
          description: Your Langtail API Key
          name: X-API-Key
          in: header
        - name: threadId
          in: path
          required: true
          description: The ID of the thread to delete.
          schema:
            type: string
      responses:
        '200':
          description: Successfully deleted thread
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: The unique identifier of the deleted thread.
                  object:
                    type: string
                    description: >-
                      The object type, which is always 'thread.deleted' for this
                      response.
                    example: thread.deleted
                  deleted:
                    type: boolean
                    description: Indicates that the thread was successfully deleted.
                    example: true
                required:
                  - id
                  - object
                  - deleted
        '404':
          description: Thread not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      message:
                        type: string
                        example: Thread not found
                required:
                  - error
      servers:
        - url: https://api.langtail.com

````