Back to explore

messaging

Spam

Credits: 0.001

Classify

POST /v1/spam/Classify

Check whether an email is likely to be spam based on its attributes

Request

email_bodystring

The raw body of the email including headers etc per RFC 822. Alternatively, use the other parameters to correctly format the message

fromstring

The email address it has been sent from

html_bodystring

the HTML version of the email body

subjectstring

The subject of the email

text_bodystring

the plain text version of the email body

tostring

The email address it is being sent to

Response

detailsarray

The rules that have contributed to this score

is_spamboolean

Is it spam? Returns true if its score is > 5

scorenumber

The score evaluated for this email. A higher number means it is more likely to be spam

Request

Response

{
    "is_spam": false,
    "score": 0.1,
    "details": [
        "NO_RELAYS, Informational: message was not relayed via SMTP, -0",
        "NO_RECEIVED, Informational: message has no Received headers, -0",
        "MISSING_MID, Missing Message-Id: header, 0.1"
    ]
}