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 →