Email Authentication Check API

Audit a domain’s email setup: MX, SPF (with the 10-lookup limit), DKIM keys, DMARC policy, MTA-STS, TLS-RPT and BIMI, with a score and what to fix.

GEThttps://apibox.io.vn/v1/email-auth
Network & Validation▶ Try it online

The email authentication API checks whether a domain is set up to deliver email and to resist spoofing, the requirements Gmail, Yahoo and Outlook now enforce for bulk senders. It reads the MX records, the SPF record (detecting duplicates, +all / ?all, deprecated ptr and counting the DNS lookups through every include against the limit of 10), DKIM keys at your selectors or at about 20 common ones (Google, Microsoft 365, Mailchimp, SendGrid, Resend, Zoho…), with their key size, and the DMARC policy with its reporting addresses.

Optional records are reported too: MTA-STS and TLS-RPT for encrypted delivery and BIMI for a brand logo in the inbox. Every finding is a check with a status (pass, info, warn, fail) and a message in English or Vietnamese (lang=vi) that says what to change; the score from 0 to 100 and the A–F grade give a quick overview.

DKIM selectors are not discoverable in DNS: if your provider uses a custom one, read the s= tag of the DKIM-Signature header of a sent email and pass it as selectors=. Records are read live through DNS-over-HTTPS (cached for 5 minutes).

Parameters

NameInTypeRequiredDefault
domainquerystringyesDomain (or an email address).
selectorsquerystringnoDKIM selectors to check, comma-separated (default: ~20 common ones).
langquerystringnoenLanguage of the messages: en or vi.

Example

curl "https://apibox.io.vn/v1/email-auth?domain=github.com" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response

{
  "domain": "github.com",
  "score": 90,
  "grade": "A",
  "summary": {
    "passed": 5,
    "info": 3,
    "warnings": 2,
    "errors": 0
  },
  "mx": [
    {
      "preference": 1,
      "host": "aspmx.l.google.com"
    }
  ],
  "spf": {
    "record": "v=spf1 ip4:192.30.252.0/22 include:spf.protection.outlook.com … ~all",
    "all": "softfail",
    "dns_lookups": 10,
    "includes": [
      "spf.protection.outlook.com",
      "_netblocks.google.com",
      "…"
    ]
  },
  "dmarc": {
    "record": "v=DMARC1; p=quarantine; …",
    "p": "quarantine"
  },
  "dkim": [
    {
      "selector": "google",
      "key_type": "rsa",
      "key_bits": 2048,
      "revoked": false,
      "testing": false
    },
    {
      "selector": "selector1",
      "key_type": "rsa",
      "key_bits": 1024,
      "revoked": false,
      "testing": false
    }
  ],
  "checks": [
    {
      "id": "spf_lookups",
      "status": "warn",
      "message": "10/10 DNS lookups",
      "value": 10
    },
    {
      "id": "dmarc",
      "status": "pass",
      "message": "DMARC policy \"p=quarantine\""
    },
    {
      "id": "dkim_key",
      "status": "warn",
      "message": "RSA key shorter than 2048 bits at selector1, k1"
    },
    "…"
  ]
}

Use cases

  • Onboarding checks in email-sending and CRM products
  • Fix “sent to spam” problems before a campaign
  • Monitor client domains in agencies and MSPs
  • Verify DNS changes after moving email providers

FAQ

Why does SPF fail with too many lookups?

RFC 7208 allows at most 10 DNS lookups (include, a, mx, ptr, exists, redirect) to evaluate SPF; beyond that receivers return permerror and SPF fails. The API counts them recursively; remove unused includes or flatten them.

Is p=none enough?

It satisfies the minimum requirement of Gmail and Yahoo but does not stop spoofing. Read the reports (rua=) and move to p=quarantine or p=reject.

The DKIM check says nothing was found, but I sign my email.

Your provider probably uses a custom selector. Find the s= value in the DKIM-Signature header of a received email and pass selectors=that-value.

Related APIs

Start with 1,000 free requests every month. Get free API key →