Skip to main content
Version: 1.1

Quickstart

This guide walks you through sending your first SMS with the Pahappa Comms API. You will create an account, get your API credentials, and send a test message using a JSON POST request.

Create an account

Sign up on the live platform at https://comms.egosms.co, or use the sandbox at https://comms-test.pahappa.net/register for testing.

Get your API credentials

After logging in:

  • Go to SettingsAPI Settings.
  • Complete the KYC (Know Your Customer) form (this form is completed only once).
  • Then copy your API Username and API Password. You will include these in every request.
Send your first SMS

Make a JSON POST request to the API endpoint with the SendSms method. Replace YOUR_USERNAME and YOUR_PASSWORD with your credentials.

curl -X POST https://comms.egosms.co/api/v1/json/ \
-H "Content-Type: application/json" \
-d '{
"method": "SendSms",
"userdata": {
"username": "YOUR_USERNAME",
"password": "YOUR_PASSWORD"
},
"msgdata": [
{
"number": "256700111222",
"message": "Hello World!",
"senderid": "MyCompany",
"priority": 1
}
]
}'
note

If you are using the sandbox, ensure to swap the endpoint above to be:

https://comms-test.pahappa.net/api/v1/json/
Check the response

A successful request returns a JSON response like this:

{
"Status": "OK",
"Cost": 35,
"MsgFollowUpUniqueCode": "8efd86fb78a56a5145ed7739dcb00c78581c5375"
}

The Status field is OK when the message is accepted. Save the MsgFollowUpUniqueCode if you want to track delivery status later.

A failed request returns a JSON response like this:

{
"Status": "Failed",
"Message": "Wrong Username or Password."
}