eSMS AfricaeSMS Africa
SMS Platform

HTTP API

Send SMS messages via the eSMS HTTP API.

Send an SMS

curl -X POST https://app.esmsafrica.io/api/sms/send \
  -H "X-Account-ID: your_account_id" \
  -H "X-API-Key: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "phoneNumber": "+254712345678",
    "text": "Hello from eSMS Africa!",
    "senderId": "eSMS"
  }'

Request body

FieldTypeRequiredDescription
phoneNumberstringYesRecipient phone number in international format (e.g. +254712345678)
textstringYesMessage content (max 160 characters for a single SMS, longer messages are split)
senderIdstringNoSender ID to display. Must be an approved sender ID.

Response

{
  "status": "success",
  "messageId": "msg_abc123",
  "reason": "SMS queued for delivery"
}

Check message status

curl https://app.esmsafrica.io/api/sms/message/{messageId} \
  -H "X-Account-ID: your_account_id" \
  -H "X-API-Key: your_api_key"

Delivery statuses

StatusDescription
queuedMessage accepted and queued
sentMessage submitted to carrier
deliveredMessage delivered to handset
failedDelivery failed
rejectedMessage rejected (invalid number, insufficient balance, etc.)

Sending bulk SMS

For bulk SMS, use the web portal at app.esmsafrica.io:

  1. Go to Send SMS
  2. Select a sender ID and contact list
  3. Compose your message
  4. Send

Bulk SMS deducts from your wallet based on per-country pricing.

Authentication

All API requests require two headers — your numeric account ID and your API key:

X-Account-ID: your_account_id
X-API-Key: your_api_key

Get your account ID and API key from your profile at app.esmsafrica.io.

Error codes

CodeDescription
401Invalid or missing API key
400Invalid phone number or missing fields
402Insufficient wallet balance
429Rate limit exceeded

On this page