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

# Delete Session

> Delete a session and its messages

Permanently delete an AI Ask session and all of its messages. This operation is irreversible and idempotent.

## Authentication

Requires an [API key](/authentication). The session is looked up within the key's project; an unknown session returns `404`. An end-user-scoped key can only delete its own sessions.

<RequestExample>
  ```bash cURL theme={null}
  curl -X DELETE "https://api.bota.dev/v1/ask/sessions/as_abc123" \
    -H "Authorization: Bearer sk_live_..."
  ```

  ```javascript Node.js theme={null}
  const response = await fetch('https://api.bota.dev/v1/ask/sessions/as_abc123', {
    method: 'DELETE',
    headers: { 'Authorization': 'Bearer sk_live_...' },
  });

  // 204 No Content on success
  ```

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

  response = requests.delete(
      'https://api.bota.dev/v1/ask/sessions/as_abc123',
      headers={'Authorization': 'Bearer sk_live_...'},
  )

  # 204 No Content on success
  ```
</RequestExample>

## Path Parameters

<ParamField path="id" type="string" required>
  Session identifier (`as_*`).
</ParamField>

## Response

Returns `204 No Content` on success. The session's messages are deleted along with it.
