SMS RESTful API Details

Estimated reading: 3 minutes 2586 views

With our SMS messaging API you can:

  1. Send SMS messages.
  2. Receive real time delivery reports (DLR) for all messages sent.
  3. Receive replies and inbound SMS messages.

Our simple REST API allows you to get up and running in minutes, just follow the helpful Quick Start guide. For advanced users, dig deeper into our technology and check our reference guides for more detailed functions and calls. We have a wide range of calls to mirror useful functionality on the site at both user and reseller level. We also offer code samples in order to make your experience using the API suite as clean as possible.

So let’s now look at how to use and get the best out of the REST API.

Security

To ensure security & privacy the API only works over HTTPS protocol for all requests. Also, for your own security, If you have a website with a form which sends SMS be sure to send the request from your server and not directly from the browser otherwise you will be giving away your API secret and opening the floodgates to unwanted charges.

Authentication

All API requests require your API credentials, We will provide you APPKEY. For Security API credentials must be passed as HTTP Basic Authentication headers not as CGI parameters.

Throttling

To provide the best service to all our customers we limit the number of API calls which can be made by each account to 15 calls per sec. For heavy users we can increase your throttling speed, but please contact us to discuss your requirements. If you exceed this limit we will return two indicators which you can use in your code to detect that you have been throttled. The first is the HTTP status code 429 “Too Many Requests”, the second is the error code “OVER_LIMIT” in the error block of the response body.

Pagination

Some responses are too large to be returned in one go so we paginate. To identify which calls use pagination look for the “page” parameters in the parameter descriptions for each API call. These calls include a “page” block in the response with two values, “count” and “number”. Count tells you how many pages are available and number indicates the page number you are on. The page parameter is used to request a certain page, it defaults to 1. 25 responses will be returned per page.

Error Reporting

Always check if your API call was successful or resulted in error. You may check the following

  1. 200 OK response header. It will be 4xx if an error occurred.
  2. error->code structure should equal to ‘SUCCESS’Note that some API functions can return custom errors of their own (listed in appropriate document sections). Check the error->description for details, e.g. which field caused an error or which resource you don’t have access to.

We can’t wait to see what you build!