tenants
Delete Tenant
Delete tenant from the platform (PERMANENT).
Purpose: Remove a tenant/organization from the platform
What it does:
- Permanently deletes tenant account
- Used when customer cancels service
- Removes all tenant data from the system
⚠️ WARNING - CASCADE DELETE: This operation permanently deletes ALL related data:
- All agents created by this tenant
- Call history and recordings (all calls)
- Workflows and integrations (custom flows, API configs)
- Files and logs (knowledge base, activity logs)
- SIP trunks (phone number configurations)
- Squad configurations (agent teams)
Use Cases:
- Customer account cancellation
- Service termination
- Data cleanup after trial expiration
Recommended Practice:
- Export/backup tenant data before deletion
- Verify tenant has no active calls/sessions
- Notify customer before deletion
- Consider soft-delete (status=inactive) instead
DELETE
Delete Tenant
Documentation Index
Fetch the complete documentation index at: https://docs.mrassistant.ai/llms.txt
Use this file to discover all available pages before exploring further.
Previous
Get Tenant StatsGet tenant usage statistics and analytics.
**Purpose:** View usage statistics, performance metrics, and billing data
**What it returns:**
```json
{
"tenant_id": "uuid",
"total_agents": 5, // Number of AI agents created
"total_calls_today": 23, // Today's call volume
"total_calls_month": 456, // Monthly call volume
"avg_call_duration": 180.5, // Average call length (seconds)
"avg_sentiment_score": 0.75, // Customer satisfaction (-1 to 1)
"active_sessions": 3, // Current active calls/sessions
"monthly_usage_cents": 1250, // Billing amount for current month
"last_call_at": "2025-10-02T10:30:00Z" // Last call timestamp
}
```
**Used For:**
- **Billing calculations:** Track monthly_usage_cents for invoicing
- **Usage monitoring:** Check if approaching monthly_call_limit
- **Customer dashboards:** Display usage stats to tenant users
- **Capacity planning:** Monitor concurrent calls vs max_concurrent_calls
- **Performance tracking:** Average call duration and sentiment scores
- **Support insights:** Identify usage patterns and issues
**Real-World Scenarios:**
- Admin sees tenant approaching limit → proactively offer upgrade
- Customer views their dashboard → sees call volume trends
- Billing system queries stats → generates monthly invoice
- Support team checks stats → troubleshoots customer issues
Next
Delete Tenant