Batch Simple Messaging

This endpoint allows you to send messages to a group of people. You’ll need to make an HTTP POST and also authenticate your request with the Basic Auth of your SMS API credentials.

Request Parameters

ParameterTypeRequirementDescription
FromStringMandatorySenderId or Name recipients will see.
RecipientsArrayMandatoryMSISDNs to receive of message.
ContentStringMandatoryContent of the simple message

Sample HTTP Request

POST /v1/messages/batch/simple/send HTTP/1.1
Host: sms.hubtel.com
Content-Type: application/json
Authorization: Basic cW9vaHF2Y3A6c2dyb3Juam=
{
    "From": "AbrantieLai",
    "Recipients": [
        "233546335113",
        "233501431586"
    ],
    "Content": "Welcome to the first ever bulk SMS via API in Ghana"
}
curl --location 'https://sms.hubtel.com/v1/messages/batch/simple/send' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic ZyZXRibWc6bm5oY3B6cnc=' \
--data '{
"From": "AbrantieLai",
"Recipients": [
"233546335113",
"233501431586"
],
"Content": "Welcome to the first ever bulk SMS via API in Ghana"
}'

Response Parameters

ParameterTypeDescription
batchIdStringThe ID of the batch of messages
statusNumberStatus code of the request returned by SMS API
dataArrayThis contains other objects.
recipientStringMSISDNs to receive of message.
contentStringContent of the simple message
messageIdStringUnique identifier of message

Sample Response

{
    "batchId": "165949ee-431b-4bf8-9eca-108058a8bc32",
    "status": 0,
    "data": [
        {
            "recipient": "233546335113",
            "content": "Welcome to the first ever bulk SMS via API in Ghana",
            "messageId": "e80133f9-e822-457c-98fb-d217bc4a1f83"
        },
        {
            "recipient": "233501431586",
            "content": "Welcome to the first ever bulk SMS via API in Ghana",
            "messageId": "ebc7948a-7c81-4396-9104-9c99fc921069"
        }
    ]
}