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 usernamepassword: Your Comms API key
Request Structure
| Field | Type | Required | Description |
|---|---|---|---|
| method | string | Yes | Must be "SendSms" |
| userdata | object | Yes | Authentication |
| ...username | string | Yes | Your API username |
| ...password | string | Yes | Your API password |
| msgdata | array | Yes | List of messages to send |
| ...number | string | Yes | Recipient's phone number (international format, e.g., "256700111222") |
| ...message | string | Yes | SMS message content |
| ...senderid | string | Yes | Sender ID (as configured in your Comms account) |
| ...priority | string | No | Message 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.