Stop Session
Sessions
Stop Session
Stop a browser session and get billing summary
DELETE
Stop Session
Stop an active browser session. Returns the billing summary with total duration and credits charged.
Request
Headers
| Header | Required | Description |
|---|---|---|
x-api-key | Yes | Your API key |
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | Session ID |
Response
200 OK
Fields
| Field | Description |
|---|---|
sessionId | Session that was stopped |
status | Always "stopped" |
durationMs | How long the session was active in milliseconds |
creditsCharged | Total credits charged for this session |
Errors
| Code | Status | Description |
|---|---|---|
session_not_found | 404 | Session does not exist or belongs to another workspace |
session_expired | 410 | Session already stopped or expired |
Webhook
Asession.stopped webhook event is fired with the billing summary.
