/v1. Request and response bodies are JSON unless an endpoint says otherwise (screenshots are PNG, /v1/usage.csv is CSV).
Authentication
Send an API key as a bearer token on every request:zode_tok_ followed by 64 hex characters. Create one in the console under API keys (console.zode.dev/tokens), or with POST /v1/tokens. The secret is shown once, in the create response.
scope limits what the key may call:
A call outside the scope gets
403 token_scope. Leave out expires_in_days for a key that never expires; otherwise it is 1 to 365. Revoke a key with DELETE /v1/tokens/{id} or in the console; it then gets 401 like an unknown key. zode login also creates a key, for the CLI.
Workspace
A key belongs to one member of one workspace, and every call acts in that workspace with that member’s role. You do not pass a workspace id. If you send anX-Zode-Org header anyway, it must match the key’s workspace (org_...), or the call gets 403 forbidden.
Errors
Every error has the same shape:code, which is stable. message is for people and may change.
code is an open set, not a fixed list: new codes are added over time. The Error schema in the spec lists every code in use today, grouped by status. When you meet a code your client does not know, handle it by its HTTP status. Common codes:
Each endpoint page lists the statuses it can return.
Rate limits
Making sandboxes (create and fork together) is limited per hour:
Over a limit, the API answers
429 rate_limited with these headers:
The headers describe the window that refused the request, and only 429 answers carry them. A few other routes have their own limits and answer the same way, for example member invites (30 per workspace per hour) and alert channel tests (10 per channel per minute).
The plan’s running-sandbox limit is separate: it answers
409 concurrency_limit, not 429. GET /v1/concurrency returns running, limit and plan.
Pagination
Most list endpoints, such asGET /v1/sandboxes, return every item in one response. The ones that page:
Ids
Ids are a prefix, an underscore and 16 characters froma-z and 2-7, such as sbx_q3vfn7tkx2mhcw4a.
Where a route takes a sandbox or image, it takes the id; images also accept their name.
Timestamps
Timestamps are RFC 3339 strings in UTC, such as2026-11-11T11:02:00Z. Usage and billing ranges use whole UTC days as YYYY-MM-DD.
Money
Amounts are integers in micro-dollars, in fields ending in_micros. 1 USD is 1,000,000 micros, so "compute_micros": 2804 is $0.002804. AI provider spend appears in ai_micros for reporting and is not billed.