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

Report spam / not spam

POST/v1/emails/receiving/{id}/spam

Report a received email as spam or not spam: your account's spam filter learns from it.

Requires a full-access live key; test keys get 403 test_key_restricted.

Each account has its own statistics: your reports never change another account's filter. The filter starts scoring once it has learned 20 emails of each kind. Reporting the same email twice is harmless. learned is false when the email has too few words to learn from.

Path parameters

idstring
Received email id.

Body parameters

spambooleanrequired
true: mail like this is spam; false: it is wanted. Limits: missing → 422 missing_required_field

Errors

restricted_api_keyHTTP 403
test_key_restrictedHTTP 403
test-mode keys can send test email and read, not change the account: use a live key
not_foundHTTP 404
Unknown email or past your plan's retention.
service_unavailableHTTP 503
The spam filter could not learn right now; retry.
POST/v1/emails/receiving/{id}/spam
curl -X POST 'https://zapsmtp.xyz/v1/emails/receiving/019a1f2e-7c3b-7d41-9a52-0c4b8e6f1a23/spam' \
  -H "Authorization: Bearer $ZAP_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "spam": true
}'
Set ZAP_API_KEY in your environment.
Response 200 OK
{
  "object": "email",
  "id": "01a17204-bd5b-7691-9fca-52161a26e6d7",
  "spam": true,
  "learned": true
}