Input Parameters
| Field | Type | Required / Default | Description & Constraints |
|---|---|---|---|
html |
string |
Required | HTML email body to convert into a formatted text/plain MIME fallback with inline CTA URLs and stripped preheader padding. (minLength: 1, maxLength: 900000) |
wrapWidth |
integer |
Default: 78 |
Soft line-wrap width in characters (default 78 per RFC 5322; URLs are never split). (min: 40, max: 120) |
REST Example (curl)
curl -X POST "https://mail-preflight.apikeg.com/v1/extract-plain-text-fallback" \
-H "Content-Type: application/json" \
-d '{
"html": "<div>Preview text ‌ ͏‌ ͏</div><h1>Payment Received</h1><p>View your invoice: <a href=\"https://acme.com/inv/42\">Download PDF</a></p>",
"wrapWidth": 78
}'
MCP tools/call Payload
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "extract_plain_text_fallback",
"arguments": {
"html": "<div>Preview text ‌ ͏‌ ͏</div><h1>Payment Received</h1><p>View your invoice: <a href=\"https://acme.com/inv/42\">Download PDF</a></p>",
"wrapWidth": 78
}
}
}