Skip to main content

Send SMS API Specs and Usage

This page covers the HTTP API details for sending SMS through the Comms platform.

API Endpoint

All API requests are made via JSON POST to:

https://comms.egosms.co/api/v1/json/
  • Content-Type: application/json
  • Authentication: Required (see below)

Authentication

Every request must include your API credentials in the userdata object:

  • username: Your Comms API username
  • password: Your Comms API key

Request Structure

FieldTypeRequiredDescription
methodstringYesMust be "SendSms"
userdataobjectYesAuthentication
...usernamestringYesYour API username
...passwordstringYesYour API password
msgdataarrayYesList of messages to send
...numberstringYesRecipient's phone number (international format, e.g., "256700111222")
...messagestringYesSMS message content
...senderidstringYesSender ID (as configured in your Comms account)
...prioritystringNoMessage priority ("0" for normal; other values if supported)

Response Structure

All API responses are JSON objects. For SendSms, a successful response looks like this:

{
"Status": "OK",
"Message": "Successfully Sent!",
"Cost": "35",
"MsgFollowUpUniqueCode": "ApiMSG.123456789"
}

SendSms Method

Send one or more SMS messages.

Send One Message
{
"method": "SendSms",
"userdata": {
"username": "your_username",
"password": "your_api_key"
},
"msgdata": [
{
"number": "256700111222",
"message": "Hello World!",
"senderid": "MyCompany",
"priority": "0"
}
]
}
Send Many Messages
{
"method": "SendSms",
"userdata": {
"username": "your_username",
"password": "your_api_key"
},
"msgdata": [
{
"number": "256700111222",
"message": "Hello World!",
"senderid": "MyCompany",
"priority": "0"
},
{
"number": "256700111333",
"message": "Hello World!",
"senderid": "CustomID2",
"priority": "0"
},
{
"number": "256700111444",
"message": "Hello other message!",
"senderid": "MyCompany",
"priority": "0"
}
]
}

Errors

If the request fails, Status is "Failed" and the Message field contains details.