Close a browser session
Closes the session and destroys its browser. With `persist_profile`, cookies and storage are saved to the profile first (a newer revision saved by another session fails the save with `profile_conflict` unless `overwrite_profile` was set; the session still closes). Returns the closed session with the final browser time. Closing a closed session returns it unchanged.
DELETE
/v1/vision/sessions/{session_id}
Closes the session and destroys its browser. With `persist_profile`, cookies and storage are saved to the
profile first (a newer revision saved by another session fails the save with `profile_conflict` unless
`overwrite_profile` was set; the session still closes). Returns the closed session with the final browser
time. Closing a closed session returns it unchanged.
Authentication
Bearer Token (b3os_sk_ API key or b3os_pat_ token) API Key (cookie: __Host-b3os_session)
Path Parameters
session_id
string
required
path
The session ID (`brs_…`).
Example:
"brs_01m5t3y30wcksxf22t9gwk9fwb"Responses
200
The closed session.
application/jsonid
string
REQUIRED
object
string
REQUIRED
Enum:
browser_sessionstatus
string
REQUIRED
`active` until closed by `DELETE` (`closed`) or by its timeout (`expired`).
Enum:
active, closed, expiredcreated_at
string (date-time)
REQUIRED
expires_at
string (date-time)
REQUIRED
closed_at
string (date-time) | null
REQUIRED
timeout_s
integer
REQUIRED
viewport
object
REQUIRED
Browser viewport in CSS pixels.
width
integer
REQUIRED
height
integer
REQUIRED
profile
object | null
REQUIRED
The loaded profile, or `null`.
id
string
REQUIRED
name
string
REQUIRED
revision
integer
REQUIRED
The revision the session loaded.
persist
boolean
REQUIRED
Whether the session saves back on close.
cdp_url
string (uri)
REQUIRED
WebSocket URL of the session's CDP endpoint.
pages
object[]
Array of:
target_id
string
REQUIRED
The CDP target ID.
url
string
REQUIRED
title
string
usage
object
REQUIRED
browser_ms
integer
REQUIRED
Billed browser time so far.
timing
object
Server-side phase durations in milliseconds with microsecond resolution: the same phases as the
`Server-Timing` header, keyed `<phase>_ms`. `total_ms` is always present. Phase names are product-specific
and documented per operation. Example values in this reference are illustrative, not measurements.
total_ms
number
REQUIRED
metadata
object
REQUIRED
Up to 16 string key-value pairs you attach to an object for your own use. Keys are 1 to 40 characters of
`A-Z a-z 0-9 _ . : -`; values are at most 500 characters. B3OS never interprets them.
400
The request failed validation (`invalid_request`, `invalid_url`).
401
Missing, malformed, expired or revoked credentials (`unauthorized`).
403
Authenticated but not allowed (`forbidden`, `egress_denied`).
404
No such browser session in this project (`session_not_found`).
429
A rate, concurrency or quota limit applies (`rate_limited`, `concurrency_limited`, `quota_exceeded`).
500
Something failed inside B3OS (`internal`). Retry with backoff.
503
The node or the product is not available right now (`node_unavailable`, `product_unavailable`, `capacity_unavailable`).
curl -X DELETE 'https://beta-api.b3os.org/v1/vision/sessions/brs_01m5t3y30wcksxf22t9gwk9fwb' \ -H 'Authorization: Bearer YOUR_API_TOKEN'
const response = await fetch('https://beta-api.b3os.org/v1/vision/sessions/brs_01m5t3y30wcksxf22t9gwk9fwb', { method: 'DELETE', headers: { "Authorization": "Bearer YOUR_API_TOKEN" }});const data = await response.json();console.log(data);
import requestsheaders = { 'Authorization': 'Bearer YOUR_API_TOKEN'}response = requests.delete('https://beta-api.b3os.org/v1/vision/sessions/brs_01m5t3y30wcksxf22t9gwk9fwb', headers=headers)print(response.json())
200
Response
{ "id": "brs_01m5t3y30wcksxf22t9gwk9fwb", "object": "browser_session", "status": "closed", "created_at": "2026-10-25T18:30:00.002Z", "expires_at": "2026-10-25T18:40:00.002Z", "closed_at": "2026-10-25T18:31:12.430Z", "timeout_s": 600, "viewport": { "width": 1440, "height": 900 }, "profile": null, "cdp_url": "wss://beta-api.b3os.org/v1/vision/sessions/brs_01m5t3y30wcksxf22t9gwk9fwb/cdp", "usage": { "browser_ms": 72428 }, "metadata": {}}
API Playground
Try this endpoint
DELETE
/v1/vision/sessions/{session_id}