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

# Delete AskFred Thread

> Delete an AskFred conversation thread and all its messages

## Overview

The `deleteAskFredThread` mutation allows you to permanently delete an AskFred conversation thread along with all its associated messages. This action is irreversible.

## Arguments

**id** `String` *required*

The unique identifier of the AskFred thread to delete

## Returns

Returns the deleted `AskFredThread` object if successful, allowing you to confirm the deletion details.

## Usage Example

```graphql theme={null}
mutation DeleteThread($id: String!) {
  deleteAskFredThread(id: $id) {
    id
    title
    transcript_id
    user_id
    created_at
  }
}
```

```bash curl theme={null}
curl -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer your_api_key" \
  -d '{
    "query": "mutation DeleteThread($id: String!) { deleteAskFredThread(id: $id) { id title transcript_id created_at } }",
    "variables": {
      "id": "thread_abc123"
    }
  }' \
  https://api.fireflies.ai/graphql
```

```javascript javascript theme={null}
const axios = require('axios');

const url = 'https://api.fireflies.ai/graphql';
const headers = {
  'Content-Type': 'application/json',
  Authorization: 'Bearer your_api_key'
};

const threadId = 'thread_abc123';

const data = {
  query: `
    mutation DeleteAskFredThread($id: String!) {
      deleteAskFredThread(id: $id) {
        id
        title
        transcript_id
        user_id
        created_at
      }
    }
  `,
  variables: { id: threadId }
};

axios
  .post(url, data, { headers: headers })
  .then(result => {
    console.log('Thread deleted:', result.data);
  })
  .catch(e => {
    console.error('Error deleting thread:', e);
  });
```

```python python theme={null}
import requests

url = 'https://api.fireflies.ai/graphql'

headers = {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer your_api_key'
}

thread_id = 'thread_abc123'

query = '''
    mutation DeleteAskFredThread($id: String!) {
        deleteAskFredThread(id: $id) {
            id
            title
            transcript_id
            user_id
            created_at
        }
    }
'''

variables = {
    'id': thread_id
}

data = {
    'query': query,
    'variables': variables
}

response = requests.post(url, headers=headers, json=data)

if response.status_code == 200:
    print('Thread deleted:', response.json())
else:
    print('Error:', response.text)
```

```json Response theme={null}
{
  "data": {
    "deleteAskFredThread": {
      "id": "thread_abc123",
      "title": "What were the action items from the Q4 planning meeting?",
      "transcript_id": "transcript_xyz789",
      "user_id": "user_123",
      "created_at": "2024-03-15T10:30:00Z"
    }
  }
}
```

## Important Notes

> [!WARNING]
>
> Deletion is permanent and cannot be undone

## Error Codes

> [accordion] object\_not\_found
>
> The specified thread ID does not exist or you don't have access to it

## Audit Trail

A successful call records a [`ASKFRED_THREAD_DELETED`](https://docs.fireflies.ai/graphql-api/query/audit-events) audit event for the deleted thread.

## Related

> [card] [List Threads](https://docs.fireflies.ai/graphql-api/query/askfred-threads.md)
>
> View all your threads before deletion

> [card] [View Thread Details](https://docs.fireflies.ai/graphql-api/query/askfred-thread.md)
>
> Review thread content before deletion


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.