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

# Destroy Session

> Terminate a session and clean up resources

# Destroy Session

Terminate a browser session. This kills the Chromium process, releases the proxy, and cleans up the network namespace.

<ParamField path="id" type="string" required>
  The session ID to destroy.
</ParamField>

<ParamField query="saveProfile" type="boolean" default="false">
  Save cookies and localStorage to the session's profile before destroying.
</ParamField>

## Request

```bash theme={null}
curl -X DELETE https://api.meshbrow.dev/v1/sessions/ses_k8m2n4p6?saveProfile=true \
  -H "Authorization: Bearer mb_live_..."
```

## Response

```json 200 theme={null}
{
  "id": "ses_k8m2n4p6",
  "status": "destroyed",
  "duration": 342,
  "metrics": {
    "pagesVisited": 12,
    "bytesTransferred": 4521890,
    "proxyCost": 0.0034
  }
}
```

```json 404 theme={null}
{
  "error": {
    "code": "not_found",
    "message": "Session ses_k8m2n4p6 not found or already destroyed"
  }
}
```
