1. Get a token
Exchange your dashboard credentials for an access token.curl -X POST https://api.huduma.cloud/auth/login \
-H "Content-Type: application/json" \
-d '{"email":"you@example.com","password":"your-password"}'
const res = await fetch("https://api.huduma.cloud/auth/login", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ email: "you@example.com", password: "your-password" }),
});
const { data } = await res.json();
2. Send a message
Pass the token as a bearer credential and post one envelope per recipient.curl -X POST https://api.huduma.cloud/api/v3/outgoings/send \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"senderId": "HUDUMA SMS",
"envelopes": [
{ "number": "255766298542", "message": "Karibu HudumaSMS!" }
]
}'
await fetch("https://api.huduma.cloud/api/v3/outgoings/send", {
method: "POST",
headers: {
Authorization: `Bearer ${token}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
senderId: "HUDUMA SMS",
envelopes: [{ number: "255766298542", message: "Karibu HudumaSMS!" }],
}),
});
import requests
requests.post(
"https://api.huduma.cloud/api/v3/outgoings/send",
headers={"Authorization": f"Bearer {token}"},
json={
"senderId": "HUDUMA SMS",
"envelopes": [{"number": "255766298542", "message": "Karibu HudumaSMS!"}],
},
)
3. Read the response
A successful call returns202 with your remaining balance and one entry per
message.
{
"status": "202 ACCEPTED",
"code": 202,
"message": "Messages queued",
"timestamp": "2026-08-22T12:00:00Z",
"reqId": "REQ7F2A9C41",
"path": "/api/v3/outgoings/send",
"data": {
"balance": 4980,
"outgoings": [
{
"id": 918273645,
"senderId": "HUDUMA SMS",
"recipient": "255766298542",
"message": "Karibu HudumaSMS!",
"credits": 1,
"status": "SENT"
}
]
}
}
202 ACCEPTED means the message was accepted for delivery, not that it has arrived.
See Delivery status for how the final outcome is reported.