Introduction to the Sozuri API
Sozuri is a single API for sending and receiving messages in Kenya across SMS, WhatsApp, Premium SMS and voice, with M-Pesa payment collection alongside. Use it from your own code, or let an AI agent such as ChatGPT or Claude use it for you through the Sozuri MCP server. Integrate once, and we handle the differences between channels, carriers and regulators — so you can focus on the conversation, not the plumbing.
What you can do with Sozuri
AI agents (MCP server)
Give ChatGPT, Claude, Cursor or an agent you build every channel below as tools. One URL, permissions you tick, and your spending limits.
Bulk & Transactional SMS
Reach Safaricom, Airtel and Telkom numbers with a single API call. One-way alerts, OTPs, marketing — transactional or promotional.
WhatsApp for Business
Send and receive WhatsApp messages on a number linked by QR code or on the official WhatsApp Business Platform, through one API. Compare the two channels to choose.
Two-way SMS
Receive replies on your shortcode and route them to your webhook in real time.
Premium SMS & Subscriptions
Monetise content with on-demand premium SMS and subscription services, billed to the subscriber’s airtime on Safaricom.
Voice
Place outbound calls, call a number to read out a one-time code, look up a call’s outcome and manage your voice numbers.
One-time codes (OTP)
Send a code you generate on WhatsApp, then SMS, then a voice call, each only when the one before did not deliver it. One request, and one webhook when it is decided.
Airtime Topup
Airtime top-up is not available at the moment. The page explains what to expect.
Payments & Collections
Collect M-Pesa payments with STK Push into your own Paybill or Till, with payment notifications sent to your webhook.
https://sozuri.net/api. Sending SMS, for example, is POST https://sozuri.net/api/v1/messaging; contacts, voice, WhatsApp and payments live under /api/v1/ too.
Get up and running in five steps
- Create a Sozuri account. Sign up in a minute — no credit card needed.
- Create a project. Each project gets its own API key, sender IDs, callback URL and balance, so you can keep apps isolated.
- Register a sender ID. Every SMS goes out under a sender ID registered to your project, matched exactly (capitalisation included) for each network and message type — there is no shared default. Request one from your dashboard. Two-way SMS needs a shortcode, and WhatsApp a connected number.
- Top up. Sending is charged to your project’s balance. Top up from the dashboard.
- Send. Check your credentials with
GET /api/v1/messaging/authtest, which sends nothing, then send withPOST /api/v1/messaging. See the FAQ if a test message doesn’t arrive.
Supported message types
| Message type | SMS | |
|---|---|---|
| Plain text | Yes | Yes |
| Rich text (bold, italic, lists) | — | Yes |
| Media (image, video, audio, document) | — | Yes |
| Templates | Dashboard only | Yes |
| URL preview | — | Yes |
| Interactive buttons & lists | — | Yes |
Where to go next
Jump straight to the code samples for ready-made requests in PHP, JavaScript, Python, Ruby, Java, C# and cURL. Or import our Postman collection from the sidebar to try the endpoints without writing a line of code.
Use cases
A few of the everyday problems Sozuri solves for teams across Kenya and Africa.
OTP & two-factor authentication
Deliver one-time passcodes in seconds to keep logins, signups and payments secure.
It expires in 5 minutes. 10:24
Order updates on WhatsApp
Notify customers as their order is confirmed, dispatched and delivered — right in their WhatsApp inbox.
Marketing campaigns at scale
Send a sender-ID campaign to thousands of contacts and follow its delivery reports in one dashboard.
M-Pesa Paybill & STK Push
Trigger an STK prompt on a customer’s phone, receive the callback, and complete checkout in seconds.
Build your first integration today.
Create a project, register a sender ID, drop in your API key, and send a real SMS or WhatsApp message.