SMS API
Send an SMS
Send one transactional SMS message to a mobile number.
Endpoint
POST https://api.safravo.co.ke/sms/v1/messagesRequest
{
"apikey": "your-api-key",
"partnerID": "17042",
"mobile": "254712345678",
"message": "Your receipt is ready.",
"shortcode": "YOUR-SENDER-ID"
}Fields
| Field | Required | Description |
|---|---|---|
apikey | Yes | Messaging account API key |
partnerID | Yes | Messaging account partner ID |
mobile | Yes | Recipient number in international format |
message | Yes | Message content |
shortcode | Yes | Approved sender ID |
timeToSend | No | Future delivery time or Unix timestamp |
cURL
curl -X POST 'https://api.safravo.co.ke/sms/v1/messages' \
-H 'Content-Type: application/json' \
-d '{
"apikey": "your-api-key",
"partnerID": "17042",
"mobile": "254712345678",
"message": "Your receipt is ready.",
"shortcode": "YOUR-SENDER-ID"
}'Successful response
{
"id": "6a75f98e6a7ffaa197c19424",
"status": "sent",
"mobile": "254712345678",
"providerMessageId": "796220792"
}The id is Safravo's message identifier. Keep it with your own transaction or notification ID for reconciliation.
Scheduling
Pass timeToSend when a message should be delivered later:
{
"apikey": "your-api-key",
"partnerID": "17042",
"mobile": "254712345678",
"message": "Your appointment is tomorrow at 10:00.",
"shortcode": "YOUR-SENDER-ID",
"timeToSend": "2026-08-08 10:00"
}Delivery status
Accepted by the API means the message was accepted for processing. Use Delivery reports to check the provider delivery result.