Skip to content

Create a tenant vanity domain.

POST
/api/admin/tenant-vanity-domains
Code sample: Shell / cURL
curl --request POST \
--url https://auth.example.com/api/admin/tenant-vanity-domains \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "hostname": "login.example.com", "is_primary": true }'

Create a tenant-scoped vanity domain. Cloudflare custom hostname provisioning is attempted when the deployment has Cloudflare API configuration.

X-Tenant-Id
string

Tenant selector for multi-tenant admin requests.

Media type application/json
object
hostname
required
string
<= 253 characters
is_primary
boolean
default: true
cloudflare_zone_id
string
key
additional properties
Example
{
"hostname": "login.example.com",
"is_primary": true
}

Tenant vanity domain create response.

Media type application/json
object
domain
required
object
id
required
string
tenant_id
required
string
hostname
required
string
is_active
required
boolean
is_primary
required
boolean
status
required
string
Allowed values: pending pending_manual active failed deleted
cloudflare_zone_id
required
string | null
cloudflare_custom_hostname_id
required
string | null
ssl_status
required
string | null
ownership_status
required
string | null
validation_method
required
string | null
validation_records
required
object | null
last_sync_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
cloudflare_configured
required
boolean
manual_setup_required
required
boolean
cloudflare_error
required
string | null
key
additional properties
Example
{
"domain": {
"id": "domain_123",
"tenant_id": "default",
"hostname": "login.example.com",
"is_active": true,
"is_primary": false,
"status": "pending_manual",
"cloudflare_zone_id": null,
"cloudflare_custom_hostname_id": null,
"ssl_status": null,
"ownership_status": null,
"validation_method": "http",
"validation_records": {
"ownership_verification": null,
"ownership_verification_http": null,
"ssl_validation_records": null
},
"last_sync_at": null,
"created_by": "admin_123",
"created_at": 1770000000,
"updated_at": 1770000000
}
}