CargoPal Bulk SMS API Integration Guide
Welcome to the official CargoPal Bulk SMS API documentation. We provide reliable and scalable SMS messaging solutions for businesses across Kenya and beyond. Use our API to automate alerts, OTPs, marketing campaigns, and transactional messages directly from your systems.
Why Use CargoPal SMS API?
- High-throughput, low-latency SMS delivery
- Secure and scalable architecture
- Local telco coverage across Kenya
- Real-time delivery tracking
- 24/7 support and monitoring
Authentication & Access
To access the API, log in to your dashboard at sms.tonisoft.co.ke and obtain your:
- API Key
- Partner ID
Sending a Single SMS
1. GET Method
Send a quick SMS via a simple GET request:
Endpoint:
https://sms.tonisoft.co.ke/api/services/sendsms/?
Required Parameters:
- apikey: Your API key
- partnerID: Your assigned partner ID
- message: URL-encoded text message
- shortcode: Sender ID (e.g. CARGOPAL)
- mobile: Recipient phone number in international format
2. POST Method
Endpoint:
https://sms.tonisoft.co.ke/api/services/sendsms/
Sample JSON Payload:
{ "apikey": "YOUR_API_KEY", "partnerID": "YOUR_PARTNER_ID", "message": "Your CargoPal package has been dispatched.", "shortcode": "CARGOPAL", "mobile": "254712345678" }
Sending Bulk SMS
Endpoint:
https://sms.tonisoft.co.ke/api/services/sendbulk/
Sample JSON Payload:
{ "count": 3, "smslist": [ { "partnerID": "YOUR_PARTNER_ID", "apikey": "YOUR_API_KEY", "pass_type": "plain", "clientsmsid": "msg001", "mobile": "254701234567", "message": "Package #1234 is ready for pickup.", "shortcode": "TONISOFT" }, { "partnerID": "YOUR_PARTNER_ID", "apikey": "YOUR_API_KEY", "pass_type": "plain", "clientsmsid": "msg002", "mobile": "254711234567", "message": "Reminder: Your delivery is scheduled for 3 PM.", "shortcode": "TONISOFT" } ] }
Scheduling SMS
To schedule an SMS, add the optional timeToSend parameter in your POST payload:
{ "apikey":"123456789", "partnerID":"123", "message":"this is a test message", "shortcode":"SENDERID", "mobile":"254712345678", "timeToSend":"2019-09-01 18:00" }
This can be either a date-time string or a Unix timestamp.
Delivery Reports
Check message delivery status:
Endpoint:
https://sms.tonisoft.co.ke/api/services/getdlr/
GET Parameters:
- apikey
- partnerID
- messageID
Check SMS Balance
Endpoint:
https://sms.tonisoft.co.ke/api/services/getbalance/
GET Parameters:
- apikey
- partnerID
Error Codes
Code | Message | Description |
---|---|---|
100 | OK | Message sent successfully |
101 | Missing Parameter | One or more required fields are missing |
102 | Invalid API Key or Partner ID | Authentication failed |
103 | Insufficient Balance | Your SMS balance is too low to process the request |
104 | Invalid Phone Format | Use 2547XXXXXXXX format |
Developer Tips
- Always URL-encode your message text in GET requests
- Use POST method for secure and large payloads
- Implement retry logic for recoverable errors
- Log all request and response data for audit and debug
- Use clientsmsid to track specific messages
CargoPal — Delivering smarter logistics with instant communication.