API
Check an email from your own scripts or build pipeline. The API is part of the Agency plan. Each call counts as one check.
Authenticate
Create a key on your dashboard and send it in the Authorization header.
Check an email
curl -X POST https://cleartosend.chrishenrytech.com/api/v1/check \
-H "Authorization: Bearer API_KEY" \
-H "Content-Type: application/json" \
-d '{
"html": "EMAIL_HTML",
"subject": "SUBJECT_LINE",
"platform": "hubspot",
"domains": "example.com",
"probe_links": true,
"require_utm": true
}'
Request fields
| Field | Type | Description |
|---|---|---|
html | string | The email HTML, up to 2 MB. Required unless you send eml. |
eml | string | A raw RFC 822 message. Adds header checks such as List-Unsubscribe and DMARC. |
subject | string | Subject line. |
preheader | string | Preview text, if it is not in the HTML. |
platform | string | One of auto, eloqua, hubspot, mailchimp, marketo, klaviyo, sfmc, other. |
domains | string | Comma-separated domains whose links need UTM tags. |
probe_links | boolean | Test every link and image. Default true. |
require_utm | boolean | Report links to your domains without UTM tags. Default true. |
Response
{
"report_url": "https://cleartosend.chrishenrytech.com/r/…",
"verdict": "hold",
"verdict_label": "Hold: fix before sending",
"score": 64,
"counts": { "errors": 2, "warnings": 3, "info": 1 },
"platforms_detected": ["hubspot"],
"urls_tested": 14,
"html_bytes": 48211,
"findings": [
{
"group": "Personalization",
"code": "token_no_default",
"severity": "warning",
"title": "Token has no fallback value",
"detail": "Contacts with an empty field will see a blank.",
"snippet": "{{ contact.firstname }}"
}
]
}
verdict is clear (no problems), review (warnings only) or hold (one or more errors). Use it to stop a pipeline before a campaign is scheduled.
Errors
| Status | Meaning |
|---|---|
| 401 | Missing or wrong API key. |
| 403 | Your plan does not include the API. |
| 422 | No HTML, or HTML over 2 MB. |
| 429 | Monthly check limit reached. |