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

# Delete Session

> Permanently delete a session and its message history

### Authorization

<ParamField header="Authorization" type="string" required>
  Bearer token. Format: `Bearer synthra_live_abc123def456`
</ParamField>

### Path Parameters

<ParamField path="sessionId" type="string" required>
  Unique session identifier. Format: `session_<16 chars>`
</ParamField>

### Response

<ResponseField name="deleted" type="boolean">
  Confirmation of deletion
</ResponseField>

<ResponseField name="sessionId" type="string">
  ID of the deleted session
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --request DELETE \
    --url https://api.synthra.ai/v1/sessions/session_abc123def456 \
    --header 'Authorization: Bearer synthra_live_abc123def456'
  ```

  ```javascript Node.js theme={null}
  const response = await fetch(
    'https://api.synthra.ai/v1/sessions/session_abc123def456',
    {
      method: 'DELETE',
      headers: {
        'Authorization': `Bearer ${process.env.SYNTHRA_API_KEY}`
      }
    }
  );
  ```

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

  response = requests.delete(
      'https://api.synthra.ai/v1/sessions/session_abc123def456',
      headers={
          'Authorization': f'Bearer {api_key}'
      }
  )
  ```
</RequestExample>

<ResponseExample>
  ```json 200 - Success theme={null}
  {
    "deleted": true,
    "sessionId": "session_abc123def456"
  }
  ```

  ```json 404 - Not Found theme={null}
  {
    "error": {
      "code": "session_not_found",
      "message": "Session does not exist or has already been deleted"
    }
  }
  ```
</ResponseExample>

<Warning>
  Deleted sessions cannot be recovered. All message history will be permanently removed.
</Warning>
