API ReferenceSMS API
Send SMS
POST /api/sms/send — Send a single SMS message.
Endpoint
POST https://app.esmsafrica.io/api/sms/sendAuthentication
X-Account-ID: your_account_id
X-API-Key: your_api_keyRequest body
{
"phoneNumber": "+254712345678",
"text": "Hello from eSMS Africa!",
"senderId": "eSMS"
}| Field | Type | Required | Description |
|---|---|---|---|
phoneNumber | string | Yes | Recipient in international format (e.g. +254712345678) |
text | string | Yes | Message content. Max 160 chars per segment (GSM-7) or 70 chars (Unicode). |
senderId | string | No | Approved sender ID. Defaults to system default if omitted. |
Response
Success (200)
{
"status": "success",
"messageId": "msg_abc123",
"reason": "SMS queued for delivery"
}Errors
| Status | Description |
|---|---|
400 | Invalid phone number or missing required fields |
401 | Invalid or missing API key |
402 | Insufficient wallet balance |
403 | Sender ID not approved for your account |
Example
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": "Your OTP is 123456",
"senderId": "MyApp"
}'