Skip to content

Create a platform tenant domain mapping.

POST
/api/admin/platform/tenant-domain-mappings
Code sample: Shell / cURL
curl --request POST \
--url https://auth.example.com/api/admin/platform/tenant-domain-mappings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "domain": "example.com", "tenant_id": "default", "priority": 10, "is_active": true, "verified": false }'

Create a platform email-domain-to-tenant mapping. The raw domain is validated and hashed before storage; the hash is not returned.

X-Tenant-Id
string

Tenant selector for multi-tenant admin requests.

Media type application/json
object
domain
required

Raw email domain to hash and map to a tenant.

string
<= 253 characters
tenant_id
required
string
>= 1 characters <= 63 characters
priority
integer
0 <= 1000
is_active
boolean
default: true
verified
boolean
key
additional properties
Example
{
"domain": "example.com",
"tenant_id": "default",
"priority": 10,
"is_active": true,
"verified": false
}

Tenant domain mapping response.

Media type application/json
object
id
required
string
tenant_id
required
string
hash_version
required
integer
priority
required
integer
is_active
required
boolean
verified
required
boolean
verification_expires_at
required
integer | null format: int64
created_by
required
string | null
created_at
required
integer format: int64
updated_at
required
integer format: int64
key
additional properties
Example
{
"id": "mapping_123",
"tenant_id": "default",
"hash_version": 1,
"priority": 10,
"is_active": true,
"verified": false,
"verification_expires_at": null,
"created_by": "admin_123",
"created_at": 1770000000,
"updated_at": 1770000000
}