---
title: "Delete a thread"
description: "Delete a chat thread and its transcript."
---

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

Path: AI Gateway API › History & Feedback

`DELETE /threads/{thread_id}`

Delete a chat thread and its transcript.

## Authentication

- `HTTPBearer`, http, header `Authorization`

## Path parameters

- `thread_id` (`delete_thread.path.thread_id`; string, required)

## Header parameters

- `x-app-id` (`delete_thread.header.x-app-id`; any of, optional) — Application ID for scoping threads
  - any of: `string`, `null`
- `X-On-Behalf-Of` (`delete_thread.header.X-On-Behalf-Of`; any of, optional)
  - any of: `string`, `null`
- `X-External-User-Id` (`delete_thread.header.X-External-User-Id`; any of, optional)
  - any of: `string`, `null`
- `X-App-Id` (`delete_thread.header.X-App-Id`; any of, optional)
  - any of: `string`, `null`

## Code samples

### cURL

```bash
curl --request DELETE \
  --url 'https://truememory-api.mvstg.com/threads/<thread_id>' \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://truememory-api.mvstg.com/threads/<thread_id>';
const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://truememory-api.mvstg.com/threads/<thread_id>"

headers = {"Authorization": "Bearer <token>"}

response = requests.delete(url, headers=headers)

print(response.text)
```

## Responses

### 200

Successful Response

#### Example

```json
{
  "status": "deleted",
  "thread_id": "string"
}
```

- `thread_id` (`delete_thread.response.200.thread_id`; string, required)
- `status` (`delete_thread.response.200.status`; string, optional)
  - default `"deleted"`

### 422

Validation Error

#### Example

```json
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}
```

- `detail` (`delete_thread.response.422.detail`; array<object>, optional)
  - `loc` (`delete_thread.response.422.detail.loc`; array<any of>, required)
    - any of: `string`, `integer`
  - `msg` (`delete_thread.response.422.detail.msg`; string, required)
  - `type` (`delete_thread.response.422.detail.type`; string, required)
  - `input` (`delete_thread.response.422.detail.input`; unknown, optional)
  - `ctx` (`delete_thread.response.422.detail.ctx`; object, optional)


Source: https://truememory-docs.mvstg.com/api/threads/delete/index.md
