Hanzo
OpenapiAccount

Onboard creates the caller's organization.

Onboard creates the caller's organization.

POST /v1/account/orgs

Addresshttps://api.hanzo.ai/v1/account/orgs
MethodPOST
Operationpost_account_orgs
AuthAuthorization: Bearer $HANZO_API_KEY

Onboard creates the caller's organization. Two flows, keyed on whether the caller already has a home org (mirrors app/onboard/route.ts):

  • FIRST-RUN (no home org): create + MOVE the user in as admin, so their next JWT carries the new owner and the cloud scopes everything to it. This is the path a fresh OAuth sign-up takes, from the sign-up application's org.
  • ADDITIONAL (owner set): create the org but do NOT move the user — a move changes their IAM owner (stripping a SuperAdmin's status + orphaning their current org). They reach the new org via the OrgSwitcher, which re-scopes X-Org-Id without touching IAM membership. A personal-org request from someone who already has an org is meaningless → 409.

Request

2 fields, body application/json (required).

FieldInTypeRequiredDescription
namebodystringName is the organization's display name.
personalbodybooleanPersonal asks for the caller's own workspace: the name is derived from their username and the slug auto-suffixes to stay unique.

Response

StatusBodyMeaning
200onboardRespok

200 body — 5 fields.

FieldInTypeAlwaysDescription
accessKeybodystringAccessKey is the identifier of the org-scoped credential provisioning minted with the organization.
accessSecretbodystringAccessSecret is that credential's confidential half, returned ONCE — on the response that mints it and never again.
additionalbodybooleanAdditional is true when the caller already had an organization and this one was created WITHOUT moving them into it — they reach it via the org switcher.
displayNamebodystringDisplayName is the organization's human name.
orgbodystringOrg is the created organization's slug, which is what X-Org-Id carries.

Failure carries the platform error shape — see Errors.

Examples

hanzo has no subcommand for this operation — the CLI serves only what cloud's live route table confirms. Use HTTP or an SDK.


Account API · All Hanzo APIs · Interactive reference

How is this guide?

On this page