Developers
JSON API
Every test can be driven without the interface. Create a mailbox, send a message to it, then read the JSON result.
1. Create a mailbox
curl -s -X POST https://your-host/api/mailboxes \
-H "Authorization: Bearer $API_TOKEN"
{"id":"web-a1b2c3","address":"web-a1b2c3@mail-tester.test"}
2. Send your message
Either over SMTP to the configured listener, or upload the raw source:
curl -s -X POST https://your-host/api/mailboxes/web-a1b2c3/email \
-H "Content-Type: message/rfc822" --data-binary @message.eml
3. Read the result
curl -s "https://your-host/api/results/web-a1b2c3?format=json"
The payload contains score, sections, spamAssassin.rules, signature and blacklists. Status 404 means the mailbox is unknown or expired; 409 means no message has been received yet.
Public deployments should put this behind a reverse proxy with TLS. Mailbox creation and webhook ingest require API_TOKEN when it is set; uploads and demos stay open because the browser UI uses them.
Endpoints
| Method | Path | Purpose |
|---|---|---|
| POST | /api/mailboxes | Create a test address |
| GET | /api/mailboxes/:id | Status of a test |
| POST | /api/mailboxes/:id/email | Submit a raw message |
| POST | /api/mailboxes/:id/demo?mode=good|bad | Run a built-in demo |
| GET | /api/results/:id | Report as JSON |
| GET | /badge/:id.svg | Score badge |
| GET | /r/:id?embed=1 | Iframe-friendly report |