Developer Tools

Email Preflight API API

The Email Preflight API returns pre-send QA for HTML email as clean JSON.

7 actionsLive JSON1,000 free creditsMCP-ready
Get a free keyOpen in playground

🤖 Using an AI assistant? Copy this link into ChatGPT / Claude / Cursor — it reads every endpoint and parameter instantly and tells you if this API fits your use case.

The primary audit_html endpoint returns HTML validity and warnings, message size with Gmail-clip risk and accessibility issues such as missing alt text — everything you would check before hitting send. You can also test CSS support across clients, compute a spam score, check links and images, verify DNS auth and render a basic preview. It is built for ESPs, marketing tools and QA pipelines that need to catch broken email before it ships. One ReefAPI key, one shared credit pool, the standard envelope.

Live example

Real request and response JSON

Captured from the indexed primary action, audit_html, on .

Captured request
{
  "method": "POST",
  "url": "https://api.reefapi.com/email-preflight/v1/audit_html",
  "headers": {
    "x-api-key": "$REEF_KEY",
    "content-type": "application/json"
  },
  "body": {
    "html": "<html><body><img src='https://x.test/a.png'><a href='https://x.test'>hi</a></body></html>"
  }
}
Captured response
{
  "ok": true,
  "meta": {
    "api": "email-preflight",
    "endpoint": "audit_html",
    "mode": "live",
    "latency_ms": 3.4,
    "record_count": 5,
    "bytes": 0,
    "cache_hit": false,
    "proxy_tier_note": "none"
  },
  "data": {
    "html_validity": {
      "parse_ok": true,
      "warnings": []
    },
    "size": {
      "bytes": 89,
      "gmail_clip_risk": false,
      "limit_bytes": 102000
    },
    "accessibility": {
      "images_total": 1,
      "missing_alt": 1,
      "missing_alt_srcs": [
        "https://x.test/a.png"
      ],
      "issues": [
        "1 image(s) without alt text",
        "no lang attribute on the document (screen-reader language hint)"
      ]
    },
    "structure": {
      "has_doctype": false,
      "has_table_layout": false,
      "uses_div_layout": false,
      "heading_count": 0,
      "script_tags": 0,
      "link_count": 1,
      "image_count": 1
    },
    "mobile_width_risks": [
      "[redacted-phone]"
    ],
    "dark_mode": {
      "has_meta_color_scheme": false,
      "hints": [
        "no <meta name=color-scheme> — clients may auto-invert your colors"
      ]
    },
    "tracking_pixels": [],
    "external_assets": [],
    "unsubscribe": {
      "list_unsubscribe_header_present": false,
      "has_unsubscribe_link": false,
      "has_unsubscribe_text": false
    },
    "text_part": {
      "present": false,
      "recommended": true
    },
    "recommendations": [
      {
        "severity": "error",
        "code": "MISSING_ALT",
        "message": "1 image(s) lack alt text — add descriptive alt for accessibility + when images are blocked."
      },
      {
        "severity": "error",
        "code": "NO_UNSUB",
        "message": "No unsubscribe link/text found — required by CAN-SPAM/CASL and critical for deliverability."
      },
      {
        "severity": "warning",
        "code": "NO_DOCTYPE",
        "message": "No <!DOCTYPE> — declare one (XHTML 1.0 Transitional is the email-safe default) for predictable rendering."
      }
    ],
    "score": {
      "value": 46,
      "grade": "F"
    }
  }
}
Actions

What the Email Preflight API API does

ActionDescriptionConcrete use caseKey params
audit_htmlFull pre-send structure + accessibility + deliverability lint of an HTML email: missing alt text, broken structure, mobile-width risks, dark-mode hints, tracking pixels, external assets, List-Unsubscribe check, Gmail-clip size budget, and prioritized recommendations. Pure local compute (no network).Ops teams call audit_html to get full pre-send structure + accessibility + deliverability lint of an HTML email.html, text_part, base_url, subject, check_links
css_supportEmail-client CSS/HTML compatibility map for the template (Can-I-Email data, MIT): which CSS features used in the HTML break or degrade in Outlook/Gmail/Apple Mail/Yahoo and friends. Pure local compute (offline snapshot).Developer tools call css_support to get email-client CSS/HTML compatibility map for the template (Can-I-Email data, MIT).html
spam_scoreDeterministic spam-SIGNAL score for the email content (caps ratio, image-to-text ratio, spam phrases, missing unsubscribe, raw-IP links…). HONEST: a content signal score, NOT an inbox-placement prediction; SpamAssassin/Rspamd sidecar = the calibrated upgrade (see docs). Pure local compute.Validation workflows call spam_score to get deterministic spam-SIGNAL score for the email content (caps ratio, image-to-text ratio, spam….html, subject, text_part
check_linksResolve every link in the email through url-resolver (SSRF-guarded): final URL, redirect chain, status, final domain. Bot-403/429 = `unverifiable` (honest — not marked broken). Inner-calls url-resolver per link.Data-quality teams call check_links to resolve every link in the email through url-resolver (SSRF-guarded).html, base_url
check_imagesAudit every <img> in the email: alt text presence, dimensions declared, src scheme/format, http-vs-https, and (best-effort) reachability via url-resolver. Pure-compute by default; reachability adds sub-calls.Ops teams call check_images to get audit every <img> in the email.html, base_url, check_reachable
dns_authSender-domain email-authentication summary (SPF/DKIM/DMARC/MX + deliverability grade) via an inner-call to the email-health engine — REUSE, not re-implemented here (email-health owns DNS auth; this is a thin preflight wrapper).Developer tools call dns_auth to get sender-domain email-authentication summary (SPF/DKIM/DMARC/MX + deliverability grade) via an….domain, dkim_selector, include_blacklist
preview_basicBasic visual preview: render the HTML to a PNG via web-capture's browser sandbox. HONEST: a browser render, NOT a real email-client render (no Outlook/Word engine). Degrades gracefully if web-capture is not deployed.Validation workflows call preview_basic to get basic visual preview.html, width
Code samples

Call audit_html from your stack

curl -X POST https://api.reefapi.com/email-preflight/v1/audit_html \
  -H "x-api-key: $REEF_KEY" \
  -H "content-type: application/json" \
  -d '{"html":"<html><body><img src='https://x.test/a.png'><a href='https://x.test'>hi</a></body></html>"}'
MCP one-liner
Ask your MCP-connected assistant: call reefapi.email-preflight.audit_html with {"html":"<html><body><img src='https://x.test/a.png'><a href='https://x.test'>hi</a></body></html>"}.
Use cases

Who uses this API and why

  • ESPs and marketing tools call audit_html to catch broken markup and clipping risk before a send.
  • QA pipelines use spam_score and check_links to flag deliverability and broken-link problems.
  • Accessibility checks use audit_html to ensure images have alt text and the email is readable.
FAQ

Questions developers ask before integrating

What is the Email Preflight API API?

Email Preflight API API is a ReefAPI endpoint group for email preflight api It returns live JSON through POST requests under /email-preflight/v1.

Is the Email Preflight API API free to try?

Yes. ReefAPI starts with 1,000 free credits, no card required. Email Preflight API calls use the same shared credit balance as every other ReefAPI engine.

Do I need a Email Preflight API login or account?

No login to Email Preflight API is needed for the API response. You call ReefAPI with your x-api-key header, and the playground can run live examples before you create a production key.

How fresh is the Email Preflight API data?

The page example is captured from a live audit_html call, and production requests fetch live data through ReefAPI rather than a static sample.

How many credits does the Email Preflight API API use?

Email Preflight API actions currently cost 1-3 credits per successful call. Failed or blocked calls are free, and all APIs draw from one credit pool.

Can I call Email Preflight API from an AI assistant or MCP client?

Yes. Connect ReefAPI once through MCP and your assistant can call email-preflight actions with the same key, credit pool and JSON envelope used by normal REST requests.

Is the Email Preflight API API a Email Preflight API scraper?

It is the managed alternative to a DIY Email Preflight API scraper. Instead of building and maintaining your own scraper — proxies, headless browsers, captcha and constant breakage — you call one ReefAPI endpoint and get the same email preflight api back as clean JSON.

Why does my Email Preflight API scraper keep getting blocked?

Most Email Preflight API scrapers break on anti-bot defenses, rate limits and IP bans that need rotating residential proxies and browser fingerprinting to clear. ReefAPI handles all of that for you — no proxies, no captchas, no maintenance — and returns live JSON. Blocked or failed calls are free.

docs / email-preflight

Email Preflight API

Email Preflight API

base /email-preflight/v17 endpoints
post/email-preflight/v1/audit_html2 credits

Full pre-send structure + accessibility + deliverability lint of an HTML email: missing alt text, broken structure, mobile-width risks, dark-mode hints, tracking pixels, external assets, List-Unsubscribe check, Gmail-clip size budget, and prioritized recommendations. Pure local compute (no network).

ParameterAllowed / rangeDescription
htmlrequiredThe full HTML of the email you are about to send (paste the source). Parsed read-only in a no-network, no-script sandbox.
text_partoptionalOptional plain-text alternative of the email. If omitted, the audit flags the missing multipart/alternative text part.
base_urloptionalOptional base URL: relative links/images in the HTML are resolved against it before checking.
subjectoptionalOptional subject line — included in the spam-signal analysis.
check_links = falseoptionalIf true, audit_html ALSO resolves every link via url-resolver (adds latency + a sub-call per link). Default false = static lint only.
Try in playground →
post/email-preflight/v1/css_support1 credit

Email-client CSS/HTML compatibility map for the template (Can-I-Email data, MIT): which CSS features used in the HTML break or degrade in Outlook/Gmail/Apple Mail/Yahoo and friends. Pure local compute (offline snapshot).

ParameterAllowed / rangeDescription
htmlrequiredThe full HTML of the email you are about to send (paste the source). Parsed read-only in a no-network, no-script sandbox.
Try in playground →
post/email-preflight/v1/spam_score1 credit

Deterministic spam-SIGNAL score for the email content (caps ratio, image-to-text ratio, spam phrases, missing unsubscribe, raw-IP links…). HONEST: a content signal score, NOT an inbox-placement prediction; SpamAssassin/Rspamd sidecar = the calibrated upgrade (see docs). Pure local compute.

ParameterAllowed / rangeDescription
htmlrequiredThe full HTML of the email you are about to send (paste the source). Parsed read-only in a no-network, no-script sandbox.
subjectoptionalOptional subject line — included in the spam-signal analysis.
text_partoptionalOptional plain-text alternative of the email. If omitted, the audit flags the missing multipart/alternative text part.
Try in playground →
post/email-preflight/v1/check_images1 credit

Audit every <img> in the email: alt text presence, dimensions declared, src scheme/format, http-vs-https, and (best-effort) reachability via url-resolver. Pure-compute by default; reachability adds sub-calls.

ParameterAllowed / rangeDescription
htmlrequiredThe full HTML of the email you are about to send (paste the source). Parsed read-only in a no-network, no-script sandbox.
base_urloptionalOptional base URL: relative links/images in the HTML are resolved against it before checking.
check_reachable = falseoptionalIf true, HEAD/GET each image via url-resolver to confirm it loads (adds latency + sub-calls).
Try in playground →
post/email-preflight/v1/dns_auth1 credit

Sender-domain email-authentication summary (SPF/DKIM/DMARC/MX + deliverability grade) via an inner-call to the email-health engine — REUSE, not re-implemented here (email-health owns DNS auth; this is a thin preflight wrapper).

ParameterAllowed / rangeDescription
domainrequiredThe sending domain (the From: address domain). Its email authentication (SPF/DKIM/DMARC/MX) is summarized via email-health.
dkim_selectoroptionalOptional DKIM selector to look up (e.g. 'google', 's1'). If omitted, email-health autoscans common selectors.
include_blacklist = falseoptionalAlso run the slower DNSBL reputation pass (email-health blacklist). Default false = auth-only (SPF/DKIM/DMARC/MX), the fast pre-send check.
Try in playground →
post/email-preflight/v1/preview_basic3 credits

Basic visual preview: render the HTML to a PNG via web-capture's browser sandbox. HONEST: a browser render, NOT a real email-client render (no Outlook/Word engine). Degrades gracefully if web-capture is not deployed.

ParameterAllowed / rangeDescription
htmlrequiredThe full HTML of the email you are about to send (paste the source). Parsed read-only in a no-network, no-script sandbox.
width = 600optional320–1200Viewport width in px (typical email width = 600).
Try in playground →