Organizations API
Create, read, update, and delete organizations
The Organizations API manages the top-level entity in Hanzo Platform. Every cluster, project, and team member belongs to an organization.
Endpoints
| Procedure | Method | Description |
|---|---|---|
organization.all | GET | List all organizations for the authenticated user |
organization.one | GET | Get a single organization by ID |
organization.create | POST | Create a new organization |
organization.update | PATCH | Update organization settings |
organization.remove | DELETE | Delete an organization |
List Organizations
GET /api/organization.all
Returns all organizations the authenticated user is a member of.
curl https://app.platform.hanzo.ai/api/organization.all \
-H "Authorization: Bearer YOUR_TOKEN"Response:
{
"result": {
"data": [
{
"id": "org_abc123",
"name": "Acme Corp",
"description": "Production infrastructure",
"createdAt": "2025-01-15T10:00:00Z",
"memberCount": 12,
"clusterCount": 3
},
{
"id": "org_def456",
"name": "Staging",
"description": "Development and testing",
"createdAt": "2025-03-20T14:30:00Z",
"memberCount": 5,
"clusterCount": 1
}
]
}
}Get Organization
GET /api/organization.one?organizationId=org_abc123
curl "https://app.platform.hanzo.ai/api/organization.one?organizationId=org_abc123" \
-H "Authorization: Bearer YOUR_TOKEN"Response:
{
"result": {
"data": {
"id": "org_abc123",
"name": "Acme Corp",
"description": "Production infrastructure",
"createdAt": "2025-01-15T10:00:00Z",
"memberCount": 12,
"clusterCount": 3,
"members": [
{
"userId": "user_abc",
"email": "alice@acme.com",
"role": "owner",
"joinedAt": "2025-01-15T10:00:00Z"
}
]
}
}
}Create Organization
POST /api/organization.create
curl -X POST https://app.platform.hanzo.ai/api/organization.create \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Acme Corp",
"description": "Production infrastructure"
}'Parameters:
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Organization name (2-50 characters) |
description | string | No | Short description |
Response: 201 Created
{
"result": {
"data": {
"id": "org_new789",
"name": "Acme Corp",
"description": "Production infrastructure",
"createdAt": "2026-02-26T10:00:00Z"
}
}
}The authenticated user is automatically assigned the Owner role.
Update Organization
PATCH /api/organization.update
curl -X PATCH https://app.platform.hanzo.ai/api/organization.update \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"organizationId": "org_abc123",
"name": "Acme Corporation",
"description": "Updated description"
}'Parameters:
| Field | Type | Required | Description |
|---|---|---|---|
organizationId | string | Yes | Organization ID |
name | string | No | New name |
description | string | No | New description |
Requires Owner or Admin role.
Delete Organization
DELETE /api/organization.remove
curl -X DELETE https://app.platform.hanzo.ai/api/organization.remove \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"organizationId": "org_abc123"
}'Response: 204 No Content
Deleting an organization permanently removes all clusters, projects, environments, and data. This action cannot be undone. Requires the Owner role.
Team Management
Team members are managed via the orgTeam router:
| Procedure | Method | Description |
|---|---|---|
orgTeam.all | GET | List all members of an organization |
orgTeam.update | PATCH | Change a member's role |
orgTeam.remove | DELETE | Remove a member |
# List members
curl "https://app.platform.hanzo.ai/api/orgTeam.all?organizationId=org_abc123" \
-H "Authorization: Bearer YOUR_TOKEN"
# Change role
curl -X PATCH https://app.platform.hanzo.ai/api/orgTeam.update \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"organizationId": "org_abc123",
"userId": "user_def456",
"role": "admin"
}'
# Remove member
curl -X DELETE https://app.platform.hanzo.ai/api/orgTeam.remove \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"organizationId": "org_abc123",
"userId": "user_def456"
}'How is this guide?
Last updated on