Send Voice SMS


Our Voice Messaging API enables you to transform text messages into voice messages to any country. You can select from 26 languages and different attributes such as male or female voice, speaking rate, repeat, and more.

Endpoint

For sending messages, the base url is:

https://bulk.cloudrebue.co.ke/api/v1

{info} This endpoint is rate limited to 120 requests per second. Consider sending in Batches for higher volume throughput

Method

Method URI
POST voice-sms

Request Params

Param Type Description
originator string(required) The Originator Phone number 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/01 with 10 characters for Kenya or 7/1 with 9 characters for Kenya.
voice integer(optional) Voice to use during the call. 1 for Female and 2 for Male (Defaults to Female).
repeat integer(optional) The number of times the message should be repeated. Valid range is from 1 to 10 (defaults to 1).
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
endpoint string(optional) Your endpoint that we will call to send delivery receipt for a given message. Click HERE for the structure

Sample Request Header

{
    "Content-type: application/json",
    "Accept: application/json",
    "Authorization: Bearer 123456789"
}

Sending Single/Comma Separated

Sample Request Body (single phone number)

{
  "originator": "254708361797",
  "message": "Hi from Voice API",
  "phone": "2547XXXXXXXX",
  "correlator": 1
}

Sample Request Body (comma separated phone numbers)

{
  "originator": "254708361797",
  "message": "Hi from Voice API",
  "phone": "2547XXXXXXXX,2547XXXXXXYZ",
  "correlator": 1
}

Sample Success Response

StatusCode 200

Content

[
   {
      "status":true,
      "message":"Message successfully queued!",
      "data":{
         "correlator":1,
         "uniqueId":"b5e08e44-1d66-461e-b1ff-6572e9e3fb13",
         "client_id":"1",
         "phone":"2547XXXXXXXX",
         "operator":"safaricom",
         "sms_units":13,
         "originator":"+254708361797",
         "message":"Hi from Voice API",
         "voice":"2",
         "repeat":"10",
         "end_point":"https:\/\/example.com\/delivery",
         "batch_id":"8599a761-c607-4a61-b357-8cfa3d276726",
         "created_at":"2022-01-08 18:58:17"
      }
   }
]

Sending in Batches

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

[
    {
    "originator": "254708361797",
    "message": "Hi from Voice API",
    "phone": "2547XXXXXXXX",
    "correlator": 1
    },
     {
    "originator": "254708361XXX",
    "message": "Hi from Voice API 2",
    "phone": "2547XXXXXXYZ",
    "correlator": 2
    }
]

Sample Success Response

StatusCode 200

Content

[
   {
      "status":true,
      "message":"Message successfully queued!",
      "data":{
         "correlator":1,
         "uniqueId":"62630359-db1f-4893-9d13-5fa9150307c9",
         "client_id":"1",
         "phone":"2547XXXXXXXX",
         "operator":"safaricom",
         "sms_units":13,
         "originator":"+254708361XXX",
         "message":"Hi from Voice API 1",
         "voice":"1",
         "repeat":"3",
         "end_point":"https:\/\/example.com\/delivery",
         "batch_id":"b2302d69-8010-4d64-95d4-eb6bd97c3df1",
         "created_at":"2022-01-08 20:49:30"
      }
   },
   {
      "status":true,
      "message":"Message successfully queued!",
      "data":{
         "correlator":2,
         "uniqueId":"deb44ad7-f947-4336-9702-c9ab5452e0b3",
         "client_id":"1",
         "phone":"2547XXXXXXYZ",
         "operator":"airtel",
         "sms_units":13,
         "originator":"+254710282776",
         "message":"Hi from Voice API 2",
         "voice":"1",
         "repeat":"3",
         "end_point":"https:\/\/example.com\/delivery",
         "batch_id":"b2302d69-8010-4d64-95d4-eb6bd97c3df1",
         "created_at":"2022-01-08 20:49:30"
      }
   }
]

{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.

Sample Error Response

StatusCode 401

Reason Invalid or Missing Token

Content

{
    "status": false,
    "message": "Unauthenticated."
}

Delivery Receipts Structure

All Requested delivery receipts will be delivered via a POST method with the below structure.

{
     "phone": "254XXXXXXXXX",
     "correlator": 2,
     "uniqueId": "unique-string",
     "deliveryStatus": "Answered",
     "deliveryTime": "2020-01-01 00:00:00"
 }

{danger} The Generated Auth Token Gives a person full access to your account. Don't share it under any circumstance️