DELETE /v1/keys/current
Revokes the API key or CLI token that sends this request. Any key or token may revoke itself, whatever its scopes, so a key without platform:write can still be retired; b3os logout calls this. It takes effect like DELETE /v1/keys/{key_id} and returns the revoked key. A dashboard session is not a key: it gets 409 conflict, so sign out instead.

Authentication

Bearer Token (b3os_sk_ API key or b3os_pat_ token)

Responses

200 The revoked key or token.
application/json
id string REQUIRED
object string REQUIRED
Values api_key
kind string REQUIRED
api_key (b3os_sk_…, made with POST /v1/keys) or cli_token (b3os_pat_…, from the device login; created_by is the user who approved it).
Values api_key cli_token
client_id string | null REQUIRED
The device-login client a CLI token was issued to (b3os-cli); null for API keys.
name string REQUIRED
redacted string REQUIRED
The start and end of the secret, for recognizing it.
org_id string REQUIRED
project_id string REQUIRED
scopes string[] REQUIRED
Array of: string
A scope from the catalog (vision:run; x-b3os-scopes), <product>:* for every scope of one product, or * for every scope. The build generates enum from the catalog, the same list as dist/scopes.json plus <product>:* and *.
Values vision:read vision:write vision:run vision:profiles:use vision:profiles:export render:read render:write render:run sandboxes:read sandboxes:write
25 moresandboxes:run routines:read routines:write routines:run actions:read actions:write actions:run actions:tools:publish infer:read infer:write infer:run vault:read vault:write vault:run platform:read platform:write vision:* render:* sandboxes:* routines:* actions:* infer:* vault:* platform:* *
spend_cap_usd number | null REQUIRED
spent_usd number REQUIRED
Spend in the current billing period.
status string REQUIRED
Values active revoked expired
expires_at string (date-time) | null REQUIRED
created_at string (date-time) REQUIRED
created_by object REQUIRED
type string REQUIRED
Values user api_key
id string REQUIRED
last_used_at string (date-time) | null REQUIRED
revoked_at string (date-time) | null 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.
401 Missing, malformed, expired or revoked credentials (unauthorized).
403 Authenticated but not allowed (forbidden, egress_denied).
409 The caller is a dashboard session, not a key (conflict).
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/keys/current' \  -H 'Authorization: Bearer YOUR_API_TOKEN'
const response = await fetch('https://beta-api.b3os.org/v1/keys/current', {  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/keys/current', headers=headers)print(response.json())
200 Response
{  "id": "key_01m5t5csy2wt4e3er052chyf1x",  "object": "api_key",  "kind": "cli_token",  "client_id": "b3os-cli",  "name": "B3OS CLI (WDJB-MJHT)",  "redacted": "b3os_pat_ex4m…7b34",  "org_id": "org_01m5t5hthd29mm5wpza5ndd6mm",  "project_id": "prj_01m5t3pf8heewxt65ej3dm577y",  "scopes": [    "vision:run",    "sandboxes:write",    "sandboxes:run"  ],  "spend_cap_usd": null,  "spent_usd": 0.31,  "status": "revoked",  "expires_at": "2026-11-24T22:31:10.000Z",  "created_at": "2026-10-25T22:31:10.000Z",  "created_by": {    "type": "user",    "id": "usr_01m5t3jv4b5sappg7vzv1rwx6x"  },  "last_used_at": "2026-10-25T23:02:41.000Z",  "revoked_at": "2026-10-25T23:05:00.000Z",  "metadata": {}}
Ask a question... ⌘I