For sending messages, the base url is:
@bulk_base/api/v1
{info} This endpoint is rate limited to 120 requests per second. Consider sending in Batches for higher volume throughput
Method | URI |
---|---|
POST | /send-sms |
Param | Type | Description |
---|---|---|
sender | string (required) |
The Sender ID to send the message with |
message | string (required) |
Short Message to be sent |
phone | string (required) |
Phone Number to receive message. Should start with country code with 12 characters (e.g 254 for kenya) or 07 with 10 characters for Kenya or 7 with 9 characters for Kenya. |
correlator | string (optional) |
A Unique identifier generated by YOUR system, for each message. We forward delivery receipts together with your correlator, to help you identify the message in your system associated with the delivery receipt |
link_id | string (varies) |
An initiator identifier that was sent by an originating message, MUST be provided when sending on-demand messages |
endpoint | string (optional) |
Your endpoint that we will call to send delivery receipt for a given message. Click HERE for the structure |
{
"Content-type: application/json",
"Accept: application/json",
"Auntorization: Bearer 123456666"
}
{
"sender": "BONGATECH",
"message": "Test API",
"phone": "07XXXXXXXX",
"correlator": 1
}
StatusCode 200
Content
{
"status": true,
"message": "Message successfully queued!",
"data": {
"correlator": 2,
"uniqueId": "unique-string",
"phone": "254XXXXXXXXX",
"sms_units": 1
}
}
This will help overally reduce on network/resource usage by chunking multiple messages into a single request.
{danger} For batch sending, a maximum of 100 concurrent messages can be sent on a single JSON request body
[
{
"sender": "BONGATECH",
"message": "Test API",
"phone": "07XXXXXXXX",
"correlator": 1
},
{
"sender": "BONGATECH",
"message": "Test API 2",
"phone": "07XXXXXXXX",
"correlator": 2
}
]
StatusCode 200
Content
[
{
"status": true,
"message": "Message successfully queued!",
"data": {
"correlator": 1,
"uniqueId": "unique-string",
"phone": "254XXXXXXXXX",
"sms_units": 1
}
},
{
"status": true,
"message": "Message successfully queued!",
"data": {
"correlator": 2,
"uniqueId": "unique-string",
"phone": "254XXXXXXXXX",
"sms_units": 1
}
}
]
{info} Official SDKs can be obtained HERE.
Also consider having a look at our responses format HERE In order to anticipate all the formats our responses are returned in, and hence a better handling of the same.
Code 401
Reason Invalid or Missing Token
Content
{
"status": false,
"message": "Unauthenticated."
}
{info} Consider having a look at our responses format HERE, in order to anticipate all the formats our responses are returned in, and hence a better handling of the same.
Alternatively, you can send messages directly via a GET METHOD
.
The endpoint is:
@bulk_base/api/v1/send-basic-sms
All the parameters listed here, apply. They should instead be appended as GET parameters
A sample request is:
@bulk_base/api/v1/send-basic-sms?username=testuser&password=testpassword&sender=BONGATECH&message=Hello&phone=07XXXXXXXX&correlator=1
{warning} Replace testuser with your username and testpassword is your password, that you use to log into the portal
All Requested delivery receipts will be delivered via a POST
method with the below structure.
{
"phone": "254XXXXXXXXX",
"correlator": 2,
"uniqueId": "unique-string",
"deliveryStatus": "DeliveredToTerminal",
"deliveryTime": "2020-01-01 00:00:00"
}