Add a custom domain
A hostname the customer owns (such as login.example.com) where the directory is served besides .sso.ezgh.app, as its own OIDC issuer and SAML entity. It starts pending, with the two records to create: a TXT record proving ownership and a CNAME to .sso.ezgh.app. sso-worker checks both at once, then every 15 minutes for a week; once both are found it has a certificate issued (ACME HTTP-01) and attached, and the domain becomes active. A hostname is claimed by one directory at a time. A directory has one custom domain: another hostname is 409 too_many_custom_domains until it's removed. While it's active, the pages people open directly on .sso.ezgh.app (the portal, sign-in, account, activation and reset links) redirect to it, and emails link to it; the OIDC and SAML endpoints there keep working.
https://sso.ezghcloud.com/v1/organizations/{orgId}/sso/custom-domainsAuthorization
Path parameters
Header parameters
Request bodyJSONrequired
Returns
201
The custom domain and its records.
- statuspendingorissuingoractiverequired
pending until sso-worker finds both records; issuing while the certificate is issued and attached to the Gateway; active once sso-edge serves the hostname. Two consecutive misses of either record make an issuing or active domain pending again, and it stops being served.
400
invalid_request (with issues), invalid_cursor, or the endpoint's own 400 codes.
403
access_denied: the caller's policies don't allow the action; forbidden_origin: a cookie-authenticated write from an origin that isn't allowed; spend_limit_reached.
404
not_found: unknown, malformed, or in an organization the caller isn't in.
409
quota_exceeded (an allocation quota, with quota), idempotency_conflict, idempotency_in_progress (with Retry-After), organization_deletion_pending, operation_in_progress, or the endpoint's own 409 codes.
413
payload_too_large: the body is over the endpoint's limit (1 MiB unless it says otherwise).
429
too_many_requests, with Retry-After; or quota_exceeded (a rate, usage or concurrency quota, with quota), never with Retry-After.
500
internal_error: a bug; the details are in the logs, under the request ID.