Skip to content
Projects

Custom domains

Serve a project on your own hostname with Cloudflare for SaaS Custom Hostnames — add, verify, and manage TLS automatically.

Every project is reachable at <slug>.backlex.com out of the box. To serve it on your own domain (e.g. api.acme.com), attach a custom hostname — backed by Cloudflare for SaaS, so TLS certificates are issued and renewed for you.

From the project’s Domains tab, or:

Terminal window
curl -X POST https://cloud.backlex.com/api/org/<org>/projects/<project>/domains \
-H "Authorization: Bearer pak_..." \
-H "Content-Type: application/json" \
-d '{"hostname":"api.acme.com"}'

The response includes the DNS records you need to create at your registrar (a CNAME to the platform, plus a validation record).

After you’ve added the DNS records, trigger verification. Cloudflare checks the records and issues the certificate; the domain moves to active once TLS is live.

Terminal window
curl -X POST \
https://cloud.backlex.com/api/org/<org>/projects/<project>/domains/<id>/verify \
-H "Authorization: Bearer pak_..."

Verification can take a few minutes while the certificate is issued. The platform also re-checks pending domains periodically in the background, so a domain that wasn’t ready on the first try will flip to active on its own once DNS propagates.

Deleting a domain detaches the custom hostname and stops serving the project on it. Adding, verifying, and removing domains all require the admin role.