Bulk SMS
Use POST /api/sms/send-api with an API key to send the same text to up to 1,000 recipients per request. Use Kenyan mobile numbers in international format, for example 254712345678.
const result = await client.sms.bulk(
['254712345678', '254798765432'],
'Our office will be closed on Monday.',
'YOURBRAND',
);
console.log(result.totalSent, result.totalFailed, result.remainingCredits);The SDK also accepts legacy { phoneNumber: '254712345678' } inputs and converts them to strings before sending. The HTTP API accepts only strings.
Message segments
Each recipient consumes credits according to the number of message segments. The current service calculation is:
| Message content | Single segment | Multipart segment |
|---|---|---|
| ASCII text | Up to 160 characters | 153 characters |
| Text containing non-ASCII characters | Up to 70 characters | 67 characters |
For a message exceeding the single-segment limit, the credit calculation rounds the message length up to the next multipart segment. SMS credits start at KES 0.50; checkout shows the current price.
Larger audiences
For contact groups, drafts, scheduling, and sending reports, use campaigns. Campaigns accept up to 100,000 explicitly entered numbers and 100 group IDs, normalize Kenyan numbers, and deduplicate the combined audience.
Sending results
An HTTP 200 is not a guarantee that every recipient was accepted. Check success, totalSent, totalFailed, and error. Split larger direct API batches yourself and keep a record of completed batches. Direct SMS requests do not have a client idempotency key; do not blindly retry after a timeout.