Sending SMS

Send a message, then follow it until the network reports delivery.

Send

curl -X POST "https://api.nopexo.com/v1/sms/send" \
  -H "Authorization: Bearer $NOPEXO_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "to": "0200000009",
    "from": "NOPEXO",
    "body": "Your order #1042 is ready for pickup."
  }'
  • to: a Ghana mobile number in local (024 123 4567) or international (+233241234567) form. Nopexo normalizes it and detects the network.
  • from: your sender ID, up to 11 letters and numbers. Production messages must use a sender ID approved for the project.
  • body: up to 6 SMS parts. Plain text (GSM-7) fits 160 characters in one part, 153 per part after that; any other character (emoji, some accents) switches the whole message to Unicode: 70, then 67 per part. You pay per part.

202 is not delivery

A 202 means Nopexo accepted the message for sending. Delivery is confirmed later by the network — read the status, or receive the message.delivered / message.failed webhook.

Statuses

StatusFinalMeaning
queuedNoAccepted, waiting to be sent.
sendingNoBeing handed to the network.
unknownNoThe network didn’t answer in time. Nopexo checks before doing anything else — it never blindly resends.
submittedNoAccepted by the network, waiting for the delivery report.
deliveredYesThe network confirmed delivery to the phone.
undeliveredYesThe network couldn’t deliver it.
expiredYesThe phone couldn’t be reached in time.
rejectedYesThe network rejected the message.
not_sentYesNever handed to the network (see error). Any hold on your wallet is released.
cancelledYesCancelled before sending (bulk).

Statuses only move forward, and duplicate or out-of-order reports are ignored, so you can safely act on each change once.

Get a message

curl -X GET "https://api.nopexo.com/v1/sms/msg_7kd2qm4x9t3c8f1v" \
  -H "Authorization: Bearer $NOPEXO_API_KEY"

Reports

A summary for a period (totals, delivery rate, parts and cost) plus the matching messages, newest first, paged with cursor.

curl -X GET "https://api.nopexo.com/v1/sms/reports?status=delivered&limit=50" \
  -H "Authorization: Bearer $NOPEXO_API_KEY"

Retrying safely

If a request times out you can’t know whether it was accepted. Send an Idempotency-Key header (any unique string, 8–100 characters) and repeat the request with the same key: Nopexo returns the original message (200) instead of sending again. See requests and responses.

Opt-outs

Numbers on your organization’s suppression list (people who opted out) are refused with RECIPIENT_SUPPRESSED. Manage the list in the dashboard under SMS → Contacts.