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 inSimulated result
any other numberdelivered
…0000undelivered
…0002sent (no final DLR)
…0003failed (rejected by carrier)
…0404failed (unknown subscriber)
…0009402 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.