SMS over URL parameters

Send SMS by including all of the required parameters in the URL using HTTP GET request.

Owning custom made applications tailored for specific requirements of a single organization is an expensive privilege few can afford. Using third party software solutions for your business needs is a more common case for businesses today. These “generic” applications are usually highly configurable in order to cover the widest range of use cases. No matter how clever the application is designed, it seems like there is always at least one crucial feature missing.

If you happen to have one of those applications, you probably have options to configure different workflows and triggers. Often the application also offers integration options too. Due to it’s generic nature, the application has to cover a variety of integration scenarios and also keep a certain level of simplicity to remain intuitive and usable. This trade-off between options and usability can result in a solution with limited integration possibilities.

Integrating our REST API method for sending SMS in such an application may be impossible since you have to configure the request type, headers and body model. This is something that is usually handled by developers and this type of application will not allow you to write custom code. At best it will provide you with a single input to enter the URL of the service you want to trigger, and that’s it.

Simple SMS with basic parameters

With this single input problem in mind, we have designed a method which allows you to send SMS in a single line of the HTTP request:

GET /sms/1/text/query?username=myUsername&password=myPassword&to=41793026727&text=Message text HTTP/1.1
Accept: application/json
GET /sms/1/text/query?username=myUsername&password=myPassword&to=41793026727&text=Message text HTTP/1.1
Accept: application/xml

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => " text",
    "accept: application/json"

$response = curl_exec($curl);
$err = curl_error($curl);


if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;

This is all you need to send a message. You can even send this message through your web browser address bar, the same way you would type an address to open a web page. Now, this is something that you could put into your application without writing any code!

The response will be identical to a fully-featured SMS response:

  "bulkId": "1478260834465349757",
  "messages": [
      "to": "41793026727",
      "status": {
        "groupId": 1,
        "groupName": "PENDING",
        "id": 7,
        "name": "PENDING_ENROUTE",
        "description": "Message sent to next instance"
      "smsCount": 1,
      "messageId": "844acc75-e5c6-4a21-a7e3-444c412c385b"

XML response format

The default response format is JSON. However, if you would like to receive XML instead, you may specify the format .xml extension at the end of the method base URL, such as:

There is one more catch. You will probably need to replace hard-coded values like phone number and message text with placeholders unless you want to send the same message to the same recipient every time. Placeholder names will be provided by the application system you are using. What you need to understand is where to put the placeholders. Let’s break down our example request in several lines so we can examine it closely:
&text=Message text

The first line is the API endpoint and this never changes. The question mark at the end represents beginning of the query string parameters. It’s a system of key / value pairs separated by symbol &. It’s quite clear now what the values are and which values you will need to replace by a value placeholder.


Value placeholders

Placeholder names and format will vary depending on your application. Refer to your application documentation for instructions.

Here is the final result:

Your application should now dynamically send different messages to different recipients and dynamically replace placeholders with the recipient’s phone number and message.

Key / value pairs

It’s important to understand how to properly format the query string in order to make it work properly. This rule must be followed: ? key = value & key = value & key = value

The sorting order of key / value pairs is not important as long as it’s well formatted. If your application supports placeholders, you should use it to replace values only!

Multiple recipients

Sending messages to multiple recipients at once is also supported, as long as they all get the same message. The URL is basically the same as with simple SMS. The only difference is in the to key where you need to separate recipients by a comma.,41793026834&text=Message text

Closer look:


You can use this method to send an SMS with almost all features of our standard fully-featured SMS.

Optional key value pairs:


Refer to our fully-featured SMS documentation for an explanation of each parameter.


Please use this method to send messages only when you don’t have the option to integrate via the fully-featured SMS method.

Please keep in mind:

  • This method does not support API key authorization. You are sending the username and password over the network which is less secure than using an API key.
  • Your application should support the URL encoding of your requests. Messages that are not properly formatted may be delivered with incorrectly encoded text or not delivered at all.