API ReferenceSMS API
Message status
GET /api/messages/{id} - Check an SMS's delivery status.
Endpoint
GET https://sms.esmsafrica.io/api/messages/{id}{id} is the id returned when you sent the message. To list recent messages,
use GET /api/messages.
Authentication
Authorization: Bearer esms_live_your_api_keyResponse
{
"id": "msg_abc123",
"phone": "+254712345678",
"text": "Your OTP is 123456",
"sender_id": "MyApp",
"route": "ESMS_KE",
"country": "KE",
"segments": 1,
"cost": 0.0096,
"status": "delivered",
"error_code": null
}Statuses
| Status | Description |
|---|---|
queued | Accepted and queued for sending. |
sent | Submitted to the carrier network. |
delivered | Confirmed delivered to the handset. |
failed | Delivery failed (see error_code). |
rejected | Rejected before sending (e.g. content policy or opt-out). |
Rather than polling, you can receive status updates in real time - see Delivery webhooks in your dashboard settings.
Example
curl https://sms.esmsafrica.io/api/messages/msg_abc123 \
-H "Authorization: Bearer esms_live_your_api_key"