---
title: "Create Tenant"
method: POST
path: "/v1/auth/tenants"
tags: ["auth", "auth"]
---

# Create Tenant

`POST /v1/auth/tenants`

## Request

- Base URL: `https://api.elaan.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.elaan.io/v1/auth/tenants`
- Auth: none declared

Create a new tenant owned by the signed-in user. Like signup, the
route coordinates single-aggregate use cases in the one request transaction:
the Tenant, the owner's Membership (NOT their default — they keep the tenant
they're in; switch explicitly via POST /auth/session), and the tenant's
un-deletable default brand (every tenant has exactly one). Refused on a
single-tenant (on-prem) install, which is pinned to one tenant.

## Headers

- `authorization` string, nullable

## Request body

- CreateTenantRequest: Create a new account (tenant) owned by the signed-in user. `name` is the display label; blank/whitespace-only is a clean 422 (mirrors the Tenant rule).
  - `name` string, required

## Response `201`

Successful Response

- TenantResponse: One account the signed-in user belongs to (UI: 'account'; code: tenant).
  - `tenant_id` string, required
  - `name` string, required
  - `role` string, required
  - `is_default` boolean, required
  - `status` string: "active" or "archived". An archived account is hidden from the switcher and can no longer send — the trigger refuses it and fan-out skips it. Reversible via unarchive; data is retained.

## Other responses

- `403`: Tenant creation is disabled (single-tenant install)
- `422`: Blank or over-long tenant name

---

[API](https://skmtc.dev/elaan/apis/elaan-api.md) · [All operations](https://skmtc.dev/elaan/apis/elaan-api/llms.txt) · [OpenAPI document](https://skmtc.dev/elaan/apis/elaan-api/revisions/c96a7e6399aa?raw)
