Bulk SMS API
With the Bulk SMS API, you can integrate your systems to automatically leverage on the instant delivery of SMS to generate receipts, alerts and relevant communications to your clients and customers. As a developer, the following two methods will greatly assist you to implement this service to your systems.
GET METHOD
URL: https://account.afrokatt.com/sms/api?action=send-sms
GET PARAMS:
- apikey : Valide API KEY. Get this by clicking the button “GET API KEY & PARTNER ID” in your account.
- action: Action Method.
- message : URL Encoded Text Message with valid GSM7 Characters
- from: Valid Sender ID / Shortcode
- to: Valid Mobile Number
POST METHOD
REQUEST ENDPOINT: https://account.afrokatt.com/sms/api?action=send-sms&api_key=YOUR_KEY&to=PhoneNumber&from=SenderID&sms=YourMessage
SAMPLE REQUEST BODY
{
"action": "send-sms",
"api_key": api_key,
"to": phone_number,
"from": sender_id,
"sms": message
}
For a successfully sent message you get:
SAMPLE RESPONSE
{
"code": "200",
"message": "Successfully Sent",
"balance": "10",
"message_id": 149039,
"recipient": "254721512910"
}
SCHEDULING MESSAGES
For messages to be sent at a future time, you will need to pass an optional parameter time ToSend with a valid date string that resolves to a Unix timestamp or the unix timestamp itself.
{
"apikey":"123456789",
"partnerID":"123",
"message":"this is a test message",
"shortcode":"SENDERID",
"mobile":"254712345678",
"timeToSend":"2019-09-01 18:00"
}
Sample Request Body
Sample Response:
GETTING DELIVERY REPORTS
ENDPOINT URL: https://account.afrokatt.com/sms/api?action=check-getdlr&api_key=YOUR_KEY&username=USERNAME&messageid=MESSAGEID
SAMPLE RESPONSE
{
"code":200,
"response-description":"Success",
"mobile":"254712345678",
"messageid":"123456789",
"send_at":"2024-02-28 10:59:25"
}
GETTING ACCOUNT BALANCE
ENDPOINT URL: https://account.afrokatt.com/sms/api?action=check-balance&api_key=YOUR_KEY&username=USERNAME
SAMPLE REQUEST BODY
{
"apikey":"123456789",
"username":""
}
GETTING ACCOUNT BALANCE
- 200;Successfully Send
- 100;Bad gateway requested
- 101;Wrong action
- 103;Invalid phone number
- 104;Phone coverage not active
- 105;Insufficient balance
- 106;Invalid Sender ID
- 107;Invalid SMS Type
- 108;SMS Gateway not active
- 109;Invalid Schedule Time
- 110;Media url required
- 111;SMS contain spam word. Wait for approval
- 112;User account inactive
- 113;User account locked, contact your Administrator
- 4093;Unable to create campaign at this time please try again later.
- 4093;Country Undefined.
- 4093;Max Mobile Number limit exceeded.
- 4093;Queue Connection Closed