Email authentication

SPF / DMARC / DKIM / BIMI generators API

Build RFC-compliant SPF, DMARC, DKIM, BIMI, and MTA-STS TXT records ready to paste into your DNS provider. Generates validated hostnames and syntax cleanly without hand-editing tags or risking typos that break mail delivery.

POSTapi.middle.network/v1/tools/email-generators
1 unit a callLive lookup

Request body

Send JSON: { "input": { … } } with these fields. Fields not listed are ignored.

  • typestringoptional
    Which record to build.
    One of: spf, dmarc, dkim, bimi, mta-sts · Default "spf"
  • domainstringoptional
    The domain the record is for. Leave out for example.com.
    Up to 253 characters
  • textstringoptional
    What to build it from: for SPF, the senders (include:…, IPs or domains) and an optional policy such as ~all.
    Up to 8,192 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 SPF / DMARC / DKIM / BIMI generators 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-generators \
  -H "Authorization: Bearer $MN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input":{}}'
const res = await fetch("https://api.middle.network/v1/tools/email-generators", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MN_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"input":{}}),
});
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-generators",
    headers={"Authorization": f"Bearer {os.environ['MN_API_KEY']}"},
    json={"input":{}})
result = res.json()
print(result["status"], result["summary"]["plain"])
200 response
{
  "tool": "email-generators",
  "target": null,
  "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: SPF check, DKIM check, DMARC check, BIMI check.

Try it without code

The same test runs free in your browser, no key needed.

Open the SPF / DMARC / DKIM / BIMI generators