tenants
Create Tenant
Create a new tenant (organization/customer) - Usually auto-created during signup.
⚠️ NOTE: For most users, tenants are AUTO-CREATED during signup!
When to use this endpoint:
- Platform Admins: Manually create organizations for customers
- Recovery: If auto-creation failed during signup
- Migration: Importing existing organizations into the platform
- Advanced: Creating additional sub-organizations
For Regular Users (BUSINESS role):
- Your tenant is automatically created when you sign up via
POST /auth/signup - You don’t need to call this endpoint
- Your tenant_id = your owner_id (automatically linked)
What it does:
- Creates a new tenant account with unique ID (uses current_user.owner_id)
- Sets up billing plan and usage limits
- Configures SIP capabilities (if enabled)
- Establishes compliance settings (HIPAA, PCI)
- Encrypts sensitive credentials (SIP passwords)
Key Configuration:
name: Organization namebilling_plan: Subscription tier (starter/business/enterprise)max_concurrent_calls: Call capacity limit (1-1000)monthly_call_limit: Monthly usage capsip_enabled: Enable phone number integrationrecording_enabled: Call recording capabilityanalytics_enabled: Analytics dashboard access
User Flow Clarification:
- Sign up →
POST /auth/signup(role=BUSINESS) → Tenant auto-created ✅ - Login →
POST /auth/token→ Get access token - Create agents →
POST /agents→ Start building
❌ You do NOT need to manually create tenant after signup!
POST
Create Tenant
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Tenant creation model.
Required string length:
1 - 255Required string length:
1 - 100Required range:
1 <= x <= 1000Required range:
x >= 0Response
Successful Response
Tenant response model.
Required string length:
1 - 255Required string length:
1 - 100Required range:
1 <= x <= 1000Required range:
x >= 0Create Tenant