In Bonga, an SMS sender is an approved identity on a managed route or a SIM subscription on a paired Android gateway. Set up managed sender IDs or pair the gateway in your workspace before choosing a sender.

Endpoints at a glance

What do you want to do?EndpointKey scope
Find a managed sender or a specific SIMGET /api/v2/senders?channel=smsmessages:read
Identify the sender's device or connectionGET /api/v2/connections?channel=smsmessages:read
Submit text to one recipient in the previewPOST /api/v2/messagesmessages:send
Check the status of an accepted messageGET /api/v2/messages/{id}messages:read
Schedule a managed SMSPOST /api/v2/messages/scheduledmessages:send
List schedulesGET /api/v2/messages/scheduledmessages:read
Read or cancel one scheduleGET/DELETE /api/v2/messages/scheduled/{id}messages:read / messages:send

List senders

Create a scoped API key with messages:read. Store it on your server.

curl "$BONGA_API_BASE_URL/api/v2/senders?channel=sms" \
  -H "Authorization: Bearer $BONGA_API_KEY"

The response contains data.senders and data.connections. The sender’s connection_id identifies its connection, and the optional address is for display. A managed sender may display a registered brand name or approved number. A SIM sender can show its slot even when the phone number is unknown.

To see the senders for one gateway, add connection_id using the ID returned by discovery. Choose the sender for the intended SIM slot and use its snd_… ID as from. A device ID, phone number, brand name, or SIM slot does not replace that ID in a message request.

Submit and track

See the v2 reference for the SMS text example and status response. Use a key with messages:send for submission, send to one E.164 recipient, and retain your Idempotency-Key for replays. A 202 records acceptance; delivery depends on the qualified route and provider evidence.

Store the message ID returned in data.id alongside your order or job ID. Use the Location response header to look up the message. The idempotency key is for replaying the request; it is not the message ID. The current preview does not return SMS segment counts, quotes, or charges.

Only senders with ready: true can accept preview messages. A configured sender with readiness_reason: "not_qualified" is not available for submission. An empty list means no sender matched your filters.

Common responses

ResponseWhat to check
401Use an active workspace API key in the Bearer header.
403 PERMISSION_DENIEDCheck the scope required by the endpoint.
409 SENDER_NOT_READYRe-run discovery and choose an eligible sender.
409 IDEMPOTENCY_CONFLICTA retry must reuse both the key and payload. The preview also rejects identical normalized payloads under a different key.
422 CHANNEL_UNQUALIFIEDThe selected channel or route is unavailable in this environment.

Schedule a managed SMS

Scheduling is enabled only when the operator has qualified the managed route and sets MESSAGING_V2_MANAGED_SCHEDULE_ENABLED=true. Use the same discovered managed sender and add a future send_at value:

{
  "channel": "sms",
  "from": "snd_example01",
  "to": "+254712345678",
  "content": {"type": "text", "text": "Your appointment is tomorrow."},
  "send_at": "2027-01-15T09:00:00Z"
}

The allowed horizon is one minute through 365 days. Bonga pins the sender and API-key scope, then rechecks the key, workspace, consent and opt-out state at dispatch. Cancel with DELETE /api/v2/messages/scheduled/{id} before the worker begins provider handoff. Android SIM and WhatsApp scheduling are separate routes and are never selected as an automatic fallback.

Public v2 does not expose bulk sends, SMS balances, sender registration or delivery webhooks yet.