These endpoints require the platform:admin scope. They are intended for MeshAI platform operators, not regular tenants.
List Tenants
List all tenants on the platform.
| Parameter | Type | Description |
|---|
plan | string | Filter by plan: starter, professional, enterprise, enterprise_plus |
page | integer | Page number |
limit | integer | Results per page |
curl https://api.meshai.dev/admin/tenants \
-H "Authorization: Bearer msh_PLATFORM_ADMIN_KEY"
{
"success": true,
"data": [
{
"id": "tnt_abc123",
"company_name": "Acme Corp",
"plan": "professional",
"active_agents": 47,
"agent_limit": 100,
"owner_email": "admin@acme.com",
"monthly_cost_usd": 799.00,
"created_at": "2026-01-15T08:00:00Z",
"last_activity": "2026-03-17T10:30:00Z"
},
{
"id": "tnt_def456",
"company_name": "Globex Inc",
"plan": "enterprise",
"active_agents": 234,
"agent_limit": 1000,
"owner_email": "admin@globex.com",
"monthly_cost_usd": 1999.00,
"created_at": "2026-02-01T08:00:00Z",
"last_activity": "2026-03-17T09:15:00Z"
}
],
"meta": { "total": 42, "page": 1, "limit": 20 }
}
Create a Tenant
Provision a new tenant (e.g., for enterprise onboarding or testing).
curl -X POST https://api.meshai.dev/admin/tenants \
-H "Authorization: Bearer msh_PLATFORM_ADMIN_KEY" \
-H "Content-Type: application/json" \
-d '{
"company_name": "NewCo Ltd",
"owner_email": "admin@newco.com",
"plan": "enterprise",
"agent_limit": 500
}'
{
"success": true,
"data": {
"id": "tnt_ghi789",
"company_name": "NewCo Ltd",
"plan": "enterprise",
"agent_limit": 500,
"owner_email": "admin@newco.com",
"api_key": "msh_live_newco_abc123",
"created_at": "2026-03-17T10:00:00Z"
}
}
The API key is shown once at creation time. Share it securely with the tenant admin.
Delete a Tenant
DELETE /admin/tenants/{tenant_id}
Permanently delete a tenant and all associated data (agents, policies, audit events, billing).
curl -X DELETE https://api.meshai.dev/admin/tenants/tnt_abc123 \
-H "Authorization: Bearer msh_PLATFORM_ADMIN_KEY"
Returns 204 No Content on success.
This action is irreversible. All tenant data is permanently deleted. Use with extreme caution.
Get a Tenant
GET /admin/tenants/{tenant_id}
curl https://api.meshai.dev/admin/tenants/tnt_abc123 \
-H "Authorization: Bearer msh_PLATFORM_ADMIN_KEY"
Returns the full tenant object including plan details, agent count, billing status, and feature flags.