Create a tenant

Create a tenant in the organization.

POST /organizations/{org}/tenants

Creates a tenant from a name and an optional logo. To set who can join, follow up with Update a tenant.

Authorization

Org owner. Anyone else gets 403 forbidden.

Path parameters

NameTypeDescription
orgstringThe organization: its id (org_…) or its slug. It has to be an org your token can manage (see Who can call it)

Body

FieldTypeRequiredDescription
namestringyes1–80 characters, trimmed
logostringnoAn https URL. A placeholder fills in when it is left out

No other field is accepted.

Response

201 Created with the created tenant, shaped as in List tenants.

Errors

StatuserrorWhen
400invalid_requestAn unknown field, or a value that fails validation. The detail names it
403forbiddenYou are not an owner of the org
404not_foundThe org does not exist, or your token cannot manage it

Example

curl -X POST https://loginwith.loginwith.dev/organizations/acme/tenants \
  -H "Authorization: Bearer $TOKEN" -H "content-type: application/json" \
  -d '{"name": "Acme France"}'