Our powerful and incredibly easy SMS text API

SMS API Integration, SMS API Gateway, Two-Way SMS

Our SMS API makes it easy to integrate SMS into your website, application or CRM system. A few simple lines of code is all it takes to add SMS functionality and send automated SMS alerts, notifications, marketing messages and more to your clients.

Cut and paste our SMS API code to start sending text messages in minutes. Our API gateway is fully supported with detailed documentation and full developer SMS code examples. See how you can integrate into our SMS API gateway and read all of our supporting API Documentation here. Also find out our API Reference to learn more.

Send first SMS from your application!

API Documentation

Get Started with the SMShubs.net API

This defines the SMS API:

  • Request - send a sms to your user.
  • Response - ensure that your request to the SMS API was successful.

Request

An SMS API request look like:

https://www.smshubs.net/api/sendsms.php?email=[EMAIL]&key=[KEY]&sender=[SENDER]&recipient=[RECIPIENT]&message=[MESSAGE]&referenceID=[CUSTOMREFERENCEID]

This request contains:
  • Base URL
  • Parameter

Base URL

All request to the SMS API must contain:

http://www.smshubs.net/api/sendsms.php?

Request after encode

Encourage to use URL encode on the request link / url to converts reserved, unsafe, and non-ASCII characters in URLs to a format that is universally accepted and understood by all web browsers and servers. Paste it here and encode link

Please refer to here to know more about url encoding characters reference


An SMS API request after encoded look like:

https%3A%2F%2Fwww.smshubs.net%2Fapi%2Fsendsms.php%3Femail%3D%5BEMAIL%5D%26key%3D%5BKEY%5D%26sender%3D%5BSENDER%5D%26recipient%3D%5BRECIPIENT%5D%26message%3D%5BMESSAGE%5D%26referenceID%3D%5BCUSTOMREFERENCEID%5D

Parameters

The following table shows the parameters you use in the request:

Parameter Description
[EMAIL] Email address
[KEY] API Key.( Find your API key at Settings > Profile )
[SENDER] Recipient received sender.
- Is optional params.
- Specific route only.
[RECIPIENT] Recipient mobile number.
- Mobile number with your country code.
- One recipient one request.
[MESSAGE] Message body.
- A single SMS may contains 160 characters, or 70 characters for Unicode.
- Concatenated SMS may contains 153 characters, or 67 characters for Unicode.
- All Malaysia mobile number will be minus 7 characters "RM0.00 " at the beginning of each SMS content.
- Maximum of 10 concatenated SMS.

As per SKMM guidelines, you shall include price information at the beginning of each SMS. You shall use either "Free msg/RM0.00/Msj ini percuma/Msj percuma" at the beginning of the SMS content. For more information, please read our Terms & Conditions.
[CUSTOMREFERENCEID] An unique reference id from your system to avoid duplicate request.

Response

An SMS API response looks like:

<sms>
    <statusCode>[STATUSCODE]</statusCode>
    <statusMsg>[STATUSMSG]</statusMsg>
    <sms>
       <items>
         <recipient>[RECIPIENT]</recipient>
         <referenceID>[REFERENCEID]</referenceID>
         <part>[PART]</part>
       </items>
    <sms>
 <sms>

Parameter

The following table shows the parameters in the response:

Parameter Description
[Status Code] Show how the SMS send is processing. See all the Status codes.
[STATUSMSG] Status explanation.
[REFERENCE] Your reference for any future enquiries.
[PART] Total SMS for the message.

Status Code

The following table shows the description of status codes in the response:

Status Code Description
ER1126 Account is under verifying progress. Please contact our support team.
ER1204 The query string is empty.
ER1206 Enter your email Account.
ER1207 Enter your account key.
ER1208 Invalid Email address or key.
ER1209 Please activate your account.
ER1210 Your account has been suspended.
ER1602 Invalid recipient(s).
ER1603 Kindly enter your message.
ER1605 Maximum 10 SMS per recipient(s).
ER1606 SMS successly accepted.
ER1608 Your account is insufficient balance.
ER1609 Please enter at least one recipient.
ER1610 Duplicated reference ID found.