You are not currently logged in
Log In | Register

Getting started with the HTTP API

Tagged with api, http, httpapi
by Jonny Carter
in Uncat

28-May-2015 14:52

The HTTP API is our most basic API.

To make a call to the HTTP API, simply make a HTTP GET or POST request to the following URL:[MESSAGE]&n=[NUMBER]&u=[USERNAME]&p=[PASSWORD]

Obviously you should substitute the appropriate values. The message should be URL encoded, and will be decoded on receipt.

You will receive one of the following responses:

  • SUCCESS- The message has been accepted, and added to our queue.
  • INVALID_CREDENTIALS - Your userid/password were incorrect.
  • INVALID_NUMBER - The phone number is invalid.
  • MESSAGE_TOO_LONG - The message is longer than your current tariff permits.
  • INSUFFICIENT_CREDIT - You need more credit on your account.
  • NUMBER_STOPPED - This number is stopped on your account, and you may not send to it
  • NO_MERGE - You may not perform data merging in the API, which means no square brackets in the message!

Silver, Gold and Platinum Tariffs ONLY

You can also add a "t" parameter to your GET/POST containing a date/time stamp in the format yyyy-MM-dd HH:mm:ss to queue a message for a later send, and if you have permission to change your own originator, you can set that with the "o" parameter.[MESSAGE]&n=[NUMBER]&u=[USERNAME]&p=[PASSWORD]&t=[DATETIME]&o=[ORIGINATOR]