Skip to main content
POST
/
api
/
public
/
tenants
curl -X POST "https://app.crovver.com/api/public/tenants" \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "externalTenantId": "workspace_abc123",
    "name": "Acme Corp",
    "externalUserId": "user_123",
    "ownerEmail": "admin@acme.com",
    "ownerName": "Jane Smith"
  }'
{
  "success": true,
  "data": {
    "tenant": {
      "id": "uuid",
      "externalTenantId": "workspace_abc123",
      "name": "Acme Corp",
      "slug": "acme-corp",
      "isActive": true,
      "createdAt": "2025-01-01T00:00:00Z"
    },
    "owner": {
      "id": "uuid",
      "externalUserId": "user_123",
      "email": "admin@acme.com",
      "name": "Jane Smith"
    },
    "message": "Tenant created successfully"
  }
}
Creates a new billing tenant in Crovver. For B2B orgs, call this when a new workspace/organization is created in your app. For D2C, tenants are auto-created on first checkout — this endpoint is not needed.

Request Body

externalTenantId
string
required
The workspace/org ID from your application
name
string
required
Display name for the tenant
externalUserId
string
required
The external user ID of the billing owner
ownerEmail
string
Email address of the billing owner
ownerName
string
Display name of the billing owner
slug
string
URL-friendly slug. Auto-generated from name if not provided.
metadata
object
Arbitrary key-value pairs stored on the tenant.

Authentication

Requires a secret key (Authorization: Bearer sk_live_...). Restricted to B2B organizations.
curl -X POST "https://app.crovver.com/api/public/tenants" \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "externalTenantId": "workspace_abc123",
    "name": "Acme Corp",
    "externalUserId": "user_123",
    "ownerEmail": "admin@acme.com",
    "ownerName": "Jane Smith"
  }'
{
  "success": true,
  "data": {
    "tenant": {
      "id": "uuid",
      "externalTenantId": "workspace_abc123",
      "name": "Acme Corp",
      "slug": "acme-corp",
      "isActive": true,
      "createdAt": "2025-01-01T00:00:00Z"
    },
    "owner": {
      "id": "uuid",
      "externalUserId": "user_123",
      "email": "admin@acme.com",
      "name": "Jane Smith"
    },
    "message": "Tenant created successfully"
  }
}