Developer documentation
Docs
Custom Domain Kit quickstart, integration, API, and FAQ documents are available publicly for SaaS implementation teams.
Quickstart
Understand the setup path, connection modes, billing rules, and first test domain.
- QuickstartThe four-step integration path for adding Custom Domain Kit to a SaaS product.
- Before You StartAccounts, product data, test domain, and decisions to prepare before integration.
- Cloudflare Connection ModesChoose hosted mode or your own Cloudflare account before production rollout.
- Billing RulesTesting Mode, domain limits, hosted-domain billing, BYO billing, and payment-required handling.
- First Test DomainRun a real hostname through setup, DNS, traffic, and webhook verification.
Integration
Build the dashboard setup, server endpoints, embedded UI, webhook receiver, and tenant routing.
- Create an AppCreate the application, configure origin, save secrets, and add webhook settings.
- Server IntegrationImplement setup-session creation, permission checks, token refresh, and webhook processing.
- Frontend IntegrationRegister the Web Component, load a setup session, and render the setup UI.
- Webhook ReceiverVerify signed webhook deliveries and update your local domain state.
- Tenant RoutingMap runtime custom-domain traffic to tenants using hostname headers.
- Production ChecklistVerify app configuration, server endpoints, frontend embedding, DNS, routing, and billing.
API
Reference the Custom Domain Kit endpoints your SaaS team may call directly.
- Authentication and ErrorsAuthentication assumptions, JSON error envelope, common codes, and handling guidance.
- Applications APICreate, update, rotate secrets, list, get, and delete applications.
- Domains APICreate, list, inspect, refresh, create setup sessions for, and delete domains.
- Webhooks APICreate, update, rotate secrets for, list, get, and delete webhook endpoints.
- Monitoring APIRead application-level domain health for support and operations views.
- Billing APIRead billing state and create checkout, portal, plan-change, and resume sessions.
- Cloudflare Connections APIManage BYO Cloudflare connections, token guidance, tests, worker origins, and deletion.
FAQ
Troubleshoot setup, DNS, token, webhook, routing, and billing questions.
