Free DNS check API for email
One GET request returns whether a domain’s email records are in order, what to fix, and the exact values to publish. JSON, CORS enabled, no sign-up.
- Free, commercial use too
- No key, CORS enabled
- 30 checks per hour per IP
$ curl "https://app.mailsenpai.com/tools/dns-check?domain=example.com"
{
"domain": "example.com",
"status": "checked",
"summary": "3 things to fix",
"checks": {
"spf": { "result": "fix", "label": "Needs fixing", "note": "..." },
"dmarc": { "result": "ok", "label": "OK", "note": "..." },
"dkim": { ... },
"mx": { ... }
},
"tips": [ "..." ],
"records": { "spf": ["v=spf1 -all"], "mx": [], ... },
"cached": false
}Parameters and examples
| Name | Required | Description |
|---|---|---|
domain | Yes | The domain to check, e.g. example.com. A URL or an email address also works: the domain is extracted. |
lang | No | Language of labels, notes and tips: en (default) or it. |
selector | No | A DKIM selector to try first (the name before ._domainkey), useful when the sending service uses an uncommon one. Without it, the most common selectors are tried. |
curl "https://app.mailsenpai.com/tools/dns-check?domain=example.com"
const res = await fetch("https://app.mailsenpai.com/tools/dns-check?domain=" + encodeURIComponent(domain));
const report = await res.json();
console.log(report.summary, report.checks.dmarc.result);What you get back
Real response for example.com, shortened.
{
"domain": "example.com",
"status": "checked",
"lang": "en",
"summary": "3 things to fix",
"to_fix": 3,
"to_check": 0,
"checks": {
"spf": { "result": "fix", "label": "Needs fixing", "note": "There is an SPF record, but it says no server may send email on behalf of example.com. Record: v=spf1 -all." },
"dmarc": { "result": "ok", "label": "OK", "note": "It exists, with p=reject: email using your domain without permission is rejected. ..." },
"dkim": { ... },
"mx": { ... }
},
"tips": [
"If you send email from example.com, replace the SPF record v=spf1 -all with one that lists the services you send from, ...",
"..."
],
"records": {
"spf": ["v=spf1 -all"],
"dmarc": ["v=DMARC1;p=reject;sp=reject;adkim=s;aspf=s"],
"mx": [],
"dkim_selectors": []
},
"checked_at": "2026-10-08T11:36:47Z",
"cached": false,
"source": "MailSenpai"
}| Field | Values |
|---|---|
status | checked (records read), public_mailbox (gmail.com and similar: records belong to the provider), not_found (domain not registered), invalid, dns_unreachable (try again later). |
checks.*.result | ok, fix (present but wrong), missing, check (DKIM not found on common selectors: pass selector). |
tips | Two to four actions in order of priority, with the values to publish. |
records | The raw SPF and DMARC records, MX hosts with priority, DKIM selectors found. |
cached | true when the same check ran in the last 15 minutes. |
Simple rules, no surprises
30 checks per hour
From the same IP address. Answers served from the 15-minute cache don’t count.
Clear errors
Over the limit you get HTTP 429; a missing domain returns 422. Errors share one shape: {"code": "mspck_error", "message": "...", "data": {"status": 429}}.
Free, commercial use too
A link to the MailSenpai DNS checker where you show the results is appreciated, not required.
Public data only
The API only reads public DNS records: no account and no personal data needed.
Use it from Claude, ChatGPT or Cursor
The same check is the check_domain_dns tool of the MailSenpai MCP server, for Claude, ChatGPT, Cursor and other MCP clients. How to connect it.
https://mcp.mailsenpai.com/mcp
tool: check_domain_dns
input: { "domain": "example.com" }Frequently asked questions
Do I need an API key?
No. Call the endpoint directly from your server or the browser: CORS is enabled.
What does it check?
SPF (a single record, its ending, DNS lookups under the limit of 10, includes that no longer exist), DKIM (key present and length), DMARC (policy, reports address, inherited from the parent domain) and MX (which servers and spam filters receive the mail).
Can I use it in a commercial product?
Yes, within the limit of 30 checks per hour per IP. A link to the MailSenpai DNS checker where you show the results is appreciated, not required.
Is there an embeddable version?
Yes: the free DNS check widget, two lines of code with no key. See the DNS check widget page.
Prefer a page? Check a domain
Check a domain in your browser and get the full report with the fixes by email. If your website or app still sends from the hosting server, SMTP Senpai signs your emails with DKIM on your own domain, with servers and data in the EU.