Send Voice SMS


Endpoint

For sending voice messages, the base url is:

https://rebuetext.com/api/v1

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 5).
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
time_to_send string(optional) The time you want to schedule the message to be send in this format Y-m-d H:i e.g 2024-10-31 18:00 if left out, the message will be processed immediately
delivery_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"
}

Sample Request Body

Sample Request Body (single phone numbers)

{
    "originator": "+2547XXXXXXXX",
    "message": "Test voice message 1",
    "phone": "0708XXXXXX",
    "correlator": 1
}

Sample Success Response

[
    {
        "status": true,
        "message": "Message queued successfully",
        "data": {
            "originator": "+254710282777",
            "phone": "254708361797",
            "operator": "Safaricom",
            "message": "Test voice message 1",
            "voice": 1,
            "repeat": 5,
            "correlator": 1,
            "delivery_endpoint": null,
            "batch_id": "25ba097f-5784-4693-bec9-2380730ae7ab",
            "uniqueId": "9a1f9144-dfc0-41cb-827a-7e12547846aa",
            "time_to_send": "2025-01-28T07:02:25.727286Z",
            "sms_units": 10,
            "length": 20,
            "remarks": "Message queued successfully",
            "created_at": "2025-01-28 10:02:25"
        }
    }
]

Sample Request Body (comma separated phone numbers)

{
    "originator": "+2547XXXXXXXX",
    "message": "Test voice message 1",
    "phone": "0708XXXXXX,0741XXXXXX",
    "correlator": 1
}

Sample Success Response

StatusCode 200

Content

[
    {
        "status": true,
        "message": "Message queued successfully",
        "data": {
            "originator": "2547XXXXXXXX",
            "phone": "254708XXXXXX",
            "operator": "Safaricom",
            "message": "Test voice message 1",
            "voice": 1,
            "repeat": 5,
            "correlator": 1,
            "delivery_endpoint": null,
            "batch_id": "7fd96580-468f-4e76-b452-9f196eae2ee8",
            "uniqueId": "686b21bb-c88f-4af0-98f5-0ef48f545b80",
            "time_to_send": "2024-10-31T15:00:00.000000Z",
            "sms_units": 1,
            "length": 10,
            "remarks": "Message queued successfully",
            "created_at": "2024-11-22 22:55:42"
        }
    },
    {
        "status": true,
        "message": "Message queued successfully",
        "data": {
            "originator": "2547XXXXXXXX",
            "phone": "254741XXXXXX",
            "operator": "Safaricom",
            "message": "Test voice message 1",
            "correlator": 1,
            "delivery_endpoint": null,
            "batch_id": "7fd96580-468f-4e76-b452-9f196eae2ee8",
            "uniqueId": "4d141817-a8cb-440f-b4a8-6395f138d6f1",
            "time_to_send": "2024-10-31T15:00:00.000000Z",
            "sms_units": 1,
            "length": 10,
            "remarks": "Message queued successfully",
            "created_at": "2024-11-22 22:55:42"
        }
    }
]

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": "+254710282777",
        "message": "Test voice message 1",
        "phone": "0708361797",
        "repeat": 1,
        "voice": 2,
        "time_to_send":"2024-10-31 18:00",
        "delivery_endpoint": "https://cloudrebue.co.ke",
        "correlator": 1
     },
     {
        "originator": "+254710282777",
        "message": "Test voice message 2",
        "phone": "07xxx",
        "correlator": 2
     },
     {
        "originator": "+254710282776",
        "message": "Test voice message 3",
        "phone": "0741226412",
        "correlator": 3
     }
]

Sample Success Response

StatusCode 200

Content

[
    {
        "status": true,
        "message": "Message queued successfully",
        "data": {
            "originator": "+254710282777",
            "phone": "254708361797",
            "operator": "Safaricom",
            "message": "Test voice message 1",
            "voice": 2,
            "repeat": 1,
            "correlator": 1,
            "delivery_endpoint": "https://cloudrebue.co.ke",
            "batch_id": "b11c1192-62a5-4a99-a88f-6eb42934e3a7",
            "uniqueId": "28448d51-897a-4a4c-8d5e-816ec542ed1a",
            "time_to_send": "2024-10-31T15:00:00.000000Z",
            "sms_units": 10,
            "length": 20,
            "remarks": "Message queued successfully",
            "created_at": "2025-01-28 10:11:20"
        }
    },
    {
        "status": false,
        "message": "Invalid number",
        "data": {
            "originator": "+254710282777",
            "phone": "2547",
            "operator": "Unknown",
            "message": "Test voice message 2",
            "voice": 1,
            "repeat": 5,
            "correlator": 2,
            "delivery_endpoint": null,
            "batch_id": "b11c1192-62a5-4a99-a88f-6eb42934e3a7",
            "uniqueId": "b2e58633-9940-44d7-94d7-cc785627838b",
            "time_to_send": "2025-01-28T07:11:20.034041Z",
            "sms_units": 0,
            "length": 20,
            "remarks": "Invalid number",
            "created_at": "2025-01-28 10:11:20"
        }
    },
    {
        "status": false,
        "message": "Unauthorized originator '+254710282776' for this account.",
        "data": {
            "originator": "+254710282776",
            "phone": "254741226412",
            "correlator": 3,
            "uniqueId": "ac728c1b-bcbc-4036-be54-eb4fe7def260",
            "sms_units": 0,
            "remarks": "Unauthorized originator"
        }
    }
]

{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": 1,
     "uniqueId": "unique-string",
     "deliveryStatus": "Answered",
     "deliveryTime": "2024-11-01 00:00:00"
 }

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