Ana içeriğe geç

Create a new workspace for the current account

POST 

/api/tenants

Creates a NEW tenant owned + administered by the CURRENT account (Faz 5E). The account identity comes from the session, never the request.

FREE LIMIT: an account may own at most ONE free-plan tenant. Requesting the free plan when one already exists is rejected 422 with error: free_tenant_limit.

  • Free plan (allowed) → the tenant is created on the free/trial baseline and the session is switched into it immediately; checkout_url is null (201).
  • Paid plan under the live Stripe provider → the tenant is created on the free/trial baseline and a hosted Stripe Checkout URL is returned (checkout_url); the session is NOT switched and no quota is granted until the webhook confirms payment (202). Under the fake provider the paid plan is provisioned directly and the session is switched (201).

Request​

Responses​

Tenant created and the session switched into it (free / fake-provider paid).