Update a profile
Renames a profile, changes its domains, expiry or metadata, or replaces its state (a new revision). Omitted fields are unchanged.
PATCH
/v1/vision/profiles/{profile_id}
Renames a profile, changes its domains, expiry or metadata, or replaces its state (a new revision).
Omitted fields are unchanged.
Authentication
Bearer Token (b3os_sk_ API key or b3os_pat_ token) API Key (cookie: __Host-b3os_session)
Path Parameters
profile_id
string
required
path
The profile ID (`prof_…`).
Example:
"prof_01m5t3v4507bhcb5jqrgzfvfsk"Request Body required
application/jsonname
string
state
object
Playwright storageState JSON (context.storageState({indexedDB: true})). Upload it as is; exports return the same shape. Sensitive: it is encrypted at rest, decrypted only inside the session or recorder that loads it, never logged and never sent to a model.
cookies
object[]
REQUIRED
Array of:
name
string
REQUIRED
value
string
REQUIRED
domain
string
REQUIRED
Host or .domain the cookie belongs to.
path
string
REQUIRED
expires
number
REQUIRED
Unix time in seconds; -1 for a session cookie.
httpOnly
boolean
REQUIRED
secure
boolean
REQUIRED
sameSite
unknown
REQUIRED
Enum:
Strict, Lax, NonepartitionKey
string
CHIPS partition (top-level site, e.g. https://example.com) for partitioned cookies.
_crHasCrossSiteAncestor
boolean
Chromium partition detail Playwright emits for partitioned cookies; preserved as is.
origins
object[]
REQUIRED
Array of:
origin
string
REQUIRED
Serialized origin: scheme://host[:port], no path.
localStorage
object[]
REQUIRED
Array of:
name
string
REQUIRED
value
string
REQUIRED
indexedDB
object[]
Array of:
name
string
REQUIRED
version
integer
REQUIRED
stores
object[]
REQUIRED
Array of:
...
opfs
object[]
Array of:
path
string
REQUIRED
type
unknown
REQUIRED
Enum:
file, directorybase64
string (byte)
domains
string[]
Array of:
string
expires_at
string (date-time) | null
metadata
object
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.
Responses
200
The updated profile.
application/jsonid
string
REQUIRED
object
unknown
REQUIRED
Enum:
profilecreated_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, expiredsource
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, loginstats
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.
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 profile in this project (`profile_not_found`).
409
Another profile already has this name (`profile_name_taken`).
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 PATCH 'https://beta-api.b3os.org/v1/vision/profiles/prof_01m5t3v4507bhcb5jqrgzfvfsk' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "name": "acme-prod"}'
const response = await fetch('https://beta-api.b3os.org/v1/vision/profiles/prof_01m5t3v4507bhcb5jqrgzfvfsk', { method: 'PATCH', headers: { "Authorization": "Bearer YOUR_API_TOKEN", "Content-Type": "application/json" }, body: JSON.stringify({ "name": "acme-prod" })});const data = await response.json();console.log(data);
import requestsheaders = { 'Authorization': 'Bearer YOUR_API_TOKEN'}response = requests.patch('https://beta-api.b3os.org/v1/vision/profiles/prof_01m5t3v4507bhcb5jqrgzfvfsk', headers=headers, json={ "name": "acme-prod"})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-prod", "domains": [ "example.com" ], "revision": 4, "status": "active", "source": "session", "stats": { "cookies": 7, "origins": 2, "bytes": 18422 }}
API Playground
Try this endpoint
PATCH
/v1/vision/profiles/{profile_id}