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

FieldTypeDescription
htmlstringThe email HTML, up to 2 MB. Required unless you send eml.
emlstringA raw RFC 822 message. Adds header checks such as List-Unsubscribe and DMARC.
subjectstringSubject line.
preheaderstringPreview text, if it is not in the HTML.
platformstringOne of auto, eloqua, hubspot, mailchimp, marketo, klaviyo, sfmc, other.
domainsstringComma-separated domains whose links need UTM tags.
probe_linksbooleanTest every link and image. Default true.
require_utmbooleanReport 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

StatusMeaning
401Missing or wrong API key.
403Your plan does not include the API.
422No HTML, or HTML over 2 MB.
429Monthly check limit reached.