← Home
SMS Gateway API
Portal Login

Important: Supported Number Format

The SMS Gateway ONLY supports Sri Lankan phone numbers. You must format numbers as 10 digits starting with '0'.

✅ Correct Format
0771234567

10 Digits, starts with 0

❌ Incorrect Formats
+94771234567
94771234567

Do not use country code (+94)

Authentication

The API uses Basic Authentication. You must provide your credentials with every request.

  • Username: Your Account Email Address
  • Password: Your API Key

Send SMS - Single (GET Method)

The easiest way to send an SMS is by simply calling a URL in your browser or code.

https://sender.hashnetlk.com/api.php?FUN=SEND_SINGLE&with_get=true&un=YOUR_EMAIL&up=YOUR_APIKEY&senderID=MySendID&to=0701234567&text=TestMessage

URL Parameters

NameRequired ValueDescription
FUNSEND_SINGLEFunction Name
with_gettrueEnables GET mode
unUser EmailAccount Email
upAPI KeyAccount API Key
senderIDSender IDYour approved Sender Name
toReceiver PhoneFormat: 07xxxxxxxx (10 digits)
textMessageURL Encoded Message

Send SMS - Single (POST Method)

Endpoint: https://sender.hashnetlk.com/api.php?FUN=SEND_SINGLE

Send the data as a JSON object in the body.

{
  "senderID": "MySendID",
  "to": "0701234567",
  "msg": "A Test Message"
}

Send Bulk SMS (Same Message)

Endpoint: https://sender.hashnetlk.com/api.php?FUN=SEND_BULK_SAME

Limits: Up to 10,000 numbers allowed per request.
{
  "senderID": "MySendID",
  "to": [
    "0701234567",
    "0712345678"
  ],
  "msg": "A Test Message",
  "check_cost": true 
}

* check_cost is optional. Set to true to check price before sending.

Send Bulk SMS (Different Messages)

Endpoint: https://sender.hashnetlk.com/api.php?FUN=SEND_BULK_DIFFERENT

Limits: Up to 20 different messages allowed per request.
{
  "senderID": "MySendID",
  "msg_list": [
    {
      "msg": "A Test Message 1",
      "to": "0701234567"
    },
    {
      "msg": "A Test Message 2",
      "to": "0712345678"
    }
  ]
}

Check Account Balance

Endpoint: https://sender.hashnetlk.com/api.php?FUN=CHECK_BALANCE

Method: POST