Batch Personalized Messaging

This endpoint allows you to send personalized 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 see
personalizedRecipientsArrayMandatoryContains objects of recipients and content
ToStringMandatoryMSISDNs to receive of message.
ContentStringMandatoryContent of the Personalized message

Sample HTTP Request

POST /v1/messages/batch/personalized/send HTTP/1.1
Host: sms.hubtel.com
Content-Type: application/json
Authorization: Basic cW9vaHF2Y3A6c2dyb3Juam=
{
    "From": "AbrantieCo",
    "personalizedRecipients": [
        {
            "To": "233501431586",
            "Content": "Hi Pheezy, thank you for all you do for this business"
        },
        {
            "To": "233546335113",
            "Content": "Hi Joe, thank you for all you do for this business"
        }
    ]
}
curl --location 'https://sms.hubtel.com/v1/messages/batch/personalized/send' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic ZGJyZibWc6bm5oY3B6cnc=' \
--data '{
    "from": "AbrantieCo",
    "personalizedRecipients": [
        {
            "to": "233548359582",
            "Content": "Hi Phil, thank you for all you do for this business"
        },
        {
            "to": "233262051132",
            "Content": "Hi Abrantie, thank you for all you do for this business"
        },
        {
            "to": "233200585542",
            "Content": "Hi Collins, thank you for all you do for this business"
        },
        {
            "to": "233546335113",
            "Content": "Hi Joseph, thank you for all you do for this business"
        },
        {
            "to": "233242825109",
            "Content": "Hi Felix, thank you for all you do for this business"
        }
    ]
}'

Resonse Parameters

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

Sample Response

{
    "batchId": "18ee6a2a-29ac-41c6-b70f-de809b040584",
    "status": 0,
    "data": [
        {
            "recipient": "233501431586",
            "content": "Hi Pheezy, thank you for all you do for this business",
            "messageId": "350fd34d-dce1-4694-a4c9-d9b97d1f4593"
        },
        {
            "recipient": "233546335113",
            "content": "Hi Joe, thank you for all you do for this business",
            "messageId": "f58e7f2a-203a-4079-a518-7f6647099b5e"
        }
    ]
}