Revoke the calling API key
Revokes the key that authenticates this request, flipping its status to revoked so its secret can no longer authenticate — the call to make when a script or CLI signs out.
Revokes the key that authenticates this request, flipping its status to revoked so its secret can no longer authenticate — the call to make when a script or CLI signs out. Any key may revoke itself whatever its scopes, so no keys:write is needed; revoking any other key is DELETE /v1/api-keys/{apiKeyId}. A successful revoke returns 204 No Content with an empty body, and the same secret is refused from then on.
Scope: __any__. Send the API key as a bearer token; Scopes lists what each one reaches.
Request
Response
204 Success, no body.
Errors
Every error has the same body, {"error": {"type", "code", "message", "param"}}; branch on code. Errors lists every code.
| Status | Meaning |
|---|---|
400 | The request is malformed or a value is invalid (invalid_request, invalid_domain, idempotency_key_mismatch). |
401 | The API key is missing or invalid. |
404 | No such resource in this account (resource_not_found). |
429 | Rate limit, plan limit, budget or spend cap reached (rate_limited, plan_limit_reached, budget_exceeded, spend_cap_reached). |
500 | An unexpected error; retry with backoff, then contact support (internal_error). |
Create an API key and return its one-time secret
Creates an API key on the organization and returns its full secret exactly once.
Update an API key's name and/or IP allowlist
Updates the mutable fields of the key identified by apiKeyId: its name, its allowedIps, its inboxIds restriction, or any combination.