Documentation API
The Mailtest.me REST API lets you integrate email verification and spam testing into your own tools, scripts and pipelines.
Introduction
The API is available to subscribers from the Pro plan (50 checks/day). All responses are JSON. The base URL for all requests is:
Two features are exposed: email address verification and the spam test (deliverability). Each feature consumes its own daily quota.
Authentication
Every API request must include your API key in the HTTP header
X-API-Key :
You can generate your key from your account page. The full key is only shown once, upon creation: store it somewhere safe.
- 401 — missing or invalid key
- 403 — insufficient plan (Pro minimum required)
Email verification
Verifies an email address in three steps: syntax (RFC 5322), DNS (MX records), and SMTP (handshake with the server). Returns a confidence score from 0 to 100. Each call is deducted from your daily verification quota.
Verify an address
Spam test
The spam test measures the deliverability of your emails (newsletters, transactional emails). The API generates a unique disposable email address; you send your email to it; Mailtest.me analyzes it (SPF, DKIM, DMARC, SpamAssassin, AI content analysis) and returns a score out of 100 with a detailed report.
Each creation call is deducted from your daily spam test quota, independent from the email verification quota (see Rate limits).
How it works
POST /api/v1/spam-test.
You get back a unique disposable email address such as
spamtest-a1b2c3d4@spamtest.mailtest.me.
Each call creates a fresh test: do not reuse an address from a previous test.
analyzing).
GET /api/v1/spam-test/{id}
every 3 seconds until the status becomes
done.
The score and full report are then available.
| Status | Description |
|---|---|
waiting | Waiting for the email to arrive |
analyzing | Email received, analysis in progress |
done | Analysis complete, result available |
error | Analysis failed |
Create a test
Creates a new spam test and returns the disposable address. No request body required.
Headers
remaining : number of spam tests still available today for your account.
Send the test email
This step does not go through the API: simply send your email to the disposable address returned in the previous step, from the server or service (ESP, SMTP relay, newsletter tool) you want to evaluate.
- The disposable address only accepts the first received email: send only one.
- The analysis starts automatically upon reception and usually takes a few seconds.
- Keep the
idof the test to poll the result.
Fetch the result
Returns the current status of the test and, once the analysis is complete, the full report. The test must have been created with the same API key.
HeadersRate limits
Email verification and spam test quotas are independent and reset every day at midnight (UTC).
| Plan | Verifications / day | Spam tests / day | API access |
|---|---|---|---|
| Free | 3 | 1 (per IP) | No |
| Starter (10/j) | 10 | 2 | No |
| Pro (50/j) | 50 | 5 | Yes |
| Business (100/j) | 100 | 10 | Yes |
| Enterprise (500/j) | 500 | 25 | Yes |
Error codes
Errors follow HTTP conventions. The response body contains a
detail descriptive field.
| Code | Description |
|---|---|
401 | Missing or invalid API key. |
403 | Insufficient plan (Pro minimum), or attempt to access a test owned by another account. |
404 | Resource not found (unknown test id). |
422 | Invalid request body (e.g. malformed email address). |
429 | Daily quota reached. The message states which one (verifications or spam tests). |
500 | Internal error. Try again later. |
Mailtest.me