Domains
Scope your API key to the site(s) it's actually embedded on.
An account with no domains registered is unrestricted by design — a getting-started default so a fresh key works immediately without a setup step. Registering at least one domain switches your key to allowlist mode: only requests from a registered domain succeed.
Register a domain — from your own server
The one route on this page that authenticates with your API key, not a login session — built for an integration (like the WordPress plugin) to register its own site automatically, e.g. on plugin activation. Idempotent: registering the same domain twice just confirms it's already there instead of erroring. Not available to call from a browser (see register-domain's CORS note in apps/api/src/routes/domains.ts if you're curious why) — server-to-server only.
curl -X POST https://exactcalcs.com/v1/widget/register-domain \
-H "Content-Type: application/json" \
-d '{ "apiKey": "sk_live_...", "domain": "https://yoursite.com" }'Response: { "registered": true, "alreadyRegistered": false }. Capped at 20 domains per account.
Manage domains — from the dashboard
These two require your account session (Authorization: Bearer <JWT>), not the API key — they're what the dashboard's own domain list uses, and what you'd use to manage domains from a script acting on your behalf rather than from an embed itself.
curl -X POST https://exactcalcs.com/v1/domains \
-H "Authorization: Bearer <your JWT>" \
-H "Content-Type: application/json" \
-d '{ "url": "https://yoursite.com" }'