Skip to main content
POST
Create an API key

Authorizations

Authorization
string
header
required

An API key (zode_tok_...). Create one in the console under API keys (https://console.zode.dev/tokens), or with zode login.

Body

application/json
name
string
required

Printable; trimmed.

Required string length: 1 - 64
scope
enum<string>

What the key may call. full: everything its member's role allows. read_only: GET and HEAD only, and never attach (a session). sandboxes: only /v1/sandboxes* and /v1/whoami. Anything else is 403 token_scope (not audited, like the other auth refusals).

Available options:
full,
read_only,
sandboxes
expires_in_days
integer | null

Absent or null for a key that never expires.

Required range: 1 <= x <= 365

Response

Created; token is shown once

id
string
required
name
string
required
token
string
required

zode_tok_<64 hex>. Shown once; store it now.

scope
enum<string>
required

What the key may call. full: everything its member's role allows. read_only: GET and HEAD only, and never attach (a session). sandboxes: only /v1/sandboxes* and /v1/whoami. Anything else is 403 token_scope (not audited, like the other auth refusals).

Available options:
full,
read_only,
sandboxes
expires_at
string<date-time> | null
required