The eSMS Africa sandbox uses magic numbers so you can deterministically simulate every delivery outcome. The result is controlled by the last four digits of the destination number — anything not listed is delivered.
The magic numbers
| Destination ends in | Simulated result |
|---|---|
| any other number | delivered |
| …0000 | undelivered |
| …0002 | sent (no final DLR) |
| …0003 | failed (rejected by carrier) |
| …0404 | failed (unknown subscriber) |
| …0009 | 402 insufficient balance |
Example: test an undelivered path
curl "https://sms.esmsafrica.io/api/messages/send" \
-H "Authorization: Bearer esms_test_..." \
-d '{"to":"+254712340000","text":"Your code is 482910"}'
The send is accepted, then your webhook fires with "status":"undelivered" so you can verify your failure handling.
Why it matters
Real networks rarely fail on demand. Magic numbers let you rehearse retries, alerting, and user messaging for undelivered, rejected, and billing-error cases before they ever happen in production. Learn more in the sandbox docs.