Hanzo
OpenapiIam

Creates a person or updates them in place, so a deployment can declare the…

Creates a person or updates them in place, so a deployment can declare the accounts it needs and re-run that declaration safely.

POST /v1/iam/admin/users/upsert

Addresshttps://api.hanzo.ai/v1/iam/admin/users/upsert
MethodPOST
OperationupsertUser
AuthAuthorization: Bearer $HANZO_API_KEY

Creates a person or updates them in place, so a deployment can declare the accounts it needs and re-run that declaration safely.

It DESCRIBES an account it meets and GRANTS only to one it creates: org-admin is never raised on a row that already exists, and a machine identity is answered by name rather than adopted. Both are properties of the update itself, so a steady-state reconcile — which changes neither — is unaffected.

Passwords are hashed before they are stored. Leave the password out and their current one is kept, so a redeploy never locks somebody out; send the same one again and it is kept too, so a steady-state re-run is not a rotation.

Request

9 fields, body application/json (required).

FieldInTypeRequiredDescription
Authorizationheaderstring
displayNamebodystring
emailbodystring
isAdminbodyboolean
namebodystring
ownerbodystring
passwordbodystring
passwordTypebodystring
phonebodystring

Response

StatusBodyMeaning
200iam.replyok
400iam.replybad request
401iam.replyunauthorized
500iam.replyinternal server error

200 body — 4 fields.

FieldInTypeAlwaysDescription
actionbodystring
databodyobject
msgbodystring
statusbodystring

Failure carries the platform error shape — see Errors.

Examples

hanzo iam admin users upsert

IAM API · All Hanzo APIs · Interactive reference

How is this guide?

On this page