Endpoints
Keys and identity
Check who a key belongs to, and mint, list, rotate and revoke narrower keys.
/v1/whoamiAny valid key. Shows who the key belongs to and what it can do. Make this the first call when debugging a 401 or 403.
{ "principal": "provider(prv_…)", "kind": "provider", "providerId": "prv_…", "scopes": ["…"], "keyId": "akey_…" }/v1/auth/selfThe same, plus label, source (managed or static) and expiresAt.
/v1/auth/scopesThe full list of scopes. Use it to build a scope picker without hard-coding the list.
/v1/auth/keysScope keys:write. Mints a key for your own tenant.
| Field | Type | Notes |
|---|---|---|
label | string | required. Shown in listings |
scopes | string[] | must be a subset of the minting key's scopes. "<resource>:*" is allowed if you hold it |
expiresInSeconds | number | can't be later than the minting key's expiry |
// 201: the token is returned once, and only its hash is stored
{ "key": { "id": "akey_…", "label": "invoice-bot", "scopes": ["…"], "expiresAt": "…", "status": "active" }, "token": "zk.akey_….…" }/v1/auth/keysScope keys:read. Your keys, without their secrets. Console sessions aren't listed. Add ?includeRevoked=true to include revoked keys.
/v1/auth/keys/:idScope keys:read. One key's details.
/v1/auth/keys/:id/rotateScope keys:write. Issues a new secret with the same scopes. Body { graceSeconds? } keeps the old secret working for a rolling deploy.
/v1/auth/keys/:idScope keys:write. Revokes a key, effective on the next request. ?cascade=true also revokes every key minted from it. Use that for a leak.