Custom Domains API
Add, verify and manage your own domains for upload links.
Custom domains are available on embrly.ca and on instances running in cloud mode. See the Custom Domains guide for the DNS steps.
All endpoints need authentication. These endpoints return plain JSON or plain-text errors, without the success/data wrapper.
| Method | Endpoint | Description |
|---|---|---|
GET | /api/domains | List your domains and how many you can add |
POST | /api/domains | Add a domain |
POST | /api/domains/{id}/cf-check | Check DNS and verify the domain |
POST | /api/domains/{id}/cloudflare-setup | Create the DNS records in your own Cloudflare account |
PATCH | /api/domains/{id} | Make it your main domain, or rename it |
DELETE | /api/domains/{id} | Remove a domain |
Add a Domain
POST /api/domains
Returns the new domain as { "domain": { ... } }. It starts unverified.
| Status | When |
|---|---|
400 | Not a valid domain name |
403 | You've reached your domain limit |
409 | Someone has already added this domain |
Verify a Domain
Point a CNAME record for your domain at cname.emberly.site, then call:
POST /api/domains/{id}/cf-check
Returns { "status": "...", "cf": { ... } } with the current verification and certificate state. Call it again until the domain shows as verified; this usually takes a few minutes after the DNS change. Limited to 10 checks per 10 minutes.
POST /api/domains/{id}/cloudflare-setup
If your domain is on Cloudflare, Emberly can create the records for you:
The token needs Zone → Zone → Read and Zone → DNS → Edit permission for that domain. It's used once and not stored. Set replaceConflicts to true to replace existing records with the same name.
Manage a Domain
PATCH /api/domains/{id}
Make a verified domain the one your upload links use:
Rename a domain. It becomes unverified until you verify it again:
DELETE /api/domains/{id}
Removes the domain. Links using it stop working.
List Your Domains
GET /api/domains
Returns your domains, with their verification state and whether each is your main domain, plus your domain limit.