Developer REST API
Vuuma SMS API documentation
Send SMS and check your credit balance from your own app, website or ERP. Two endpoints, JSON in and JSON out.
Overview
The Vuuma API is a REST API served from the same platform as your portal. Every request is a POST with a JSON body, and every response is JSON.
https://sms.vuuma.co.ke/api/sms/v1
| Method | Endpoint | Purpose |
|---|---|---|
| POST | /sendsms | Send an SMS to one or many phone numbers |
| POST | /credit-balance | Check the SMS credit left on your account |
Getting started
- Register your Sender ID. The API sends from your registered Sender ID. Registration is Ksh 8,500 one-time and includes 1,500 free SMS units. See how it works.
-
Copy your API key.
Log in at sms.vuuma.co.ke and open My Profile. Your
api_keyis listed there. -
Make your first request.
Call
/credit-balanceto confirm your key works, then send a test message to your own number with/sendsms.
Authentication
Every request is authenticated with your api_key, sent as a field in the JSON body. There are no extra headers or tokens to manage.
Send SMS
Sends a message from your Sender ID to one or more phone numbers. To reach several people with the same message, put all their numbers in phone, separated by commas.
Body parameters
| Field | Type | Description |
|---|---|---|
api_key required | string | Your API key, from My Profile in the portal. |
sender_id required | string | Your registered Sender ID, for example 23107. |
message required | string | The text of the SMS. |
phone required | string | One number, or several separated by commas, in the format 2547XXXXXXXX. See phone number format. |
Example request
curl -X POST https://sms.vuuma.co.ke/api/sms/v1/sendsms \
-H "Content-Type: application/json" \
-d '{
"api_key": "YOUR_API_KEY",
"sender_id": "23107",
"message": "Hello welcome to Vuuma SMS",
"phone": "2547XXXXXXXX,2547YYYYYYYY"
}'<?php
$payload = [
'api_key' => getenv('VUUMA_API_KEY'),
'sender_id' => '23107',
'message' => 'Hello welcome to Vuuma SMS',
'phone' => '2547XXXXXXXX,2547YYYYYYYY',
];
$ch = curl_init('https://sms.vuuma.co.ke/api/sms/v1/sendsms');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => ['Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode($payload),
CURLOPT_RETURNTRANSFER => true,
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;import os
import requests
response = requests.post(
"https://sms.vuuma.co.ke/api/sms/v1/sendsms",
json={
"api_key": os.environ["VUUMA_API_KEY"],
"sender_id": "23107",
"message": "Hello welcome to Vuuma SMS",
"phone": "2547XXXXXXXX,2547YYYYYYYY",
},
timeout=30,
)
print(response.json())const response = await fetch("https://sms.vuuma.co.ke/api/sms/v1/sendsms", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
api_key: process.env.VUUMA_API_KEY,
sender_id: "23107",
message: "Hello welcome to Vuuma SMS",
phone: "2547XXXXXXXX,2547YYYYYYYY",
}),
});
console.log(await response.json());
Example response
A successful request returns 200 OK:
[
{
"status": "200",
"message": "Message sent successfully"
}
]
Credit balance
Returns the SMS credit left on your account. Check it before a large broadcast, or use it to alert your team when credit runs low.
Body parameters
| Field | Type | Description |
|---|---|---|
api_key required | string | Your API key, from My Profile in the portal. |
Example request
curl -X POST https://sms.vuuma.co.ke/api/sms/v1/credit-balance \
-H "Content-Type: application/json" \
-d '{ "api_key": "YOUR_API_KEY" }'<?php
$ch = curl_init('https://sms.vuuma.co.ke/api/sms/v1/credit-balance');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => ['Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode(['api_key' => getenv('VUUMA_API_KEY')]),
CURLOPT_RETURNTRANSFER => true,
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;import os
import requests
response = requests.post(
"https://sms.vuuma.co.ke/api/sms/v1/credit-balance",
json={"api_key": os.environ["VUUMA_API_KEY"]},
timeout=30,
)
print(response.json())const response = await fetch("https://sms.vuuma.co.ke/api/sms/v1/credit-balance", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ api_key: process.env.VUUMA_API_KEY }),
});
console.log(await response.json());
Example response
balance holds your remaining credit:
{
"status": "200",
"balance": "CREDIT_BALANCE"
}
Phone number format
Send numbers in international format: the country code 254 followed by the number, with no +, no spaces and no leading 0.
| Number as written | Send as |
|---|---|
07XX XXX XXX | 2547XXXXXXXX |
+254 7XX XXX XXX | 2547XXXXXXXX |
| Two numbers | 2547XXXXXXXX,2547YYYYYYYY |
Integration support
Planning high-volume OTPs or a custom integration? Our team will help you get it right. Call (+254) 0700 742 742 or email [email protected], Monday to Sunday, 8:00 AM to 5:00 PM.
Contact support