Sending messages
Send SMS over the HTTP API or SMPP, and receive delivery reports.
You can send messages two ways with the same credentials: the HTTP API (simplest) or a direct SMPP bind (for high throughput). See Credentials for SMPP client examples.
HTTP API
Send a message with a single request to https://smpp.esmsafrica.io/send.
curl -G "https://smpp.esmsafrica.io/send" \
--data-urlencode "username=YOUR_USERNAME" \
--data-urlencode "password=YOUR_PASSWORD" \
--data-urlencode "to=254712345678" \
--data-urlencode "from=eSMS" \
--data-urlencode "content=Hello from eSMS Africa" \
--data-urlencode "dlr-level=3" \
--data-urlencode "dlr-url=https://your-app.example.com/dlr" \
--data-urlencode "dlr-method=POST"Parameters
| Parameter | Required | Description |
|---|---|---|
username | Yes | Your bind username |
password | Yes | Your bind password |
to | Yes | Destination number in international format (no +) |
content | Yes | Message text |
from | No | Sender ID (must be an approved sender ID) |
coding | No | 0 = GSM 03.38 (default), 8 = UCS-2 for non-Latin text |
dlr-level | No | 1 = SMSC receipt, 2 = terminal receipt, 3 = both (recommended) |
dlr-url | No | Your endpoint to receive delivery reports |
dlr-method | No | GET or POST |
A successful response returns the message id: Success "07033084-5cfd-4812-90a4-e4d24ffb6e3d".
Check balance
curl -G "https://smpp.esmsafrica.io/balance" \
--data-urlencode "username=YOUR_USERNAME" \
--data-urlencode "password=YOUR_PASSWORD"Returns your remaining SMS count. Top up any time from Billing & top-up.
Delivery reports (DLR)
Request DLRs to know whether a message actually reached the handset. Without dlr-level, messages show as sent (accepted by the network) but not confirmed delivered.
When you set dlr-url, we call your endpoint with the final status:
| Field | Description |
|---|---|
id | The message id returned when you sent |
message_status | DELIVRD, UNDELIV, EXPIRED, REJECTD, etc. |
level | The DLR level you requested |
Your endpoint must respond with HTTP 200 and the body ACK/Jasmin, or the DLR is retried up to 3 times at 30-second intervals.
Note: many African networks do not return DLRs by default, so some routes report
sentrather thandelivered. Your dashboard shows per-operator delivery confirmation rates.
Two-way (inbound / MO)
Inbound messages to your numbers can be delivered to your SMPP bind or forwarded to a webhook. Ask the team to enable MO for your account.