admin scope: a key granted admin, or the session of an owner or admin. Anything else is 403 forbidden. API detail: Authentication.
create
POST /v1/api_keys. The reply is the key plus secret, org_id, and mode (test | live) — the only response shape that carries them. A key can only mint another key in its own mode. scopes alone works exactly as before; preset, expiresAt and budget are optional (developer workspaces default to a 90-day expiry and a $20-a-day budget). See Keys.
list
GET /v1/api_keys — name, prefix, scopes, created_by; never a secret. Newer fields (grants, preset, description, expires_at, budget, created_via) are present when the API sends them.
get
GET /v1/api_keys/{id}. One key, with spent_micro_usd, calls_24h and pending_approvals.
update
PATCH /v1/api_keys/{id}. A key may only narrow another key; widening needs a person’s session.
rotate
POST /v1/api_keys/{id}/rotate. Mints a replacement secret under the same id; the reply carries it once. graceSeconds (up to 604800) keeps the old secret working that long; the default 0 ends it at once, as before.
revoke
DELETE /v1/api_keys/{id}. Immediate — the next request on the old secret is a 401.