---
title: "Create Tenant Endpoint"
method: POST
path: "/infra/tenants"
tags: ["tenants"]
---

# Create Tenant Endpoint

`POST /infra/tenants`

## Request

- Base URL: `https://api.4chems.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.4chems.com/infra/tenants`
- Auth: HTTP bearer

Provision a new tenant asynchronously and return the operation envelope. Call
this when an infra admin needs to create a tenant outside the self-service
trial flow. Returns 202 + Location: /infra/operations/{id}.

## Request body

- TenantCreateIn
  - `slug` string, required
  - `name` string, required
  - `initial_admin_email` string, email, required
  - `attestation` AttestationIn, required: Attestation checkbox (NFR-006 pt 8). Stored with timestamp on the tenant row.
    - `attested` boolean, required
    - `email` string, email, required
  - `legal_entity` LegalEntityIn, required: Composite legal-entity input validated against the country catalog. Rules: - *country* must be a supported market (validated at field level via SupportedCountry, caught in the model validator against the loaded catalog). - *legal_entity_type* must appear in that country's catalog file. - When *legal_entity_type* is ``<CC>_OTHER``, *other_label* is required (2-80 chars). - For any other type, *other_label* must be absent.
    - `country` string, required
    - `legal_entity_type` string, required
    - `other_label` string, nullable
    - `name` string, required
  - `allow_duplicate_domain` boolean

## Response `202`

Successful Response

- OperationOut
  - `operation_id` string, uuid, required
  - `status` string, required
  - `type` string, required
  - `target_type` string, nullable
  - `target_id` string, nullable
  - `result` unknown
  - `error` ErrorDetail
    - `code` string, required
    - `message` string, required
  - `created_at` string, date-time, required
  - `finished_at` string, date-time, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/4chems/apis/platform-api.md) · [All operations](https://skmtc.dev/4chems/apis/platform-api/llms.txt) · [OpenAPI document](https://skmtc.dev/4chems/apis/platform-api/revisions/65e4f7b4dba0?raw)
