Account Login
Knowledgebase : API Documentation > SMS API
Send Single SMS to Multiple Recipients
Posted by Administrator on 16 January 2018 09:22 pm
Endpoint for sending simple SMS is:
POST https://sms.enet.co.ke/sms/1/text/single
Header Parameters
| Name | Values | Description |
|---|---|---|
| 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
| Name | Description | Parameter Type | Possible 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/single HTTP/1.1 Host: sms.enet.co.ke Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ== Content-Type: application/json Accept: application/json { "from":"Enet_Online", "to":[ "254726872512", "254722xxxxx" ], "text":"This is a test message" }
Response
HTTP/1.1 200 OK Content-Type: application/json { "bulkId":"f5c4322c-10e7-a41e-5528-34fa0b032134", "messages":[ { "to":"254726872512", "status":{ "groupId":0, "groupName":"ACCEPTED", "id":0, "name":"MESSAGE_ACCEPTED", "description":"Message accepted" }, "smsCount":1, "messageId":"4a54f0242f19-b832-1c39-a7e7a2095f351ed2" }, { "to":"254722xxxxxx", "status":{ "groupId":0, "groupName":"ACCEPTED", "id":0, "name":"MESSAGE_ACCEPTED", "description":"Message accepted" }, "smsCount":1, "messageId":"9404a69cef19-7a31-ba39-92ace76a5f351ed2" } ] }