Email delivery and reputation
Email header analyser API
Reconstruct an email’s hop-by-hop delivery timeline, per-hop relay delays, and server-reported SPF, DKIM, DMARC, and ARC verdicts from raw headers. We also decode Microsoft Defender (SCL/BCL) and Gmail spam signals, map relay providers, and explain every header field in plain English.
POST
api.middle.network/v1/tools/email-headers2 units a callLive lookup
Request body
Send JSON: { "input": { … } } with these fields. Fields not listed are ignored.
textstringrequiredThe full headers of one email, as pasted from “Show original”.Up to 262,144 characters
Response
The same result shape every tool uses. status is the worst finding, summary and each finding come in plain and tech, and data holds the raw Email header analyser detail.
200The test ran. RateLimit headers show what’s left today.400The input broke the schema, or the target is not valid (with suggestions when it looks like a typo).401No API key, or the key is not valid or was revoked.403The tool sends traffic at the target and isn’t open to API keys yet (activeTool), or the target’s owner has asked not to be tested (optedOut).429Too many checks: per minute, per day, or at the same target.
Request
curl -X POST https://api.middle.network/v1/tools/email-headers \
-H "Authorization: Bearer $MN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input":{"text":"Received: from mail.example.com (mail.example.com [192.0.2.10])\nAuthentication-Results: mx.example.net; spf=pass smtp.mailfrom=example.com; dkim=pass header.d=example.com; dmarc=pass\nFrom: Alice <alice@example.com>\nTo: bob@example.net\nSubject: Hello\nDate: Mon, 1 Jan 2026 09:00:00 +0000"}}'const res = await fetch("https://api.middle.network/v1/tools/email-headers", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.MN_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({"input":{"text":"Received: from mail.example.com (mail.example.com [192.0.2.10])\nAuthentication-Results: mx.example.net; spf=pass smtp.mailfrom=example.com; dkim=pass header.d=example.com; dmarc=pass\nFrom: Alice <alice@example.com>\nTo: bob@example.net\nSubject: Hello\nDate: Mon, 1 Jan 2026 09:00:00 +0000"}}),
});
const result = await res.json();
console.log(result.status, result.summary.plain);import os, requests
res = requests.post("https://api.middle.network/v1/tools/email-headers",
headers={"Authorization": f"Bearer {os.environ['MN_API_KEY']}"},
json={"input":{"text":"Received: from mail.example.com (mail.example.com [192.0.2.10])\nAuthentication-Results: mx.example.net; spf=pass smtp.mailfrom=example.com; dkim=pass header.d=example.com; dmarc=pass\nFrom: Alice <alice@example.com>\nTo: bob@example.net\nSubject: Hello\nDate: Mon, 1 Jan 2026 09:00:00 +0000"}})
result = res.json()
print(result["status"], result["summary"]["plain"])200 response
{
"tool": "email-headers",
"target": "Received: from mail.example.com (mail.example.com [192.0.2.10])\nAuthentication-Results: mx.example.net; spf=pass smtp.mailfrom=example.com; dkim=pass header.d=example.com; dmarc=pass\nFrom: Alice <alice@example.com>\nTo: bob@example.net\nSubject: Hello\nDate: Mon, 1 Jan 2026 09:00:00 +0000",
"status": "pass",
"summary": {
"tech": "…",
"plain": "…"
},
"findings": [
{
"level": "pass",
"tech": "…",
"plain": "…"
}
],
"data": {},
"ms": 420,
"at": "2026-01-01T00:00:00.000Z"
}Put your key in MN_API_KEY. No key yet? Here’s how to get one. More in this group: MX lookup, Blacklist check, SMTP test, Bulk sender compliance.
Try it without code
The same test runs free in your browser, no key needed.