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

# Delete Session

> Delete a session and all its data

## Request

<ParamField path="sessionId" type="string" required>
  The session ID to delete
</ParamField>

<ParamField header="Authorization" type="string" required>
  Bearer token with your API key
</ParamField>

## Response

<ResponseField name="deleted" type="boolean">
  Always true on success
</ResponseField>

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

<Warning>
  Deletion is permanent. All files, processes, and data are immediately destroyed and cannot be recovered.
</Warning>

## Example

<RequestExample>
  ```bash cURL theme={null}
  curl -X DELETE https://api.buntime.sh/sessions/ses_abc123 \
    -H "Authorization: Bearer $BUNTIME_API_KEY"
  ```

  ```typescript TypeScript theme={null}
  await client.sessions.delete({
    sessionId: 'ses_abc123'
  });
  ```
</RequestExample>

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

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