> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Provisions (or updates) a tenant. Used by the dashboard gateway to create a

> tenant per WorkOS organization. Requires Postgres.

tenant per WorkOS organization. Requires Postgres.

### Request body

`Tenant`

<ParamField body="created_at" type="string (date-time)" />

<ParamField body="display_name" type="string" required />

<ParamField body="enabled" type="boolean" />

<ParamField body="id" type="string" required>
  Stable tenant identifier (slug), e.g. `acme-com`.
</ParamField>

### Response

`Tenant`

<ResponseField name="created_at" type="string (date-time)" />

<ResponseField name="display_name" type="string" required />

<ResponseField name="enabled" type="boolean" />

<ResponseField name="id" type="string" required>
  Stable tenant identifier (slug), e.g. `acme-com`.
</ResponseField>

### Status codes

| Code  | Meaning                                     |
| ----- | ------------------------------------------- |
| `200` | The provisioned tenant                      |
| `403` | Admin credential required                   |
| `422` | Single-tenant deployment (no DATABASE\_URL) |

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://edi.stateset.com/v1/tenants' \
    --header 'Authorization: Bearer YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
    "created_at": "2026-08-31T14:22:05Z",
    "display_name": "Ada Lovelace",
    "enabled": true,
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "created_at": "2026-08-31T14:22:05Z",
    "display_name": "Ada Lovelace",
    "enabled": true,
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  }
  ```
</ResponseExample>
