POST /v1/vision/sessions/{session_id}/profile
Saves the session's current cookies and storage to a profile now: the named profile is created if it does not exist, otherwise a new revision replaces its state. Use it right after an agent or a person signs in. If another session saved the profile since this one loaded it, the save fails with `profile_conflict` unless `overwrite` is set.

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"

Request Body required

application/json
name string REQUIRED
Profile to create or replace.
overwrite boolean
Replace the profile even if it changed since this session loaded it.

Responses

200 The updated profile.
application/json
id string REQUIRED
object unknown REQUIRED
Enum: profile
created_at string (date-time) REQUIRED
RFC 3339, UTC, e.g. 2026-10-25T17:00:00Z.
updated_at string (date-time) REQUIRED
Last time the storage state was replaced or saved back.
last_used_at string (date-time) | null REQUIRED
Last time a session or render job loaded the profile; null if never.
expires_at string (date-time) | null
When the profile is deleted automatically; null for no expiry.
metadata object REQUIRED
Customer string map, at most 16 keys (ARCHITECTURE 4.1).
name string REQUIRED
org string
Owning org. Returned to the owner only; tenancy is checked on every access.
project string
domains string[] REQUIRED
Registrable domains the profile may hold state for. Every cookie domain and every origin host in the storage state must equal one of these or be a subdomain of one; an import that breaks this fails with profile_domain_mismatch. When omitted at creation, it is derived from the uploaded state.
Array of: string
revision integer REQUIRED
Increments on every save. A session that loaded revision n and saves back while the profile is at revision m > n fails with profile_conflict unless it asked to overwrite.
status unknown REQUIRED
active: loadable. locked: a session with persist is writing it back; loads still see the last revision. expired: past expires_at, about to be deleted.
Enum: active, locked, expired
source unknown
How the current revision was produced: uploaded storage state, saved back from a vision session, or imported from a render or CLI login.
Enum: upload, session, login
stats object REQUIRED
Counts over the current revision, so clients can show what a profile holds without decrypting it.
cookies integer REQUIRED
origins integer REQUIRED
indexeddb_databases integer
bytes integer REQUIRED
Size of the serialized storage state before encryption.
earliest_cookie_expiry string (date-time) | null
Earliest expires among persistent cookies; null when there are none. Lets clients warn before a login lapses.
201 A new profile was created.
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`).
409 The profile changed since the session loaded it (`profile_conflict`).
413 The request body exceeds this operation's limit.
415 The Content-Type is not accepted by this operation.
422 A cookie or origin falls outside the profile's domains (`profile_domain_mismatch`).
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 POST 'https://beta-api.b3os.org/v1/vision/sessions/brs_01m5t3y30wcksxf22t9gwk9fwb/profile' \  -H 'Authorization: Bearer YOUR_API_TOKEN' \  -H 'Content-Type: application/json' \  -d '{  "name": "acme-staging"}'
const response = await fetch('https://beta-api.b3os.org/v1/vision/sessions/brs_01m5t3y30wcksxf22t9gwk9fwb/profile', {  method: 'POST',  headers: {      "Authorization": "Bearer YOUR_API_TOKEN",      "Content-Type": "application/json"  },  body: JSON.stringify({    "name": "acme-staging"  })});const data = await response.json();console.log(data);
import requestsheaders = {    'Authorization': 'Bearer YOUR_API_TOKEN'}response = requests.post('https://beta-api.b3os.org/v1/vision/sessions/brs_01m5t3y30wcksxf22t9gwk9fwb/profile', headers=headers, json={  "name": "acme-staging"})print(response.json())
200 Response
{  "id": "prof_01m5t3v4507bhcb5jqrgzfvfsk",  "object": "profile",  "created_at": "2026-10-20T09:12:44.000Z",  "updated_at": "2026-10-25T18:31:02.118Z",  "last_used_at": "2026-10-25T18:30:00.002Z",  "expires_at": null,  "metadata": {},  "name": "acme-staging",  "domains": [    "example.com"  ],  "revision": 4,  "status": "active",  "source": "session",  "stats": {    "cookies": 7,    "origins": 2,    "bytes": 18422  }}
Ask a question... ⌘I