SSoftLinkSMSDocs
SMS

Send one or more SMS messages

POST
/api/v1/sms

Queues an SMS message for delivery to up to 1000 recipients. Each recipient receives an individual Message record; delivery is dispatched asynchronously via a background task and the cost is calculated per-segment based on message length.

Authorization

apiKeyAuth
headerX-Api-Key<token>

Your API key, sent as X-Api-Key. Format bsk_<key_id>.<secret>. Create one in the dashboard under Settings → Developer tools.

Header Parameters

Idempotency-Key?string

Makes retries safe. Send a unique value (a UUID works) per logical send; repeating the request with the same key within 24 hours returns the original response with Idempotent-Replayed: true instead of sending and charging again. Reusing a key with a different body is 422 idempotency_key_reused. Max 255 characters.

Request Body

  1. body
recipients*array<>
Items1 <= items <= 1000
body*string

The text to send. message is accepted as an alias.

Length1 <= length
traffic_class?string

promotional (default, shared sender ID) or transactional (OTPs, receipts, alerts; needs approval, sent from your own sender ID). See GET /sending-profile.

  • promotional - Promotional
  • transactional - Transactional
Default"promotional"
Value in"promotional""transactional"

Response Body

Queued. One message per recipient, all sharing batch_id.

application/json
  1. response
batch_id*string

Shared by every message in this send, and by their webhook events.

Formatuuid
recipients*integer

Number of messages queued.

total_price*string

Total cost of the send as a decimal string, e.g. 1.20. Charged up front.

currency*string

ISO 4217 code, e.g. KES.

messages*array<>

One message per recipient.

Example Request
curl -X POST 'https://api.softlinksms.co.ke/api/v1/sms' \  -H 'Content-Type: application/json' \  -d '{  "recipients": [    "+254712345678",    "+254798765432"  ],  "body": "Your order has shipped!"}'
Example Response
{  "batch_id": "1c9d7f2a-55e3-4b8e-9a61-0f2d3c4b5a69",  "recipients": 1,  "total_price": "0.50",  "currency": "KES",  "messages": [    {      "id": "3fae8b8e-9c3a-4e9a-9d3a-7e8e9c3a4e9a",      "body": "Your order has shipped!",      "traffic_class": "promotional",      "sender_id": "SOFTLINK",      "price": "0.50",      "currency": "KES",      "batch_id": "1c9d7f2a-55e3-4b8e-9a61-0f2d3c4b5a69",      "message_id": null,      "recipient": "+254712345678",      "response_code": null,      "response_description": null,      "status": "pending",      "duration_ms": null,      "created_at": "2026-10-19T08:15:00.412000Z",      "updated_at": "2026-10-19T08:15:00.412000Z"    }  ]}