Email‑security grade

Send a domain and get an A to F grade for its SPF, DKIM and DMARC records, with the exact DNS change that fixes each problem.

GET https://api.fare.dev/v1/email-grade

0.5¢per successful call

Failed calls
not billed
MCP tool
grade_email_security
Billed
monthly, by Stripe
Get an API key

Request

Send your key in the X-API-Key header. Pass the domain as a query parameter.

Request parameters
NameRequiredWhat it is
domainYesrequiredThe domain to grade, like example.com. Send internationalised domains in punycode (xn--) form.
selectorNooptionalA DKIM selector to check. Without one, we try the common selectors: google, selector1, selector2, default, k1, s1, s2, dkim, mail, smtp, fm1, fm2, fm3, protonmail, protonmail2, protonmail3, sig1, hs1, hs2, s1024 and s2048.

Try it

Each successful call costs 0.5¢. A call that fails isn't billed.

Grade a domaincurl · 0.5¢
curl "https://api.fare.dev/v1/email-grade?domain=example.com" \
  -H "X-API-Key: $FARE_KEY"
{
  "domain": "example.com",
  "grade": "C",
  "score": 60,
  "spf":   { "status": "pass", "points": 25, "max_points": 30,
             "record": "v=spf1 include:_spf.example.net ~all" },
  "dmarc": { "status": "warn", "points": 15, "max_points": 50,
             "record": "v=DMARC1; p=none; rua=mailto:dmarc@example.com" },
  "dkim":  { "status": "pass", "points": 20, "max_points": 20 },
  "accepts_mail": true,
  "fixes": [
    "`p=none` only monitors. Move to `p=quarantine`, then `p=reject`, once reports look clean."
  ]
}

What you get back

Response fields
FieldWhat it is
gradeA, B, C, D or F.
score0 to 100. SPF is worth 30, DMARC 50 and DKIM 20.
spf, dmarc, dkimEach has a status (pass, warn, fail or unknown), points, max_points, the record we found, and notes.
mxThe domain's mail servers.
accepts_mailtrue if the domain has a mail server that isn't a null MX.
fixesWhat to change, most important first.

How the grade works

Grade and Score
GradeScore
A90 or more
B75 to 89
C60 to 74
D40 to 59
FUnder 40
Check and Points
CheckPoints
SPFUp to 30: -all 30, ~all 25, ?all 10, +all 0. A redirect= is graded on its target's all.
DMARCUp to 50: p=reject 50, p=quarantine 40, p=none 15. Less for pct under 100, sp=none or no rua.
DKIMUp to 20: a key found 20. None found at the common selectors 10, marked unknown; a revoked key there counts the same. A missing or revoked key at the selector you name 0.

Errors

Errors
StatusCodeMessage
400invalid_domaindomain must be a hostname like example.com
400invalid_selectorselector must be letters, digits, hyphens, underscores or dots
502dns_failedDNS lookup failed; try again shortly.
401missing_keySend your API key in the X-API-Key header.
401invalid_keyThat API key is not valid.
402payment_requiredAdd a card at https://fare.dev/app/billing to use this key.
429rate_limitedThis key allows 10 requests per second.

None of these are billed. Branch on the code, not the message: codes never change meaning within /v1.

For agents

The MCP tool grade_email_security takes a domain and an optional selector. It runs this same call on the key your agent connects with, and it's billed the same way.

Add Fare to Claude CodeStreamable HTTPHTTP
claude mcp add --transport http fare https://api.fare.dev/mcp