What changes
Usually three addresses and one key: the token URL on your server, the script tag on your page, the webhook URL in the dashboard, and the Cnamio credentials. If your current code depends on another service's global object, event names or signature header, ask for compatibility mode when your application is created and those names keep working. Write to contato@cnamio.com.
1. Credentials
Sign up and you get a test application and a live one. Each has an applicationId (app_…) and a secret (cnm_sk_…, shown once). Keep them where your current credentials live, on the server only.
2. Session token on your server
- POST https://<current service>/token { applicationId, secret }
+ POST https://api.cnamio.com/token { applicationId, secret }
# → 200 { "auth_token": "…" } valid for 60 minutes
Optional domain, userId and dnsRecords bind the session to those values.
3. Connect window in the browser
<script src="https://connect.cnamio.com/sdk/v1.js"></script>
cnamio.connectDomain({ applicationId, token, dnsRecords, prefilledDomain, userId, locale: 'pt' });
dnsRecords takes type, host, value, ttl, priority and optional, with the placeholders {DOMAIN}, {SUBDOMAIN}, {SLD} and {TLD}. Types: A, AAAA, CNAME, TXT, MX and CAA, up to 20 per connection. Details in the docs.
4. Webhooks
- Save your webhook URL in the dashboard. Events:
domain.added,domain.propagation.timeout, and, with monitoring,domain.records_missinganddomain.records_restored. - Signature:
Cnamio-Signature: sha256=HMAC-SHA256 of"{timestamp}.{raw body}", withCnamio-Timestamp. Reject timestamps older than 5 minutes. - The dashboard's "Send test event" button sends a signed
webhook.testso you can check your code before switching.
Checklist
- Cnamio
applicationIdand secret in your server environment - Token request pointed at
https://api.cnamio.com/token - Script tag switched to
https://connect.cnamio.com/sdk/v1.js - A test domain connected end to end, guided and automatic
- Webhook URL saved in the dashboard and signature verified with a real event
- Old credentials switched off after a week without traffic
Not available yet
Cnamio connects domains and monitors them. It does not issue TLS certificates, host sites or sell domains. Configuration options not listed in the docs are ignored without an error.