# Isolate customer orgs, Base stores, and entitlements

URL: https://docs.hanzo.ai/docs/guides/business/multi-tenant-white-label

> Isolate customer organizations, Base datastores, and runtime plan entitlements via /v1/iam/organizations, /v1/base/bases/{org}, and /v1/entitlement/orgs/{org}.

**Ship enterprise-grade multi-tenancy on day one.** Every customer organization gets its own IAM identity boundary, Base store, KMS namespace, and plan entitlement resolution.

## Architecture & contract

Resolve tenant entitlements server-side from IAM-verified org claims (`GET /v1/entitlement/orgs/{org}`) before opening Base queries (`/v1/base/bases/{org}`) or routing into paid model tiers.

**Primary endpoint:** `GET /v1/entitlement/orgs/{org}` · \*_Status:_\* `shipped` · \*_Level:_\* `architect`

## Run it across all four surfaces

**CLI**

```bash
hanzo iam organizations list
hanzo plan list
hanzo entitlement orgs get acme-corp
```

**SDK**

**TypeScript**

```ts
import { Configuration, PlanApi, EntitlementApi, BaseApi } from 'hanzoai';

const cfg = new Configuration({ accessToken: process.env.HANZO_API_KEY });
const [plans, ent, base] = await Promise.all([
  new PlanApi(cfg).getPlan(),
  new EntitlementApi(cfg).getEntitlementOrgsByOrg('acme-corp'),
  new BaseApi(cfg).getBaseBasesByOrg('acme-corp'),
]);
console.log({ plans: plans.data, ent: ent.data, base: base.data });
```

**Python**

```python
import os
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import PlanApi, EntitlementApi, BaseApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
print(PlanApi(client).get_plan())
print(EntitlementApi(client).get_entitlement_orgs_by_org("acme-corp"))
print(BaseApi(client).get_base_bases_by_org("acme-corp"))
```

**HTTP**

```bash
curl -s https://api.hanzo.ai/v1/plan \
  -H "Authorization: Bearer $HANZO_API_KEY" | jq '.'

curl -s https://api.hanzo.ai/v1/entitlement/orgs/acme-corp \
  -H "Authorization: Bearer $HANZO_API_KEY" | jq '.'

curl -s https://api.hanzo.ai/v1/base/bases/acme-corp \
  -H "Authorization: Bearer $HANZO_API_KEY" | jq '.'
```

**MCP**

```bash
curl -s -X POST https://api.hanzo.ai/v1/mcp \
  -H "Authorization: Bearer $HANZO_API_KEY" -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "entitlement",
      "arguments": {"op": "get_entitlement", "input": {}}
    }
  }'
```

## Verify the outcome

- Assert a tenant on a free plan is gated cleanly from enterprise-only model tiers via resolved entitlements.

## Production guardrails

- Never trust client-supplied `org` headers without verifying the authenticated IAM token's org membership.

## Next steps & Hanzo University

- [White-Label AI Products](https://docs.hanzo.ai/docs/business/white-label)

- **[ENT 401 — Build Your AI Company](https://hanzo.university/build-your-ai-company)** ([Launch interactive lab on hanzo.app/learn](https://hanzo.app/learn/build-your-ai-company))

- **[ARC 105 — AI Architect](https://hanzo.university/ai-architect)** ([Launch interactive lab on hanzo.app/learn](https://hanzo.app/learn/ai-architect))
