Create a platform tenant vanity domain.
POST
/api/admin/platform/tenant-vanity-domains
Code sample: Shell / cURL
curl --request POST \ --url https://auth.example.com/api/admin/platform/tenant-vanity-domains \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "hostname": "login.example.com", "tenant_id": "default", "is_primary": true }'Create a vanity hostname for an active tenant. When Cloudflare custom hostname credentials are configured the handler attempts provisioning; otherwise it returns a pending manual setup response.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ” Media type application/json
object
tenant_id
required
string
hostname
required
string
is_primary
boolean
cloudflare_zone_id
string
Example
{ "hostname": "login.example.com", "tenant_id": "default", "is_primary": true}Responses
Section titled “ Responses ”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
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 }}Error response.
Media type application/json
object
error
string
message
string
error_description
string
key
additional properties
Example generated
{ "error": "example", "message": "example", "error_description": "example"}Error response.
Media type application/json
object
error
string
message
string
error_description
string
key
additional properties
Example generated
{ "error": "example", "message": "example", "error_description": "example"}Error response.
Media type application/json
object
error
string
message
string
error_description
string
key
additional properties
Example generated
{ "error": "example", "message": "example", "error_description": "example"}Error response.
Media type application/json
object
error
string
message
string
error_description
string
key
additional properties
Example generated
{ "error": "example", "message": "example", "error_description": "example"}Error response.
Media type application/json
object
error
string
message
string
error_description
string
key
additional properties
Example generated
{ "error": "example", "message": "example", "error_description": "example"}