Enable a country
Turn on live sending to an African country for your account, and what to do when a send is refused.
Live sending is off by default for every country. Before your first live send to a country, enable it on your account. This keeps a leaked API key from being used to send to countries you never meant to reach.
Test keys do not need this - they work for every African country straight away. See Test keys and the sandbox.
Enable from the dashboard
- Sign in at sms.esmsafrica.io and open Countries.
- Find the country (search by name, ISO code or network) and open it.
- Click Enable. It takes effect immediately - no approval is needed for African countries.
Use the Enabled for you filter to see every country your account can send to. Only the workspace owner or an admin can enable or disable countries.
You can also enable a country by getting a sender ID approved for it (see Sender IDs) - an approved sender ID enables its countries automatically.
Check from the API
API keys cannot enable countries (so a leaked key cannot widen what your account can do), but any key can read the current state:
curl https://sms.esmsafrica.io/api/send-countries \
-H "Authorization: Bearer esms_live_xxx"{
"enabled_countries": ["CM", "NG"],
"african_countries": [
{
"country_code": "CM",
"country_name": "Cameroon",
"dial_code": "+237",
"national_digits": [9],
"example": "+237671234567",
"availability": "live",
"enabled": true,
"blocked": false
}
]
}Live, Coming soon and enabled
These are two separate things:
| Live | Coming soon | |
|---|---|---|
| Enabled | Sends are delivered and billed. | Refused with destination_unavailable. Not charged. |
| Not enabled | Refused with country_not_enabled. Not charged. | Refused with destination_unavailable. Not charged. |
You can enable a Coming soon country ahead of time. Your sends start working the moment it opens, with no change on your side.
When a live send is refused
Every refusal names the country and says what to do. Nothing is charged.
{
"error": {
"code": "country_not_enabled",
"message": "Sending to Cameroon (CM) is not enabled for this account yet. Enable it in the dashboard at https://sms.esmsafrica.io/countries (one click, no approval needed for African countries), then send again. Nothing was charged. ..."
}
}code | Meaning | Fix |
|---|---|---|
country_not_enabled | The country is not enabled on your account. | Enable it on the Countries page. |
destination_unavailable | Live delivery to the country is coming soon. | Keep building with a test key; contact sales to prioritise it. |
sender_not_approved | Your custom sender_id is not approved for that country. | Request it at Sender IDs, or leave sender_id out to use the default. |
country_blocked | eSMS Africa disabled the country for your account. | Contact support@esmsafrica.io. |
route_country_mismatch | The number belongs to a different country than the route you set. | Remove route - it is detected from the number. |
For bulk sends, the error lists every country that is not enabled. Pass
"skip_unavailable": true to send to the rest and leave those recipients out
(they are not charged).
Countries outside Africa
Self-serve enabling covers the 54 African countries. For destinations outside Africa, email sales@esmsafrica.io - see Global coverage.