CustomDomain Docs
Quickstart

Which path are you on?

Pick the console, the API, the widget or MCP.

Pick the path that fits what you're building. New here? The Quickstart runs the whole flow once in test mode, with no real domain and no card.

CustomDomain™ is one product with four front doors. The model underneath is the same on every path:

  • A workspace has applications.
  • An application owns connections, and its origin, keys and webhooks.
  • A connection is one domain moving from pending to propagating to live.
  • Live means the edge serves HTTPS and proxies the domain to the application's origin.
You areUseStart
Pointing your own domain at your appthe consoleConsole, no code
A product that provisions domains for customers from your serverthe API (/v1, cd_ API key)API
A product whose customers connect their domains inside your UIthe widget (customdomain-js)Widget
An AI agent or MCP clientthe MCP server (mcp.customdomain.ai)MCP
Building one of the above before you have a customer's domainSandbox, made up .test names, no cardSandbox

Shared truths

These hold on every path. If a screen or a response seems to contradict one of them, that is a bug. Tell us.

  • Four statuses. pending means the records are not seen yet. propagating means a way to connect wrote them and we are watching DNS. Then live or failed.
  • pending has no deadline. Checks run every five seconds at first, then back off to every 15 minutes. After 72 hours the connection stays pending with error_code: setup_incomplete. It is then checked every six hours, for good, and goes live the moment the records appear.
  • Records written for you usually check out in seconds. We check a write at once. When public resolvers still hold an old answer, we ask the zone's own nameservers.
  • propagating fails after 24 hours with error_code: propagation_timeout. The records were written but never resolved. The usual cause is a wrong value, or a Cloudflare proxy (orange cloud) in the way.
  • failed is not final. Resume or :recheck revives it. Creating the same domain again revives it (200). Real traffic at the edge revives it too.
  • The diagnosis is on the connection. Read error_code and error_message on GET /v1/connections/{id}, on every list, and on the webhook events.
  • Sandbox runs all of this on made up names. A Sandbox application connects .test names. They go live, stay pending or fail on a short simulated clock chosen by the name. They send the same webhooks, marked "sandbox": true, and count for nothing: no free domain, no allowance, no bill.
  • HTTPS only after live. The certificate issues on the first request once the connection is live. A domain pointed at us before that gets a clear "not active yet" page, never a raw error.
  • Root domains work everywhere. The record differs by provider: an ALIAS or flattened CNAME, or A records. See Root domains.
  • "Automatic" means an adapter exists. It does not mean the user types nothing. Read rails, recommended_rail and end_user_automatic on the pre-flight check (what to tell the user).
  • Drift monitoring checks live connections every hour. Alerts are not delivered on the hosted service yet.

Which credential do I have?

You got it fromIt isUse it for
The console, API & SDKa cd_live_… or cd_test_… API key, scoped to your workspace. Older keys start sk_ and still work. Every workspace has a default key from the start, which owners can view at the top of the page. Another key from Create key is shown once and needs a card on file (14 day free trial)API calls from your server, the MCP server, and minting widget tokens with POST /v1/tokens (the key as the bearer)
POST /v1/applications, for an application created over the APIthe application's client secret (sk_…, shown once in that response). A console signup never shows oneminting widget tokens from your server with POST /v1/tokens
A widget token endpoint (above)a short-lived widget JWT, for one application and optionally one domain and one end userthe browser: customdomain-js open({ token }), or direct /v1 calls from the page
An agent granta delegated agent tokenthe agent's scoped API calls

Most customers sign up in the console. So they hold an API key, and mint widget tokens at POST /v1/tokens with that key. The client secret is for applications created over the API. An API key is not a client secret, and you cannot use one in place of the other. See Widget tokens.

A widget JWT can never mint another token. It never reads another application's data, and never chooses the records we write. Anything that chooses records needs an API key.

On this page