# Create a tenant

> Create a tenant: reference page for this CustomDomain™ API operation in the tenancy group. Covers parameters, request body, responses and error codes.

Source: https://docs.customdomain.ai/docs/api-reference/tenancy/createTenant

## `POST https://api.customdomain.ai/v1/tenants`

Operator provisioning endpoint. Requires the management key in production.

### Authentication

`managementKey`

### Request body (JSON)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | yes |  |

### Responses

| Status | Description |
| --- | --- |
| `201` | Tenant created |
| `400` | Error envelope: {code, title, details}. |
| `401` | Error envelope: {code, title, details}. |

### `201` response body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | yes |  |
| `name` | string | yes |  |
| `created_at` | string | no |  |

The full specification is served at `GET https://api.customdomain.ai/v1/openapi.json`.
