Hanzo
OpenapiIam

Issues an API key.

Issues an API key. A standard key comes back as a publishable half you may ship in client code and a secret half you must not — the secret is shown once,…

POST /v1/iam/keys

Addresshttps://api.hanzo.ai/v1/iam/keys
MethodPOST
Operationpost_iam_keys
AuthAuthorization: Bearer $HANZO_API_KEY

Issues an API key. A standard key comes back as a publishable half you may ship in client code and a secret half you must not — the secret is shown once, at creation, and cannot be retrieved afterwards. A publish-scoped key is issued with the publishable half only, so there is no secret to leak.

A name already used in your organization is refused rather than reissued, so creating twice never silently invalidates a key that is in production.

Request

20 fields, body application/json (required).

FieldInTypeRequiredDescription
accessKeybodystringAccessKey (pk-) is the publishable identifier and lookup index; AccessSecret (sk-) is the confidential secret.
accessSecretbodystring
accessSecretDigestbodystringAccessSecretDigest is how a presented secret finds its key: the resolver digests what the caller sent and looks THAT up.
actbodybooleanAct is the durable, opt-in grant that lets this key act FOR a user in its own org — the credential behind as(): presenting it authorizes minting a short-lived,…
applicationbodystring
createdAtbodystring (date-time)
createdTimebodystringCreatedTime and UpdatedTime are RFC3339 audit stamps carried as strings for byte-parity with the v1 row (orm.Model separately tracks CreatedAt / UpdatedAt as…
deletedbodyboolean
displayNamebodystringDisplayName is the human-facing label.
expireTimebodystringExpireTime is when the key stops being honored (empty = never).
idbodystring
namebodystring
organizationbodystring
ownerbodystringOwner is the tenant that holds the key; Name is unique within Owner.
scopebodystringScope is the key's ACCESS CLASS, orthogonal to Type (which names the bound principal).
statebodystring
typebodystringType is the scope the key is bound to — "Organization", "Application", "User", or "General" — and Organization / Application / User name the concrete principal…
updatedAtbodystring (date-time)
updatedTimebodystring
userbodystring

Response

StatusBodyMeaning
200iam.Keyok

200 body — 20 fields.

FieldInTypeAlwaysDescription
accessKeybodystringAccessKey (pk-) is the publishable identifier and lookup index; AccessSecret (sk-) is the confidential secret.
accessSecretbodystring
accessSecretDigestbodystringAccessSecretDigest is how a presented secret finds its key: the resolver digests what the caller sent and looks THAT up.
actbodybooleanAct is the durable, opt-in grant that lets this key act FOR a user in its own org — the credential behind as(): presenting it authorizes minting a short-lived,…
applicationbodystring
createdAtbodystring (date-time)
createdTimebodystringCreatedTime and UpdatedTime are RFC3339 audit stamps carried as strings for byte-parity with the v1 row (orm.Model separately tracks CreatedAt / UpdatedAt as…
deletedbodyboolean
displayNamebodystringDisplayName is the human-facing label.
expireTimebodystringExpireTime is when the key stops being honored (empty = never).
idbodystring
namebodystring
organizationbodystring
ownerbodystringOwner is the tenant that holds the key; Name is unique within Owner.
scopebodystringScope is the key's ACCESS CLASS, orthogonal to Type (which names the bound principal).
statebodystring
typebodystringType is the scope the key is bound to — "Organization", "Application", "User", or "General" — and Organization / Application / User name the concrete principal…
updatedAtbodystring (date-time)
updatedTimebodystring
userbodystring

Failure carries the platform error shape — see Errors.

Examples

hanzo iam keys create

IAM API · All Hanzo APIs · Interactive reference

How is this guide?

On this page