Bulk SMS

This API enables you to send as many SMSs as you would like (Bulk SMS).

This endpoint allows you to send to send as many SMSs as possible. We are using Kafka to ensure that all your messages are processed and sent. We will also pre-process your object body inorder to remove duplicate messages.

One SMS will cost you a small fee of 0.5/= per SMS. You will not be charged for messages are found during pre-processing.

Endpoint for the API request.

POST https://api.rotsi.co.ke/sms/bulksms/v1

Request Body

Name
Type
Description

username*

string

The username of the account, as per the Rotsi Dashboard.

body*

Object

messages: Type: Array of Objects

Description: An array where each element is an object representing a single SMS message to be sent. Each message object contains the following fields:

phone:

Type: String Description: The recipient's phone number. This should include the country code if applicable. Example: "0745474586" message:

Type: String Description: The text content of the SMS message to be sent. This field contains the actual message that will be delivered to the recipient. Example: "This is a test message 4,"

const axios = require('axios');

const data = {
  username: "username",
  body: {
    messages: [
      { phone: "0722000000", message: "This is a test message 1," },
      { phone: "0722000000", message: "This is a test message 2," },
      { phone: "0722000000", message: "This is a test message 3," }
    ]
  }
};

const config = {
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'secret_key'
  }
};

axios.post('https://api.rotsi.co.ke/sms/bulksms/v1', data, config)
  .then(response => {
    console.log(response.data);
  })
  .catch(error => {
    console.error(error);
  });
{
    status: "Success",
    Service: "RotsiBulkSmsService",
    TimeCreated: Date.now(),
    ResponseMessage: `Sent to ${successfulCount}/${initialBatchSize}. Total Cost: KES ${totalCost}`,
    UnsuccessfulMessages: unsuccessfulMessages
}

If youre under demo clients, ensure youre balance is sufficient to send the messages. Minimum account Balance is 10KES. Eg. If youre total cost is 10, ensure your balance is 20KES or more. If youre an active business using your own shortcode via the Rotsi EcoSystem, ensure your services balance is sufficient. Check the balance in the Dashboard Portal.

If you would like you`re own senderID to be sent along with the message. Contact us via email at : [email protected], with the Subject :"Request for SenderID", along with your suggested senderID, and we will reply alerting you if it is available and documents required to be submitted.

Last updated