Send an SMS message and receive status updates

Check the delivery status of your message#

When you send a text message, you get back a response from the API regarding the message status

There are two ways to get the delivery status of the message.

  • A. By using the Tracking resource
  • B. By providing a callbackURL to your original message submission so that the Routee API will respond back with the delivery update.

The final delivery status might take from some seconds to some days, depending on the network or recipient status.

For example, if a mobile device is turned off, the message will be delivered when the GSM subscriber (client) gets back online or switches on the mobile device. Depending on your system configuration, you have the option to provide a Callback URL - also called Webhook - to receive status updates for your messages.

In order to minimize load, you might prefer to receive only the final status update for your messages.

Messaging statuses: Routee is using only application significant statuses read more...


In this guide, we assume you have already registered, got your application credentials from Routee Platform and authenticated.

We will demonstrate how to send an SMS and get the final delivery status update to your application.

Phone number format#

The message will be sent only to a valid phone number, written in international format e.g. +3069xxxxxxxx. You have to use the E.164 number formatting. E.164 numbers are internationally standardized to a 15-digit maximum length.


Now, you are ready to create an HTTP POST request to the API. Before that, you should enable an endpoint in your application server accessible by (eg. to receive message update(s).

Your Header should contain authorization and content type:

Authorization:Bearer {access_token}

Request example is shown below:

curl - -request POST \
  - -url \
  - -header 'authorization: Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4'\
  - -header 'content-type: application/json' \
  - -data '{ "body": "A new game has been posted to the MindPuzzle. Check it out","to" : "+30697ΧΧΧΧΧΧΧ","from": "amdTelecom","callback": { "strategy": "OnCompletion", "url": ""}}'
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{ \"body\": \"A new game has been posted to the MindPuzzle. Check it out\",\"to\" : \"+30697XXXXXXX\",\"from\": \"amdTelecom\",\"callback\": { \"strategy\": \"OnCompletion\", \"url\": \"\"}}");
Request request = new Request.Builder()
  .addHeader("authorization", "Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4")
  .addHeader("content-type", "application/json")

Response response = client.newCall(request).execute();
var client = new RestClient("");
var request = new RestRequest(Method.POST);

request.AddHeader("content-type", "application/json");
request.AddHeader("authorization", "Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4");
request.AddParameter("application/json", "{ \"body\": \"A new game has been posted to the MindPuzzle. Check it out\",\"to\" : \"+30697XXXXXXX\",\"from\": \"amdTelecom\",\"callback\": { \"strategy\": \"OnCompletion\", \"url\": \"\"}}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "",
  CURLOPT_POSTFIELDS => "{ \"body\": \"A new game has been posted to the MindPuzzle. Check it out\",\"to\" : \"+30697XXXXXXX\",\"from\": \"amdTelecom\",\"callback\": { \"strategy\": \"OnCompletion\", \"url\": \"\"}}",
    "authorization: Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4",
    "content-type: application/json"

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


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

conn = http.client.HTTPSConnection("")

payload = "{ \"body\": \"A new game has been posted to the MindPuzzle. Check it out\",\"to\" : \"+30697XXXXXXX\",\"from\": \"amdTelecom\",\"callback\": { \"strategy\": \"OnCompletion\", \"url\": \"\"}}"

headers = {
    'authorization': "Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4",
    'content-type': "application/json"

conn.request("POST", "/sms", payload, headers)

res = conn.getresponse()
data =

require 'uri'
require 'net/http'

url = URI("")

http =, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request =
request["authorization"] = 'Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4'
request["content-type"] = 'application/json'
request.body = "{ \"body\": \"A new game has been posted to the MindPuzzle. Check it out\",\"to\" : \"+30697XXXXXXX\",\"from\": \"amdTelecom\",\"callback\": { \"strategy\": \"OnCompletion\", \"url\": \"\"}}"

response = http.request(request)
puts response.read_body
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "",
  "method": "POST",
  "headers": {
    "authorization": "Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4",
    "content-type": "application/json"
  "processData": false,
  "data": "{ \"body\": \"A new game has been posted to the MindPuzzle. Check it out\",\"to\" : \"+30697XXXXXXX\",\"from\": \"amdTelecom\",\"callback\": { \"strategy\": \"OnCompletion\", \"url\": \"\"}}"

$.ajax(settings).done(function (response) {
#import <Foundation/Foundation.h>

NSDictionary *headers = @{ @"authorization": @"Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"body": @"A new game has been posted to the MindPuzzle. Check it out",
                              @"to": @"+30697XXXXXXX",
                              @"from": @"amdTelecom",
                              @"callback": @{ @"strategy": @"OnCompletion", @"url": @"" } };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@""]
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
[dataTask resume];

That's it! You should receive an SMS in a few moments.
Your application on should receive a status update for the message when the final message delivery status is received from Routee server(s).

Resource Reference here

Additional information#

  • Check here for resource reference
  • The payload that Routee will POST to your CallbackURL is described here
  • You can also set the default CallbackURL for a Routee application.

For more information check here


Character Transcoding

If you need to automatically transcode unicode characters (Greek, French, Spanish etc) just set the "transcode" parameter to true in the body of the request, or enable the enforce transcoding option found on here under the application you used to authenticate.