# Which path are you on?

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

Source: https://docs.customdomain.ai/docs/getting-started/overview

Pick the path that fits what you're building. New here? The
[Quickstart](/docs/getting-started/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 are                                                                | Use                                         | Start                                             |
| ---------------------------------------------------------------------- | ------------------------------------------- | ------------------------------------------------- |
| Pointing **your own** domain at your app                               | the **console**                             | [Console](/docs/getting-started/console), no code |
| A product that provisions domains for customers **from your server**   | the **API** (`/v1`, `cd_` API key)          | [API](/docs/getting-started/api)                  |
| A product whose customers connect **their** domains inside **your** UI | the **widget** (`customdomain-js`)          | [Widget](/docs/getting-started/widget)            |
| An AI agent or MCP client                                              | the **MCP server** (`mcp.customdomain.ai`)  | [MCP](/docs/getting-started/mcp)                  |
| Building one of the above before you have a customer's domain          | **Sandbox**, made up `.test` names, no card | [Sandbox](/docs/guides/test-mode)                 |

## 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](/docs/concepts/glossary#ways-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](/docs/guides/test-mode) 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](/docs/dns/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](/docs/concepts/ownership-and-setup-types#rail-truth-what-to-actually-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](/docs/authentication/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.
