Get started/ Documentation
Get started

Documentation

spamex gives every form submission a verdict and a reason over one HTTP call. Start here.

spamex classifies form submissions as spam or ham through a single request to https://api.spamex.dev. You send the fields your form collected plus the visitor’s IP from your backend; back comes a label, a score, the stage that decided, and stable reason codes you can act on or show to your users.

One request, one answer

{
  "id": "3f0c1a9e2b7d4e1f9c3a5b6d7e8f9a0b",
  "label": "spam",
  "score": 0.97,
  "stage": "ml",
  "reasons": ["NAME_EMAIL_MISMATCH", "SPAM_PHRASE", "ML_SPAM"],
  "latency_ms": 1.4
}
fieldwhat it tells you
labelspam or ham. Always one of the two.
scoreHow confident the verdict is, as a probability of spam from 0 to 1.
stageWhich part of the pipeline decided: rules, ml or llm.
reasonsStable codes such as HONEYPOT_FILLED or DUP_KNOWN_SPAM. Never empty.
idKeep it. Feedback and deletion refer to it.

How verdicts work explains each stage. Handling verdicts turns a response into a policy for your inbox.

Where things are

  • Get started covers the request, the response, and what to do with it.
  • Guides hold copy-paste integrations for Node, PHP and WordPress, and Python, the guide for form platforms, and the data and privacy details your own policy may need.
  • API reference documents each customer endpoint. Platform API covers the endpoints that manage keys for your customers’ forms.
  • Reference lists every reason code, the limits for each plan, the changelog, and enterprise self-hosting.

Conventions in these docs

  • Base URL: https://api.spamex.dev. All examples use it.
  • $SPAMEX_KEY stands for a site key, $PLATFORM_KEY for a platform key.
  • Requests and responses are JSON. Timestamps are Unix seconds. Months are YYYY-MM.
↑↓ navigate↵ openDocs and blog