Hanzo
OpenapiIam

Records an access token — the credential an application or integration presents…

Records an access token — the credential an application or integration presents on a caller's behalf.

POST /v1/iam/tokens

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

Records an access token — the credential an application or integration presents on a caller's behalf.

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.tokenResultok

200 body — 31 fields.

FieldInTypeAlwaysDescription
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 create

IAM API · All Hanzo APIs · Interactive reference

How is this guide?

On this page