Domains
A domain is a host you connect through this API and route API links through. Connect it, set two DNS records, and verification flips on its own. Links can go onto it before that — they wait, staged, and go live with the domain.
/v1/domainsConnect a domain
Returns the two DNS records to set — copy the values exactly as returned. Status starts at pending_dns and flips automatically — see below. You can create links on it right away; they are staged until it is active.
hoststringREQUIREDThe fully-qualified host, e.g. go.example.com.
include_wwwbooleanAlso connect the www ↔ apex twin (www.example.com for example.com, or the other way round). It 301-redirects to host and is free: it does not count toward your plan’s custom domains. Defaults to false. See below.
/v1/domainsList domains
Every domain connected through this API, with status and link count. links tells you what a disconnect would break; staged_links counts the links still waiting for the domain to go active (0 once it is).
/v1/domains/{id}Retrieve a domain
One domain, the same shape as a list entry. Poll it during a migration: staged_links is how many imported links are waiting on DNS.
How verification flips
We re-check DNS every minute; status turns active once both records resolve and the certificate is issued. It is polling, not a callback — nothing to expose on your side; outbound webhooks are roadmap, dated on their own page. Staged links need nothing either: they were already loaded into routing, so they answer as soon as the domain does.
NO ACTION NEEDED AFTER THE RECORDS ARE SET — THE FLIP IS AUTOMATIC
www and the bare domain
Connect example.com with "include_www": true and www.example.com comes along: every request to it gets a 301 to example.com, path and query kept, so you never create a link twice. The domain you send as host is the one that holds the links. The response names the twin in www_redirect and lists its routing record in records with "required": false: set it for the redirect to work, but the domain goes active without it. If the name can’t pair up (go.example.com has no www twin) or the twin is already connected somewhere, the domain is connected alone and www_redirect is null. Test keys never add one. A twin added or removed later in the dashboard shows up here too.
FREE ON EVERY PLAN · THE TWIN NEVER COUNTS AS A CUSTOM DOMAIN
/v1/domains/{id}Disconnect a domain
Refused with 409 domain_in_use while links still resolve on the host. Move or delete them first, or force it and accept the breakage consciously. Disconnecting a domain also disconnects its www twin.
forcebooleanQuery param. Deletes the links on the host (slugs quarantined 30 days), then disconnects.