Knowledgebase : API Documentation > SMS API
Multiple SMS to multiple destinations
Posted by Administrator on 27 July 2019 11:34 am

Imagine you want to target your customers by offering them their favourite product during your next promotion. Every customer is specific and you shouldn’t send the same message to all of them. Tailor your SMS messages according to customers’ preferences and get their full attention.

You can use our multiple textual messages for that purpose. This option gives you the ability to send multiple messages to multiple destinations by calling one API method only once.

Endpoint for sending simple SMS is:

POST https://sms.enet.co.ke/sms/1/text/multi

Header Parameters

NameValuesDescription
Authorization (required) Basic <Access token> Access token = base64encode(yourUsername:yourPassword)
Content-Type application/json Only application/json is supported for now
Accept application/json Only application/json is supported for now

Request Parameters

NameDescriptionParameter TypePossible value
from The sender ID that will be used to send the message numeric / alphanumeric Enet_Online
to The recipient Phone number numeric 254726872512
text The message being send text This is a test message

Examples

POST /sms/1/text/multi HTTP/1.1
Host: sms.enet.co.ke
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
Content-Type: application/json

{  
   "messages":[  
      {  
         "from":"Enet_Online",
         "to":"254726872512",
         "text":"Hey Mike, delicious Istrian Malvazija is finally here. Feel free to visit us and try it for free!"
      },
      {  
         "from":"Enet_Online",
         "to":"254722012345",
         "text":"Hi Jenny, we have new French Merlot on our shelves. Drop by our store for a free degustation!"
      }
   ]
}	
  

Response

HTTP/1.1 200 OK
Content-Type: application/json

{
    "bulkId": "2034072219640523073",
    "messages": [
        {
            "to": "254726872512",
            "status": {
                "groupId": 1,
                "groupName": "PENDING",
                "id": 7,
                "name": "PENDING_ENROUTE",
                "description": "Message sent to next instance"
            },
            "smsCount": 1,
            "messageId": "2034072219640523074"
        },
        {
            "to": "254722012345",
            "status": {
                "groupId": 1,
                "groupName": "PENDING",
                "id": 7,
                "name": "PENDING_ENROUTE",
                "description": "Message sent to next instance"
            },
            "smsCount": 1,
            "messageId": "2034072219650523075"
        }
    ]
}