For the complete documentation index, see llms.txt. This page is also available as Markdown.

Get message spam score

Get a brief spam report by message ID.

get
Authorizations
Api-TokenstringRequired

Pass the API token in the Api-Token

Path parameters
sandbox_idinteger · int64 · min: 1Required

Unique sandbox ID

Example: 4015
message_idinteger · int64 · min: 1Required

Unique message ID

Example: 427
Responses
200

Returns message spam analysis report.

application/json
get/api/sandboxes/{sandbox_id}/messages/{message_id}/spam_report
curl -X GET https://mailtrap.io/api/sandboxes/{sandbox_id}/messages/{message_id}/spam_report \
  -H 'Authorization: Bearer YOUR_API_KEY'
{
  "report": {
    "ResponseCode": 2,
    "ResponseMessage": "Not spam",
    "ResponseVersion": "1.2",
    "Score": 1.2,
    "Spam": false,
    "Threshold": 5,
    "Details": [
      {
        "Pts": 0,
        "RuleName": "HTML_MESSAGE",
        "Description": "BODY: HTML included in message"
      }
    ]
  }
}

Last updated

Was this helpful?