Overview
Multi-tenancy structure:Copy
Organizations
├── Users (reviewers)
├── Teams
├── Agents (AI agents)
├── Routing Rules
└── Reviews
Creating Organizations
Copy
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
Copy
# 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
Copy
# 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
Copy
# 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
Copy
# 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
- Learn about Routing Rules
- Explore Dashboard for reviewing