Skip to main content
POST /v1/tenants/create Creates a new tenant with the given ID and name. Each tenant gets its own isolated schema and authorization data store.
If you are not using multi-tenancy, Permify pre-inserts a default tenant t1. You do not need to create additional tenants for single-tenant deployments.

Request Body

id
string
required
A unique identifier for the new tenant. Must match [a-zA-Z0-9-,]+, max 64 bytes.
name
string
required
A human-readable name for the tenant. Max 64 bytes.

Response

tenant
object
The created tenant object.

Example

curl --location --request POST 'http://localhost:3476/v1/tenants/create' \
--header 'Content-Type: application/json' \
--data-raw '{
    "id": "acme",
    "name": "Acme Corp"
}'
Request body
{
  "id": "acme",
  "name": "Acme Corp"
}
Response
{
  "tenant": {
    "id": "acme",
    "name": "Acme Corp",
    "created_at": "2024-01-15T10:30:00Z"
  }
}

Error Codes

HTTP StatusDescription
400Bad request — invalid ID format or missing required fields
401Unauthorized
409Conflict — a tenant with this ID already exists
429Rate limit exceeded
500Internal server error

Build docs developers (and LLMs) love