Hanzo
OpenapiIam

Changes an access token's scope or expiry.

Changes an access token's scope or expiry.

POST /v1/iam/tokens/update

Addresshttps://api.hanzo.ai/v1/iam/tokens/update
MethodPOST
OperationupdateToken
AuthAuthorization: Bearer $HANZO_API_KEY

Changes an access token's scope or expiry.

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

Request

30 fields, body application/json (required).

FieldInTypeRequiredDescription
accessTokenbodystring
accessTokenHashbodystring
applicationbodystring
codebodystring
codeChallengebodystring
codeChallengeMethodbodystring
codeExpireInbodyinteger
codeIsUsedbodyboolean
createdAtbodystring (date-time)
createdTimebodystring
deletedbodyboolean
expiresInbodyinteger
idbodystring
namebodystring
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…
organizationbodystring
ownerbodystring
publicGrantbodybooleanPublicGrant records that this grant was established WITHOUT client authentication — a PKCE code exchange from a client that presented no secret.
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…
refreshConsumedbodyboolean
refreshExpireInbodyinteger
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.
refreshTokenbodystring
refreshTokenHashbodystring
resourcebodystringRFC 8707 resource indicator
scopebodystring
tokenTypebodystring
updatedAtbodystring (date-time)
userbodystring
userCodebodystring

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 update

IAM API · All Hanzo APIs · Interactive reference

How is this guide?

On this page