Check an email before sending
Reads an email for mistakes a send can't take back: links and images on a local address, placeholders nobody filled in, links that go nowhere, images without alt text, and HTML over the size Gmail clips at. Nothing is sent or stored, and no link is fetched, so a link that's simply broken won't be found. passed is false when any finding is an error. Anything else is worth a look, but the email would still work.
bearerAuthAuthorizationBearer <token>API key sent as Authorization: Bearer <key>. Looked up by SHA-256
hash (email_core::sha256_hex) against api_keys.hash; revoked
keys and keys belonging to a suspended tenant are rejected. See the
top-level Authentication section for permission levels.
application/json- body
subject?stringhtml_body?stringtext_body?stringThe findings. An email with problems is still a 200.
application/json- response
passed*booleanFalse when any finding is an error.
errors*integerwarnings*integerfindings*array<>curl -X POST 'https://api.emitd.com/v1/email/check' \ -H 'Content-Type: application/json' \ -d '{ "subject": "Your receipt", "html_body": "<a href=\"http://localhost:3000/orders/1\">View order</a>"}'{ "passed": false, "errors": 1, "warnings": 0, "findings": [ { "code": "local_link", "severity": "error", "message": "This link points at a local or private address, so it won't open for recipients.", "detail": "http://localhost:3000/orders/1" } ]}