Hanzo
OpenapiIam

Revokes an access token.

Revokes an access token. Whatever was using it stops being authorized at once.

POST /v1/iam/tokens/delete

Addresshttps://api.hanzo.ai/v1/iam/tokens/delete
MethodPOST
OperationdeleteToken
AuthAuthorization: Bearer $HANZO_API_KEY

Revokes an access token. Whatever was using it stops being authorized at once.

A token that is already gone answers "nothing changed" rather than an error, so the call is safe to repeat.

Request

2 fields, body application/json (required).

FieldInTypeRequiredDescription
namebodystringyes
ownerbodystringyes

Response

StatusBodyMeaning
200iam.tokenMutationok

200 body — 32 fields.

FieldInTypeAlwaysDescription
affectedbodyboolean
tokenbodyiam.Token
token.accessTokenbodystring
token.accessTokenHashbodystring
token.applicationbodystring
token.codebodystring
token.codeChallengebodystring
token.codeChallengeMethodbodystring
token.codeExpireInbodyinteger
token.codeIsUsedbodyboolean
token.createdAtbodystring (date-time)
token.createdTimebodystring
token.deletedbodyboolean
token.expiresInbodyinteger
token.idbodystring
token.namebodystring
token.noncebodystringNonce is the OIDC authorize nonce, stored on the code and echoed into the id_token minted at the exchange (OIDC Core §3.1.3.6) so a relying party binds the…
token.organizationbodystring
token.ownerbodystring
token.publicGrantbodybooleanPublicGrant records that this grant was established WITHOUT client authentication — a PKCE code exchange from a client that presented no secret.
token.redirectUribodystringRedirectUri binds the authorization code to the exact redirect URI of the authorize request (RFC 6749 §4.1.3): the token endpoint refuses a code redeemed with…
token.refreshConsumedbodyboolean
token.refreshExpireInbodyinteger
token.refreshFamilybodystringRefresh-token rotation state (v2). Each refresh belongs to a family (the grant); rotation mints a new row in the same family and marks the prior one consumed.
token.refreshTokenbodystring
token.refreshTokenHashbodystring
token.resourcebodystringRFC 8707 resource indicator
token.scopebodystring
token.tokenTypebodystring
token.updatedAtbodystring (date-time)
token.userbodystring
token.userCodebodystring

Failure carries the platform error shape — see Errors.

Examples

hanzo iam tokens delete \
  --name <name> \
  --owner <owner>

IAM API · All Hanzo APIs · Interactive reference

How is this guide?

On this page