Guides
Send First SMS
Send your first SMS using the eSMS HTTP API.
Prerequisites
- An eSMS account at sms.esmsafrica.io
- A funded wallet (top up via Billing)
- Your API key (from API Keys in the sidebar). Use an
esms_test_key to try it out without charging your wallet.
Send the SMS
curl -X POST https://sms.esmsafrica.io/api/messages/send \
-H "Authorization: Bearer esms_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"to": "+254712345678",
"text": "Hello from eSMS Africa!",
"sender_id": "eSMS"
}'Check delivery status
curl https://sms.esmsafrica.io/api/messages/msg_abc123 \
-H "Authorization: Bearer esms_live_your_api_key"Using Python
import requests
response = requests.post(
"https://sms.esmsafrica.io/api/messages/send",
headers={
"Authorization": "Bearer esms_live_your_api_key",
"Content-Type": "application/json",
},
json={
"to": "+254712345678",
"text": "Hello from eSMS Africa!",
"sender_id": "eSMS",
},
)
print(response.json())Using Node.js
const response = await fetch('https://sms.esmsafrica.io/api/messages/send', {
method: 'POST',
headers: {
'Authorization': 'Bearer esms_live_your_api_key',
'Content-Type': 'application/json',
},
body: JSON.stringify({
to: '+254712345678',
text: 'Hello from eSMS Africa!',
sender_id: 'eSMS',
}),
});
const data = await response.json();
console.log(data);What's next
- Check price - preview cost before sending
- Validate numbers - drop invalid numbers
- SMS Pricing - per-country rates
- Delivery Reports - track message delivery