The eSMS Mail Sandbox lets you build and test your whole integration — request shapes, webhooks, error handling — without sending real email and without touching your plan quota. It's the same API as production; only delivery is simulated.
Use a test API key
Create an API key with the Test environment (its secret starts with esms_test_). Any email sent with it is never delivered, never billed, and never counted against your limits. It still moves through queued → sent → delivered (or a failure state you pick) and fires the same webhooks as live email, marked "livemode": false.
curl -X POST https://send.esmsafrica.io/v1/emails \
-H "Authorization: Bearer esms_test_your_test_key" \
-H "Content-Type: application/json" \
-d '{"from":"hello@yourdomain.com","to":["delivered@sandbox.test"],"subject":"Sandbox test","html":"<p>Hi</p>"}'
Magic recipients
The simulated outcome is decided by the recipient's local part (the text before the @), so you can exercise every path deterministically:
| Recipient | Result | Webhook events |
|---|---|---|
delivered@… (or anything else) | Delivered | email.sent, email.delivered |
bounce@… | Hard bounce | email.sent, email.bounced |
complaint@… | Delivered then marked spam | email.delivered, email.complained |
fail@… | Rejected before sending | email.failed |
Isolated logs
Test emails appear only under the Test environment filter in your dashboard's Email Logs, or with ?environment=test on the API — they never mix with live traffic.
Going live
When everything works in the Sandbox, swap the esms_test_ key for a live esms_k_ key. Same requests, same responses — you just start sending for real.