Getting Started

Getting Started

A brief guide to working with the Bunicom Bulk SMS API.


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 guide will greatly assist you to implement this service to your systems.

SMS

You can send text messages SMS from your application by making a POST request to the BULK SMS API. We respond with a response back indicating whether the transaction was a success or failed.

Post Request Params:

apikey : Valid API KEY. Get this by clicking the navigation item "For Developers" in your account dashboard.
message : URL Encoded Text Message with valid GSM7 Characters
mobile : Valid Mobile Number
shortcode : Valid SenderID
                  

Sample Request Body

{
 "apikey":"123456789",
 "message":"this is a test message",
 "mobile":"254712345678",
 "shortcode":"BuniComSMS"
}
                

For a successfully sent message you get:

Sample Response

{
  "responses": [
      {
          "response-code": 200,
          "response-description": "Success",
          "mobile": 254712345678,
          "messageid": 8290842,
      }
  ]
}
                
#

Sending Scheduled SMS

For messages to be sent at a future time, you will need to pass an optional parameter timeToSend with a valid date string that resolves to a Unix timestamp or the unix timestamp itself.

{
  "apikey":"123456789",
  "message":"this is a test message",
  "mobile":"254712345678",
  "shortcode":"BuniComSMS",
  "timeToSend":"2019-09-01 18:00"
}
                
#

Sending Bulk SMS

Send multiple text messages in one single call by using the our API endpoint:

API URL ENDPOINT: https://api.bunicom.com/sendbulksms


headers: List of all column names. Note the first item in the lish should be a Valid Mobile Number column.
data_records: Array of object (JSON) containing the phone and extra fields for your data
message_pattern: URL Encoded Text Message with valid GSM7 Characters. You can include dynamic fields by adding double opening '{{' and closing '}}' curly braces
apikey : Valid API KEY. Get this by clicking the navigation item "For Developers" in your account dashboard. 
shortcode : Valid SenderID
                                        

Sample Request Body


{
  "headers": ["Phone","Name","Message"],
  "data_records": [
                      {"Phone": "+254711123456","Name": "Jane", "Message": "Message for Jane"}, 
                      {"Phone": "254755123456", "Name":"Steve", "Message": "Message for Steve"}
                  ],
  "message_pattern":"Dear {{Name}}, {{Message}}",
  "apikey": "123456789",
  "shortcode":"BuniComSMS"
}

Sample Success Response


{
    "message": "Sent Text Messages Successfully",
    "messages": [],
    "status": "success"
}
                

Sample Response Data


{
    "message": "Error Sending Text Messages",
    "messages": [
        "Could not recognise number format for +254713591"
    ],
    "status": "error"
}
                
#
#

Sending Email

Send email in one single call by using the our API endpoint:

API URL ENDPOINT (POST): https://api.bunicom.com/sendemail


headers: List of all column names. Note the first item in the lish should be a Valid Email Address column.
editor_mode: use "basic" for normal email and "template" for branded emails
template_id: use only if editor mode is set to "template"
subject: Subject of the email
data_records: Array of object (JSON) containing the email address and extra fields for your data
message_pattern: URL Encoded Text Message with valid GSM7 Characters, html markup. You can include dynamic fields by adding double opening '{{' and closing '}}' curly braces
apikey : Valid API KEY. Get this by clicking the navigation item "For Developers" in your account dashboard.        
                                        

Sample Request Body

{
  "headers": ["email","name"],
  "editor_mode": "template",
  "subject": "Receipt Payment",
  "template_id": "{{template_id}}",
  "data_records":[
                {"email": "john.doe@example.com",  "name": "John Doe"}
            ],
  "message_pattern":"Dear {{Name}}",
  "apikey": "{{your_apikey}}"
}
                  

Sample Success Response

{
    "message": "Sent Text Messages Successfully",
    "messages": [
        {
            "status": "Success",
            "message": "Email sent to john.doe@example.com",
            "code": 0
        }
    ],
    "status": "success"
}
                

How to get support

The ZMC team provides support for bugfixes and guidance on using the API.

To access support, open a ticket at our support system on ZMC Website.

Giving Feedback

We strive to improve our products and we rely on feedback from our customers.

Please feel free to share any feedback about Bunicom via twitter @bunicom_ke or info@bunicom.com