Real inboxes for
integration tests.
Create an ephemeral inbox, trigger your send flow and long-poll for the result in just three API calls.
The whole flow in three commands.
Copy these into your test suite and swap in your app's endpoint.
Create an inbox
POST to get a real email address. Every inbox has a TTL — this one lives for five minutes, then it and everything in it is gone.
$ curl -sX POST https://assertmail.com/api/inboxes \ -H "Authorization: Bearer j8Kp3mN9xR2v..." \ -H "Content-Type: application/json" \ -d '{"ttlSeconds": 300}'
{
"id": "01JXKP7N3MQVW4RBSTDYFZ8EG2",
"emailAddress": "illustration-1234@in.assertmail.com",
"ttl": 1751000700
}
Trigger your send flow
Hit whichever endpoint in your app triggers the send. Nothing changes on your side — use the inbox address as you would any other recipient.
# call your app — this part is yours $ curl -sX POST https://yourapp.test/api/register \ -H "Content-Type: application/json" \ -d '{"email": "illustration-1234@in.assertmail.com"}'
Assert the email arrived
The ?wait=25 parameter holds the connection open for up to 25 seconds — you get the email the moment it arrives, not at the next poll interval.
$ curl -s "https://assertmail.com/api/inboxes/01JXKP7N3MQVW4RBSTDYFZ8EG2/emails?wait=25" \ -H "Authorization: Bearer j8Kp3mN9xR2v..."
{
"emails": [{
"id": "01JXKP8R2A4BNCVTSFGZ9MW1HK",
"subject": "Welcome to YourApp!",
"plaintext": "Hi, thanks for signing up...",
"html": "<p>Hi, thanks for signing up...</p>"
}]
}
Just HTTP and JSON.
The JSON API can be plugged into any test runner.
Long polling
One open connection, up to 25 seconds. Your test gets the email the moment it arrives, with no polling loop on your side.
Real delivery
A real email address receiving real SMTP delivery. If your app can't send email, the test fails — there's nothing to intercept or fake.
Auto-cleanup
Every inbox expires at its TTL and takes its emails with it. Parallel test workers each create their own and never step on each other.
Your test suite is three API calls away.
Sign up, grab an API key, and you're ready to go.