Hanzo
OpenapiAccount

Revokes the caller's own API key of the requested class.

Revokes the caller's own API key of the requested class.

DELETE /v1/account/keys

Addresshttps://api.hanzo.ai/v1/account/keys
MethodDELETE
Operationdelete_account_keys
AuthAuthorization: Bearer $HANZO_API_KEY

Revokes the caller's own API key of the requested class. The class is the same field mint takes — ?type=publishable, defaulting to secret — so revoking the key that ships in a browser bundle does not sign its holder out of their own API: the other key keeps working.

Revoking is how a key is replaced when it does not need replacing; minting the same class again rotates it in one step. IAM drops the credential immediately, but the gateway caches keys for a few minutes, so a request that beat the cache expiry may still be served.

For callers written against the older shape, the class is also accepted in a JSON request body, read only when ?type= is absent.

Request

1 field.

FieldInTypeRequiredDescription
typequerystringType is the key class to act on: "secret" (sk-, session-equivalent, belongs on a server) or "publishable" (pk-, org-identifying, safe in a browser bundle).

Response

StatusBodyMeaning
200revokedKeyok

200 body — 2 fields.

FieldInTypeAlwaysDescription
okbodybooleanOK is true when the key was revoked.
typebodystringType is the key class that was revoked, resolved — so a caller that named nothing can see it revoked the secret key.

Failure carries the platform error shape — see Errors.

Examples

hanzo has no subcommand for this operation — the CLI serves only what cloud's live route table confirms. Use HTTP or an SDK.


Account API · All Hanzo APIs · Interactive reference

How is this guide?

On this page