eSMS AfricaeSMS Africa
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_key

Response

{
  "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

StatusDescription
queuedAccepted and queued for sending.
sentSubmitted to the carrier network.
deliveredConfirmed delivered to the handset.
failedDelivery failed (see error_code).
rejectedRejected 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"

On this page