audit_email_template — Audit Outbound Email Template
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.
Pricing: $0.003 USD per email template preflight audit (x402 instant micropayment) · REST: POST https://mail-preflight.apikeg.com/v1/audit-email-template · MCP: https://mail-preflight.apikeg.com/mcp
Input Parameters
| Field | Type | Required / Default | Description & Constraints |
html |
string |
Required |
Complete outbound HTML email payload to inspect for Gmail 102KB clipping, Outlook/Gmail/Dark Mode CSS support, link hygiene, and spam triggers. (minLength: 1, maxLength: 900000) |
subject |
string |
Optional |
Optional Subject header evaluated for unmerged placeholders, fake Re:/Fwd: prefixes, ALL-CAPS shouting, and punctuation triggers. (maxLength: 998) |
preheader |
string |
Optional |
Optional preview/preheader snippet checked for unmerged merge tags and spam triggers. (maxLength: 1000) |
plainText |
string |
Optional |
Optional text/plain MIME companion body checked for unmerged placeholders and unsubscribe compliance. (maxLength: 500000) |
emailCategory |
string |
Default: "transactional" |
Outbound email class controlling compliance rules (marketing and cold_outreach require an unsubscribe mechanism). (enum: transactional | marketing | cold_outreach) |
REST Example (curl)
curl -X POST "https://mail-preflight.apikeg.com/v1/audit-email-template" \
-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>"
}'
MCP tools/call Payload
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "audit_email_template",
"arguments": {
"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>"
}
}
}