Skip to main content
Humancheck supports multi-tenancy with organizations, teams, and users. This guide explains how to set up and manage multi-tenant deployments.

Overview

Multi-tenancy structure:
Organizations
  ├── Users (reviewers)
  ├── Teams
  ├── Agents (AI agents)
  ├── Routing Rules
  └── Reviews

Creating Organizations

import httpx

async with httpx.AsyncClient() as client:
    # Create organization
    response = await client.post(
        "https://api.humancheck.dev/reviews",
        headers={
            "Authorization": "Bearer your-api-key-here",
            "Content-Type": "application/json"
        },
        json={
            "name": "ACME Corp",
            "settings": {
                "require_two_approvals": True,
                "max_review_timeout": 3600
            }
        }
    )
    org = response.json()
    org_id = org["id"]

Creating Users

# Create reviewer user
response = await client.post(
        "https://api.humancheck.dev/reviews",
        headers={
            "Authorization": "Bearer your-api-key-here",
            "Content-Type": "application/json"
        },
        json={
        "email": "reviewer@acme.com",
        "name": "Alice Smith",
        "role": "reviewer",
        "organization_id": org_id
    }
)
user = response.json()

Creating Teams

# Create team
response = await client.post(
        "https://api.humancheck.dev/reviews",
        headers={
            "Authorization": "Bearer your-api-key-here",
            "Content-Type": "application/json"
        },
        json={
        "name": "Finance Team",
        "organization_id": org_id,
        "settings": {
            "notifications_enabled": True
        }
    }
)
team = response.json()

Registering Agents

# Register AI agent
response = await client.post(
        "https://api.humancheck.dev/reviews",
        headers={
            "Authorization": "Bearer your-api-key-here",
            "Content-Type": "application/json"
        },
        json={
        "name": "Payment Processor Bot",
        "framework": "langchain",
        "organization_id": org_id,
        "description": "Processes vendor payments",
        "metadata": {"version": "2.0.1"}
    }
)
agent = response.json()
agent_id = agent["id"]

Using in Reviews

# Create review with organization and agent
response = await client.post(
        "https://api.humancheck.dev/reviews",
        headers={
            "Authorization": "Bearer your-api-key-here",
            "Content-Type": "application/json"
        },
        json={
        "task_type": "payment",
        "proposed_action": "Process payment",
        "organization_id": org_id,
        "agent_id": agent_id
    }
)

Next Steps