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
pendingtopropagatingtolive. - Live means the edge serves HTTPS and proxies the domain to the application's origin.
| You are | Use | Start |
|---|---|---|
| Pointing your own domain at your app | the console | Console, no code |
| A product that provisions domains for customers from your server | the API (/v1, cd_ API key) | API |
| A product whose customers connect their domains inside your UI | the widget (customdomain-js) | Widget |
| An AI agent or MCP client | the MCP server (mcp.customdomain.ai) | MCP |
| Building one of the above before you have a customer's domain | Sandbox, made up .test names, no card | Sandbox |
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.
pendingmeans the records are not seen yet.propagatingmeans a way to connect wrote them and we are watching DNS. Thenliveorfailed. pendinghas no deadline. Checks run every five seconds at first, then back off to every 15 minutes. After 72 hours the connection stayspendingwitherror_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.
propagatingfails after 24 hours witherror_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.failedis not final. Resume or:recheckrevives 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_codeanderror_messageonGET /v1/connections/{id}, on every list, and on the webhook events. - Sandbox runs all of this on made up names. A
Sandbox application connects
.testnames. They golive, staypendingor 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
Arecords. See Root domains. - "Automatic" means an adapter exists. It does not mean the user types
nothing. Read
rails,recommended_railandend_user_automaticon 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 from | It is | Use it for |
|---|---|---|
| The console, API & SDK | a 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 API | the application's client secret (sk_…, shown once in that response). A console signup never shows one | minting 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 user | the browser: customdomain-js open({ token }), or direct /v1 calls from the page |
| An agent grant | a delegated agent token | the 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.