Runs examples for real against your account. Test keys only; kept in this tab, never stored on our side. Get a key
ZapSMTP / Docs / Emails

Spam-check a draft

POST/v1/emails/spam-check

Score a draft for spam before sending (nothing is sent or stored).

Requires a full-access or sending-access key.

Body: from missing or both html and text empty → 422 missing_required_field "from and html or text are required". Only these six fields are accepted (others → 400).

Body parameters

fromstringrequired
From address; when its domain is verified by the account the draft is DKIM-signed with the real key.
tostring | string[]
Recipient(s); the first is used as envelope recipient. Limits: 422 invalid_parameter "to must be a string or an array of strings" Default recipient@example.com.
subjectstring
htmlstring
At least one of html and text is required.
textstring
streamstring
Selects the shared pool used to pick the egress IP when the account has no dedicated IP. Default transactional.

Errors

missing_required_fieldHTTP 422
invalid_parameterHTTP 422
rate_limit_exceededHTTP 429
spam checks are limited to 30 per minute
service_unavailableHTTP 503
spam checks are busy, try again shortly
scanner_unavailableHTTP 503
the spam scanners are temporarily unavailable, try again
POST/v1/emails/spam-check
curl -X POST 'https://zapsmtp.xyz/v1/emails/spam-check' \
  -H "Authorization: Bearer $ZAP_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "from": "Acme <hello@acme.com>",
  "subject": "Your receipt",
  "html": "<p>Thanks for your order.</p>"
}'
Set ZAP_API_KEY in your environment.
Response 200 OK
{
  "object": "spam_check",
  "score": 1.3,
  "threshold": 5,
  "verdict": "good",
  "engines": [
    {
      "engine": "spamassassin",
      "score": 1.3,
      "threshold": 5,
      "verdict": "good",
      "rules": [
        {
          "name": "HTML_MESSAGE",
          "score": 0.001,
          "description": "HTML included in message"
        },
        {
          "name": "MIME_HTML_ONLY",
          "score": 1.1,
          "description": "Message only has text/html MIME parts"
        }
      ]
    },
    {
      "engine": "rspamd",
      "score": 0.8,
      "threshold": 6,
      "verdict": "good",
      "rules": [
        {
          "name": "MIME_HTML_ONLY",
          "score": 0.2,
          "description": "Messages that have only HTML part"
        }
      ]
    }
  ],
  "dkim_signed": true,
  "sending_ip": "203.0.113.25",
  "issues": [],
  "note": "Scored as a receiving server sees it: DKIM-signed with your key, sent from your egress IP, checked against live DNS blocklists. SpamAssassin is the headline score (≥ 5 = spam); rspamd is shown alongside."
}