{"results":[{"input":"github.com","domain":"github.com","exists":true,"mx":{"present":true,"nullMx":false,"records":[{"priority":0,"host":"github-com.mail.protection.outlook.com"}]},"spf":{"present":true,"record":"v=spf1 ip4:192.30.252.0/22 ip4:172.170.10.240/28 ip4:40.78.162.192/28 ip4:172.170.3.48/28 include:spf.protection.outlook.com include:_netblocks.google.com include:_netblocks2.google.com include:mail.zendesk.com include:_spf.salesforce.com include:servers.mcsv.net include:mktomail.com include:sendgrid.net ip4:62.253.227.114 ip4:166.78.69.169 ip4:166.78.69.170 ip4:166.78.71.131 ~all","issues":[],"allMechanism":"~all","policy":"softfail","lookupCount":10,"lookupCountExact":true,"mechanisms":17},"dmarc":{"present":true,"record":"v=DMARC1; p=quarantine; sp=reject; pct=100; rua=mailto:[email protected]; ruf=mailto:[email protected]; fo=1","issues":[],"policy":"quarantine","subdomainPolicy":"reject","pct":100,"rua":["mailto:[email protected]"],"ruf":["mailto:[email protected]"],"adkim":"r","aspf":"r"},"dkim":[{"selector":"google","present":true,"keyType":"rsa","status":"ok","keyBitsApprox":2048}],"score":100,"grade":"A","issues":[{"code":"mx_single","severity":"info","section":"mx","message":"Only one MX host; no mail-server redundancy."}]},{"input":"example.com","domain":"example.com","exists":true,"mx":{"present":false,"nullMx":true,"records":[]},"spf":{"present":true,"record":"v=spf1 -all","issues":[],"allMechanism":"-all","policy":"fail","lookupCount":0,"lookupCountExact":true,"mechanisms":1},"dmarc":{"present":true,"record":"v=DMARC1;p=reject;sp=reject;adkim=s;aspf=s","issues":["dmarc_no_rua"],"policy":"reject","subdomainPolicy":"reject","pct":100,"rua":[],"ruf":[],"adkim":"s","aspf":"s"},"dkim":[{"selector":"google","present":true,"keyType":"rsa","status":"revoked"}],"score":95,"grade":"A","issues":[{"code":"mx_null","severity":"info","section":"mx","message":"Null MX (RFC 7505): the domain states it does not accept email."},{"code":"dmarc_no_rua","severity":"info","section":"dmarc","message":"No rua= address: you will not receive aggregate DMARC reports."},{"code":"dkim_key_revoked","severity":"warn","section":"dkim","message":"DKIM selector google has an empty p= (revoked key)."}]},{"input":"nxdomain-listclean-test-123.com","domain":"nxdomain-listclean-test-123.com","exists":false,"score":0,"grade":"F","issues":[{"code":"domain_not_found","severity":"error","section":"domain","message":"Domain does not exist (NXDOMAIN)."}]}],"checked":3}
curl --location --request POST 'https://zylalabs.com/api/15885/email+dns+health+api/43811/check+email+dns+health' --header 'Authorization: Bearer YOUR_API_KEY' --header 'Content-Type: application/json'
--data-raw '{"domains":["github.com","example.com","nxdomain-listclean-test-123.com"],"dkimSelectors":["google"]}'
After signing up, every developer is assigned a personal API access key, a unique combination of letters and digits provided to access to our API endpoint. To authenticate with the Email DNS Health API simply include your bearer token in the Authorization header.
| Header | Description |
|---|---|
Authorization
|
Required
Should be Bearer access_key. See "Your API Access Key" above when you are subscribed.
|
No long-term commitment. Upgrade, downgrade, or cancel anytime. Free Trial includes up to 50 requests.
Audit email DNS for up to 10 domains: MX, SPF (lookup count, +all), DMARC policy, optional DKIM selectors, with a 0-100 score and an issues list.
For up to 10 domains per request it reads public DNS and reports MX records, SPF (policy, DNS lookup count, +all and ptr flags), DMARC (p=, sp=, pct, report addresses) and optionally DKIM selectors you name, plus a 0-100 score, A-F grade and an issues list.
No. It only reads public DNS records via DNS-over-HTTPS. It never connects to mail servers or sends mail.
Large SPF include chains can exceed the per-request DNS query budget; then lookupCount is a lower bound. Send fewer domains per call to get exact counts.
No. Only the exact _dmarc.<domain> record is checked for each domain you submit.
DKIM selectors cannot be discovered from DNS. Pass the selectors you use (for example google or selector1), up to 5 per request, and the API reports whether each exists, is revoked, and the estimated RSA key size.
Up to 10 domains and 5 DKIM selectors per request. Domains x (3 + selectors) must fit the per-request query budget of about 44 lookups.
The endpoint returns a JSON object with a `results` array. Each entry corresponds to a submitted domain and includes its input, normalized domain, DNS findings, score, grade, and issues.
Each domain has its own object in `results`, so you can evaluate domains independently. Use the `input` field to match a result to the submitted value and `domain` to see the domain that was checked.
`mx.present` indicates whether MX records were found, while `mx.nullMx` identifies an explicit null MX record. When records are present, `mx.records` lists each mail exchanger’s priority and host.
`spf.lookupCount` reports the SPF DNS lookup count, and `lookupCountExact` indicates whether it is exact. `mechanisms` counts SPF mechanisms. `allMechanism` and `policy` describe the record’s final `all` mechanism, such as `~all` and `softfail`.
The `dmarc` object reports whether a record is present, its policy (`policy`) and subdomain policy (`subdomainPolicy`), the percentage applied (`pct`), and reporting addresses in `rua` and `ruf` arrays.
Use the 0–100 score and A–F grade for a quick summary, then review `issues` for specific findings that may need attention. An empty issues list means the API reported no issues for that section.
It indicates the submitted domain was not found in DNS. Treat its DNS checks as unavailable rather than assuming missing MX, SPF, or DMARC records are configuration errors.
Review MX for mail routing, SPF for authorized sending sources and its ending policy, and DMARC for enforcement and reporting settings. If you provide DKIM selectors, use their results alongside these checks for a broader assessment.
To obtain your API key, first sign in to your account and navigate to the API you want to use. From the API's Pricing section, choose a plan and complete the subscription process. Once subscribed, return to the API page and you will see your API Access Key displayed at the top of the documentation page. You can use this key to authenticate your requests.
You can’t switch APIs during the free trial. If you subscribe to a different API, your trial will end and the new subscription will start as a paid plan.
The free trial lasts for 7 days and allows you to make up to 50 API requests.
No, the free trial is available only once, so we recommend using it on the API that interests you the most. Most of our APIs offer a free trial, but some may not include this option.
Yes. If the API offers a free trial, you will see a "Free 7-Day Trial" option in its Pricing section. The trial lasts for 7 days and allows up to 50 API requests, enabling you to evaluate the API before subscribing to a paid plan.
Zyla API Hub is like a big store for APIs, where you can find thousands of them all in one place. We also offer dedicated support and real-time monitoring of all APIs. Once you sign up, you can pick and choose which APIs you want to use. Just remember, each API needs its own subscription. But if you subscribe to multiple ones, you'll use the same key for all of them, making things easier for you.
You can monitor your API usage through the response headers included with every request:
x-zyla-api-calls-monthly-used: Shows the total number of API requests you have used during the current billing period.
x-zyla-api-calls-monthly-remaining: Shows the number of API requests you have remaining for the current billing period.
Yes, you can cancel your subscription at any time. Simply go to the Pricing section of the API you're subscribed to and click the "Unsubscribe" button.
Please note that upgrades, downgrades, and cancellations take effect immediately. Once your subscription is canceled, access to the service will end immediately, regardless of any remaining API calls in your quota.
Please have a look at our Refund Policy: https://zylalabs.com/terms#refund