Hanzo

Orgs

Package account is your own account: API keys you mint and revoke, and org onboarding.

Package account is your own account: API keys you mint and revoke, and org onboarding.

Base URLhttps://api.hanzo.ai
Operations3
AuthAuthorization: Bearer $HANZO_API_KEY

orgs

GET /v1/orgs/{org}/entitlements

Get lists the products an org has ENABLED — its own intent, which the console's paid-product sidebar reads to decide what to show. It is distinct from what the org's plan ENTITLES it to (that is GET /v1/entitlements, resolved from commerce).

A caller may only read its OWN org's row; a platform super admin may read any.

ParameterInTypeRequiredDescription
orgpathstringyes

POST /v1/orgs/{org}/entitlements

Post turns products on or off for an org and returns the enabled set afterwards.

A product may only be ENABLED if the org's plan already ENTITLES it, so enabling never spends new money — a product the plan does not grant answers 402 and the console routes that to an upgrade prompt. DISABLING is never gated. A platform super admin bypasses the plan check (operator comp/grant) and may target any org; everyone else may only change their own. Commerce unreachable is a 503, never an implicit yes.

ParameterInTypeRequiredDescription
orgpathstringyes

Request bodyapplication/json (required)

FieldTypeRequiredDescription
addstring[]Add is the product ids to turn ON. Each must already be an ACTIVE entitlement of the org's plan, unless the caller is a…
removestring[]Remove is the product ids to turn OFF.

POST /v1/orgs

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 bodyapplication/json (required)

FieldTypeRequiredDescription
namestringName is the organization's display name. Ignored when personal is true, which derives the name from the caller's own…
personalbooleanPersonal asks for the caller's own workspace: the name is derived from their username and the slug auto-suffixes to…

All Hanzo APIs · Interactive reference

How is this guide?

On this page