Skip to main content
DELETE
/
v1
/
sessions
/
{id}
Destroy Session
curl --request DELETE \
  --url https://api.example.com/v1/sessions/{id}

Destroy Session

Terminate a browser session. This kills the Chromium process, releases the proxy, and cleans up the network namespace.
id
string
required
The session ID to destroy.
saveProfile
boolean
default:"false"
Save cookies and localStorage to the session’s profile before destroying.

Request

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

Response

200
{
  "id": "ses_k8m2n4p6",
  "status": "destroyed",
  "duration": 342,
  "metrics": {
    "pagesVisited": 12,
    "bytesTransferred": 4521890,
    "proxyCost": 0.0034
  }
}
404
{
  "error": {
    "code": "not_found",
    "message": "Session ses_k8m2n4p6 not found or already destroyed"
  }
}