MailPreflight Email QA & Deliverability API

Catch broken merge tags, Gmail 102KB clipping, Outlook CSS bugs, and spam triggers before your agent hits send.

Deterministic pre-send QA for outbound HTML emails: catches Gmail 102KB clipping, Outlook Word-engine & Gmail CSS incompatibilities, unmerged ESP placeholders, phishing/shortener link triggers, and generates clean plain-text MIME fallbacks at the edge.

marketing-ops email-deliverability developer-tools revops

Why Agents Call This API Instead of DIY

Replaces brittle regexes and heavyweight headless browsers with a <15ms deterministic HTML/CSS & deliverability parser covering Outlook Word VML/ghost-table quirks, 6 ESP placeholder syntaxes, phishing host-mismatch checks, and RFC 5322 plain-text conversion.

DimensionDIY Inside Agent Sandbox / PromptMailPreflight Email QA & Deliverability API (mail-preflight)
Onboarding & AuthInstall packages, debug runtime errors, or manage API keysZero signup — instant HTTP 402 (x402 USDC) & remote MCP
Context & Token CostThousands of tokens spent in multi-turn code/parse loopsDeterministic compact JSON response (<1.5K tokens)
Schema ValidationSilent runtime failures on malformed inputsFree ?dry_run=true preflight ($0.00 on 4xx errors)

Tools & Payable Endpoints (2)

audit_email_template — Audit Outbound Email Template

$0.003 USD per email template preflight audit (x402 instant micropayment)

Runs a full pre-send deliverability, merge-tag, link-hygiene, Gmail 102KB clipping, and cross-client CSS compatibility audit (Outlook Windows, Gmail, Apple Mail Dark Mode) on an HTML email.

Why buy vs. DIY: Audits 30+ email-client CSS quirks, 6 ESP merge syntaxes, and phishing/spam heuristics in <10ms for $0.003 without maintaining Can-I-Email rulesets.

extract_plain_text_fallback — Extract Plain-Text MIME Fallback

$0.001 USD per HTML-to-plain-text MIME fallback conversion (x402 instant micropayment)

Converts an HTML email into a clean, RFC 5322-wrapped text/plain MIME companion, preserving CTA links inline as 'Label (https://...)' and stripping invisible &#847; / &zwnj; preheader padding hacks.

Why buy vs. DIY: Strips email-specific &zwnj;/&#847; preheader spacers and formats multi-column/CTA HTML cleanly in <5ms for $0.001 instead of naive strip-tags regexes.

Quickstart: MCP, x402 & Optional Bearer API Key

1. Streamable HTTP MCP Config (com.apikeg/mail-preflight)

{
  "mcpServers": {
    "mail-preflight": {
      "type": "streamable-http",
      "url": "https://mail-preflight.apikeg.com/mcp"
    }
  }
}

Using a Monthly Stripe Plan? Get your per-email ak_live_... key at https://apikeg.com/account ($5 / $20 / $50 monthly tiers) and pass header Authorization: Bearer ak_live_... on REST or MCP requests.

2. Free Schema Dry-Run ($0.00)

curl -X POST "https://mail-preflight.apikeg.com/v1/audit-email-template?dry_run=true" \
  -H "Content-Type: application/json" \
  -d '{"subject":"Welcome to Acme, {{first_name}}!","preheader":"Your workspace is provisioned.","emailCategory":"marketing","html":"<!DOCTYPE html><html><head><meta name=\"color-scheme\" content=\"light dark\"></head><body style=\"background-color:#f9fafb;\"><p>Hi there, <a href=\"https://acme.com/start\">Launch Workspace</a> · <a href=\"https://acme.com/unsubscribe\">Unsubscribe</a></p></body></html>"}'

Common Agent & Automation Workflows

Frequently Asked Questions

Why should an AI agent call MailPreflight Email QA & Deliverability API instead of writing custom code?

Replaces brittle regexes and heavyweight headless browsers with a <15ms deterministic HTML/CSS & deliverability parser covering Outlook Word VML/ghost-table quirks, 6 ESP placeholder syntaxes, phishing host-mismatch checks, and RFC 5322 plain-text conversion.

How do I connect MailPreflight Email QA & Deliverability API to Claude, Cursor, or an MCP client?

Connect directly to the stateless Streamable HTTP MCP endpoint at https://mail-preflight.apikeg.com/mcp (registry ID: com.apikeg/mail-preflight). No API keys or OAuth accounts are required; initialize and tools/list are 100% free.

How much does MailPreflight Email QA & Deliverability API cost per API or MCP call?

Pay per call with zero signup via HTTP 402 (x402 v2 USDC on Base): audit_email_template ($0.003 USD per email template preflight audit (x402 instant micropayment)); extract_plain_text_fallback ($0.001 USD per HTML-to-plain-text MIME fallback conversion (x402 instant micropayment)). Prefer traditional monthly billing? Get a verified-email Bearer API key at https://apikeg.com/account with $5/mo ($6 credit), $20/mo ($28 credit), or $50/mo ($80 credit) per-product plans. Invalid schemas (HTTP 400) and ?dry_run=true always cost $0.00.

Can I validate request payloads for free before paying?

Yes. Pass ?dry_run=true in the URL or send the header X-Dry-Run: true to validate your JSON input against the strict schema at $0.00 cost.