| Aspect | Information |
|---|---|
| Route prefix | /dns |
| Auth | API key + userId query param on all endpoints |
| Scope | Domain must be owned by the specified user |
| Method | Endpoint | Description |
|---|---|---|
GET | /dns | List all DNS records for a domain |
POST | /dns | Add one or more DNS records |
PUT | /dns | Update an existing DNS record |
DELETE | /dns | Delete a DNS record |
PUT | /dns/nameservers | Update nameservers for a domain |
| Field | Type | Required | Description |
|---|---|---|---|
host | string | Yes | Record host/name (e.g. @, mail, _dmarc) |
value | string | Yes | Record value |
recordType | string | Yes | A, CNAME, MX, TXT, NS, etc. |
priority | string | No | Used for MX records |
excludedDMARCtags | string[] | No | DMARC TXT records only — tags to omit from the generated DMARC value |
excludedDMARCtags is only valid on TXT records where host is _dmarc or starts with _dmarc.. Passing it on any other record type returns a 400.| Record | Type | Purpose |
|---|---|---|
@ | MX | Routes inbound email to the mail server |
@ | TXT | SPF record — authorizes sending servers |
mail._domainkey | TXT | DKIM public key — signs outbound messages |
_dmarc | TXT | DMARC policy — instructs receivers what to do with failures |
POST /dns?userId= — add a TXT record at @ with your SPF value, e.g. v=spf1 include:sendgrid.net ~all.POST /dns?userId= — add a TXT record at mail._domainkey with the public key value provided by your mail provider.POST /dns?userId= — add a TXT record at _dmarc. Use excludedDMARCtags if you want to omit specific DMARC tags from the generated value.GET /dns?userId=&domain= — confirm all records are present and correct before sending.PUT /dns/nameservers — pass the domain and the new nameservers array.GET /dns?userId=&domain= — find the recordId of the record you want to update.PUT /dns?userId= — pass recordId, domain, and the updated field values.recordId for updates and deletes — recordId is returned when a record is created. Store it or retrieve it from GET /dns before calling PUT or DELETE.excludedDMARCtags on non-DMARC records — this field is only valid on TXT records with host = "_dmarc". Using it on any other record type returns a 400.PUT /dns/nameservers returns immediately but changes take time to propagate. Do not assume records are live immediately after the API call.userId — the domain must be owned by the specified user. A mismatch returns a 403 or 404.