Skip to content
Documentation menu

API reference

Checks

HTML, link and spam analysis of a message.

Email-client support for the HTML and CSS

GET/v1/messages/{id}/html-check

Compares the HTML against the Can I email data set, per client.

Path parameters

  • idstringrequired
    Message ID.

Returns

  • Warningsarray of objects
    Child attributes
    • Slugstring
    • Titlestring
    • Descriptionstring
    • URLstring
    • Categorystring
    • Tagsarray of strings
    • Resultsarray of objects
      Child attributes
      • Namestring
      • Platformstring
      • Familystring
      • Versionstring
      • Supportstring
        One of yes, no, partial.
    • Scoreobject
      Child attributes
      • Foundinteger
      • Supportedinteger
      • Partialinteger
      • Unsupportedinteger
  • Platformsobject
  • Totalobject
    Child attributes
    • Testsinteger
    • Nodesinteger
    • Supportednumber
    • Partialnumber
    • Unsupportednumber

Errors

401Missing or invalid API key.
404No such object in this workspace.
429Too many requests. Wait `Retry-After` seconds.
curl / JavaScript / Python
curl "https://app.mailbench.dev/v1/messages/msg_htumcicppd26jek6/html-check" \
  -H "Authorization: Bearer $API_KEY"
const res = await fetch("https://app.mailbench.dev/v1/messages/msg_htumcicppd26jek6/html-check", {
  headers: {
    Authorization: `Bearer ${process.env.API_KEY}`,
  },
});
const { data } = await res.json();
import os, requests

res = requests.get(
    "https://app.mailbench.dev/v1/messages/msg_htumcicppd26jek6/html-check",
    headers={"Authorization": f"Bearer {os.environ['API_KEY']}"},
)
data = res.json()["data"]
Response 200
{
  "success": true,
  "data": {
    "Warnings": [
      {
        "Slug": "string",
        "Title": "string",
        "Description": "string",
        "URL": "string",
        "Category": "string",
        "Tags": [
          "string"
        ],
        "Results": [
          {
            "Name": "string",
            "Platform": "string",
            "Family": "string",
            "Version": "string",
            "Support": "yes"
          }
        ],
        "Score": {
          "Found": 1,
          "Supported": 1,
          "Partial": 1,
          "Unsupported": 1
        }
      }
    ],
    "Platforms": {},
    "Total": {
      "Tests": 1,
      "Nodes": 1,
      "Supported": 1.5,
      "Partial": 1.5,
      "Unsupported": 1.5
    }
  }
}

Spam score

GET/v1/messages/{id}/spam-check

Scores the message with SpamAssassin rules when the server has one configured.

Path parameters

  • idstringrequired
    Message ID.

Returns

  • IsSpamboolean
  • Scorenumber
  • Rulesarray of objects
    Child attributes
    • Scorenumber
    • Namestring
    • Descriptionstring
  • Errorstring

Errors

400SpamAssassin is not configured on this server (`not_configured`).
401Missing or invalid API key.
404No such object in this workspace.
429Too many requests. Wait `Retry-After` seconds.
curl / JavaScript / Python
curl "https://app.mailbench.dev/v1/messages/msg_htumcicppd26jek6/spam-check" \
  -H "Authorization: Bearer $API_KEY"
const res = await fetch("https://app.mailbench.dev/v1/messages/msg_htumcicppd26jek6/spam-check", {
  headers: {
    Authorization: `Bearer ${process.env.API_KEY}`,
  },
});
const { data } = await res.json();
import os, requests

res = requests.get(
    "https://app.mailbench.dev/v1/messages/msg_htumcicppd26jek6/spam-check",
    headers={"Authorization": f"Bearer {os.environ['API_KEY']}"},
)
data = res.json()["data"]
Response 200
{
  "success": true,
  "data": {
    "IsSpam": true,
    "Score": 1.5,
    "Rules": [
      {
        "Score": 1.5,
        "Name": "string",
        "Description": "string"
      }
    ],
    "Error": "string"
  }
}