Suggest Edits

Get authenticated using your application credentials

Firstly, you should get your application credentials (application-id, application-secret) from the Routee Platform and on the applications menu.

Then you should encode the application-id:application-secret string to a Base64 string.

Having this string you are now able to exchange your application credentials for an access token by calling the endpoint.

The Authorization header of the request must include the Basic followed by the encoded string.

Important! All tokens that are issued from Routee's authorization server are valid for 1 hour.
That means that once you get an HTTP response with a status code of 401, from any Routee API resource, you should issue a new token and repeat your request with the new token.

Each application is associated with an Account that belongs to the user. Any requests that are made using an access token from an application are the same as if they were made by the associated account.

 
posthttps://auth.routee.net/oauth/token
curl --request POST \
  --url https://auth.routee.net/oauth/token \
  --header 'authorization: Basic {base64Token}' \
  --header 'content-type: application/x-www-form-urlencoded' \
  --data grant_type=client_credentials
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
RequestBody body = RequestBody.create(mediaType, "grant_type=client_credentials");
Request request = new Request.Builder()
  .url("https://auth.routee.net/oauth/token")
  .post(body)
  .addHeader("authorization", "Basic {base64Token}")
  .addHeader("content-type", "application/x-www-form-urlencoded")
  .build();

Response response = client.newCall(request).execute();
var client = new RestClient("https://auth.routee.net/oauth/token");
var request = new RestRequest(Method.POST);
request.AddHeader("content-type", "application/x-www-form-urlencoded");
request.AddHeader("authorization", "Basic {base64Token}");
request.AddParameter("application/x-www-form-urlencoded", "grant_type=client_credentials", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://auth.routee.net/oauth/token",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "grant_type=client_credentials",
  CURLOPT_HTTPHEADER => array(
    "authorization: Basic {base64Token}",
    "content-type: application/x-www-form-urlencoded"
  ),
));

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

curl_close($curl);

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

conn = http.client.HTTPSConnection("auth.routee.net")

payload = "grant_type=client_credentials"

headers = {
    'authorization': "Basic {base64Token}",
    'content-type': "application/x-www-form-urlencoded"
    }

conn.request("POST", "/oauth/token", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://auth.routee.net/oauth/token")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["authorization"] = 'Basic {base64Token}'
request["content-type"] = 'application/x-www-form-urlencoded'
request.body = "grant_type=client_credentials"

response = http.request(request)
puts response.read_body
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://auth.routee.net/oauth/token",
  "method": "POST",
  "headers": {
    "authorization": "Basic {base64Token}",
    "content-type": "application/x-www-form-urlencoded"
  },
  "data": {
    "grant_type": "client_credentials"
  }
}

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

NSDictionary *headers = @{ @"authorization": @"Basic {base64Token}",
                           @"content-type": @"application/x-www-form-urlencoded" };

NSMutableData *postData = [[NSMutableData alloc] initWithData:[@"grant_type=client_credentials" dataUsingEncoding:NSUTF8StringEncoding]];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://auth.routee.net/oauth/token"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[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];
Imports RestSharp
Imports Newtonsoft.Json

Public Class AccessTokenReply
        Public access_token As String
        Public token_type As String
        Public expires_in As UInteger
        Public scope As String
        Public permissions As IList(Of String)
End Class

Public AccessReply As AccessTokenReply
Dim client = New RestClient("https://auth.routee.net/oauth/token")
        Dim request = New RestRequest(Method.POST)
        request.AddHeader("content-type", "application/x-www-form-urlencoded")
        request.AddHeader("authorization", "Basic {base64Token}")
        request.AddParameter("application/x-www-form-urlencoded", "grant_type=client_credentials", ParameterType.RequestBody)
        Dim response As IRestResponse = client.Execute(request)

AccessReply = JsonConvert.DeserializeObject(Of AccessTokenReply)(response.Content)
Console.WriteLine(AccessReply.access_token)
A binary file was returned

You couldn't be authenticated

{
   "access_token":"346f0dd4-c7bb-4f84-924e-47459c7d11c6",
   "token_type":"bearer",
   "expires_in": 3599,
   "scope": "voice lookup contact report 2step sms account viber number_validator sender_info virtual_number",
   "permissions": [
       "MT_ROLE_LOOKUP",
       "MT_ROLE_NUMBER_VALIDATOR",
       "MT_ROLE_ACCOUNT_FINANCE",
       "MT_ROLE_SMS",
       "MT_ROLE_REPORT",
       "MT_ROLE_VOICE",
       "MT_ROLE_2STEP",
       "MT_ROLE_CONTACT",
       "MT_ROLE_VIBER",
       "MT_ROLE_SENDER_INFO",
       "MT_ROLE_VIRTUAL_NUMBER"
   ]
}

Query Params

grant_type
string
required

This value is always: client_credentials

scope
string

The body can also contain a scope parameter in order to limit the permissions of the access token. For example if an application only sends SMS it can request only the SMS scope. By default if the scope parameter is omitted then the token receives all the allowed scopes of the application. POSSIBLE VALUES (separated by space): contact account report sms voice lookup number_validator 2step viber sender_info virtual_number

Headers

Authorization
string
Content-Type
string
 

RESPONSE PARAMETERS

KEY
DESCRIPTION

access_token

The generated access_token. This must be used in all requests.

token_type

Token_type ("Bearer") is a parameter in Access Token generate call to Authorization server.

expires_in

Time in seconds that the token will expire. The token is set by default to expire in 1 hour (3600 seconds).

scope

The requested scopes.

permissions

The permissions granted to the authenticated application.

ERROR CODES

For possible error responses see here

Suggest Edits

Send an SMS

Sending a single SMS is one of the most common tasks performed on the Routee Platform. Sending a message is as simple as POST-ing to the SMS resource. This is a paid service. For pricing check here

 
posthttps://connect.routee.net/sms
url --request POST \
  --url https://connect.routee.net/sms \
  --header 'authorization: Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4' \
  --header 'content-type: application/json' \
  --header 'Expect:' \
  --data '{ 
  "body": "A new game has been posted to the MindPuzzle. Check it out",
  "to" : "+306912345678",
  "from": "amdTelecom"
  }'
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\" : \"+306912345678\",\"from\": \"amdTelecom\"}");
Request request = new Request.Builder()
  .url("https://connect.routee.net/sms")
  .post(body)
  .addHeader("authorization", "Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
var client = new RestClient("https://connect.routee.net/sms");
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\" : \"+306912345678\",\"from\": \"amdTelecom\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://connect.routee.net/sms",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{ \"body\": \"A new game has been posted to the MindPuzzle. Check it out\",\"to\" : \"+306912345678\",\"from\": \"amdTelecom\"}",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4",
    "content-type: application/json"
  ),
));

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

curl_close($curl);

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

conn = http.client.HTTPSConnection("connect.routee.net")

payload = "{ \"body\": \"A new game has been posted to the MindPuzzle. Check it out\",\"to\" : \"+306912345678\",\"from\": \"amdTelecom\"}"

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

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

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://connect.routee.net/sms")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
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\" : \"+306912345678\",\"from\": \"amdTelecom\"}"

response = http.request(request)
puts response.read_body
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://connect.routee.net/sms",
  "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\" : \"+306912345678\",\"from\": \"amdTelecom\"}"
}

$.ajax(settings).done(function (response) {
  console.log(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": @"+306912345678",
                              @"from": @"amdTelecom" };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://connect.routee.net/sms"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[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];
{
   "body":"A new game has been posted to the MindPuzzle. Check it out",
   "to":"+306912345678",
   "from":"amdTelecom"
}
Imports RestSharp
Imports Newtonsoft.Json

Public Class SendSMSReply
        Public trackingId As String
        Public status As String
        Public createdAt As String
        Public from As String
        Public _to As String
        Public body As String
        Public bodyAnalysis As BodyAnalysis
        Public flash As Boolean
        Public callback As CallBack
End Class

Public Class BodyAnalysis
        Public parts As Integer
        Public unicode As Boolean
        Public characters As Integer
End Class

Public Class CallBack
        Public url As String
        Public strategy As String
End Class

Dim client = New RestClient("https://connect.routee.net/sms")
        Dim 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"" : ""+306912345678"",""from"": ""amdTelecom""}", ParameterType.RequestBody)
        Dim response As IRestResponse = client.Execute(request)

SendSMS = JsonConvert.DeserializeObject(Of SendSMSReply)(response.Content)

Console.WriteLine("Tracking ID : " + SendSMS.trackingId & Environment.NewLine)
Console.WriteLine("Status : " + SendSMS.status & Environment.NewLine & Environment.NewLine)
Console.WriteLine("SEND MESSAGE RESPONSE " & Environment.NewLine)
Console.WriteLine("----------------------------------" & Environment.NewLine)
Console.WriteLine(response.Content & Environment.NewLine)
Console.WriteLine("----------------------------------" & Environment.NewLine)
A binary file was returned

You couldn't be authenticated

{  
   "trackingId":"7f09f8cc-725a-4519-a1be-d867502bb732",
   "status":"Queued",
   "createdAt":"2017-02-17T12:23:50.403Z",
   "from":"amdTelecom",
   "to":"+306912345678",
   "body":"A new game has been posted to the MindPuzzle. Check it out",
   "bodyAnalysis":{  
      "parts":1,
      "unicode":false,
      "characters":58
   },
   "flash":false
}

Body Params

from
string
required

The sender of the message. This can be a telephone number (numeric string with maximum length 16 characters) or an alphanumeric string (maximum length 11 characters). When you want to use a number, you have to enter it without the '+' before the country code (eg 447123123456).

body
string
required

The message you want to send.

to
string
required

The destination phone number. Format with a '+' and country code e.g., +3069485xxxxx (E.164 format).

flash
boolean

Indicates if the SMS is a flash SMS. A flash SMS is a type of SMS that appears directly on the main screen without user interaction and is not automatically stored in the inbox. It can be useful in emergencies, such as a fire alarm or cases of confidentiality, as in delivering one-time passwords. Default value false

label
string

A generic label which can be used for tagging the SMS. The maximum length is 20 characters.

callback
object

Defines the callback information for an individual message. Check here for payload information. You can also set this value from Routee Dev Platform on the Applications menu

 
callback.url
string

A URL that Routee will POST to, each time your message status changes to one of the following: Queued, Failed, Sent, Unsent, Delivered, or Undelivered. Routee will POST the trackingId along with the other request parameters as well as statuses and ErrorDescriptions.

callback.strategy
string

When the URL will be called. Two possible values: on every status change (OnChange) or when a final status arrives (OnCompletion).

Headers

Content-Type
string
required
Authorization
string
required
 

Warning

Live Preview

Your message will be sent!

RESPONSE PARAMETERS

KEY
DESCRIPTION

trackingId

The tracking id used to identify the message.

createdAt

The date that this resource was created.

from

The sender Id of the message.

to

The phone number the message is about to be sent to.

body

The message you sent.

status

The status of the SMS. Check here for possible values.

label

The label that was given to the SMS.

bodyAnalysis

The analysis for the body of the SMS.

bodyAnalysis.characters

The total number of characters of the message body.

bodyAnalysis.parts

The number of actual SMS that will be sent.

bodyAnalysis.transcode

Contains information for the transcoded body of the SMS message. This will be available only if the message can be transcoded.

bodyAnalysis.transcode.message

The transcoded message of the original unicode message.

bodyAnalysis.transcode.parts

The number of the parts of the transcoded message.

bodyAnalysis.unicode

Indicates if the body contains unicode characters.

bodyAnalysis.unsupportedGSMCharacters

Which characters caused the message to be considered as unicode.

flash

Indicates if the message is flash SMS.

callback

Defines the notification callback information for an individual SMS message. You can also set this value from Routee Dev Platform on the Applications menu.

callback.url

The URL that Routee will POST to, each time your message status changes to one of the following: Queued, Failed, Sent, Unsent, Delivered, or Network Error. When Routee POSTs back to your service, a HTTP 200 OK response must be returned. If Routee doesn't receive a 200 OK response, it will try to POST again (up to 5 times).

callback.strategy

When the URL will be called. Two possible values: on every status change (OnChange) or when a final status arrives (OnCompletion).

ERROR CODES

STATUS
CODE
DESCRIPTION

400

400001009

You don't have enough balance to send the SMS.

400

400005000

The sender id is invalid.

400

400000000

Validation Error.
A required field is missing.
Invalid value of a field.

401

You are unauthorized.
Invalid access token, maybe has expired.

403

403000000

Access denied.
Your application's access token does not have the right to use SMS service.

Suggest Edits

Callback - SMS Delivery reports

Notifications you receive about the status of your messages.

 

Example:

POST http://www.yourserver.com/sms-delivery-reports

The following parameters are sent in as delivery reports - callback.

When you send an SMS, you have to set the "callback" parameter in order to receive notification when the delivery status of an SMS changes.

Your callback service will receive a POST HTTP request with the following request body:

{
   "messageId":"string",
   "smsId":"string",
   "campaignTrackingId":"string",
   "part":"number",
   "parts":"number",
   "label":"string",
   "to":"string",
   "from":"string",
   "country":"string",
   "operator":"string",
   "groups":[
      "string"
   ],
   "campaignName":"string",
   "status":{
      "name":"string",
      "reason":{
         "detailedStatus":"string",
         "description":"string"
      },
      "updatedDate":"string"
   },
   "message":"string",
   "applicationName":"string",
   "latency":"number",
   "price":"number",
   "direction":"string",
   "originatingService":"string"
}

PARAMETERS:

KEY
DESCRIPTION

messageId

The trackingId of the SMS (all the parts of a multipart SMS have the same messageId).

smsId

The unique id of each SMS part included in a message. If the message is multipart then these values will be different for each part.

campaignTrackingId

The trackingId of the campaign (if the SMS was send using the /sms/campaign resource).

part

The number of the current SMS part.

parts

The total number of SMS parts.

label

A generic label used for tagging the SMS.

to

The recipient of the SMS message (in E.164 format).

from

The senderId of the SMS message.

country

The country of the recipient.

operator

The operator of the recipient.

groups

All contact groups (tags) that this contact belongs to.

campaignName

The name of the SMS Campaign (if the SMS was part of a campaign).

status

The full status object of the SMS message.

status.name

The status name of the SMS message.

status.updatedDate

The date of the last status change of the SMS.

status.reason

The reason of the status.

status.reason.detailedStatus

The detailed status.
Possible values: Sent, Delivered, Undelivered, Failed, Undelivered on Handset, Unknown Number, Roaming, Call Barred, Unknown Status, Carrier Violation.

status.reason.description

The description of the detailed status.

message

The message that was sent.

applicationName

The name of the application that was used to send this message.

latency

The overall delivery latency of the message.

price

The cost of the SMS.

direction

The direction of the SMS.

originatingService

The service that sent this message.

See details about SMS Callbacks here Callbaks (WebHooks)

Suggest Edits

Inbound SMS

Receive inbound messages

 

Example:

POST https://www.yourserver.com/inbound-sms

When you rent a number, you have to set the callback Url ("inboundSmsCallbackUrl") in order to receive the inbound messages.

Your callback service will receive a POST HTTP request with the following request body:

{
  "messageId": string,
  "from": string,
  "to": string,
  "message": string,
  "parts": integer,
  "originatingService": "Sms",
  "direction": "Inbound",
  "receivedDate": string
}

Parameters:

KEY
DESCRIPTION

messageId

The id of the inbound message.

from

The sender of the inbound message.

to

The recipient of the inbound message (your number).

message

The body of the inbound message.

parts

The message's total parts.

originatingService

The originating service of the message (Sms).

direction

The direction of the message (Inbound).

receivedDate

The date that the inbound message was received (ISO format).

See details about the Inbound SMS here: Inbound Messages (MO)

Suggest Edits

Analyse an SMS message

Analysing an SMS is useful when the user needs information about the message before actually sending it.

 
posthttps://connect.routee.net/sms/analyze
curl --request POST \
  --url https://connect.routee.net/sms/analyze \
  --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" : "+306912345678","from": "amdTelecom" }'
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\" : \"+306912345678\",\"from\": \"amdTelecom\" }");
Request request = new Request.Builder()
  .url("https://connect.routee.net/sms/analyze")
  .post(body)
  .addHeader("authorization", "Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
var client = new RestClient("https://connect.routee.net/sms/analyze");
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\" : \"+306912345678\",\"from\": \"amdTelecom\" }", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://connect.routee.net/sms/analyze",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{ \"body\": \"A new game has been posted to the MindPuzzle. Check it out\",\"to\" : \"+306912345678\",\"from\": \"amdTelecom\" }",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4",
    "content-type: application/json"
  ),
));

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

curl_close($curl);

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

conn = http.client.HTTPSConnection("connect.routee.net")

payload = "{ \"body\": \"A new game has been posted to the MindPuzzle. Check it out\",\"to\" : \"+306912345678\",\"from\": \"amdTelecom\" }"

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

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

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://connect.routee.net/sms/analyze")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
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\" : \"+306912345678\",\"from\": \"amdTelecom\" }"

response = http.request(request)
puts response.read_body
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://connect.routee.net/sms/analyze",
  "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\" : \"+306912345678\",\"from\": \"amdTelecom\" }"
}

$.ajax(settings).done(function (response) {
  console.log(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": @"+306912345678",
                              @"from": @"amdTelecom" };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://connect.routee.net/sms/analyze"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[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];
A binary file was returned

You couldn't be authenticated

{  
   "bodyAnalysis":{  
      "parts":1,
      "unicode":false,
      "characters":58
   },
   "cost":0.036
}

Body Params

from
string

The sender of the message. This can be a telephone number (numeric string with maximum length 16 characters) or an alphanumeric string (maximum length 11 characters). When you want to use a number, you have to enter it without the '+' before the country code (eg 447123123456).

body
string

The message you want to send.

to
string

The destination phone number. Format with a '+' and country code e.g., +306948530920 (E.164 format).

Headers

Content-Type
string
Authorization
string
 

Response Parameters

KEY
DESCRIPTION

bodyAnalysis

The analysis for the body of the SMS.

bodyAnalysis.characters

The total number of characters of the message body.

bodyAnalysis.parts

The number of actual message parts (concatenated or not - more information about concadenated messages here that will be sent.

bodyAnalysis.transcode

Contains information for the transcoded body of the sms message. This will be available only if the message can be transcoded.

bodyAnalysis.transcode.message

The transcoded message of the original unicode message.

bodyAnalysis.transcode.parts

The number of the parts of the transcoded message.

bodyAnalysis.unicode

Indicates if the body contains unicode characters.

bodyAnalysis.unsupportedGSMCharacters

Which characters caused the message to be considered as unicode.

cost

The cost of the message per part

Supported Unicode Languages

Transcoding is available for Greek, French, Italian and German locales.

ERROR CODES

STATUS
CODE
DESCRIPTION

404

404001001

Account not found.

Suggest Edits

Send Bulk Messages - Campaigns

Routee allows to send messages to multiple recipients/contacts/groups. This is a paid service. For pricing check here

 
posthttps://connect.routee.net/sms/campaign
curl --request POST \
  --url https://connect.routee.net/sms/campaign \
  --header 'authorization: Bearer 12dc9ff4-7df4-4786-8e7a-a46d317687f4' \
  --header 'content-type: application/json' \
  --header 'Expect:' \
  --data '{"body": "Hello, a new version of MindPuzzle is available. Check it out", "to" : [ "+30697xxxxxxx", "+30694xxxxxxx", "+30693xxxxxxx" ],"from": "mindpuzzle"}'
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"body\": \"Hello, a new version of MindPuzzle is available. Check it out\", \"to\" : [ \"+30697xxxxxxx\", \"+30694xxxxxx\", \"+30963xxxxxxx\" ],\"from\": \"mindpuzzle\"}");
Request request = new Request.Builder()
  .url("https://connect.routee.net/sms/campaign")
  .post(body)
  .addHeader("authorization", "Bearer 12dc9ff4-7df4-4786-8e7a-a46d317687f4")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
var client = new RestClient("https://connect.routee.net/sms/campaign");
var request = new RestRequest(Method.POST);
request.AddHeader("content-type", "application/json");
request.AddHeader("authorization", "Bearer 12dc9ff4-7df4-4786-8e7a-a46d317687f4");
request.AddParameter("application/json", "{\"body\": \"Hello, a new version of MindPuzzle is available. Check it out\", \"to\" : [ \"+30697xxxxxxx\", \"+30694xxxxxx\", \"+30963xxxxxxx\" ],\"from\": \"mindpuzzle\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://connect.routee.net/sms/campaign",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\"body\": \"Hello, a new version of MindPuzzle is available. Check it out\", \"to\" : [ \"+30697xxxxxxx\", \"+30694xxxxxx\", \"+30963xxxxxxx\" ],\"from\": \"mindpuzzle\"}",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer 12dc9ff4-7df4-4786-8e7a-a46d317687f4",
    "content-type: application/json"
  ),
));

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

curl_close($curl);

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

conn = http.client.HTTPSConnection("connect.routee.net")

payload = "{\"body\": \"Hello, a new version of MindPuzzle is available. Check it out\", \"to\" : [ \"+30697xxxxxxx\", \"+30694xxxxxx\", \"+30963xxxxxxx\" ],\"from\": \"mindpuzzle\"}"

headers = {
    'authorization': "Bearer 12dc9ff4-7df4-4786-8e7a-a46d317687f4",
    'content-type': "application/json"
    }

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

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://connect.routee.net/sms/campaign")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["authorization"] = 'Bearer 12dc9ff4-7df4-4786-8e7a-a46d317687f4'
request["content-type"] = 'application/json'
request.body = "{\"body\": \"Hello, a new version of MindPuzzle is available. Check it out\", \"to\" : [ \"+30697xxxxxxx\", \"+30694xxxxxx\", \"+30963xxxxxxx\" ],\"from\": \"mindpuzzle\"}"

response = http.request(request)
puts response.read_body
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://connect.routee.net/sms/campaign",
  "method": "POST",
  "headers": {
    "authorization": "Bearer 12dc9ff4-7df4-4786-8e7a-a46d317687f4",
    "content-type": "application/json"
  },
  "processData": false,
  "data": "{\"body\": \"Hello, a new version of MindPuzzle is available. Check it out\", \"to\" : [ \"+30697xxxxxxx\", \"+30694xxxxxx\", \"+30963xxxxxxx\" ],\"from\": \"mindpuzzle\"}"
}

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

NSDictionary *headers = @{ @"authorization": @"Bearer 12dc9ff4-7df4-4786-8e7a-a46d317687f4",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"body": @"Hello, a new version of MindPuzzle is available. Check it out",
                              @"to": @[ @"+30697xxxxxxx", @"+30694xxxxxxx", @"+30693xxxxxxx" ],
                              @"from": @"mindpuzzle" };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://connect.routee.net/sms/campaign"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[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];
A binary file was returned

You couldn't be authenticated

{  
   "trackingId":"f085b02f-8bca-4e17-8e9a-ed49g02298eb",
   "type":"Sms",
   "state":"Queued",
   "createdAt":"2016-02-13T09:48:02.389Z",
   "respectQuietHours":false,
   "from":"mindpuzzle",
   "to":[  
      "+30697xxxxxxx",
      "+30693xxxxxxx",
      "+30694xxxxxxx"
   ],
   "body":"Hello, a new version of MindPuzzle is available. Check it out",
   "smsAnalysis":{  
      "numberOfRecipients":3,
      "recipientsPerCountry":{  
         "GR":3
      },
      "recipientCountries":{  
         "+30697xxxxxxx":"GR",
         "+30693xxxxxxx":"GR",
         "+30694xxxxxxx":"GR"
      },
      "contacts":{  

      },
      "recipientsPerGroup":{  

      },
      "totalInGroups":0,
      "bodyAnalysis":{  
         "parts":1,
         "unicode":false,
         "characters":61
      }
   },
   "flash":false,
   "statuses":{  
      "Queued":0,
      "Sent":0,
      "Failed":0,
      "Delivered":0,
      "Undelivered":0,
      "Unsent":0
   },
   "cost":0,
   "totalMessages":3
}

Body Params

contacts
array of strings

The contact ids that the message will be sent. Contacts have to be uploaded to the system. One of "groups", "to", "contacts" parameters is required.

groups
array of strings

The groups of contacts in the account selected as recipients. Groups have to be created at the system. One of "groups", "to", "contacts" parameters is required.

to
array of strings

The phone numbers (array) the message is about to be sent to. Format with a '+' and country code e.g., +306948530920 (E.164 format). Maximum array of number allowed 30k. One of "groups", "to", "contacts" parameters is required.

from
string
required

The sender of the message. This can be a telephone number (numeric string with maximum length 16 characters) or an alphanumeric string (maximum length 11 characters). When you want to use a number, you have to enter it without the '+' before the country code (eg 447123123456).

body
string
required

The message you want to send.

scheduledDate
date

Defines the scheduled date and time in UTC. (eg YYYY-MM-DDThh:mm:ssTZD where TZD is the time zone designator (Z or +hh:mm or -hh:mm))

campaignName
string

The name of the campaign. If you want to be able to track the whole campaign from Routee console use a name, if no name is provided you won’t be able to see the campaign from the console but you can track all the individual messages.

flash
boolean

Indicates if the SMS is a flash SMS. A flash SMS is a type of SMS that appears directly on the main screen without user interaction and is not automatically stored in the inbox. It can be useful in emergencies, such as a fire alarm or cases of confidentiality, as in delivering one-time passwords.

respectQuietHours
boolean

Indicates if the SMS should respect the quiet hours. Quiet Hours are set by default to 23.00 - 08.00 and 14.00-17.00 destination local time. Please note that not all countries are supported with this feature due to multiple time zones within the country.

campaignCallback
object

Defines the notification callback information for the progress of the SMS campaign. Check here for the payload information

 
campaignCallback.url
string

The URL that Routee will POST to, each time your campaign status changes to one of the following: Scheduled, Queued, Sent, Running, Finished, or Failed.

campaignCallback.strategy
string

When the URL will be called. Two possible values: on every status change (OnChange) or when a final status arrives (OnCompletion).

callback
object

Defines the notification callback information for an individual message progress of the SMS campaign. Check here for the payload information

 
callback.url
string

A URL that Routee will POST to, each time your message status changes to one of the following: Queued, Failed, Sent, Unsent, Delivered, or Undelivered. Routee will POST the trackingId along with the other request parameters as well as statuses and ErrorDescriptions.

callback.strategy
string

When the URL will be called. Two possible values: on every status change (OnChange) or when a final status arrives (OnCompletion).

reminder
object

Defines the recipients that will receive a test SMS before the actual SMS campaign is sent.

 
reminder.minutesBefore
integer

The minutes before the scheduled date (that the SMS will be sent) for the test SMS to be sent.

reminder.to
array of strings

Defines the recipients of the test SMS

fallbackValues
string

Defines the default values when the SMS has labels, in case a contact does not contain any of these labels.

Headers

Content-Type
string
Authorization
string
 

RESPONSE PARAMETERS

KEY
DESCRIPTION

trackingId

The tracking id used to identify the campaign.

createdAt

The date that this resource was created.

type

The service type of the campaign.

scheduledDate

The time the campaign is scheduled to run.

campaignName

The name of the campaign.

from

The sender of the message.

to

The phone numbers the message is about to be sent to.

body

The message you sent.

state

The state of the campaign.

statuses

Defines the number of SMS per message status. Either, Queued, Sent, Unsent, Failed, Delivered, Undelivered. Check here for more information

smsAnalysis

The data analysis the this SMS.

smsAnalysis.contacts

The details for each contact. The key refers to the id of the contact given in the request.

smsAnalysis.contacts.recipient

The mobile phone that corresponds to the given contact id.

smsAnalysis.contacts.recipientCountry

The country that corresponds to the given contact id.

smsAnalysis.contacts.blacklisted

Indicates if the contact is in the blacklist. If true the contact will be excluded from the request.

smsAnalysis.numberOfRecipients

The total number of recipients.

smsAnalysis.recipientCountries

The country that each mobile belongs to. The key refers to the mobile of the recipients request property

smsAnalysis.recipientsPerCountry

The total recipients per country. The key refers to the country.

smsAnalysis.recipientsPerGroup

For each group the number of recipients that it contains without the blacklisted contacts (in SMS blacklist). The key refers to the group given in the group request property.

smsAnalysis.totalInGroups

The total number of recipients in all given groups excluding the ones already specified (in contacts and recipients request property) as well as the ones that are blacklisted.

smsAnalysis.bodyAnalysis

The analysis for the body of the SMS.

smsAnalysis.bodyAnalysis.characters

The total number of characters of message body.

smsAnalysis.bodyAnalysis.parts

The number of actual SMS that will be sent.

smsAnalysis.bodyAnalysis.transcode

Contains information for the transcoded body of the SMS message. This will be available only if the message can be transcoded.

smsAnalysis.bodyAnalysis.transcode.message

The transcoded message of the original unicode message.

smsAnalysis.bodyAnalysis.transcode.parts

The number of the parts of the transcoded message.

smsAnalysis.bodyAnalysis.unicode

Indicates if the body contains unicode characters.

smsAnalysis.bodyAnalysis.unsupportedGSMCharacters

Which characters caused the message to be considered as unicode.

flash

Indicates if the message is a flash SMS.

respectQuietHours

Indicates if the SMS should respect the quiet hours.

callback

Defines the notification callback information for an individual SMS message

callback.url

The URL that Routee will POST to, each time your message status changes to one of the following: Queued, Failed, Sent, Unsent, Delivered, or Network Error. When Routee POSTs back to your service, a HTTP 200 OK response must be returned. If Routee doesn't receive a 200 OK response, it will try to POST again (up to 5 times)

callback.strategy

When the URL will be called. Two possible values: on every status change (OnChange) or when a final status arrives (OnCompletion)

campaignCallback

Defines the notification callback information for the progress of the SMS campaign.

campaignCallback.url

The URL that Routee will POST to, each time your campaign status changes to one of the following: Scheduled, Queued, Sent, Running, Finished, or Failed. When Routee POSTs back to your service, a HTTP 200 OK response must be returned. If Routee doesn't receive a 200 OK response, it will try to POST again (up to 5 times).

campaignCallback.strategy

When the URL will be called. Two possible values: on every status change (OnChange) or when a final status arrives (OnCompletion).

reminder

Defines the recipients that will receive a test SMS before the actual SMS is sent.

reminder.minutesBefore

The minutes before the scheduled date (that the SMS will be sent) for the test SMS to be sent.

reminder.to

The recipients that will get the test SMS before the campaign will start. Must be a list with valid mobile numbers starting with “ + ” and the country code.

contacts

The contacts in the account selected as recipients.

groups

The groups of contacts in the account selected as recipients.

fallbackValues

Defines the default values in case a contact does not contain any of the selected personalized labels. The key refers to the label name.

errors.code

The code of error

errors.developerMessage

Message of error

errors.property

The numbers of invalid recipients

ERROR CODES

STATUS
CODE
DESCRIPTION

400

400001009

You don't have enough balance to send the campaign.

400

400005000

In case you haven't specified any recipients or the sender is invalid or the recipient numbers are not in the correct format (mobile numbers).If your arrays of numbers contains at least one wrong number then the response will contain an array of the invalid numbers. Also keep in mind that in this case the bulk send out will not be dispatched.

409

409009003

Your account already has a campaign with the given name.

400

400009004

Your campaign has no recipients. Your groups might be empty or all contacts might be blacklisted.

404

404002001

A contact id does not exist.

Suggest Edits

Analyze Bulk Messages - Campaigns

Analyzing a bulk sendout is useful when the user needs information about the send out before actually sending it.

 
posthttps://connect.routee.net/sms/analyze/campaign
curl --request POST \
  --url https://connect.routee.net/sms/analyze/campaign \
  --header 'authorization: Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4' \
  --header 'content-type: application/json' \
  --data '{"body": "Hello [~firstName] a new version of MindPuzzle is available. Check it out", "groups" : [ "customers" ],"from": "mindpuzzle", "to" : [ "+30697xxxxxxx", "+30694xxxxxxx", "+30693xxxxxxx" ]}'
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"body\": \"Hello [~firstName] a new version of MindPuzzle is available. Check it out\", \"groups\" : [ \"customers\" ],\"from\": \"mindpuzzle\", \"to\" : [ \"+30697xxxxxxx\", \"+30694xxxxxxx\", \"+30693xxxxxxx\" ]}");
Request request = new Request.Builder()
  .url("https://connect.routee.net/sms/analyze/campaign")
  .post(body)
  .addHeader("authorization", "Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
var client = new RestClient("https://connect.routee.net/sms/analyze/campaign");
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\": \"Hello [~firstName] a new version of MindPuzzle is available. Check it out\", \"groups\" : [ \"customers\" ],\"from\": \"mindpuzzle\", \"to\" : [ \"+30697xxxxxxx\", \"+30694xxxxxxx\", \"+30693xxxxxxx\" ]}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://connect.routee.net/sms/analyze/campaign",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\"body\": \"Hello [~firstName] a new version of MindPuzzle is available. Check it out\", \"groups\" : [ \"customers\" ],\"from\": \"mindpuzzle\", \"to\" : [ \"+30697xxxxxxx\", \"+30694xxxxxxx\", \"+30693xxxxxxx\" ]}",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4",
    "content-type: application/json"
  ),
));

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

curl_close($curl);

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

conn = http.client.HTTPSConnection("connect.routee.net")

payload = "{\"body\": \"Hello [~firstName] a new version of MindPuzzle is available. Check it out\", \"groups\" : [ \"customers\" ],\"from\": \"mindpuzzle\", \"to\" : [ \"+30697xxxxxxx\", \"+30694xxxxxxx\", \"+30693xxxxxxx\" ]}"

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

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

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://connect.routee.net/sms/analyze/campaign")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["authorization"] = 'Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4'
request["content-type"] = 'application/json'
request.body = "{\"body\": \"Hello [~firstName] a new version of MindPuzzle is available. Check it out\", \"groups\" : [ \"customers\" ],\"from\": \"mindpuzzle\", \"to\" : [ \"+30697xxxxxxx\", \"+30694xxxxxxx\", \"+30693xxxxxxx\" ]}"

response = http.request(request)
puts response.read_body
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://connect.routee.net/sms/analyze/campaign",
  "method": "POST",
  "headers": {
    "authorization": "Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4",
    "content-type": "application/json"
  },
  "processData": false,
  "data": "{\"body\": \"Hello [~firstName] a new version of MindPuzzle is available. Check it out\", \"groups\" : [ \"customers\" ],\"from\": \"mindpuzzle\", \"to\" : [ \"+30697xxxxxxx\", \"+30694xxxxxxx\", \"+30693xxxxxxx\" ]"
}

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

NSDictionary *headers = @{ @"authorization": @"Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"body": @"Hello [~firstName] a new version of MindPuzzle is available. Check it out",
                              @"groups": @[ @"customers" ],
                              @"from": @"mindpuzzle",
                              @"to" : @[ "+30697xxxxxxx", "+30694xxxxxxx", "+30693xxxxxxx" ]};

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://connect.routee.net/sms/analyze/campaign"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[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];
A binary file was returned

You couldn't be authenticated

{
   "numberOfRecipients": 7,
   "recipientsPerCountry":{
     "GR": 3,
     "DE": 1,
     "FR": 2,
     "RU": 1
   },
   "recipientCountries":{
     "+30697xxxxxxx": "GR",
     "+30693xxxxxxx": "GR",
     "+30694xxxxxxx": "GR"
   },
  "contacts":{
  },
  "recipientsPerGroup":{
    "customers": 4
  },
  "totalInGroups": 4,
  "bodyAnalysis":{
    "characters": 76,
    "parts": 1,
    "unicode": false
  }
}

Body Params

contacts
array of strings

The contact ids that the message will be sent.

groups
array of strings

The groups of contacts in the account selected as recipients.

to
array of strings

The phone numbers the message is about to be sent to. Format with a '+' and country code e.g., +306948530920 (E.164 format).

from
string
required

The sender of the message. This can be a telephone number (numeric string with maximum length 16 characters) or an alphanumeric string (maximum length 11 characters). When you want to use a number, you have to enter it without the '+' before the country code (eg 447123123456).

body
string
required

The message you want to send.

Headers

Content-Type
string
Authorization
string
 

RESPONSE PARAMETERS

KEY
DESCRIPTION

contacts

The details for each contact. The key refers to the id of the contact given in the request.

contacts.recipient

The mobile phone that corresponds to the given contact id.

smsAnalysis.contacts.recipientCountry

The country that corresponds to the given contact id.

contacts.blacklisted

Indicates if the contact is in the SMS blacklist. If true the contact will be excluded from the request.

numberOfRecipients

The total number of recipients.

recipientCountries

The country that each mobile belongs to. The key refers to the mobile of the recipients request property.

recipientsPerCountry

The total recipients per country. The key refers to the country.

recipientsPerGroup

For each group the number of recipients that it contains without the blacklisted contacts (in SMS blacklist). The key refers to the group given in the group request property.

totalInGroups

The total number of recipients in all given groups excluding the ones already specified (in contacts and recipients request property) as well as the ones that are blacklisted.

bodyAnalysis

The analysis for the body of the SMS.

bodyAnalysis.characters

The total number of characters of message body.

bodyAnalysis.parts

The number of actual SMS that will be sent.

bodyAnalysis.transcode

Contains information for the transcoded body of the sms message. This will be available only if the message can be transcoded.

bodyAnalysis.transcode.message

The transcoded message of the original unicode message.

bodyAnalysis.transcode.parts

The number of the parts of the transcoded message.

bodyAnalysis.unicode

Indicates if the body contains unicode characters.

bodyAnalysis.unsupportedGSMCharacters

Which characters caused the message to be considered as unicode.

errors.code

The code of error

errors.developerMessage

Message of error

errors.property

The numbers of invalid recipients

ERROR CODES

STATUS
CODE
DESCRIPTION

400

400001009

You don't have enough balance to send the campaign.

400

400005000

In case you haven't specified any recipients or the sender is invalid.

409

409009003

Your account already has a campaign with the given name.

400

400009004

Your campaign has no recipients. Your groups might be empty or all contacts might be blacklisted.

404

404002001

A contact id does not exist.

Suggest Edits

Track an SMS

You can get all the tracking information for the messages (parts) of a single SMS by providing its message id.

 
gethttps://connect.routee.net/sms/tracking/single/trackingId
curl --request GET \
  --url https://connect.routee.net/sms/tracking/single/29c2ad68-f76e-11e6-bc64-92361f002671 \
  --header 'authorization: Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4'
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://connect.routee.net/sms/tracking/single/a9122812-21e0-47c1-ba13-746e4a212655")
  .get()
  .addHeader("authorization", "Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4")
  .build();

Response response = client.newCall(request).execute();
var client = new RestClient("https://connect.routee.net/sms/tracking/single/a9122812-21e0-47c1-ba13-746e4a212655");
var request = new RestRequest(Method.GET);
request.AddHeader("authorization", "Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4");
IRestResponse response = client.Execute(request);
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://connect.routee.net/sms/tracking/single/44434312-5698-fd78-2378-d4d44a2126c3",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4"
  ),
));

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

curl_close($curl);

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

conn = http.client.HTTPSConnection("connect.routee.net")

headers = { 'authorization': "Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4" }

conn.request("GET", "/sms/tracking/single/44434312-5698-fd78-2378-d4d44a2126c3", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://connect.routee.net/sms/tracking/single/44434312-5698-fd78-2378-d4d44a2126c3")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4'

response = http.request(request)
puts response.read_body
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://connect.routee.net/sms/tracking/single/44434312-5698-fd78-2378-d4d44a2126c3",
  "method": "GET",
  "headers": {
    "authorization": "Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4"
  }
}

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

NSDictionary *headers = @{ @"authorization": @"Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://connect.routee.net/sms/tracking/single/44434312-5698-fd78-2378-d4d44a2126c3"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];

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];
A binary file was returned

You couldn't be authenticated

[
  {
    "smsId": "23c2bd04-f76e-11e6-bc64-92361f002671",
    "messageId": "29c2ad68-f76e-11e6-bc64-92361f002671",
    "to": "+306912345678",
    "groups": [],
    "country": "GR",
    "operator": "string",
    "status": {
      "status": "Delivered",
      "reason": {
        "detailedStatus": "Delivered",
        "description": "The SMS was sent and it was delivered to its recipient."
      },
      "date": "2016-06-23T06:55:57Z"
    },
    "body": "string",
    "applicationName": "Routee",
    "originatingService": "Sms",
    "latency": 1,
    "parts": 1,
    "part": 1,
    "price": 0.036,
    "from": "amdTelecom",
    "direction": "Outbound"
  }
]

Path Params

trackingId
string
required

The unique tracking id of the sms

Headers

Authorization
string
Content-Type
string
 

RESPONSE PARAMETERS

KEY
DESCRIPTION

applicationName

The name of the application that was used to send this message.

campaign

The name of the campaign that this message was sent from.

country

The country of the recipient in ISO 3166-1 alpha 2 format.

smsId

The unique id of one SMS part included in the message. If the message is multipart then these values will be different for each part.

messageId

The id of the message (trackingId). All the parts of a multipart SMS have the same messageId.

groups

The groups that the recipient belongs to.

body

The message of the SMS.

operator

The operator of the recipient.

originatingService

The service that sent this message.

to

The recipient.

latency

The overall delivery latency of the message.

parts

The number of actual SMS parts.

part

The number of the current SMS part.

price

The cost of this SMS part.

label

The label of the SMS tracking.

status

Information about the Sms status.

status.date

The date that the status was reported.

status.status

The status of the SMS tracking. Check here for possible values.

status.reason

The reason of the status

status.reason.detailedStatus

The detailed status.
Possible values: Sent, Delivered, Undelivered, Failed, Undelivered on Handset, Unknown Number, Roaming, Call Barred, Unknown Status, Carrier Violation.
Check here for details.

status.reason.description

The description of the detailed status

from

The sender Id of the message

direction

The direction of the message. Possible values: "Inbound", "Outbound"

ERROR CODES

STATUS
CODE
DESCRIPTION

404

404005000

Tracking not found.

Suggest Edits

Track multiple messages for a specific bulk send out - campaign

You can get all the tracking information for the messages of a bulk send out by providing the tracking id

 
gethttps://connect.routee.net/sms/tracking/campaign/campaignTrackingId
curl --request GET \
  --url 'https://connect.routee.net/sms/tracking/campaign/aa053cda-f76d-11e6-bc64-92361f002671 \
  --header 'authorization: Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4'
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://connect.routee.net/sms/tracking/aa053cda-f76d-11e6-bc64-92361f002671")
  .get()
  .addHeader("authorization", "Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4")
  .build();

Response response = client.newCall(request).execute();
var client = new RestClient("https://connect.routee.net/sms/tracking/campaign/aa053cda-f76d-11e6-bc64-92361f002671");
var request = new RestRequest(Method.GET);
request.AddHeader("authorization", "Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4");
IRestResponse response = client.Execute(request);
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://connect.routee.net/sms/tracking/campaign/aa053cda-f76d-11e6-bc64-92361f002671",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4"
  ),
));

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

curl_close($curl);

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

conn = http.client.HTTPSConnection("connect.routee.net")

headers = { 'authorization': "Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4" }

conn.request("GET", "/sms/tracking/campaign/aa053cda-f76d-11e6-bc64-92361f002671", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://connect.routee.net/sms/tracking/campaign/aa053cda-f76d-11e6-bc64-92361f002671")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4'

response = http.request(request)
puts response.read_body
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://connect.routee.net/sms/tracking/campaign/aa053cda-f76d-11e6-bc64-92361f002671",
  "method": "GET",
  "headers": {
    "authorization": "Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4"
  }
}

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

NSDictionary *headers = @{ @"authorization": @"Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://connect.routee.net/sms/tracking/campaign/aa053cda-f76d-11e6-bc64-92361f002671"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];

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];
A binary file was returned

You couldn't be authenticated

{
   "totalPages": 1,
   "last": true,
   "totalElements": 1,
   "first":  true,
   "numberOfElements": 1,
   "size": 20,
   "number": 0,
   "content":[
      {
         "applicationName": "Routee",
         "campaignName": "testCampaign",
         "country":"GR",
         "smsId":"23c2bd04-f76e-11e6-bc64-92361f002671",
         "messageId":"29c2ad68-f76e-11e6-bc64-92361f002671",
         "groups":[],
         "body": "string",
         "operator": "string",
         "originatingService": "sms",
         "to":"+306912345678",        
        	"status": {
	        	"status": "Delivered",
	        	"date": "2016-06-23T06:55:57Z",
        		"reason": {
        			"detailedStatus": "Delivered",
	        		"description": "The SMS was sent and it was delivered to its recipient."
        		}
        	},
         "latency": 1,
         "parts": 1,
         "part": 1,
         "price": 0.036,
         "from": "amdTelecom",
         "direction": "Outbound"
        
      }
   ]
}

Path Params

campaignTrackingId
string
required

The tracking id of the campaign which includes the messages.

Query Params

page
string

The page number to retrieve, default value is 0 (meaning the first page).

size
string

The number of items to retrieve, default value is 20.

sort
string

The field name that will be used to sort the results.

Headers

Authorization
string
Content-Type
string
 

RESPONSE PARAMETERS

KEY
DESCRIPTION

totalPages

The number of total pages.

last

Whether the current page is the last one.

totalElements

The total amount of elements for the current search.

first

Whether the current page is the first one.

numberOfElements

The number of elements currently on this page.

number

The requested page number.

size

The requested page size.

content

Contains the search results.

content.applicationName

The name of the application that was used to send this message.

content.campaignName

The name of the campaign that this message was sent from.

content.campaignTrackingId

The tracking id of the campaign that this message was sent from.

content.country

The country of the recipient in ISO 3166-1 alpha 2 format.

content.smsId

The unique id of one SMS part included in the message. If the message is multipart then these values will be different for each part.

content.messageId

The id of the message. All the parts of a multipart SMS have the same messageId.

content.groups

The groups that the recipient belongs to.

content.body

The message of the SMS.

content.operator

The operator of the recipient.

content.originatingService

The service that sent this message.

content.to

The recipient.

content.latency

The overall delivery latency of the message.

content.parts

The number of actual SMS parts.

content.part

The number of the current SMS part.

content.price

The cost of this SMS part.

content.status

Information about the Sms status.

content.status.date

The date that the status was reported.

content.status.status

The status of the SMS. Check here for possible values.

content.status.reason

The reason of the status

content.status.reason.detailedStatus

The detailed status.
Possible values: Sent, Delivered, Undelivered, Failed, Undelivered on Handset, Unknown Number, Roaming, Call Barred, Unknown Status, Carrier Violation.
Check here for details.

content.status.reason.description

The description of the detailed status

content.from

The sender Id of the message

content.direction

The direction of the message. Possible values: "Inbound", "Outbound"

ERROR CODES

STATUS
CODE
DESCRIPTION

404

404001001

Account not found.

400

404009001

Campaign not found.

Suggest Edits

Track multiple messages with filters for a specific time range

Limit the tracking result of multiple sms by passing filters.

 
posthttps://connect.routee.net/sms/tracking
curl --request POST \
  --url 'https://connect.routee.net/sms/tracking?dateStart=2015-11-11T15%3A00Z&dateEnd=2017-11-11T17%3A00Z' \
  --header 'authorization: Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4' \
  --header 'content-type: application/json' \
  --data '[{"fieldName": "smsId", "searchTerm": "23c2bd04-f76e-11e6-bc64-92361f002671"}]'
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "[{\"fieldName\": \"smsId\", \"searchTerm\": \"23c2bd04-f76e-11e6-bc64-92361f002671\"}]");
Request request = new Request.Builder()
  .url("https://connect.routee.net/sms/tracking?dateStart=2015-11-11T15%3A00Z&dateEnd=2015-11-11T17%3A00Z")
  .post(body)
  .addHeader("authorization", "Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
var client = new RestClient("https://connect.routee.net/sms/tracking?dateStart=2015-11-11T15%3A00Z&dateEnd=2015-11-11T17%3A00Z");
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", "[{\"fieldName\": \"smsId\", \"searchTerm\": \"23c2bd04-f76e-11e6-bc64-92361f002671\"}]", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://connect.routee.net/sms/tracking?dateStart=2015-11-11T15%3A00Z&dateEnd=2015-11-11T17%3A00Z",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "[{\"fieldName\": \"smsId\", \"searchTerm\": \"23c2bd04-f76e-11e6-bc64-92361f002671\"}]",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4",
    "content-type: application/json"
  ),
));

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

curl_close($curl);

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

conn = http.client.HTTPSConnection("connect.routee.net")

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

payload = '[{"fieldName": "smsId", "searchTerm": "23c2bd04-f76e-11e6-bc64-92361f002671"}]'

conn.request("POST", "/sms/tracking?dateStart=2015-11-11T15%3A00Z&dateEnd=2017-11-11T17%3A00Z", payload=payload, headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://connect.routee.net/sms/tracking?dateStart=2015-11-11T15%3A00Z&dateEnd=2017-11-11T17%3A00Z")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["authorization"] = 'Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4'
request["content-type"] = 'application/json'
request.body = '[{"fieldName": "smsId", "searchTerm": "23c2bd04-f76e-11e6-bc64-92361f002671"}]'

response = http.request(request)
puts response.read_body
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://connect.routee.net/sms/tracking?dateStart=2015-11-11T15%3A00Z&dateEnd=2015-11-11T17%3A00Z",
  "method": "POST",
  "headers": {
    "authorization": "Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4",
    "content-type" : "application/json"
  },
  "data": '[{"fieldName": "smsId", "searchTerm": "23c2bd04-f76e-11e6-bc64-92361f002671"}]'
}

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

NSDictionary *headers = @{ @"authorization": @"Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @[ @{ @"fieldName": @"smsId", @"searchTerm": @"23c2bd04-f76e-11e6-bc64-92361f002671" } ];

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://connect.routee.net/sms/tracking?dateStart=2015-11-11T15%3A00Z&dateEnd=2015-11-11T17%3A00Z"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[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];
A binary file was returned

You couldn't be authenticated

{
   "totalPages": 1,
   "last": true,
   "totalElements": 1,
   "first":  true,
   "numberOfElements": 1,
   "size": 20,
   "number": 0,
   "content":[
      {
         "applicationName": "Routee",
         "campaignName": "testCampaign",
         "country":"GR",
         "smsId":"23c2bd04-f76e-11e6-bc64-92361f002671",
         "messageId":"29c2ad68-f76e-11e6-bc64-92361f002671",
         "groups":[],
         "body": "string",
         "operator": "string",
         "originatingService": "sms",
         "to":"+306912345678",
        	"status": {
	        	"status": "Delivered",
	        	"date": "2016-06-23T06:55:57Z",
        		"reason": {
        			"detailedStatus": "Delivered",
	        		"description": "The SMS was sent and it was delivered to its recipient."
        		}
        	},
         "latency": 1,
         "parts": 1,
         "part": 1,
         "price": 0.036,
         "from": "amdTelecom",
         "direction": "Outbound"
        
      }
   ]
}

Query Params

dateStart
date

ISO-8601 date-time format

dateEnd
date

ISO-8601 date-time format

page
int32

The page number to retrieve, default value is 0 (meaning the first page)

size
int32

The number of items to retrieve, default value is 20.

sort
string

The field name that will be used to sort the results.

trackingId
string

If provided then only the SMS messages for the specific Campaign Tracking Id will be retrieved.

campaign
boolean

If true it will return only SMS messages that belong to an SMS campaign.

Body Params

fieldName
string
required

The name of the field to filter. Available values: smsId, to, country, status, label, operator, direction

searchTerm
string
required

The exact value that the specified field must match.

searchOperator
string

Optional: The operator upon which the search operation will be executed. Possible values: 'is', 'is_not', 'contains', 'starts_with', 'ends_with'. If missing defaults to 'is'.

Headers

Content-Type
string
Authorization
string
 

RESPONSE PARAMETERS

KEY
DESCRIPTION

totalPages

The number of total pages.

last

Whether the current page is the last one.

totalElements

The total amount of elements for the current search.

first

Whether the current page is the first one.

numberOfElements

The number of elements currently on this page.

number

The requested page number.

size

The requested page size.

content

Contains the search results.

content.applicationName

The name of the application that was used to send this message.

content.campaignName

The name of the campaign that this message was send from.

content.campaignTrackingId

The tracking id of the campaign that this message was sent from.

content.country

The country of the recipient in ISO 3166-1 alpha 2 format.

content.smsId

The unique id of one SMS part included in a message. If the message is multipart then these values will be different for each part.

content.messageId

The id of the message. All the parts of a multipart SMS have the same messageId.

content.groups

The groups that the recipient belongs to.

content.body

The message of the SMS.

content.operator

The operator of the recipient.

content.originatingService

The service that sent this message.

content.to

The recipient.

content.latency

The overall delivery latency of the message.

content.parts

The number of actual SMS parts.

content.part

The number of the current SMS part.

content.price

The cost of this SMS part.

content.label

The label that was given to the SMS tracking.

content.status

Information about the Sms status.

content.status.date

The date that the status was reported.

content.status.status

The status of the SMS. Check here for possible values.

content.status.reason

The reason of the status

content.status.reason.detailedStatus

The detailed status.
Possible values: Sent, Delivered, Undelivered, Failed, Undelivered on Handset, Unknown Number, Roaming, Call Barred, Unknown Status, Carrier Violation.
Check here for details.

content.status.reason.description

The description of the detailed status

content.from

The sender Id of the message

content.direction

The direction of the message. Possible values: "Inbound", "Outbound"

content.receivedDate

The date that an inbound message has received.

ERROR CODES

STATUS
CODE
DESCRIPTION

404

404001001

Account not found.

400

404009001

Campaign not found.

Suggest Edits

Retrieve the countries that are supported by Quiet Hours feature

 
gethttps://connect.routee.net/sms/quietHours/countries/language
curl --request GET \
  --url https://connect.routee.net/sms/quietHours/countries/en \
  --header 'authorization: Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4'
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://connect.routee.net/sms/quietHours/countries/en")
  .get()
  .addHeader("authorization", "Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4")
  .build();

Response response = client.newCall(request).execute();
var client = new RestClient("https://connect.routee.net/sms/quietHours/countries/en");
var request = new RestRequest(Method.GET);
request.AddHeader("authorization", "Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4");
IRestResponse response = client.Execute(request);
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://connect.routee.net/sms/quietHours/countries/en",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4"
  ),
));

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

curl_close($curl);

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

conn = http.client.HTTPSConnection("connect.routee.net")

headers = { 'authorization': "Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4" }

conn.request("GET", "/sms/quietHours/countries/en", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://connect.routee.net/sms/quietHours/countries/en")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4'

response = http.request(request)
puts response.read_body
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://connect.routee.net/sms/quietHours/countries/en",
  "method": "GET",
  "headers": {
    "authorization": "Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4"
  }
}

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

NSDictionary *headers = @{ @"authorization": @"Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://connect.routee.net/sms/quietHours/countries/en"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];

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];
A binary file was returned

You couldn't be authenticated

[
   {
      "code":"string",
      "name":"string",
      "localeName":"string",
      "isoA3Code":"string",
      "supported": "boolean"
   }
]

Path Params

language
string
required

The language code is ISO 639-1 format (el, en) that will be used to translate the country names.

Headers

Authorization
string
Content-Type
string
 

RESPONSE PARAMETERS

KEY
DESCRIPTION

code

The country code in ISO 3166-1 alpha-2 format (US, GR).

name

The country name translated in the requested language.

localeName

The country name translated in its native language (for Greece it will be Ελλάδα).

isoA3Code

The country code in ISO 3166-1 alpha-3 format (USA, GRC).

supported

Indicates if the country is supported by the quiet hours feature.

ERROR CODES

STATUS
CODE
DESCRIPTION

404

404001001

Account not found.

Suggest Edits

Update a scheduled bulk send out - campaign

Update an already scheduled campaign. You can change the recipients or the sender id or any other parameter you set previously. Note that the campaign must have status "Scheduled" in order to update it.

 
puthttps://connect.routee.net/sms/trackingId
  curl -X PUT \
  https://connect.routee.net/sms/40985880-96a9-42d6-b592-f447b2428a5f \
  -H 'authorization: Bearer 104631dc-dba7-4b33-8cd5-b73d7cc4d58e' \
  -H 'content-type: application/json' \
  -d '{
	"campaignName":"updatedCampaign",
	"from": "Routee", 
	"to" : [ "+30697xxxxxxx", "+30694xxxxxxx", "+30693xxxxxxx" ],
	"body": "The scheduled campaign has been updated", 
	"respectQuietHours":true,
	"callback": {
		"strategy": "OnChange", 
		"url": "http://xxx.xxxxxxxx.xxx/xxxxx"
		
	},
	"scheduledDate":"2020-12-24T10:54:54.098Z"
}'
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"campaignName\":\"updatedCampaign\",\"from\": \"Routee\",\"to\" : [ \"+30697xxxxxxx\", \"+30694xxxxxxx\", \"+30693xxxxxxx\" ],\"body\": \"The scheduled campaign has been updated\",\"respectQuietHours\":true,\"callback\":{\"strategy\": \"OnChange\",\"url\": \"http://xxx.xxxxxxxx.xxx/xxxxx\"},\"scheduledDate\":\"2020-12-24T10:54:54.098Z\"}");
Request request = new Request.Builder()
  .url("https://connect.routee.net/sms/40985880-96a9-42d6-b592-f447b2428a5f")
  .put(body)
  .addHeader("authorization", "Bearer 104631dc-dba7-4b33-8cd5-b73d7cc4d58e")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
var client = new RestClient("https://connect.routee.net/sms/40985880-96a9-42d6-b592-f447b2428a5f");
var request = new RestRequest(Method.PUT);
request.AddHeader("content-type", "application/json");
request.AddHeader("authorization", "Bearer 104631dc-dba7-4b33-8cd5-b73d7cc4d58e");
request.AddParameter("application/json", "{\"campaignName\":\"updatedCampaign\",\"from\": \"Routee\",\"to\" : [ \"+30697xxxxxxx\", \"+30694xxxxxxx\", \"+30693xxxxxxx\" ],\"body\": \"The scheduled campaign has been updated\",\"respectQuietHours\":true,\"callback\":{\"strategy\": \"OnChange\",\"url\": \"http://xxx.xxxxxxxx.xxx/xxxxx\"},\"scheduledDate\":\"2020-12-24T10:54:54.098Z\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://connect.routee.net/sms/40985880-96a9-42d6-b592-f447b2428a5f",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_POSTFIELDS => "{\"campaignName\":\"updatedCampaign\",\"from\": \"Routee\",\"to\" : [ \"+30697xxxxxxx\", \"+30694xxxxxxx\", \"+30693xxxxxxx\" ],\"body\": \"The scheduled campaign has been updated\",\"respectQuietHours\":true,\"callback\":{\"strategy\": \"OnChange\",\"url\": \"http://xxx.xxxxxxxx.xxx/xxxxx\"},\"scheduledDate\":\"2020-12-24T10:54:54.098Z\"}",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer 104631dc-dba7-4b33-8cd5-b73d7cc4d58e",
    "content-type: application/json"
  ),
));

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

curl_close($curl);

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

conn = http.client.HTTPSConnection("connect.routee.net")

payload = "{\"campaignName\":\"updatedCampaign\",\"from\": \"Routee\",\"to\" : [ \"+30697xxxxxxx\", \"+30694xxxxxxx\", \"+30693xxxxxxx\" ],\"body\": \"The scheduled campaign has been updated\",\"respectQuietHours\":true,\"callback\":{\"strategy\": \"OnChange\",\"url\": \"http://xxx.xxxxxxxx.xxx/xxxxx\"},\"scheduledDate\":\"2020-12-24T10:54:54.098Z\"}"

headers = {
    'authorization': "Bearer 104631dc-dba7-4b33-8cd5-b73d7cc4d58e",
    'content-type': "application/json"
    }

conn.request("PUT", "/sms/40985880-96a9-42d6-b592-f447b2428a5f", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://connect.routee.net/sms/40985880-96a9-42d6-b592-f447b2428a5f")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Put.new(url)
request["authorization"] = 'Bearer 104631dc-dba7-4b33-8cd5-b73d7cc4d58e'
request["content-type"] = 'application/json'
request.body = "{\"campaignName\":\"updatedCampaign\",\"from\": \"Routee\",\"to\" : [ \"+30697xxxxxxx\", \"+30694xxxxxxx\", \"+30693xxxxxxx\" ],\"body\": \"The scheduled campaign has been updated\",\"respectQuietHours\":true,\"callback\":{\"strategy\": \"OnChange\",\"url\": \"http://xxx.xxxxxxxx.xxx/xxxxx\"},\"scheduledDate\":\"2020-12-24T10:54:54.098Z\"}"

response = http.request(request)
puts response.read_body
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://connect.routee.net/sms/40985880-96a9-42d6-b592-f447b2428a5f",
  "method": "PUT",
  "headers": {
    "authorization": "Bearer 104631dc-dba7-4b33-8cd5-b73d7cc4d58e",
    "content-type": "application/json"
  },
  "processData": false,
  "data": "{\"campaignName\":\"updatedCampaign\",\"from\": \"Routee\",\"to\" : [ \"+30697xxxxxxx\", \"+30694xxxxxxx\", \"+30693xxxxxxx\" ],\"body\": \"The scheduled campaign has been updated\",\"respectQuietHours\":true,\"callback\":{\"strategy\": \"OnChange\",\"url\": \"http://xxx.xxxxxxxx.xxx/xxxxx\"},\"scheduledDate\":\"2020-12-24T10:54:54.098Z\"}"
}

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

NSDictionary *headers = @{ @"authorization": @"Bearer 104631dc-dba7-4b33-8cd5-b73d7cc4d58e",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"campaignName":@"updatedCampaign",
                             @"from": @"Routee",
                             @"to": @[ @"+30697xxxxxxx", @"+30694xxxxxxx", @"+30693xxxxxxx" ],
                             @"body": @"The scheduled campaign has been updated",
                             @"respectQuietHours": @"true",
                             @"scheduledDate": @"2020-12-24T10:54:54.098Z",
                              @"callback": @{ @"strategy": @"OnChange", @"url": @"http://xxx.xxxxxxxx.xxx/xxxxx" } };
                              };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://connect.routee.net/sms/40985880-96a9-42d6-b592-f447b2428a5f"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[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];
A binary file was returned

You couldn't be authenticated

{
    "campaignName": "updatedCampaign",
    "trackingId": "40985880-96a9-42d6-b592-f447b2428a5f",
    "type": "Sms",
    "state": "Scheduled",
    "createdAt": "2017-05-20T12:10:50.3Z",
    "respectQuietHours": true,
    "scheduledDate": "2020-12-24T10:54:54.098Z",
    "from": "Routee",
    "to": [
        "+30697xxxxxxxx",
        "+30694xxxxxxxx",
        "+30693xxxxxxxx"
    ],
    "body": "The scheduled campaign has been updated",
    "smsAnalysis": {
        "numberOfRecipients": 3,
        "recipientsPerCountry": {
            "GR": 3
        },
        "recipientCountries": {
            "+30693xxxxxxxx": "GR",
            "+30694xxxxxxxx": "GR",
            "+30697xxxxxxxx": "GR"
        },
        "contacts": {},
        "recipientsPerGroup": {},
        "totalInGroups": 0,
        "bodyAnalysis": {
            "parts": 1,
            "unicode": false,
            "characters": 39
        }
    },
    "flash": false,
    "statuses": {
        "Queued": 0,
        "Sent": 0,
        "Failed": 0,
        "Delivered": 0,
        "Undelivered": 0,
        "Unsent": 0
    },
    "callback": {
        "url": "http://xxx.xxxxxxxx.xxx/xxxxx",
        "strategy": "OnChange"
    },
    "cost": 0,
    "totalMessages": 3
}

Path Params

campaignTrackingId
string
required

the campaign’s tracking id.

Body Params

callback
object
 
callback.url
string

A URL that Routee will POST to, each time your message status changes to one of the following: Queued, Failed, Sent, Unsent, Delivered, or Undelivered. Routee will POST the trackingId along with the other request parameters as well as statuses and ErrorDescriptions.

callback.strategy
string

When the URL will be called. Two possible values: on every status change (OnChange) or when a final status arrives (OnCompletion).

contacts
array of strings
fallbackValues
array of strings
flash
boolean
groups
array of strings
body
string
campaignName
string
to
array of strings
respectQuietHours
boolean
scheduledDate
date
from
string
campaignCallback
object
 
campaignCallback.url
string

The URL that Routee will POST to, each time your campaign status changes to one of the following: Scheduled, Queued, Sent, Running, Finished, or Failed.

campaignCallback.strategy
string

When the URL will be called. Two possible values: on every status change (OnChange) or when a final status arrives (OnCompletion).

reminder
object
 
reminder.minutesBefore
integer

The minutes before the scheduled date (that the SMS will be sent) for the test SMS to be sent.

reminder.to
array of strings

Defines the recipients of the test SMS

Headers

Content-Type
string
Authorization
string
 

Request/Response Parameters Description

See /sms/campaign for explanation of the request/response parameters

Caution

If you don't include the "scheduledDate" parameter in your request then your campaign will be sent immediately.

ERROR CODES

STATUS
CODE
DESCRIPTIONS

404

404009001

The campaign with the given tracking id doesn't exist.

400

400009002

The campaign status is not Scheduled.

400

400001009

You don't have enough balance to send the campaign.

400

400005000

In case you haven't specified any recipients or the sender is invalid.

409

409009003

Your account already has a campaign with the given name.

400

400009004

Your campaign has no recipients. Your groups might be empty or all contacts might be blacklisted.

404

404002001

A contact id does not exist.

Suggest Edits

Delete a scheduled bulk send out - campaign

When you no longer want to send an already scheduled bulk send out - campaign, deleting it is very simple.

 
deletehttps://connect.routee.net/sms/trackingId
curl --request DELETE \
  --url https://connect.routee.net/sms/2c96147b-fb5f-4cc2-9cea-374cc68f5408 \
  --header 'authorization: Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4'
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://connect.routee.net/sms/2c96147b-fb5f-4cc2-9cea-374cc68f5408")
  .delete(null)
  .addHeader("authorization", "Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4")
  .build();

Response response = client.newCall(request).execute();
var client = new RestClient("https://connect.routee.net/sms/2c96147b-fb5f-4cc2-9cea-374cc68f5408");
var request = new RestRequest(Method.DELETE);
request.AddHeader("authorization", "Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4");
IRestResponse response = client.Execute(request);
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://connect.routee.net/sms/2c96147b-fb5f-4cc2-9cea-374cc68f5408",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4"
  ),
));

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

curl_close($curl);

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

conn = http.client.HTTPSConnection("connect.routee.net")

headers = { 'authorization': "Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4" }

conn.request("DELETE", "/sms/2c96147b-fb5f-4cc2-9cea-374cc68f5408", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://connect.routee.net/sms/2c96147b-fb5f-4cc2-9cea-374cc68f5408")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Delete.new(url)
request["authorization"] = 'Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4'

response = http.request(request)
puts response.read_body
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://connect.routee.net/sms/2c96147b-fb5f-4cc2-9cea-374cc68f5408",
  "method": "DELETE",
  "headers": {
    "authorization": "Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4"
  }
}

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

NSDictionary *headers = @{ @"authorization": @"Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://connect.routee.net/sms/2c96147b-fb5f-4cc2-9cea-374cc68f5408"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
[request setAllHTTPHeaderFields:headers];

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];
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

trackingId
string
required

the campaign’s tracking id.

Headers

Content-Type
string
Authorization
string
 

ERROR CODES

CODE
STATUS
DESCRIPTION

404

404009001

The campaign with the given tracking id doesn't exist.

400

400009002

The campaign status is not Scheduled.

Suggest Edits

Retrieve details for a bulk send out - campaign

You can retrieve the details of a specific bulk send out - campaign by its tracking id.

 
gethttps://connect.routee.net/campaigns/trackingId
curl --request GET \
  --url https://connect.routee.net/campaigns/2c96147b-fb5f-4cc2-9cea-374cc68f5408 \
  --header 'authorization: Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4'
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://connect.routee.net/campaigns/2c96147b-fb5f-4cc2-9cea-374cc68f5408")
  .get()
  .addHeader("authorization", "Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4")
  .build();

Response response = client.newCall(request).execute();
var client = new RestClient("https://connect.routee.net/campaigns/2c96147b-fb5f-4cc2-9cea-374cc68f5408");
var request = new RestRequest(Method.GET);
request.AddHeader("authorization", "Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4");
IRestResponse response = client.Execute(request);
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://connect.routee.net/campaigns/2c96147b-fb5f-4cc2-9cea-374cc68f5408",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4"
  ),
));

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

curl_close($curl);

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

conn = http.client.HTTPSConnection("connect.routee.net")

headers = { 'authorization': "Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4" }

conn.request("GET", "/campaigns/2c96147b-fb5f-4cc2-9cea-374cc68f5408", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://connect.routee.net/campaigns/2c96147b-fb5f-4cc2-9cea-374cc68f5408")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4'

response = http.request(request)
puts response.read_body
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://connect.routee.net/campaigns/2c96147b-fb5f-4cc2-9cea-374cc68f5408",
  "method": "GET",
  "headers": {
    "authorization": "Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4"
  }
}

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

NSDictionary *headers = @{ @"authorization": @"Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://connect.routee.net/campaigns/2c96147b-fb5f-4cc2-9cea-374cc68f5408"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];

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];
A binary file was returned

You couldn't be authenticated

{
  "campaignName": "My Campaign",
  "trackingId": "4f0ede3a-bd0a-40c8-b4fc-aeb6643e274e",
  "type": "Sms",
  "state": "Sent",
  "createdAt": "2017-01-26T22:58:28.492Z",
  "respectQuietHours": false,
  "scheduledDate": "2017-01-27T07:17:40Z",
  "from": "Routee",
  "to": [],
  "contacts": [],
  "groups": [
    "AMD Telecom"
  ],
  "body": "Hello [~firstName] [~lastName]. This is a test Message. Sorry for the inconvenience. Other messages may follow. Please ignore them. ",
  "smsAnalysis": {
    "numberOfRecipients": 66,
    "recipientsPerCountry": {
      "GR": 65,
      "ES": 1
    },
    "recipientCountries": {},
    "contacts": {},
    "recipientsPerGroup": {
      "AMD Telecom": 66
    },
    "totalInGroups": 66,
    "bodyAnalysis": {
      "parts": 1,
      "unicode": false,
      "characters": 138
    }
  },
  "flash": false,
  "fallbackValues": {
    "firstName": "",
    "lastName": ""
  },
  "statuses": {
    "Queued": 0,
    "Sent": 0,
    "Failed": 0,
    "Delivered": 63,
    "Undelivered": 0,
    "Unsent": 0
  },
  "cost": 2.276,
  "totalMessages": 66,
  "endedAt": "2017-01-27T07:17:41.775Z"
}

Path Params

trackingId
string
required

The tracking id of the campaign

Headers

Authorization
string
Content-Type
string
 

RESPONSE PARAMETERS

trackingId

The tracking id used to identify the campaign.

createdAt

The date that this resource was created.

type

The service type of the campaign.

scheduledDate

The time the campaign is scheduled to run.

campaignName

The name of the campaign.

from

The sender of the message.

to

The phone numbers the message is about to be sent to.

body

The message you sent.

state

The state of the campaign.

statuses

Defines the number of SMS per message status. Either, Queued, Sent, Unsent, Failed, Delivered, Undelivered. For more details check here

smsAnalysis

The data analysis the this SMS.

smsAnalysis.contacts

The details for each contact. The key refers to the id of the contact given in the request.

smsAnalysis.contacts.recipient

The mobile phone that corresponds to the given contact id.

smsAnalysis.contacts.recipientCountry

The country that corresponds to the given contact id.

smsAnalysis.contacts.blacklisted

Indicates if the contact is in the SMS blacklist. If true the contact will be excluded from the request.

smsAnalysis.numberOfRecipients

The total number of recipients.

smsAnalysis.recipientCountries

The country that each mobile belongs to. The key refers to the mobile of the recipients request property

smsAnalysis.recipientsPerCountry

The total recipients per country. The key refers to the country.

smsAnalysis.recipientsPerGroup

For each group the number of recipients that it contains without the blacklisted contacts (in SMS blacklist). The key refers to the group given in the group request property.

smsAnalysis.totalInGroups

The total number of recipients in all given groups excluding the ones already specified (in contacts and recipients request property) as well as the ones that are blacklisted.

smsAnalysis.bodyAnalysis

The analysis for the body of the SMS.

smsAnalysis.bodyAnalysis.characters

The total number of characters of message body.

smsAnalysis.bodyAnalysis.parts

The number of actual SMS that will be sent.

smsAnalysis.bodyAnalysis.transcode

Contains information for the transcoded body of the SMS message. This will be available only if the message can be transcoded.

smsAnalysis.bodyAnalysis.transcode.message

The transcoded message of the original unicode message.

smsAnalysis.bodyAnalysis.transcode.parts

The number of the parts of the transcoded message.

smsAnalysis.bodyAnalysis.unicode

Indicates if the body contains unicode characters.

smsAnalysis.bodyAnalysis.unsupportedGSMCharacters

Which characters caused the message to be considered as unicode.

flash

Indicates if the message is a flash SMS.

respectQuietHours

Indicates if the SMS should respect the quiet hours.

campaignCallback

Defines the notification callback information for the progress of the SMS campaign.

campaignCallback.url

The URL that Routee will POST to, each time your campaign status changes to one of the following: Scheduled, Queued, Sent, Running, Finished, or Failed.
For more details check here

campaignCallback.strategy

When the URL will be called. Two possible values: on every status change (OnChange) or when a final status arrives (OnCompletion).

reminder

Defines the recipients that will receive a test SMS before and/or after the actual SMS is sent.

reminder.minutesAfter

The minutes after the scheduled date (that the SMS will be sent) that the test SMS will be sent.

reminder.minutesBefore

The minutes before the scheduled date (that the SMS will be sent) that the test SMS will be sent.

reminder.to

The recipients that will get the test SMS before and/or after the campaign will start. Must be a list with valid mobile numbers starting with “ + ” and the country code.

contacts

The contacts in the account selected as recipients.

groups

The groups of contacts in the account selected as recipients.

fallbackValues

Defines the default values when the SMS has labels, in case a contact does not contain any of these labels. The key refers to the label name.

ERROR CODES

STATUS
CODE
DESCRIPTION

404

404009001

The campaign with the given tracking id doesn't exist.

Suggest Edits

View all the available numbers

 
gethttps://connect.routee.net/numbers/available?country=country
curl -X GET \
  'https://connect.routee.net/numbers/available?country=US' \
  -H 'Authorization: Bearer d0e71005-1089-44c1-9fce-80feec7b2af3' \
  -H 'Content-Type: application/json'
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://connect.routee.net/numbers/available?country=US")
  .get()
  .addHeader("Authorization", "Bearer d0e71005-1089-44c1-9fce-80feec7b2af3")
  .addHeader("Content-Type", "application/json")
  .build();

Response response = client.newCall(request).execute();
var client = new RestClient("https://connect.routee.net/numbers/available?country=US");
var request = new RestRequest(Method.GET);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Authorization", "Bearer d0e71005-1089-44c1-9fce-80feec7b2af3");
IRestResponse response = client.Execute(request);
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://connect.routee.net/numbers/available?country=US",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer d0e71005-1089-44c1-9fce-80feec7b2af3",
    "Content-Type: application/json"
  ),
));

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

curl_close($curl);

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

conn = http.client.HTTPConnection("connect,routee,net")

headers = {
    'Authorization': "Bearer d0e71005-1089-44c1-9fce-80feec7b2af3",
    'Content-Type': "application/json"
    }

conn.request("GET", "numbers,available", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://connect.routee.net/numbers/available?country=US")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer d0e71005-1089-44c1-9fce-80feec7b2af3'
request["Content-Type"] = 'application/json'

response = http.request(request)
puts response.read_body
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://connect.routee.net/numbers/available?country=US",
  "method": "GET",
  "headers": {
    "Authorization": "Bearer d0e71005-1089-44c1-9fce-80feec7b2af3",
    "Content-Type": "application/json"
  }
}

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

NSDictionary *headers = @{ @"Authorization": @"Bearer d0e71005-1089-44c1-9fce-80feec7b2af3",
                           @"Content-Type": @"application/json"};

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://connect.routee.net/numbers/available?country=US"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];

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];
A binary file was returned

You couldn't be authenticated

{
    "content": [
        {
            "msisdn": "+15033365068",
            "country": "US",
            "services": [
                "Sms",
              	"Voice"
            ],
            "inboundCosts": [
                {
                    "price": 0.01,
                    "currency": "EUR",
                    "service": "Sms"
                },
                {
                    "price": 0.01,
                    "currency": "EUR",
                    "service": "Voice"
                }
            ],
            "monthlyCosts": [
                {
                    "price": 0.05,
                    "currency": "EUR"
                }
            ],
            "activationCosts": [
                {
                    "price": 0.05,
                    "currency": "EUR"
                }
            ]
        }
    ],
    "totalPages": 1,
    "last": true,
    "totalElements": 1,
    "first": true,
    "numberOfElements": 1,
    "size": 20,
    "number": 0
}

Query Params

country
string
required

The country of the recipient in ISO 3166-1 alpha 2 format.

service
string

The available services are sms and voice.

page
int32

The page number to retrieve, default value is 0 (meaning the first page).

size
int32

The number of items to retrieve, default value is 20.

sort
string

The field name that will be used to sort the results.

Headers

Authorization
string
required
Content-Type
string
 

RESPONSE PARAMETERS

KEY
DESCRIPTION

totalPages

The number of total pages.

last

Whether the current page is the last one.

totalElements

The total amount of elements for the current search.

first

Whether the current page is the first one.

numberOfElements

The number of elements currently on this page.

number

The requested page number.

size

The requested page size.

content

Contains the search results.

content.msisdn

The phone number.

content.country

The country code in ISO 3166-1 alpha-2 format.

content.services

The supported services.

content.inboundCosts

Information about inbound message costs.

content.inboundCosts.price

The price per inbound message.

content.inboundCosts.currency

The currency of the price.

content.inboundCosts.service

The service that the inbound message price is referred to.

content.monthlyCosts

Information about costs per month.

content.monthlyCosts.price

The cost of the number per month.

content.monthlyCosts.currency

The currency of the price.

content.activationCosts

Information about activation costs.

content.activationCosts.price

The activation cost of the number.

content.activationCosts.currency

The currency of the price.

Suggest Edits

View all the available numbers with filters

 
posthttps://connect.routee.net/numbers/available/search
curl -X POST \
  https://connect.routee.net/numbers/available/search \
  -H 'Authorization: Bearer d0e71005-1089-44c1-9fce-80feec7b2af3' \
  -H 'Content-Type: application/json'
  -d '[
	{"fieldName": "country", "searchTerm": "GB"},
	{"fieldName": "msisdn", "searchTerm": "+447xxxxxxxxx"}
]'
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "[\n\t{\"fieldName\": \"country\", \"searchTerm\": \"UK\"},\n\t{\"fieldName\": \"msisdn\", \"searchTerm\": \"+447xxxxxxxxx\"}\n]");
Request request = new Request.Builder()
  .url("https://connect.routee.net/numbers/available/search")
  .post(body)
  .addHeader("Authorization", "Bearer d0e71005-1089-44c1-9fce-80feec7b2af3")
  .addHeader("Content-Type", "application/json")
  .build();

Response response = client.newCall(request).execute();
var client = new RestClient("https://connect.routee.net/numbers/available/search");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Authorization", "Bearer d0e71005-1089-44c1-9fce-80feec7b2af3");
request.AddParameter("undefined", "[\n\t{\"fieldName\": \"country\", \"searchTerm\": \"UK\"},\n\t{\"fieldName\": \"msisdn\", \"searchTerm\": \"+447xxxxxxxxx\"}\n]", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://connect.routee.net/numbers/available/search",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "[\n\t{\"fieldName\": \"country\", \"searchTerm\": \"UK\"},\n\t{\"fieldName\": \"msisdn\", \"searchTerm\": \"+447xxxxxxxxx\"}\n]",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer d0e71005-1089-44c1-9fce-80feec7b2af3",
    "Content-Type: application/json"
  ),
));

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

curl_close($curl);

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

conn = http.client.HTTPConnection("connect,routee,net")

payload = "[\n\t{\"fieldName\": \"country\", \"searchTerm\": \"UK\"},\n\t{\"fieldName\": \"msisdn\", \"searchTerm\": \"+447xxxxxxxxx\"}\n]"

headers = {
    'Authorization': "Bearer d0e71005-1089-44c1-9fce-80feec7b2af3",
    'Content-Type': "application/json"
    }

conn.request("POST", "numbers,available,search", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://connect.routee.net/numbers/available/search")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer d0e71005-1089-44c1-9fce-80feec7b2af3'
request["Content-Type"] = 'application/json'
request.body = "[\n\t{\"fieldName\": \"country\", \"searchTerm\": \"UK\"},\n\t{\"fieldName\": \"msisdn\", \"searchTerm\": \"+447xxxxxxxxx\"}\n]"

response = http.request(request)
puts response.read_body
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://connect.routee.net/numbers/available/search",
  "method": "POST",
  "headers": {
    "Authorization": "Bearer d0e71005-1089-44c1-9fce-80feec7b2af3",
    "Content-Type": "application/json"
  },
  "processData": false,
  "data": "[\n\t{\"fieldName\": \"country\", \"searchTerm\": \"UK\"},\n\t{\"fieldName\": \"msisdn\", \"searchTerm\": \"+447xxxxxxxxx\"}\n]"
}

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

NSDictionary *headers = @{ @"Authorization": @"Bearer d0e71005-1089-44c1-9fce-80feec7b2af3",
                           @"Content-Type": @"application/json"};
NSDictionary *parameters = @[ @{ @"fieldName": @"country", @"searchTerm": @"UK" },
                              @{ @"fieldName": @"msisdn", @"searchTerm": @"+447xxxxxxxxx" } ];

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://connect.routee.net/numbers/available/search"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[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];
A binary file was returned

You couldn't be authenticated

{
    "content": [
        {
            "msisdn": "+447xxxxxxxxx",
            "country": "GB",
            "services": [
                "Sms",
                "Voice"
            ],
            "inboundCosts": [
                {
                    "price": 0.04,
                    "currency": "USD",
                    "service": "Sms"
                },
                {
                    "price": 0.02,
                    "currency": "USD",
                    "service": "Voice"
                }
            ],
            "monthlyCosts": [
                {
                    "price": 0.3,
                    "currency": "USD"
                }
            ],
            "activationCosts": [
                {
                    "price": 0.1,
                    "currency": "USD"
                }
            ]
        }
    ],
    "totalElements": 1,
    "last": true,
    "totalPages": 1,
    "numberOfElements": 1,
    "first": true,
    "size": 20,
    "number": 0
}

Query Params

page
int32

The page number to retrieve, default value is 0 (meaning the first page)

size
int32

The number of items to retrieve, default value is 20.

sort
string

The field name that will be used to sort the results.

Body Params

fieldName
string
required

The name of the field to filter. Available values: country (required), msisdn and service.

searchTerm
string
required

The exact value that the specified field must match.

searchOperator
string

Optional: The operator upon which the search operation will be executed. Possible values: 'is', 'contains', 'starts_with', 'ends_with'. If missing defaults to 'is'.

Headers

Authorization
string
Content-Type
string
 

RESPONSE PARAMETERS

KEY
DESCRIPTION

totalPages

The number of total pages.

last

Whether the current page is the last one.

totalElements

The total amount of elements for the current search.

first

Whether the current page is the first one.

numberOfElements

The number of elements currently on this page.

number

The requested page number.

size

The requested page size.

content

Contains the search results.

content.msisdn

The msisdn (the phone number).

content.country

The country code in ISO 3166-1 alpha-2 format.

content.services

The supported services.

content.inboundCosts

Information about inbound message costs.

content.inboundCosts.price

The price per inbound message.

content.inboundCosts.currency

The currency of the price.

content.inboundCosts.service

The service that the inbound message price is referred to.

content.monthlyCosts

Information about costs per month.

content.monthlyCosts.price

The cost of the number per month.

content.monthlyCosts.currency

The currency of the price.

content.activationCosts

Information about activation costs.

content.activationCosts.price

The activation cost of the number.

content.activationCosts.currency

The currency of the price.

Suggest Edits

Rent a Number

 
posthttps://connect.routee.net/numbers/my
curl -X POST \
  https://connect.routee.net/numbers/my/ \
  -H 'Authorization: Bearer b336c672-ce4b-4aa5-8386-7c2a60de3023' \
  -H 'Content-Type: application/json' \
  -d '{ "msisdn": "+306911111111",
	      "inboundSmsCallbackUrl": "http://example.org" }'
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n\t\"msisdn\": \"+306911111111\",\n\t\"inboundSmsCallbackUrl\": \"http://example.org\"\n}");
Request request = new Request.Builder()
  .url("https://connect.routee.net/numbers/my/")
  .post(body)
  .addHeader("Authorization", "Bearer b336c672-ce4b-4aa5-8386-7c2a60de3023")
  .addHeader("Content-Type", "application/json")
  .build();

Response response = client.newCall(request).execute();
var client = new RestClient("https://connect.routee.net/numbers/my/");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Authorization", "Bearer b336c672-ce4b-4aa5-8386-7c2a60de3023");
request.AddParameter("undefined", "{\n\t\"msisdn\": \"+306911111111\",\n\t\"inboundSmsCallbackUrl\": \"http://example.org\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://connect.routee.net/numbers/my/",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\n\t\"msisdn\": \"+306911111111\",\n\t\"inboundSmsCallbackUrl\": \"http://example.org\"\n}",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer b336c672-ce4b-4aa5-8386-7c2a60de3023",
    "Content-Type: application/json"
  ),
));

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

curl_close($curl);

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

conn = http.client.HTTPConnection("connect.routee.net")

payload = "{\n\t\"msisdn\": \"+306911111111\",\n\t\"inboundSmsCallbackUrl\": \"http://example.org\"\n}"

headers = {
    'Authorization': "Bearer b336c672-ce4b-4aa5-8386-7c2a60de3023",
    'Content-Type': "application/json"
    }

conn.request("POST", "numbers,my,", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://connect.routee.net/numbers/my/")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer b336c672-ce4b-4aa5-8386-7c2a60de3023'
request["Content-Type"] = 'application/json'
request.body = "{\n\t\"msisdn\": \"+306911111111\",\n\t\"inboundSmsCallbackUrl\": \"http://example.org\"\n}"

response = http.request(request)
puts response.read_body
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://connect.routee.net/numbers/my/",
  "method": "POST",
  "headers": {
    "Authorization": "Bearer b336c672-ce4b-4aa5-8386-7c2a60de3023",
    "Content-Type": "application/json"
  },
  "processData": false,
  "data": "{\n\t\"msisdn\": \"+306911111111\",\n\t\"inboundSmsCallbackUrl\": \"http://example.org\"\n}"
}

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

NSDictionary *headers = @{ @"Authorization": @"Bearer b336c672-ce4b-4aa5-8386-7c2a60de3023",
                           @"Content-Type": @"application/json"};
NSDictionary *parameters = @{ @"msisdn": @"+306911111111",
                              @"inboundSmsCallbackUrl": @"http://example.org" };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://connect.routee.net/numbers/my/"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[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];
A binary file was returned

You couldn't be authenticated

{
    "trackingId": "faf5ff4c-1110-4589-8991-1827cf74a2d6",
    "msisdn": "+306911111111",
    "country": "GR",
    "services": [
        "Sms"
    ],
    "inboundCosts": [
        {
            "price": 0.01,
            "currency": "EUR",
            "service": "Sms"
        }
    ],
    "monthlyCosts": [
        {
            "price": 0.05,
            "currency": "EUR"
        }
    ],
    "activationCosts": [
        {
            "price": 0.05,
            "currency": "EUR"
        }
    ],
    "inboundSmsCallbackUrl": "http://example.org"
}

Body Params

msisdn
string
required

The phone number. Format with a '+' and country code e.g., +3069485xxxxx (E.164 format).

inboundSmsCallbackUrl
string

Defines the callback URL that will receive the inbound messages.

voiceInboundStrategy
object
 
voiceInboundStrategy.dialplanUrl
string

Defines the dialplan URL

inboundVoiceCallbackUrl
string

Defines the callback URL that will receive the inbound Voice messages.

Headers

Authorization
string
Content-Type
string
 

RESPONSE PARAMETERS

KEY
DESCRIPTION

trackingId

The trackingId of the number.

msisdn

The phone number. Format with a '+' and country code e.g., +3069485xxxxx (E.164 format).

country

The country code in ISO 3166-1 alpha-2 format.

services

The supported services.

inboundCosts

Information about inbound message costs.

inboundCosts.price

The price per number inbound message.

inboundCosts.currency

The currency of the price.

inboundCosts.service

The service that the inbound message price is referred to.

monthlyCosts

Information about costs per month.

monthlyCosts.price

The cost of the number per month.

monthlyCosts.currency

The currency of the price.

activationCosts

Information about activation costs.

activationCosts.price

The activation cost of the number.

activationCosts.currency

The currency of the price.

inboundSmsCallbackUrl

The defined callback URL that will receive the inbound messages.

voiceInboundStrategy

Represents the voice inbound strategy.

voiceInboundStrategy.dialplanUrl

The defined dialplan URL.

inboundVoiceCallbackUrl

The defined callback URL that will receive the inbound voice messages.

Suggest Edits

Update a Number

 
puthttps://connect.routee.net/numbers/my/msisdn
curl -X PUT \
  'https://connect.routee.net/numbers/my/+306911111111' \
  -H 'Authorization: Bearer 07e40337-22af-48e6-b857-d90314d2e21d' \
  -H 'Content-Type: application/json' \
  -d '{ "inboundSmsCallbackUrl": "http://example-sms.org",
	
	"voiceInboundStrategy":{
		"dialplanUrl": "http://example-dialPlan.org"
	 },
	
	"inboundVoiceCallbackUrl": "http://example-voice.org"}'
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{ \n\t\n\t\"inboundSmsCallbackUrl\": \"http://example-sms.org\",\n\t\n\t\"voiceInboundStrategy\":{\n\t\t\"dialplanUrl\": \"http://example-dialPlan.org\"\n\t },\n\t\n\t\"inboundVoiceCallbackUrl\": \"http://example-voice.org\"\n} ");
Request request = new Request.Builder()
  .url("https://connect.routee.net/numbers/my/+306911111111")
  .put(body)
  .addHeader("Authorization", "Bearer 07e40337-22af-48e6-b857-d90314d2e21d")
  .addHeader("Content-Type", "application/json")
  .build();

Response response = client.newCall(request).execute();
var client = new RestClient("https://connect.routee.net/numbers/my/+306911111111");
var request = new RestRequest(Method.PUT);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Authorization", "Bearer 740758d0-e3ac-4bc2-b9aa-e9c56fabec24");
request.AddParameter("undefined", "{ \n\t\n\t\"inboundSmsCallbackUrl\": \"http://example-sms.org\",\n\t\n\t\"voiceInboundStrategy\":{\n\t\t\"dialplanUrl\": \"http://example-dialPlan.org\"\n\t },\n\t\n\t\"inboundVoiceCallbackUrl\": \"http://example-voice.org\"\n} ", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://connect.routee.net/numbers/my/+306911111111",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_POSTFIELDS => "{ \n\t\n\t\"inboundSmsCallbackUrl\": \"http://example-sms.org\",\n\t\n\t\"voiceInboundStrategy\":{\n\t\t\"dialplanUrl\": \"http://example-dialPlan.org\"\n\t },\n\t\n\t\"inboundVoiceCallbackUrl\": \"http://example-voice.org\"\n} ",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer 740758d0-e3ac-4bc2-b9aa-e9c56fabec24",
    "Content-Type: application/json"
  ),
));

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

curl_close($curl);

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

conn = http.client.HTTPConnection("connect,routee,net")

payload = "{ \n\t\n\t\"inboundSmsCallbackUrl\": \"http://example-sms.org\",\n\t\n\t\"voiceInboundStrategy\":{\n\t\t\"dialplanUrl\": \"http://example-dialPlan.org\"\n\t },\n\t\n\t\"inboundVoiceCallbackUrl\": \"http://example-voice.org\"\n} "

headers = {
    'Authorization': "Bearer 740758d0-e3ac-4bc2-b9aa-e9c56fabec24",
    'Content-Type': "application/json"
    }

conn.request("PUT", "numbers,my,+306911111111", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://connect.routee.net/numbers/my/+306911111111")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer 740758d0-e3ac-4bc2-b9aa-e9c56fabec24'
request["Content-Type"] = 'application/json'
request.body = "{ \n\t\n\t\"inboundSmsCallbackUrl\": \"http://example-sms.org\",\n\t\n\t\"voiceInboundStrategy\":{\n\t\t\"dialplanUrl\": \"http://example-dialPlan.org\"\n\t },\n\t\n\t\"inboundVoiceCallbackUrl\": \"http://example-voice.org\"\n} "

response = http.request(request)
puts response.read_body
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://connect.routee.net/numbers/my/+306911111111",
  "method": "PUT",
  "headers": {
    "Authorization": "Bearer 740758d0-e3ac-4bc2-b9aa-e9c56fabec24",
    "Content-Type": "application/json"
  },
  "processData": false,
    "data": "{ \n\t\n\t\"inboundSmsCallbackUrl\": \"http://example-sms.org\",\n\t\n\t\"voiceInboundStrategy\":{\n\t\t\"dialplanUrl\": \"http://example-dialPlan.org\"\n\t },\n\t\n\t\"inboundVoiceCallbackUrl\": \"http://example-voice.org\"\n} "
}

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

NSDictionary *headers = @{ @"Authorization": @"Bearer 740758d0-e3ac-4bc2-b9aa-e9c56fabec24",
                           @"Content-Type": @"application/json"};
NSDictionary *parameters = @{ @"inboundSmsCallbackUrl": @"http://example-sms.org",
                              @"voiceInboundStrategy": @{ @"dialplanUrl": @"http://example-dialPlan.org" },
                              @"inboundVoiceCallbackUrl": @"http://example-voice.org" };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://connect.routee.net/numbers/my/+306911111111"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[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];
A binary file was returned

You couldn't be authenticated

{
    "trackingId": "62d4a3cc-6f32-4ba2-b99a-b661fb27fdd5",
    "msisdn": "+306911111111",
    "country": "GR",
    "services": [
        "Sms"
    ],
    "inboundCosts": [
        {
            "price": 0.015,
            "currency": "EUR",
            "service": "Sms"
        }
    ],
    "monthlyCosts": [
        {
            "price": 0.02,
            "currency": "EUR"
        }
    ],
    "activationCosts": [
        {
            "price": 0.005,
            "currency": "EUR"
        }
    ],
    "inboundSmsCallbackUrl": "http://example.org",
    "voiceInboundStrategy": {
        "dialplanUrl": "http://example-dialPlan.org"
    },
    "inboundVoiceCallbackUrl": "http://example-voice.com",
    "nextRenewal": "2018-04-26T13:34:41.168Z"
}

Path Params

msisdn
string
required

The phone number. Format with a '+' and country code e.g., +3069485xxxxx (E.164 format).

Body Params

inboundSmsCallbackUrl
string

Defines the callback URL that will receive the inbound messages.

voiceInboundStrategy
object
 
voiceInboundStrategy.dialplanUrl
string

Defines the dialplan URL

inboundVoiceCallbackUrl
string

Defines the callback URL that will receive the inbound Voice messages.

Headers

Authorization
string
required
Content-Type
string
 

RESPONSE PARAMETERS

KEY
DESCRIPTION

trackingId

The trackingId of the number.

msisdn

The phone number. Format with a '+' and country code e.g., +3069485xxxxx (E.164 format).

country

The country code in ISO 3166-1 alpha-2 format.

services

The supported services.

inboundCosts

Information about inbound message costs.

inboundCosts.price

The price per inbound message.

inboundCosts.currency

The currency of the price.

inboundCosts.service

The service that the inbound message price is referred to.

monthlyCosts

Information about costs per month.

monthlyCosts.price

The cost of the number per month.

monthlyCosts.currency

The currency of the price.

activationCosts

Information about activation costs.

activationCosts.price

The activation cost of the number.

activationCosts.currency

The currency of the price.

inboundSmsCallbackUrl

The defined callback URL that will receive the inbound messages.

voiceInboundStrategy

Represents the voice inbound strategy.

voiceInboundStrategy.dialplanUrl

The defined dialplan URL.

inboundVoiceCallbackUrl

The defined callback URL that will receive the inbound voice messages.

nextRenewal

The date that the msisdn will automatically renew at.

Suggest Edits

View all your numbers

 
gethttps://connect.routee.net/numbers/my
curl -X GET \
  https://connect.routee.net/numbers/my \
  -H 'Authorization: Bearer d0e71005-1089-44c1-9fce-80feec7b2af3' \
  -H 'Content-Type: application/json'
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://connect.routee.net/numbers/my")
  .get()
  .addHeader("Authorization", "Bearer d0e71005-1089-44c1-9fce-80feec7b2af3")
  .addHeader("Content-Type", "application/json")
  .build();

Response response = client.newCall(request).execute();
var client = new RestClient("https://connect.routee.net/numbers/my");
var request = new RestRequest(Method.GET);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Authorization", "Bearer d0e71005-1089-44c1-9fce-80feec7b2af3");
IRestResponse response = client.Execute(request);
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://connect.routee.net/numbers/my",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer d0e71005-1089-44c1-9fce-80feec7b2af3",
    "Content-Type: application/json"
  ),
));

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

curl_close($curl);

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

conn = http.client.HTTPConnection("connect,routee,net")

headers = {
    'Authorization': "Bearer d0e71005-1089-44c1-9fce-80feec7b2af3",
    'Content-Type': "application/json"
    }

conn.request("GET", "numbers,my", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://connect.routee.net/numbers/my")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer d0e71005-1089-44c1-9fce-80feec7b2af3'
request["Content-Type"] = 'application/json'

response = http.request(request)
puts response.read_body
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://connect.routee.net/numbers/my",
  "method": "GET",
  "headers": {
    "Authorization": "Bearer d0e71005-1089-44c1-9fce-80feec7b2af3",
    "Content-Type": "application/json"
  }
}

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

NSDictionary *headers = @{ @"Authorization": @"Bearer d0e71005-1089-44c1-9fce-80feec7b2af3",
                           @"Content-Type": @"application/json"};

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://connect.routee.net/numbers/my"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];

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];
A binary file was returned

You couldn't be authenticated

{
    "content": [
        {
            "trackingId": "29c2ad68-f76e-11e6-bc64-92361f002671",
            "msisdn": "+3069xxxxxxxx",
            "country": "GR",
            "services": [
                "Sms"
            ],
            "inboundCosts": [
                {
                    "price": 0.015,
                    "currency": "EUR",
                    "service": "Sms"
                }
            ],
            "monthlyCosts": [
                {
                    "price": 0.02,
                    "currency": "EUR"
                }
            ],
            "activationCosts": [
                {
                    "price": 0.005,
                    "currency": "EUR"
                }
            ],
            "inboundSmsCallbackUrl": "https://example.org"
        },
        {
            "trackingId": "30c7ad68-f76e-11e6-bc64-92361f005896",
            "msisdn": "+124xxxxxxxx",
            "country": "US",
            "services": [
                "Sms",
                "Voice"
            ],
            "inboundCosts": [
                {
                    "price": 0.002,
                    "currency": "EUR",
                    "service": "Sms"
                },
                {
                    "price": 0.001,
                    "currency": "EUR",
                    "service": "Voice"
                }
            ],
            "monthlyCosts": [
                {
                    "price": 6,
                    "currency": "EUR"
                }
            ],
            "activationCosts": [
                {
                    "price": 5,
                    "currency": "EUR"
                }
            ],
            "inboundSmsCallbackUrl": "https://example.org"
        }
    ],
    "totalPages": 1,
    "last": true,
    "totalElements": 2,
    "numberOfElements": 2,
    "first": true,
    "size": 20,
    "number": 0
}

Query Params

page
int32

The page number to retrieve, default value is 0 (meaning the first page)

size
string

The number of items to retrieve, default value is 20.

Headers

Authorization
string
Content-Type
string
 

RESPONSE PARAMETERS

KEY
DESCRIPTION

totalPages

The number of total pages.

last

Whether the current page is the last one.

totalElements

The total amount of elements for the current search.

first

Whether the current page is the first one.

numberOfElements

The number of elements currently on this page.

number

The requested page number.

size

The requested page size.

content

Contains the search results.

content.trackingId

The tracking id of the number.

content.msisdn

The msisdn (the phone number).

content.country

The country code in ISO 3166-1 alpha-2 format.

content.services

The supported services.

content.inboundCosts

Information about inbound message costs.

content.inboundCosts.price

The price per inbound message.

content.inboundCosts.currency

The currency of the price.

content.inboundCosts.service

The service that the inbound message price is referred to.

content.monthlyCosts

Information about costs per month.

content.monthlyCosts.price

The cost of the per month.

content.monthlyCosts.currency

The currency of the price.

content.activationCosts

Information about activation costs.

content.activationCosts.price

The activation cost of the number.

content.activationCosts.currency

The currency of the price.

content.inboundSmsCallbackUrl

The defined callback URL that will receive the inbound sms messages.

content.voiceInboundStrategy

Represents the voice inbound strategy.

content.voiceInboundStrategy.dialplanUrl

The defined dialplan URL.

content.inboundVoiceCallbackUrl

The defined callback URL that will receive the inbound voice messages.

content.nextRenewal

The date that the msisdn will automatically renew at.

Suggest Edits

Cancel a Number

 
deletehttps://connect.routee.net/numbers/my/msisdn
curl -X DELETE \
  'https://connect.routee.net/numbers/my/+306911111111' \
  -H 'Authorization: Bearer 5ed4ca02-8c05-431b-9d95-bef9105ca5d0'
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://connect.routee.net/numbers/my/+306911111111")
  .delete(null)
  .addHeader("Authorization", "Bearer 5ed4ca02-8c05-431b-9d95-bef9105ca5d0")
  .build();

Response response = client.newCall(request).execute();
var client = new RestClient("https://connect.routee.net/numbers/my/+306911111111");
var request = new RestRequest(Method.DELETE);
request.AddHeader("Authorization", "Bearer 5ed4ca02-8c05-431b-9d95-bef9105ca5d0");
IRestResponse response = client.Execute(request);
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://connect.routee.net/numbers/my/+306911111111",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer 5ed4ca02-8c05-431b-9d95-bef9105ca5d0"
  ),
));

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

curl_close($curl);

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

conn = http.client.HTTPConnection("connect,routee,net")

headers = {
    'Authorization': "Bearer 5ed4ca02-8c05-431b-9d95-bef9105ca5d0"
    }

conn.request("DELETE", "numbers,my,+306911111111", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://connect.routee.net/numbers/my/+306911111111")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer 5ed4ca02-8c05-431b-9d95-bef9105ca5d0'

response = http.request(request)
puts response.read_body
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://connect.routee.net/numbers/my/+306911111111",
  "method": "DELETE",
  "headers": {
    "Authorization": "Bearer 5ed4ca02-8c05-431b-9d95-bef9105ca5d0"
  }
}

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

NSDictionary *headers = @{ @"Authorization": @"Bearer 5ed4ca02-8c05-431b-9d95-bef9105ca5d0"};

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://connect.routee.net/numbers/my/+306911111111"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
[request setAllHTTPHeaderFields:headers];

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];
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

msisdn
string
required

The phone number. Format with a '+' and country code e.g., +3069485xxxxx (E.164 format).

Headers

Authorization
string
required

Bearer {access_token}

 
Suggest Edits

Perform a voice conversation

 
posthttps://connect.routee.net/voice/conversation
curl -X POST  
-H "Authorization:Bearer e6c6531c-4083-481e-b7a3-05be2ff41f59"  
-H "Content-Type:application/json"    
-d '{  
   "from":"Routee",
   "to":{  
      "phone":"+306911111111"
   },
   "dialPlan":{  
      "verbs":[  
         {  
            "type":"PLAY",
            "fileURL":"http://xxx.xxxxxxxx.xxx/example.wav"
         },
         {  
            "bargeIn": true,
            "type":"SAY",
            "message":{  
               "language":"en-US",
               "gender":"male",
               "text":"Executing Dialplan"
            }
         },
         {  
            "type":"DIAL",
            "from":"+306911111111",
            "to":{  
               "phone":"+306922222222"
            },
            "hangupDelay":20,
            "maxDuration":60
         },
         {
            "type": "COLLECT",
            "eventUrl": "https://www.example.com",
            "maxDigits": 3,
            "submitOnHash": true
        }
      ]
   }
}'
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{  \n   \"from\":\"Routee\",\n   \"to\":{  \n      \"phone\":\"+306911111111\"\n   },\n   \"dialPlan\":{  \n      \"verbs\":[  \n         {  \n            \"type\":\"PLAY\",\n            \"fileURL\":\"http://xxx.xxxxxxxx.xxx/example.wav\"\n         },\n         {  \n            \"bargeIn\": true,\n            \"type\":\"SAY\",\n            \"message\":{  \n               \"language\":\"en-US\",\n               \"gender\":\"male\",\n               \"text\":\"Executing Dialplan\"\n            }\n         },\n         {  \n            \"type\":\"DIAL\",\n            \"from\":\"+306911111111\",\n            \"to\":{  \n               \"phone\":\"+306922222222\"\n            },\n            \"hangupDelay\":20,\n            \"maxDuration\":60\n         },\n         {\n           \t\"type\": \"COLLECT\",\n\t\t\t\"eventUrl\": \"https://www.example.com\",\n  \t\t    \"maxDigits\": 3,      \n            \"submitOnHash\": true\n        }\n      ]\n   }\n}\n");
Request request = new Request.Builder()
  .url("https://connect.routee.net/voice/conversation")
  .post(body)
  .addHeader("authorization", "Bearer 9d0a611b-b4d0-4047-9282-45fea66814da")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
var client = new RestClient("https://connect.routee.net/voice/conversation");
var request = new RestRequest(Method.POST);
request.AddHeader("content-type", "application/json");
request.AddHeader("authorization", "Bearer 9d0a611b-b4d0-4047-9282-45fea66814da");
request.AddParameter("application/json", "{  \n   \"from\":\"Routee\",\n   \"to\":{  \n      \"phone\":\"+306911111111\"\n   },\n   \"dialPlan\":{  \n      \"verbs\":[  \n         {  \n            \"type\":\"PLAY\",\n            \"fileURL\":\"http://xxx.xxxxxxxx.xxx/example.wav\"\n         },\n         {  \n            \"bargeIn\": true,\n            \"type\":\"SAY\",\n            \"message\":{  \n               \"language\":\"en-US\",\n               \"gender\":\"male\",\n               \"text\":\"Executing Dialplan\"\n            }\n         },\n         {  \n            \"type\":\"DIAL\",\n            \"from\":\"+306911111111\",\n            \"to\":{  \n               \"phone\":\"+306922222222\"\n            },\n            \"hangupDelay\":20,\n            \"maxDuration\":60\n         },\n         {\n           \t\"type\": \"COLLECT\",\n\t\t\t\"eventUrl\": \"https://www.example.com\",\n  \t\t    \"maxDigits\": 3,      \n            \"submitOnHash\": true\n        }\n      ]\n   }\n}\n", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://connect.routee.net/voice/conversation",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{  \n   \"from\":\"Routee\",\n   \"to\":{  \n      \"phone\":\"+306911111111\"\n   },\n   \"dialPlan\":{  \n      \"verbs\":[  \n         {  \n            \"type\":\"PLAY\",\n            \"fileURL\":\"http://xxx.xxxxxxxx.xxx/example.wav\"\n         },\n         {  \n            \"bargeIn\": true,\n            \"type\":\"SAY\",\n            \"message\":{  \n               \"language\":\"en-US\",\n               \"gender\":\"male\",\n               \"text\":\"Executing Dialplan\"\n            }\n         },\n         {  \n            \"type\":\"DIAL\",\n            \"from\":\"+306911111111\",\n            \"to\":{  \n               \"phone\":\"+306922222222\"\n            },\n            \"hangupDelay\":20,\n            \"maxDuration\":60\n         },\n         {\n           \t\"type\": \"COLLECT\",\n\t\t\t\"eventUrl\": \"https://www.example.com\",\n  \t\t    \"maxDigits\": 3,      \n            \"submitOnHash\": true\n        }\n      ]\n   }\n}\n",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer 9d0a611b-b4d0-4047-9282-45fea66814da",
    "content-type: application/json"
  ),
));

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

curl_close($curl);

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

conn = http.client.HTTPSConnection("connect.routee.net")

payload = "{  \n   \"from\":\"Routee\",\n   \"to\":{  \n      \"phone\":\"+306911111111\"\n   },\n   \"dialPlan\":{  \n      \"verbs\":[  \n         {  \n            \"type\":\"PLAY\",\n            \"fileURL\":\"http://xxx.xxxxxxxx.xxx/example.wav\"\n         },\n         {  \n            \"bargeIn\": true,\n            \"type\":\"SAY\",\n            \"message\":{  \n               \"language\":\"en-US\",\n               \"gender\":\"male\",\n               \"text\":\"Executing Dialplan\"\n            }\n         },\n         {  \n            \"type\":\"DIAL\",\n            \"from\":\"+306911111111\",\n            \"to\":{  \n               \"phone\":\"+306922222222\"\n            },\n            \"hangupDelay\":20,\n            \"maxDuration\":60\n         },\n         {\n           \t\"type\": \"COLLECT\",\n\t\t\t\"eventUrl\": \"https://www.example.com\",\n  \t\t    \"maxDigits\": 3,      \n            \"submitOnHash\": true\n        }\n      ]\n   }\n}\n"

headers = {
    'authorization': "Bearer 9d0a611b-b4d0-4047-9282-45fea66814da",
    'content-type': "application/json"
    }

conn.request("POST", "/voice/conversation", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://connect.routee.net/voice/conversation")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["authorization"] = 'Bearer 9d0a611b-b4d0-4047-9282-45fea66814da'
request["content-type"] = 'application/json'
request.body = "{  \n   \"from\":\"Routee\",\n   \"to\":{  \n      \"phone\":\"+306911111111\"\n   },\n   \"dialPlan\":{  \n      \"verbs\":[  \n         {  \n            \"type\":\"PLAY\",\n            \"fileURL\":\"http://xxx.xxxxxxxx.xxx/example.wav\"\n         },\n         {  \n            \"bargeIn\": true,\n            \"type\":\"SAY\",\n            \"message\":{  \n               \"language\":\"en-US\",\n               \"gender\":\"male\",\n               \"text\":\"Executing Dialplan\"\n            }\n         },\n         {  \n            \"type\":\"DIAL\",\n            \"from\":\"+306911111111\",\n            \"to\":{  \n               \"phone\":\"+306922222222\"\n            },\n            \"hangupDelay\":20,\n            \"maxDuration\":60\n         },\n         {\n           \t\"type\": \"COLLECT\",\n\t\t\t\"eventUrl\": \"https://www.example.com\",\n  \t\t    \"maxDigits\": 3,      \n            \"submitOnHash\": true\n        }\n      ]\n   }\n}\n"
response = http.request(request)
puts response.read_body
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://connect.routee.net/voice/conversation",
  "method": "POST",
  "headers": {
    "authorization": "Bearer 9d0a611b-b4d0-4047-9282-45fea66814da",
    "content-type": "application/json"
  },
  "processData": false,
  "data": "{  \n   \"from\":\"Routee\",\n   \"to\":{  \n        \"phone\":\"+306911111111\"\n   },\n   \"dialPlan\":{  \n      \"verbs\":[  \n         {  \n            \"type\":\"PLAY\",\n            \"fileURL\":\"http://xxx.xxxxxxxx.xxx/example.wav\"\n         },\n         {  \n            \"bargeIn\": true,\n            \"type\":\"SAY\",\n            \"message\":{  \n               \"language\":\"en-US\",\n               \"gender\":\"male\",\n               \"text\":\"Executing Dialplan\"\n            }\n         },\n         {  \n            \"type\":\"DIAL\",\n            \"from\":\"+306911111111\",\n            \"to\":{  \n               \"phone\":\"+306922222222\"\n            },\n            \"hangupDelay\":20,\n            \"maxDuration\":60\n         },\n         {\n           \t\"type\": \"COLLECT\",\n\t\t\t\"eventUrl\": \"https://www.example.com\",\n  \t\t    \"maxDigits\": 3,      \n            \"submitOnHash\": true\n        }\n      ]\n   }\n}\n"
}

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

NSDictionary *headers = @{ @"authorization": @"Bearer 9d0a611b-b4d0-4047-9282-45fea66814da",
                           @"content-type": @"application/json"};
NSDictionary *parameters = @{ @"from": @"Routee",
                              @"to": @{ @"phone": @"+306911111111" },
                              @"dialPlan": @{ @"verbs": @[ @{ @"type": @"PLAY", @"fileURL": @"http://xxx.xxxxxxxx.xxx/example.wav" }, @{ @"type": @"SAY", @"message": @{ @"language": @"en-US", @"gender": @"male", @"text": @"Executing Dialplan" } }, @{ @"type": @"DIAL", @"from": @"+306911111111", @"to": @{ @"phone": @"+306922222222" }, @"hangupDelay": @20, @"maxDuration": @60 } ] } };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://connect.routee.net/voice/conversation"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[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];
A binary file was returned

You couldn't be authenticated

{
    "trackingId": "9effb0b5-99e2-434a-bc69-093398ec083e",
    "direction": "Outbound",
    "from": "Routee",
    "to": {
        "phone": "+306911111111"
    },
    "dialPlans": [
        {
            "verbs": [
                {
                    "type": "PLAY",
                    "repeat": 0,
                    "fileURL": "http://xxx.xxxxxxxx.xxx/example.wav",
                    "bargeIn": false
                },
                {
                    "type": "SAY",
                    "repeat": 0,
                    "bargeIn": true,
                    "message": {
                        "language": "en-US",
                        "gender": "male",
                        "text": "Executing Dialplan"
                    }
                },
                {
                    "type": "DIAL",
                    "maxDuration": 60,
                    "hangupDelay": 20,
                    "from": "+306911111111",
                    "to": {
                        "phone": "+306922222222"
                    }
                },
                {
                    "type": "COLLECT",
                    "eventUrl": "https://www.example.com",
                    "maxDigits": 3,
                    "submitOnHash": true
                }
            ]
        }
    ],
    "createdAt": "2017-12-21T13:12:31.582Z"
}

Body Params

to
object
required

The recipient of the call.

 
to.phone
string

A valid phone number (mobile or landline)

to.viber
string

A valid viber number.

from
string
required

The sender id for the call

dialPlan
object

A combination of action verbs to be executed

 
dialPlan.verbs
array of objects

An array of SAY, PLAY, DIAL and COLLECT verbs. Check here for possible values

dialPlanUrl
string

The url which contains a combination of action verbs to be executed. Use either "dialPlanUrl" or "dialPlan".

callback
object

Defines the notification callback information for the progress of Voice conversation

 
callback.url
string

A URL that Routee will POST to, each time your message status changes to one of the following: Queued, Failed, Sent, Unsent, Delivered, or Undelivered. Routee will POST the trackingId along with the other request parameters as well as statuses and ErrorDescriptions.

callback.strategy
string

When the URL will be called. Two possible values: on every status change (OnChange) or when a final status arrives (OnCompletion).

hangupDelay
int32

The time to wait for the call to be answered

maxDuration
int32

Defines the maximum duration

Headers

Content-Type
string
Authorization
string
 

Response Parameters

KEY
DESCRIPTION

trackingId

The id of the conversation.

direction

The direction of the conversation (Inbound or Outbound).

from

The sender id of the conversation.

to

The recipient of the conversation.

to.phone

A valid phone number (mobile or landline).

to.viber

A valid viber number.

dialPlanUrl

The url that contains a combination of action verbs to be executed.

dialPlans

A combination of action verbs to be executed.

dialPlans.verbs

The array of SAY, PLAY, DIAL and COLLECT verbs. Check here for possible values.

callback

Defines the notification callback information for the progress of Voice conversation.

callback.url

The URL that will be called when an update occurs.

callback.strategy

When the URL will be called. Two possible values: on every status change (OnChange) or when a final status arrives (OnCompletion).

hangupDelay

The time to wait for the call to be answered.
The default value is to wait for the network to terminate the call.

createdAt

The time the conversation was created.

maxDuration

The maximum duration.

Suggest Edits

Retrieve Conversation dial Tracking

You can get all the tracking information for the dial by providing the conversation tracking id

 
gethttps://connect.routee.net/voice/tracking/conversation/conversationTrackingId
curl --request GET \
  --url 'https://connect.routee.net/voice/tracking/conversation/c86f7bff-640d-44ca-b23e-8805768ed77a \
  --header 'authorization: Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4'
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://connect.routee.net/voice/tracking/conversation/c86f7bff-640d-44ca-b23e-8805768ed77a")
  .get()
  .addHeader("authorization", "Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4")
  .build();

Response response = client.newCall(request).execute();
var client = new RestClient("https://connect.routee.net/voice/tracking/conversation/c86f7bff-640d-44ca-b23e-8805768ed77a");
var request = new RestRequest(Method.GET);
request.AddHeadAer("authorization", "Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4");
IRestResponse response = client.Execute(request);
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://connect.routee.net/voice/tracking/conversation/c86f7bff-640d-44ca-b23e-8805768ed77a",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4"
  ),
));

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

curl_close($curl);

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

conn = http.client.HTTPSConnection("connect.routee.net")

headers = { 'authorization': "Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4" }

conn.request("GET", "/voice/tracking/conversation/c86f7bff-640d-44ca-b23e-8805768ed77a", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://connect.routee.net/voice/tracking/conversation/c86f7bff-640d-44ca-b23e-8805768ed77a")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4'

response = http.request(request)
puts response.read_body
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://connect.routee.net/voice/tracking/conversation/c86f7bff-640d-44ca-b23e-8805768ed77a",
  "method": "GET",
  "headers": {
    "authorization": "Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4"
  }
}

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

NSDictionary *headers = @{ @"authorization": @"Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://connect.routee.net/voice/tracking/conversation/c86f7bff-640d-44ca-b23e-8805768ed77a"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];

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];
A binary file was returned

You couldn't be authenticated

{
  "content": [
    {
      "messageId": "b244ccb5-6497-4afc-b6fb-9abf6e878ae5",
      "conversationTrackingId": "c86f7bff-640d-44ca-b23e-8805768ed77a",
      "to": "+306911111111",
      "from": "dimi",
      "country": "GR",
      "status": {
        "status": "Completed",
        "date": "2017-06-12T06:23:45Z"
      },
      "originatingService": "Voice",
      "direction": "Outbound",
      "duration": 28,
      "price": 0.014
    },
    {
      "messageId": "9f4e1ab2-fed8-4936-8f3b-25151b1cd0c6",
      "conversationTrackingId": "c86f7bff-640d-44ca-b23e-8805768ed77a",
      "to": "+306911111112",
      "from": "dimi",
      "country": "GR",
      "status": {
        "status": "Completed",
        "date": "2017-06-12T06:23:45Z"
      },
      "originatingService": "Voice",
      "direction": "Outbound",
      "duration": 12,
      "price": 0.006
    }
  ],
  "totalPages": 1,
  "last": true,
  "totalElements": 2,
  "first": true,
  "numberOfElements": 2,
  "size": 20,
  "number": 0
}

Path Params

conversationTrackingId
string
required

The tracking id of the conversation which includes the dials.

Headers

Authorization
string
Content-Type
string
 

RESPONSE PARAMETERS

KEY
DESCRIPTION

content

Contains the search results.

content.messageId

The id of one of the dial parts included in a conversation.

content.conversationTrackingId

The id of the conversation.

content.to

The recipient.

content.from

The sender Id of the conversation

content.country

The country of the recipient in ISO 3166-1 alpha 2 format.

content.status

The status of the dial.

content.status.status

The status.

content.status.date

The date that the status was reported.

content.originatingService

The service that sent this dial.

content.direction

The direction of the dial.

content.duration

The overall duration of this dial part.

content.price

The cost of this dial part.

content.collectedTones

The collected DTMF tones.

last

Whether the current page is the last one.

totalElements

The total amount of elements for the current search.

first

Whether the current page is the first one.

numberOfElements

The number of elements currently on this page.

size

The requested page size.

number

The requested page number.

totalPages

The number of total pages.

Suggest Edits

Retrieve Conversation Tracking

Retrieve tracking information for conversation

 
gethttps://connect.routee.net/voice/conversation/conversationTrackingId
curl --request GET \
  --url 'https://connect.routee.net/voice/conversation/c86f7bff-640d-44ca-b23e-8805768ed77a \
  --header 'authorization: Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4'
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://connect.routee.net/voice/conversation/c86f7bff-640d-44ca-b23e-8805768ed77a")
  .get()
  .addHeader("authorization", "Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4")
  .build();

Response response = client.newCall(request).execute();
var client = new RestClient("https://connect.routee.net/voice/conversation/c86f7bff-640d-44ca-b23e-8805768ed77a");
var request = new RestRequest(Method.GET);
request.AddHeadAer("authorization", "Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4");
IRestResponse response = client.Execute(request);
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://connect.routee.net/voice/conversation/c86f7bff-640d-44ca-b23e-8805768ed77a",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4"
  ),
));

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

curl_close($curl);

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

conn = http.client.HTTPSConnection("connect.routee.net")

headers = { 'authorization': "Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4" }

conn.request("GET", "/voice/conversation/c86f7bff-640d-44ca-b23e-8805768ed77a", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://connect.routee.net/voice/conversation/c86f7bff-640d-44ca-b23e-8805768ed77a")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4'

response = http.request(request)
puts response.read_body
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://connect.routee.net/voice/conversation/c86f7bff-640d-44ca-b23e-8805768ed77a",
  "method": "GET",
  "headers": {
    "authorization": "Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4"
  }
}

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

NSDictionary *headers = @{ @"authorization": @"Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://connect.routee.net/voice/conversation/c86f7bff-640d-44ca-b23e-8805768ed77a"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];

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];
A binary file was returned

You couldn't be authenticated

{
  "trackingId": "c86f7bff-640d-44ca-b23e-8805768ed77a",
  "direction": "Outbound",
  "from": "Routee",
  "to": {
    "phone": "+306911111111"
  },
  "dialPlans": [
    {
      "verbs": [
        {
          "bargeIn": false,
          "type": "PLAY",
          "repeat": 0,
          "fileURL": "http://xxx.xxxxxxxx.xx/example.wav"
        },
        {
          "bargeIn": true,
          "type": "SAY",
          "repeat": 0,
          "message": {
            "language": "en-US",
            "gender": "female",
            "text": "Hello"
          }
        },
        {
          "type": "DIAL",
          "maxDuration": 250,
          "from": "+306911111111",
          "to": {
            "phone": "+306911111112"
          }
        },
        {
          "bargeIn": false,
          "type": "SAY",
          "repeat": 0,
          "message": {
            "language": "en-US",
            "gender": "female",
            "text": "Bye"
          }
        },
        {
          "type": "COLLECT",
          "eventUrl": "https://www.example.com",
          "maxDigits": 3,
          "submitOnHash": true
        }
      ]
    }
  ],
  "maxDuration": 260,
  "createdAt": "2017-06-12T07:58:58.703Z"
}

Path Params

conversationTrackingId
string
required

The tracking id of the conversation which includes the dialPlan.

Headers

Authorization
string
Content-Type
string
 

RESPONSE PARAMETERS

KEY
DESCRIPTION

trackingId

The id of the conversation.

direction

The direction of the conversation (inbound or outbound)

from

The sender Id of the conversation

to

The recipient of the conversation.

to.phone

A valid phone number (mobile or landline).

dialPlanUrl

The url that contains a combination of action verbs to be executed.

dialPlans

A combination of action verbs to be executed

dialPlans.verbs

The array of SAY, PLAY, DIAL and COLLECT verbs. Check here for possible values.

callback

Defines the notification callback information for the progress of Voice conversation.

callback.url

The URL that will be called when an update occurs.

callback.strategy

When the URL will be called. Two possible values: on every status change (OnChange) or when a final status arrives (OnCompletion).

hangupDelay

The time to wait for the call to be answered.

maxDuration

The maximum duration.

createdAt

The time the conversation was created.

Suggest Edits

Send a Voice Campaign

Send a Voice messaging campaign to multiple recipients. This is a paid service. For pricing check here

 
posthttps://connect.routee.net/voice/campaign
curl -X POST 
-H "Authorization: Bearer e6c6531c-4083-481e-b7a3-05be2ff41f59" 
-H "Content-Type: application/json" 
-d '{
  "from":"+306977663000",
  "to":["+306977663000"],
  "message":{
    "text":"This is a test message, please ignore. Have a good day.",
    "language":"en-US",
    "gender":"female"
  }
}'
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"from\":\"+306977663000\",\n  \"to\":[\"+306977663000\"],\n  \"message\":{\n    \"text\":\"This is a test message, please ignore. Have a good day.\",\n    \"language\":\"en-US\",\n    \"gender\":\"female\"}}");
Request request = new Request.Builder()
  .url("https://connect.routee.net/voice/campaign")
  .post(body)
  .addHeader("authorization", "Bearer e6c6531c-4083-481e-b7a3-05be2ff41f59")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
var client = new RestClient("https://connect.routee.net/voice/campaign");
var request = new RestRequest(Method.POST);
request.AddHeader("content-type", "application/json");
request.AddHeader("authorization", "Bearer e6c6531c-4083-481e-b7a3-05be2ff41f59");
request.AddParameter("application/json", "{\n  \"from\":\"+306977663000\",\n  \"to\":[\"+306977663000\"],\n  \"message\":{\n    \"text\":\"This is a test message, please ignore. Have a good day.\",\n    \"language\":\"en-US\",\n    \"gender\":\"female\"\n  }}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://connect.routee.net/voice/campaign",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\n  \"from\":\"+306977663000\",\n  \"to\":[\"+306977663000\"],\n  \"message\":{\n    \"text\":\"This is a test message, please ignore. Have a good day.\",\n    \"language\":\"en-US\",\n    \"gender\":\"female\"\n  }}",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer e6c6531c-4083-481e-b7a3-05be2ff41f59",
    "content-type: application/json"
  ),
));

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

curl_close($curl);

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

conn = http.client.HTTPSConnection("connect.routee.net")

payload = "{\n  \"from\":\"+306977663000\",\n  \"to\":[\"+306977663000\"],\n  \"message\":{\n    \"text\":\"This is a test message, please ignore. Have a good day.\",\n    \"language\":\"en-US\",\n    \"gender\":\"female\"\n  }}"

headers = {
    'authorization': "Bearer e6c6531c-4083-481e-b7a3-05be2ff41f59",
    'content-type': "application/json"
    }

conn.request("POST", "/voice/campaign", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://connect.routee.net/voice/campaign")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["authorization"] = 'Bearer e6c6531c-4083-481e-b7a3-05be2ff41f59'
request["content-type"] = 'application/json'
request.body = "{\n  \"from\":\"+306977663000\",\n  \"to\":[\"+306977663000\"],\n  \"message\":{\n    \"text\":\"This is a test message, please ignore. Have a good day.\",\n    \"language\":\"en-US\",\n    \"gender\":\"female\"\n  }}"

response = http.request(request)
puts response.read_body
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://connect.routee.net/voice/campaign",
  "method": "POST",
  "headers": {
    "authorization": "Bearer e6c6531c-4083-481e-b7a3-05be2ff41f59",
    "content-type": "application/json"
  },
  "processData": false,
  "data": "{\n  \"from\":\"+306977663000\",\n  \"to\":[\"+306977663000\"],\n  \"message\":{\n    \"text\":\"This is a test message, please ignore. Have a good day.\",\n    \"language\":\"en-US\",\n    \"gender\":\"female\"\n  }}" 
}

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

NSDictionary *headers = @{ @"authorization": @"Bearer e6c6531c-4083-481e-b7a3-05be2ff41f59",
                           @"content-type": @"application/json"};
NSDictionary *parameters = @{ @"from": @"+306977663000",
                              @"to": @[ @"+306977663000" ],
                              @"message": @{ @"text": @"This is a test message, please ignore. Have a good day.", @"language": @"en-US", @"gender": @"female" }};
NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://connect.routee.net/voice/campaign"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[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];
A binary file was returned

You couldn't be authenticated

{
   "trackingId":"e21e65d7-030b-431f-82f9-d64c784b731a",
   "type":"Voice",
   "state":"Queued",
   "createdAt":"2017-03-29T10:20:47.43Z",
   "respectQuietHours":false,
   "from":"+306977663000",
   "to":["+306977663000"],
   "contacts":[],
   "groups":[],
   "message":{
      "language":"en-US",
      "gender":"female",
      "text":"This is a test message, please ignore. Have a good day."
   },
   "voiceAnalysis":{
      "numberOfRecipients":1,
      "recipientsPerCountry":{
         "GR":1
      },
      "recipientCountries":{
         "+306977663000":"GR"
      },
      "contacts":{},
      "recipientsPerGroup":{},
      "totalInGroups":0
   },
   "statuses":{
      "Unknown":0,
      "Queued":1,
      "Initiated":0,
      "Ringing":0,
      "InProgress":0,
      "Completed":0,
      "Busy":0,
      "NoAnswer":0,
      "Failed":0,
      "Unsent": 0,
      "Terminated": 0
   },
   "cost":0
}

Body Params

from
string
required

The sender id for this call

to
array of strings

The recipients of this call, must be a list with valid numbers (mobiles or landlines). One of "groups", "to", "contacts" parameters are required.

contacts
array of strings

The contacts of this call, must be a list with valid contact ids. One of "groups", "to", "contacts" parameters are required.

groups
array of strings

The lists of this call, must be a list with valid group names. One of "groups", "to", "contacts" parameters are required.

fileURL
string

The url of the wav file to play. One of fileURL or message parameters is required.

message
object
 
message.gender
string

The gender of the voice message to be played. Check here for possible values

message.language
string

The language of the voice message to be played. Check here for possible values

message.text
string

The text of the voice message to be played

name
string

The name of the campaign for this call.

respectQuietHours
boolean

Indicates if the call should respect the quiet hours, default value: false.

scheduledDate
date

The date and time (in UTC), that the call campaign will be executed at. (eg YYYY-MM-DDThh:mm:ssTZD where TZD is the time zone designator (Z or +hh:mm or -hh:mm))

hangupDelay
int32

The time to wait for the call to be answered

campaignCallback
object

Information about a DLR callback for the progress of the Voice campaign.

 
campaignCallback.url
string

The URL that Routee will POST to, each time your campaign status changes to one of the following: Scheduled, Queued, Sent, Running, Finished, or Failed.

campaignCallback.strategy
string

When the URL will be called. Two possible values: on every status change (OnChange) or when a final status arrives (OnCompletion).

callback
object

Defines the notification callback information for an individual message progress of the Voice campaign

 
callback.url
string

A URL that Routee will POST to, each time your message status changes to one of the following: Queued, Failed, Sent, Unsent, Delivered, or Undelivered. Routee will POST the trackingId along with the other request parameters as well as statuses and ErrorDescriptions.

callback.strategy
string

When the URL will be called. Two possible values: on every status change (OnChange) or when a final status arrives (OnCompletion).

Headers

Content-Type
string
Authorization
string
 

Response Parameters

KEY
DESCRIPTION

callback

Defines the notification callback information for an individual message progress of the Voice campaign. Check here for more details.

callback.strategy

When the URL will be called, on every status change (OnChange) or when a final status arrives (OnCompletion)

callback.url

The URL that will be called when an update occurs

campaignCallback

Information about a DLR callback for the progress of the Voice campaign.

campaignCallback.strategy

When the URL will be called, on every status change (OnChange) or when a final status arrives (OnCompletion)

campaignCallback.url

The URL that will be called when an update occurs

campaignName

The name of the campaign

contacts

The contacts list

cost

The cost of the campaign

createdAt

The time the campaign was created

fileURL

The url of the wav file to play

from

The sender id

groups

The groups

hangupDelay

The time to wait for the call to be answered

message

Represents the text message to be converted to wav file

message.gender

The gender of the voice message. Check here for possible values

message.language

The language of the voice message. Check here for possible values

message.text

The text of the voice message

respectQuietHours

Indicates if the Voice message should respect the quiet hours.

scheduledDate

The date the campaign was scheduled to run

state

The status of the campaign

statuses

Defines the number of voice messages per status. Check here for details.

to

The recipients' numbers.

trackingId

The tracking id of the campaign

type

The service type of the campaign

voiceAnalysis

Contains information for a voice call after being analyzed

voiceAnalysis.contacts

The details of each contact. The key refers to the id of the contact given in the request.

voiceAnalysis.dialPlanAnalysis

voiceAnalysis.dialPlanAnalysis.placeholder

voiceAnalysis.numberOfRecipients

The total number of recipients

voiceAnalysis.recipientCountries

For each recipient the country that the mobile belongs to (country format in ISO 3166-1 alpha-2)

voiceAnalysis.recipientsPerCountry

The total recipients per country (country format in ISO 3166-1 alpha-2)

voiceAnalysis.recipientsPerGroup

For each group the number of recipients that it contains without the blacklisted contacts

voiceAnalysis.totalInGroups

The total number of recipients in all given groups excluding the ones already specified and the blacklisted

errors.code

The code of error

errors.developerMessage

Message of error

errors.property

The numbers of invalid recipients

ERROR CODES

Status
Code
Description

403

User is not authenticated

404

User is not found

Suggest Edits

Analyze a Voice Campaign

Analyzing a voice campaign sendout is useful when the user needs information about the send out before actually sending it.

 
posthttps://connect.routee.net/voice/analysis
curl --request POST \
  --url https://connect.routee.net/voice/analysis \
  --header 'authorization: Bearer fdac4c64-e404-4e49-94a0-0f165abce4fd' \
  --header 'content-type: application/json' \
  --data '{"from":"TestSender", "to":["+306977663000", "+447123123456"], "message":{"text":"This is a test message. Have a good day.", "language":"el-GR", "gender":"female"}}'
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"from\":\"+TestSender\",\n  \"to\":[\"+306977663000\", \"+447123123456\"],\n  \"message\":{\n    \"text\":\"This is a test message. Have a good day.\",\n    \"language\":\"el-GR\",\n    \"gender\":\"female\"\n  }\n}");
Request request = new Request.Builder()
  .url("https://connect.routee.net/voice/analysis")
  .post(body)
  .addHeader("authorization", "Bearer fdac4c64-e404-4e49-94a0-0f165abce4fd")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
var client = new RestClient("https://connect.routee.net/voice/analysis");
var request = new RestRequest(Method.POST);
request.AddHeader("content-type", "application/json");
request.AddHeader("authorization", "Bearer fdac4c64-e404-4e49-94a0-0f165abce4fd");
request.AddParameter("application/json", "{\n  \"from\":\"+TestSender\",\n  \"to\":[\"+306977663000\", \"+447123123456\"],\n  \"message\":{\n    \"text\":\"This is a test message. Have a good day.\",\n    \"language\":\"el-GR\",\n    \"gender\":\"female\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://connect.routee.net/voice/analysis",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{\n  \"from\":\"TestSender\",\n  \"to\":[\"+306977663000\", \"+447123123456\"],\n  \"message\":{\n    \"text\":\"This is a test message. Have a good day.\",\n    \"language\":\"el-GR\",\n    \"gender\":\"female\"\n  }\n}",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer fdac4c64-e404-4e49-94a0-0f165abce4fd",
    "content-type: application/json"
  ),
));

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

curl_close($curl);

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

conn = http.client.HTTPSConnection("connect.routee.net")

payload = "{\n  \"from\":\"TestSender\",\n  \"to\":[\"+306977663000\", \"+447123123456\"],\n  \"message\":{\n    \"text\":\"This is a test message. Have a good day.\",\n    \"language\":\"el-GR\",\n    \"gender\":\"female\"\n  }\n}"

headers = {
    'authorization': "Bearer fdac4c64-e404-4e49-94a0-0f165abce4fd",
    'content-type': "application/json"
    }

conn.request("POST", "/voice/analysis", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://connect.routee.net/voice/analysis")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["authorization"] = 'Bearer fdac4c64-e404-4e49-94a0-0f165abce4fd'
request["content-type"] = 'application/json'
request.body = "{\n  \"from\":\"TestSender\",\n  \"to\":[\"+306977663000\", \"+447123123456\"],\n  \"message\":{\n    \"text\":\"This is a test message. Have a good day.\",\n    \"language\":\"el-GR\",\n    \"gender\":\"female\"\n  }\n}"

response = http.request(request)
puts response.read_body
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://connect.routee.net/voice/analysis",
  "method": "POST",
  "headers": {
    "authorization": "Bearer fdac4c64-e404-4e49-94a0-0f165abce4fd",
    "content-type": "application/json"
  },
  "processData": false,
  "data": "{\n  \"from\":\"TestSender\",\n  \"to\":[\"+306977663000\", \"+447123123456\"],\n  \"message\":{\n    \"text\":\"This is a test message. Have a good day.\",\n    \"language\":\"el-GR\",\n    \"gender\":\"female\"\n  }\n}"
}

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

NSDictionary *headers = @{ @"authorization": @"Bearer fdac4c64-e404-4e49-94a0-0f165abce4fd",
                           @"content-type": @"application/json",
NSDictionary *parameters = @{ @"from": @"TestSender",
                              @"to": @[ @"+306977663000", @"+447123123456" ],
                              @"message": @{ @"text": @"This is a test message. Have a good day.", @"language": @"el-GR", @"gender": @"female" } };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://connect.routee.net/voice/analysis"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[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];
A binary file was returned

You couldn't be authenticated

{
   "numberOfRecipients":2,
   "recipientsPerCountry":{
      "GR":1,
      "GB":1
   },
   "recipientCountries":{
      "+447123123456":"GB",
      "+306977663127":"GR"
   },
   "contacts":{},
   "recipientsPerGroup":{},
   "totalInGroups":0
}

Body Params

from
string
required

The sender id for this call

groups
array of strings

The groups of contacts selected as recipients of this call. One of "groups", "to", "contacts" parameters is required.

contacts
array of strings

The contacts selected as recipients of this call. One of "groups", "to", "contacts" parameters is required.

to
array of strings

The recipients of this call, must be a list with valid numbers (mobiles or landlines). One of "groups", "to", "contacts" parameters is required.

fileURL
string

The url of the wav file to play

message
object
 
message.gender
string

The gender of the voice message to be played

message.language
string

The language of the voice message to be played

message.text
string

The text of the voice message to be played

hangupDelay
int32

The time to wait for the call to be answered

respectQuietHours
boolean

Indicates if the call should respect the quiet hours, default value: false

scheduledDate
date

The date and time (in UTC), that the call campaign will be executed at. (eg YYYY-MM-DDThh:mm:ssTZD where TZD is the time zone designator (Z or +hh:mm or -hh:mm))

Headers

Content-Type
string
Authorization
string
 

Response Parameters

KEY
DESCRIPTION

contacts

The details of each contact. The key refers to the id of the contact given in the request

numberOfRecipients

The total number of recipients

recipientCountries

For each recipient the country that the mobile belongs to (country format in ISO 3166-1 alpha-2)

recipientsPerCountry

The total recipients per country (country format in ISO 3166-1 alpha-2)

recipientsPerGroup

For each group the number of recipients that it contains without the blacklisted contacts

totalInGroups

The total number of recipients in all given groups excluding the ones already specified and the blacklisted

errors.code

The code of error

errors.developerMessage

Message of error

errors.property

The numbers of invalid recipients

ERROR CODES

Status
Code
Description

403

User is not authenticated

404

User is not found

Suggest Edits

Track multiple voice messages with filters for a specific time range

Limit the tracking result of multiple voice messages by passing filters

 
posthttps://connect.routee.net/voice/tracking
curl -X POST \
  'https://connect.routee.net/voice/tracking?from=2017-06-01T15%3A00Z&to=2017-06-21T17%3A00Z&page=0&size=10' \
  -H 'authorization: Bearer d41a1104-7a17-4743-86ed-7dc9774c9f86' \
  -H 'content-type: application/json' \
  -d '[{"fieldName":"status.status","searchTerm":"NoAnswer"},{"fieldName": "country", "searchTerm": "GR", "searchOperator": "is"}]'
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "[{\"fieldName\":\"status.status\",\"searchTerm\":\"NoAnswer\"},\n{\"fieldName\": \"country\", \"searchTerm\": \"GR\", \"searchOperator\": \"is\"}]");
Request request = new Request.Builder()
  .url("https://connect.routee.net/voice/tracking?from=2017-06-01T15%3A00Z&to=2017-06-21T17%3A00Z&page=0&size=10")
  .post(body)
  .addHeader("authorization", "Bearer d41a1104-7a17-4743-86ed-7dc9774c9f86")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
var client = new RestClient("https://connect.routee.net/voice/tracking?from=2017-06-01T15%3A00Z&to=2017-06-21T17%3A00Z&page=0&size=10");
var request = new RestRequest(Method.POST);
request.AddHeader("content-type", "application/json");
request.AddHeader("authorization", "Bearer d41a1104-7a17-4743-86ed-7dc9774c9f86");
request.AddParameter("application/json", "[{\"fieldName\":\"status.status\",\"searchTerm\":\"NoAnswer\"},\n{\"fieldName\": \"country\", \"searchTerm\": \"GR\", \"searchOperator\": \"is\"}]", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
import http.client

conn = http.client.HTTPSConnection("connect.routee.net")

payload = "[{\"fieldName\":\"status.status\",\"searchTerm\":\"NoAnswer\"},\n{\"fieldName\": \"country\", \"searchTerm\": \"GR\", \"searchOperator\": \"is\"}]"

headers = {
    'authorization': "Bearer d41a1104-7a17-4743-86ed-7dc9774c9f86",
    'content-type': "application/json"
    }

conn.request("POST", "/voice/tracking?from=2017-06-01T15%3A00Z&to=2017-06-21T17%3A00Z&page=0&size=10", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://connect.routee.net/voice/tracking?from=2017-06-01T15%3A00Z&to=2017-06-21T17%3A00Z&page=0&size=10")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["authorization"] = 'Bearer d41a1104-7a17-4743-86ed-7dc9774c9f86'
request["content-type"] = 'application/json'
request.body = "[{\"fieldName\":\"status.status\",\"searchTerm\":\"NoAnswer\"},\n{\"fieldName\": \"country\", \"searchTerm\": \"GR\", \"searchOperator\": \"is\"}]"

response = http.request(request)
puts response.read_body
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://connect.routee.net/voice/tracking?from=2017-06-01T15%3A00Z&to=2017-06-21T17%3A00Z&page=0&size=10",
  "method": "POST",
  "headers": {
    "authorization": "Bearer d41a1104-7a17-4743-86ed-7dc9774c9f86",
    "content-type": "application/json"
  },
  "processData": false,
  "data": "[{\"fieldName\":\"status.status\",\"searchTerm\":\"NoAnswer\"},\n{\"fieldName\": \"country\", \"searchTerm\": \"GR\", \"searchOperator\": \"is\"}]"
}

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

NSDictionary *headers = @{ @"authorization": @"Bearer d41a1104-7a17-4743-86ed-7dc9774c9f86",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @[ @{ @"fieldName": @"status.status", @"searchTerm": @"NoAnswer" },
                              @{ @"fieldName": @"country", @"searchTerm": @"GR", @"searchOperator": @"is" } ];

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://connect.routee.net/voice/tracking?from=2017-06-01T15%3A00Z&to=2017-06-21T17%3A00Z&page=0&size=10"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[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];
A binary file was returned

You couldn't be authenticated

{
   "content":[
     {
       "messageId":"900f2ad3-790b-49f3-ab59-f6ffcf9af250",
       "to":"306986111111",
       "from":"TestSender",
       "country":"GR",
       "status":{
         "status":"NoAnswer",
         "date":"2017-06-07T09:24:22Z"
       },
       "applicationName": "Routee Web App",
       "originatingService": "Voice",
       "direction": "Outbound",
       "duration": 0,
       "message": {
         "language": "en-GB",
         "gender": "female",
         "text": "Hello!!!"
       },
       "price": 0
     },
     {
       "messageId":"b747678b-2824-4c63-8733-8e45546c4df4",
       "to":"306973240000",
       "from":"TestSender",
       "country":"GR",
       "status":{
         "status":"NoAnswer",
         "date":"2017-06-12T08:58:32Z"
       },
       "campaign":"TestCampaign",
       "applicationName": "default",
       "originatingService": "Voice",
       "direction": "Outbound",
       "duration": 0,
       "fileURL": "http://www.externalharddrive.com/waves/animal/duck.wav",
       "price": 0
      }
   ],
    "totalElements": 2,
    "last": true,
    "totalPages": 1,
    "first": true,
    "numberOfElements": 2,
    "size": 20,
    "number": 0
}

Query Params

from
string

ISO-8601 date-time format

to
string

ISO-8601 date-time format

page
int32

The page number to retrieve, default value is 0 (meaning the first page)

size
int32

The number of items to retrieve, default value is 20.

sort
string

The field name that will be used to sort the results.

trackingId
string

If provided then only the voice messages of the campaign with this tracking Id will be retrieved.

tagged
boolean

Body Params

fieldName
string

Defines the name of the field for this filter. ACCEPTED VALUES: id, recipient, from, collectedTones, groups, country, status.status, campaign

searchOperator
string

Defines the search operator to be used for the search. Examples: is, is_not, contains, starts_with, ends_with

searchTerm
string

Defines the value of the specified field.

Headers

Content-Type
string
Authorization
string
 

RESPONSE PARAMETERS

KEY
DESCRIPTION

content

Contains the search results.

content.messageId

The id of the voice message.

content.conversationTrackingId

The tracking id of the conversation that this message belongs to.

content.to

The recipient.

content.from

The sender Id of the call.

content.groups

The groups that the recipient belongs to.

content.country

The country of the recipient in ISO 3166-1 alpha 2 format.

content.status

The voice message's status.

content.status.date

The date that the status was updated.

content.status.status

The status of the voice message. Check here for possible values.

content.campaign

The name of the campaign that this message belongs to.

content.applicationName

The name of the application that was used to send this message.

content.originatingService

The service that sent this message.

content.direction

The direction of this call.

content.duration

The duration of this call.

content.fileURL

The URL of the .wav file.

content.message

The text message that converted to voice.

content.message.gender

The gender of the voice message (male or female).

content.message.language

The language of the voice message.

content.message.text

The text of the voice message.

content.price

The price of the voice message.

content.collectedTones

The collected DTMF tones during the call.

totalPages

The number of total pages.

last

Whether the current page is the last one.

totalElements

The total amount of elements for the current search.

first

Whether the current page is the first one.

numberOfElements

The number of elements currently on this page.

number

The requested page number.

size

The requested page size.

Suggest Edits

Delete a scheduled Voice campaign

When you no longer want to send an already scheduled voice campaign, deleting it is very simple.

 
deletehttps://connect.routee.net/voice/campaign/trackingId
curl --request DELETE \
  --url https://connect.routee.net/voice/campaign/a15c4fba-e3b0-40d0-a6c5-9f1aa386c74c \
  --header 'authorization: Bearer fffefa76-c031-46b5-b5ab-f42506712780' \
  --header 'content-type: application/json' 
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://connect.routee.net/voice/campaign/a15c4fba-e3b0-40d0-a6c5-9f1aa386c74c")
  .delete(null)
  .addHeader("authorization", "Bearer fffefa76-c031-46b5-b5ab-f42506712780")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
var client = new RestClient("https://connect.routee.net/voice/campaign/a15c4fba-e3b0-40d0-a6c5-9f1aa386c74c");
var request = new RestRequest(Method.DELETE);
request.AddHeader("content-type", "application/json");
request.AddHeader("authorization", "Bearer fffefa76-c031-46b5-b5ab-f42506712780");
IRestResponse response = client.Execute(request);
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://connect.routee.net/voice/campaign/a15c4fba-e3b0-40d0-a6c5-9f1aa386c74c",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer fffefa76-c031-46b5-b5ab-f42506712780",
    "content-type: application/json"
  ),
));

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

curl_close($curl);

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

conn = http.client.HTTPSConnection("connect.routee.net")

headers = {
    'authorization': "Bearer fffefa76-c031-46b5-b5ab-f42506712780",
    'content-type': "application/json"
    }

conn.request("DELETE", "/voice/campaign/a15c4fba-e3b0-40d0-a6c5-9f1aa386c74c", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://connect.routee.net/voice/campaign/a15c4fba-e3b0-40d0-a6c5-9f1aa386c74c")


http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Delete.new(url)
request["authorization"] = 'Bearer fffefa76-c031-46b5-b5ab-f42506712780'
request["content-type"] = 'application/json'

response = http.request(request)
puts response.read_body
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://connect.routee.net/voice/campaign/a15c4fba-e3b0-40d0-a6c5-9f1aa386c74c",
  "method": "DELETE",
  "headers": {
    "authorization": "Bearer fffefa76-c031-46b5-b5ab-f42506712780",
    "content-type": "application/json"
  }
}

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

NSDictionary *headers = @{ @"authorization": @"Bearer fffefa76-c031-46b5-b5ab-f42506712780",
                           @"content-type": @"application/json"};

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://connect.routee.net/voice/campaign/a15c4fba-e3b0-40d0-a6c5-9f1aa386c74c"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
[request setAllHTTPHeaderFields:headers];

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];
A binary file was returned

You couldn't be authenticated

Try the API to see results

Path Params

trackingId
string
required

The campaign’s tracking id.

Headers

Content-Type
string
Authorization
string
 

RESPONSE CODES

STATUS
DESCRIPTION

200

In case the voice campaign was deleted

403

User is not authenticated

404

User is not found

Suggest Edits

Retrieve Voice Message Tracking

Retrieve the tracking information of a voice message

 
gethttps://connect.routee.net/voice/tracking/messageTrackingId
curl --request GET \
  --url https://connect.routee.net/voice/tracking/6b8639ef-7cf7-4954-ae59-7a300f2e25ea \
  --header 'authorization: Bearer 0dac2371-e655-4c73-bd97-9513248ab158' \
  --header 'content-type: application/json'
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://connect.routee.net/voice/tracking/6b8639ef-7cf7-4954-ae59-7a300f2e25ea")
  .get()
  .addHeader("authorization", "Bearer 0dac2371-e655-4c73-bd97-9513248ab158")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
var client = new RestClient("https://connect.routee.net/voice/tracking/6b8639ef-7cf7-4954-ae59-7a300f2e25ea");
var request = new RestRequest(Method.GET);
request.AddHeader("content-type", "application/json");
request.AddHeader("authorization", "Bearer 0dac2371-e655-4c73-bd97-9513248ab158");
IRestResponse response = client.Execute(request);
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://connect.routee.net/voice/tracking/6b8639ef-7cf7-4954-ae59-7a300f2e25ea",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer 0dac2371-e655-4c73-bd97-9513248ab158",
    "content-type: application/json"
  ),
));

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

curl_close($curl);

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

conn = http.client.HTTPSConnection("connect.routee.net")

headers = {
    'authorization': "Bearer 0dac2371-e655-4c73-bd97-9513248ab158",
    'content-type': "application/json"
    }

conn.request("GET", "/voice/tracking/6b8639ef-7cf7-4954-ae59-7a300f2e25ea", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://connect.routee.net/voice/tracking/6b8639ef-7cf7-4954-ae59-7a300f2e25ea")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE


request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer 0dac2371-e655-4c73-bd97-9513248ab158'
request["content-type"] = 'application/json'

response = http.request(request)
puts response.read_body
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://connect.routee.net/voice/tracking/6b8639ef-7cf7-4954-ae59-7a300f2e25ea",
  "method": "GET",
  "headers": {
    "authorization": "Bearer 0dac2371-e655-4c73-bd97-9513248ab158",
    "content-type": "application/json"
  }
}

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

NSDictionary *headers = @{ @"authorization": @"Bearer 0dac2371-e655-4c73-bd97-9513248ab158",
                           @"content-type": @"application/json" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://connect.routee.net/voice/tracking/6b8639ef-7cf7-4954-ae59-7a300f2e25ea"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];

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];
A binary file was returned

You couldn't be authenticated

{
  "messageId":"6b8639ef-7cf7-4954-ae59-7a300f2e25ea",
  "to":"306977663000",
  "from":"TestSender",
  "groups":["groupOne"],
  "country":"GR",
  "status":{ 
    "status":"Ringing",
    "date":"2017-04-05T13:36:37Z"
  },
  "campaign":"TestCampaign",
  "applicationName":"app1",
  "originatingService":"Voice",
  "direction":"Outbound",
  "duration": 5,
  "message": {
    "language": "en-US",
    "gender": "female",
    "text": "This is a test message, please ignore. Have a good day."
  },
  "price": 0.0025
}

Path Params

messageTrackingId
string
required

Headers

Content-Type
string
Authorization
string
 

RESPONSE PARAMETERS

KEY
DESCRIPTION

messageId

The id of the voice message.

conversationTrackingId

The tracking id of the conversation that this message belongs to.

to

The recipient.

from

The sender Id of the call.

groups

The groups that the recipient belongs to.

country

The country of the recipient in ISO 3166-1 alpha 2 format.

status

The voice message's status.

status.date

The date that the status was updated.

status.status

The status of the voice message. Check here for possible values.

campaign

The name of the campaign that this message belongs to.

applicationName

The name of the application that was used to send this message.

originatingService

The service that sent this message.

direction

The direction of this call.

duration

The duration of this call.

fileURL

The URL of the .wav file.

message

The text message that converted to voice.

message.gender

The gender of the voice message (male or female).

message.language

The language of the voice message.

message.text

The text of the voice message.

price

The price of the voice message.

collectedTones

The collected DTMF tones during the call.

Suggest Edits

Retrieve Voice Trackings by Campaign

You can get all the tracking information for the messages of a voice campaign by providing the tracking id

 
gethttps://connect.routee.net/voice/tracking/campaign/campaignTrackingId
curl -X GET \
  https://connect.routee.net/voice/tracking/campaign/6b8639ef-7cf7-4954-ae59-7a300f2e25ea \
  -H 'authorization: Bearer 979f9b96-1df7-419e-af4f-da9966e38bca' \
  -H 'content-type: application/json' 
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://connect.routee.net/voice/tracking/campaign/6b8639ef-7cf7-4954-ae59-7a300f2e25ea")
  .get()
  .addHeader("authorization", "Bearer 979f9b96-1df7-419e-af4f-da9966e38bca")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
var client = new RestClient("https://connect.routee.net/voice/tracking/campaign/6b8639ef-7cf7-4954-ae59-7a300f2e25ea");
var request = new RestRequest(Method.GET);
request.AddHeader("content-type", "application/json");
request.AddHeader("authorization", "Bearer 979f9b96-1df7-419e-af4f-da9966e38bca");
IRestResponse response = client.Execute(request);
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://connect.routee.net/voice/tracking/campaign/6b8639ef-7cf7-4954-ae59-7a300f2e25ea",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer 979f9b96-1df7-419e-af4f-da9966e38bca",
    "content-type: application/json"
  ),
));

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

curl_close($curl);

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

conn = http.client.HTTPSConnection("connect.routee.net")

headers = {
    'authorization': "Bearer 979f9b96-1df7-419e-af4f-da9966e38bca",
    'content-type': "application/json"
    }

conn.request("GET", "/voice/tracking/campaign/6b8639ef-7cf7-4954-ae59-7a300f2e25ea", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://connect.routee.net/voice/tracking/campaign/6b8639ef-7cf7-4954-ae59-7a300f2e25ea")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer 979f9b96-1df7-419e-af4f-da9966e38bca'
request["content-type"] = 'application/json'

response = http.request(request)
puts response.read_body
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://connect.routee.net/voice/tracking/campaign/6b8639ef-7cf7-4954-ae59-7a300f2e25ea",
  "method": "GET",
  "headers": {
    "authorization": "Bearer 979f9b96-1df7-419e-af4f-da9966e38bca",
    "content-type": "application/json"
  }
}

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

NSDictionary *headers = @{ @"authorization": @"Bearer 979f9b96-1df7-419e-af4f-da9966e38bca",
                           @"content-type": @"application/json"};

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://connect.routee.net/voice/tracking/campaign/6b8639ef-7cf7-4954-ae59-7a300f2e25ea"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];

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];
A binary file was returned

You couldn't be authenticated

{
    "content": [
        {
            "messageId": "70bf7c9e-9d30-4a83-b383-a4568e1ddea9",
            "to": "+306911111111",
            "from": "Routee",
            "country": "GR",
            "status": {
                "status": "Completed",
                "date": "2017-10-05T14:21:04Z"
            },
            "campaign": "TrackedCampaign",
            "applicationName": "default",
            "originatingService": "Voice",
            "direction": "Outbound",
            "duration": 65,
            "fileURL": "http://www.xxxxxxxx.xx/example.wav",
            "price": 0.0325
        },
        {
            "messageId": "c617ccd5-2f95-4231-b623-afce1c1a6411",
            "to": "+306922222222",
            "from": "Routee",
            "country": "GR",
            "status": {
                "status": "Completed",
                "date": "2017-10-05T14:20:51Z"
            },
            "campaign": "TrackedCampaign",
            "applicationName": "default",
            "originatingService": "Voice",
            "direction": "OutgoingAPI",
            "duration": 52,
            "fileURL": "http://www.xxxxxxxx.xx/example.wav",
            "price": 0.026
        }
    ],
    "totalPages": 1,
    "last": true,
    "totalElements": 2,
    "numberOfElements": 2,
    "first": true,
    "size": 20,
    "number": 0
}

Path Params

campaignTrackingId
string
required

The tracking id of the campaign which includes the messages.

Query Params

page
string

The page number to retrieve, default value is 0 (meaning the first page).

size
string

The number of items to retrieve, default value is 20.

sort
string

The field name that will be used to sort the results.

Headers

Content-Type
string
Authorization
string
 

RESPONSE PARAMETERS

KEY
DESCRIPTION

content

Contains the search results.

content.messageId

The id of the voice message.

content.to

The recipient.

content.from

The sender Id of the call.

content.groups

The groups that the recipient belongs to.

content.country

The country of the recipient in ISO 3166-1 alpha 2 format.

content.status

The voice message's status.

content.status.date

The date that the status was updated.

content.status.status

The status of the voice message. Check here for possible values.

content.campaign

The name of the campaign that this message belongs to.

content.applicationName

The name of the application that was used to send this message.

content.originatingService

The service that sent this message.

content.direction

The direction of this call.

content.duration

The duration of this call.

content.fileURL

The URL of the .wav file.

content.message

The text message that converted to voice.

content.message.gender

The gender of the voice message (male or female).

content.message.language

The language of the voice message.

content.message.text

The text of the voice message.

content.price

The price of the voice message.

totalPages

The number of total pages.

last

Whether the current page is the last one.

totalElements

The total amount of elements for the current search.

first

Whether the current page is the first one.

numberOfElements

The number of elements currently on this page.

number

The requested page number.

size

The requested page size.

Suggest Edits

Send a Viber Campaign

Send viber messages to multiple recipients. This is a paid service.

 
posthttps://connect.routee.net/viber/campaign
curl --request POST \
  --url https://connect.routee.net/viber/campaign \
  --header 'authorization: Bearer 12dc9ff4-7df4-4786-8e7a-a46d317687f4' \
  --header 'content-type: application/json' \
  --header 'Expect:' \
  --data '{
  		"senderInfoTrackingId": "xxxxxx",
 			"to": ["+3069xxxxxxxx"],
      "campaignName": "name of campaign",
 			"body": {
   			"text": "This is a viber message!",
   			"imageURL": "http://www.xxxxxx",
   			"action": {
   	  			"targetUrl": "http://www.xxxxxx",
   	  			"caption": "Go"
   			}
 			},
 			"ttl": 5000
      }'
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{ \n \"senderInfoTrackingId\": \"xxxx\",\n \"to\": [\"+3069xxxxxxxx\"],\n \"body\": {\n   \"text\": \"This is a viber message!\",\n  \"imageURL\": \"http://www.xxxx\",\n   \"action\": {\n   \t  \"targetUrl\": \"https://www.xxxx\",\n   \t  \"caption\": \"Go\"\n   \t}\n },\n \"ttl\": 5000\n}");
Request request = new Request.Builder()
  .url("https://connect.routee.net/viber/campaign")
  .post(body)
  .addHeader("content-type", "application/json")
  .addHeader("authorization", "Bearer 04c41869-f630-4f29-965d-c2ecdb397df0")
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();
var client = new RestClient("https://connect.routee.net/viber/campaign");
var request = new RestRequest(Method.POST);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("authorization", "Bearer 04c41869-f630-4f29-965d-c2ecdb397df0");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{ \n \"senderInfoTrackingId\": \"xxxx\",\n \"to\": [\"+3069xxxxxxxx\"],\n \"body\": {\n   \"text\": \"This is a viber message!\",\n    \"imageURL\": \"http://www.xxxx\",\n   \"action\": {\n   \t  \"targetUrl\": \"https://www.xxxx\",\n   \t  \"caption\": \"Go\"\n   \t}\n },\n \"ttl\": 5000\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://connect.routee.net/viber/campaign",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "{ \n \"senderInfoTrackingId\": \"xxxxx\",\n \"to\": [\"+3069xxxxxxxx\"],\n \"body\": {\n   \"text\": \"This is a viber message!\",\n   \"imageURL\": \"http://www.xxxx\",\n   \"action\": {\n   \t  \"targetUrl\": \"https://www.xxxx\",\n   \t  \"caption\": \"Go\"\n   \t}\n },\n \"ttl\": 5000\n}",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer 04c41869-f630-4f29-965d-c2ecdb397df0",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

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

curl_close($curl);

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

conn = http.client.HTTPSConnection("connect.routee.net")

payload = "{ \n \"senderInfoTrackingId\": \"xxxxx\",\n \"to\": [\"+3069xxxxxxxx\"],\n \"body\": {\n   \"text\": \"This is a viber message!\",\n  \"imageURL\": \"http://www.xxxx\",\n   \"action\": {\n   \t  \"targetUrl\": \"https://www.xxxx\",\n   \t  \"caption\": \"Go\"\n   \t}\n },\n \"ttl\": 5000\n}"}"

headers = {
    'content-type': "application/json",
    'authorization': "Bearer 04c41869-f630-4f29-965d-c2ecdb397df0",
    'cache-control': "no-cache"
    }

conn.request("POST", "/viber/campaign", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://connect.routee.net/viber/campaign")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request["authorization"] = 'Bearer 04c41869-f630-4f29-965d-c2ecdb397df0'
request["cache-control"] = 'no-cache'
request.body = "{ \n \"senderInfoTrackingId\": \"xxxxx\",\n \"to\": [\"+3069xxxxxxxx\"],\n \"body\": {\n   \"text\": \"This is a viber message!\",\n \"imageURL\": \"http://www.xxxx\",\n   \"action\": {\n   \t  \"targetUrl\": \"https://www.xxxx\",\n   \t  \"caption\": \"Go\"\n   \t}\n },\n \"ttl\": 5000\n}"}"

response = http.request(request)
puts response.read_body
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://connect.routee.net/viber/campaign",
  "method": "POST",
  "headers": {
    "content-type": "application/json",
    "authorization": "Bearer 04c41869-f630-4f29-965d-c2ecdb397df0",
    "cache-control": "no-cache"
  },
  "processData": false,
  "data": "{ \n \"senderInfoTrackingId\": \"xxxxx\",\n \"to\": [\"+3069xxxxxxxx\"],\n \"body\": {\n   \"text\": \"This is a viber message!\",\n  \"imageURL\": \"http://www.xxxx\",\n   \"action\": {\n   \t  \"targetUrl\": \"https://www.xxxx\",\n   \t  \"caption\": \"Go\"\n   \t}\n },\n \"ttl\": 5000\n}"}"
}

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

NSDictionary *headers = @{ @"content-type": @"application/json",
                           @"authorization": @"Bearer 04c41869-f630-4f29-965d-c2ecdb397df0",
                           @"cache-control": @"no-cache",
                           @"postman-token": @"371e28a9-7b8a-874e-b4db-9c93d74cba32" };
NSDictionary *parameters = @{ @"senderInfoTrackingId": @"xxxxx",
                              @"to": @[ @"+3069xxxxxxxx" ],
                              @"body": @{ @"text": @"This is a viber message!",  @"imageURL": @"http://www.xxxxxx", @"action": @{ @"targetUrl": @"https://www.xxxxxx", @"caption": @"Go" } },
                              @"ttl": @5000};

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://connect.routee.net/viber/campaign"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[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];
A binary file was returned

You couldn't be authenticated

{
    "trackingId": "62d4a3cc-6f32-4ba2-b99a-b661fb27fdd5",
    "type": "Viber",
    "state": "Queued",
    "createdAt": "2017-08-11T12:36:45.393Z",
    "senderInfoTrackingId": "xxxxxx",
    "to": [
        "+3069xxxxxxxx"
    ],
    "campaignName": "name of campaign",
    "body": {
        "text": "This is a viber message!",
        "imageURL": "http://www.xxxxxx",
        "action": {
            "caption": "Go",
            "targetUrl": "http://www.xxxxxx"
        }
    },
    "ttl": 5000,
    "cost": 0,
    "totalMessages": 1,
    "viberAnalysis": {
        "numberOfRecipients": 1,
        "recipientsPerCountry": {
            "GR": 1
        },
        "recipientCountries": {
            "+3069xxxxxxxx": "GR"
        },
        "contacts": {},
        "recipientsPerGroup": {},
        "totalInGroups": 0,
        "bodyAnalysis": {
            "characters": 36
        }
    }
}

Body Params

senderInfoTrackingId
string
required

The unique sender id. Please contact with sales@routee.net to receive it.

to
array of strings

The phone numbers (array) the message is about to be sent to. Format with a '+' and country code e.g., +306948530920 (E.164 format). Maximum array of number allowed 20k. One of "groups", "to", "contacts" parameters are required.

contacts
array of strings

The contact ids that the message will be sent to. One of "groups", "to", "contacts" parameters are required.

groups
array of strings

The groups of contacts in the account selected as recipients. Groups have to be created at the system. One of "groups", "to", "contacts" parameters are required.

campaignName
string

The name of viber campaign.

scheduledDate
date

Defines the scheduled date and time in UTC. (eg YYYY-MM-DDThh:mm:ssTZD where TZD is the time zone designator (Z or +hh:mm or -hh:mm))

body
object
 
body.text
string

The text of viber message. Maximum number of characters supported in a Viber message is 1000 characters.

body.imageURL
string

The url of the image. (max image size: 400KB)

body.action
object
 
body.action.caption
string

The displayed text on the button (max 30 characters).

body.action.targetUrl
string

The target URL of the viber action.

ttl
int32

Time range until message expires. TTL range in seconds: 15 - 86400 seconds. If it is not set, the default range is 14 days.

callbackUrl
string

Defines the callback URL that will receive all the individual messages' progress of the Viber campaign. Check here for details.

inboundUrl
string

Defines the callback URL that will receive the inbound messages. Check here for details.

Headers

Authorization
string
required
Content-Type
string
required
 

RESPONSE PARAMETERS

KEY
DESCRIPTION

trackingId

The tracking id of the viber campaign.

type

The service type of the campaign.

state

The state of the campaign.

createdAt

The time the campaign was created

senderInfoTrackingId

The unique sender id.

to

The recipients' numbers.

campaignName

The name of the campaign. This value must be unique for your account. This is useful if you plan to sent the Viber message to multiple destination numbers or to a group of contacts.

scheduledDate

The time the campaign is scheduled to run.

body

Represents the viber message.

body.text

The text of viber message.

body.imageURL

The url of the image. (max image size: 400KB)

body.action

Represents the action(button) of the viber message.

body.action.caption

The displayed text on the button.

body.action.targetUrl

The target URL of the viber action.

ttl

Time range until message expires. TTL range in seconds: 15 - 86400 seconds. If it is not set, the default range is 14 days.

cost

The cost of the campaign.

totalMessages

The total messages of viber campaign.

viberAnalysis

Contains information for viber campaign after being analyzed.

viberAnalysis.numberOfRecipients

The total number of recipients.

viberAnalysis.recipientsPerCountry

The total recipients per country (country format in ISO 3166-1 alpha-2).

viberAnalysis.recipientCountries

For each recipient the country that the mobile belongs to (country format in ISO 3166-1 alpha-2).

viberAnalysis.recipientsPerGroup

For each group the number of recipients that it contains, without the blacklisted contacts.

viberAnalysis.totalInGroups

The total number of recipients in all given groups excluding the ones already specified and the blacklisted.

viberAnalysis.bodyAnalysis

The body analysis of the viber message.

viberAnalysis.bodyAnalysis.characters

The total number of characters of the message's body.

callbackUrl

The defined callback URL that will receive all the individual messages' progress of the Viber campaign. Check here for details.

inboundUrl

The defined callback URL that will receive the inbound messages. Check here for details.

ERROR CODES

STATUS
CODE
DESCRIPTION

400

400001009

You don't have enough balance to send the campaign.

400

400019002

(errorCode: 001) The recipient numbers are not in the correct format (mobile numbers) or your array of numbers contains at least one wrong number.

400

400019002

(errorCode: 007) Your campaign has wrong message type combination. The supported types are: Text, Image, Text + Action, Text + Action + Image.

400

400000000

The value of ttl must be less than or equal to 86400.

404

404002001

A contact id does not exist.

404

404020001

The sender ID is not correct.

409

409009003

Your account already has a campaign with the given name.

Suggest Edits

Retrieve Viber Trackings by Campaign

Retrieve tracking information for viber messages included in a campaign.

 
gethttps://connect.routee.net/viber/tracking/campaign/campaignTrackingId
curl -X GET \
  https://connect.routee.net/viber/tracking/campaign/62d4a3cc-6f32-4ba2-b99a-b661fb27fdd5 \
  -H 'authorization: Bearer 979f9b96-1df7-419e-af4f-da9966e38bca' \
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("  https://connect.routee.net/viber/tracking/campaign/62d4a3cc-6f32-4ba2-b99a-b661fb27fdd5")
  .get()
  .addHeader("authorization", "Bearer 979f9b96-1df7-419e-af4f-da9966e38bca")
  .build();

Response response = client.newCall(request).execute();
var client = new RestClient(" https://connect.routee.net/viber/tracking/campaign/62d4a3cc-6f32-4ba2-b99a-b661fb27fdd5");
var request = new RestRequest(Method.GET);
request.AddHeader("authorization", "Bearer 979f9b96-1df7-419e-af4f-da9966e38bca");
IRestResponse response = client.Execute(request);
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => " https://connect.routee.net/viber/tracking/campaign/62d4a3cc-6f32-4ba2-b99a-b661fb27fdd5",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer 979f9b96-1df7-419e-af4f-da9966e38bca"
  ),
));

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

curl_close($curl);

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

conn = http.client.HTTPSConnection("connect.routee.net")

headers = {
    'authorization': "Bearer 979f9b96-1df7-419e-af4f-da9966e38bca"
    }

conn.request("GET", "/viber/tracking/campaign/62d4a3cc-6f32-4ba2-b99a-b661fb27fdd5", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI(" https://connect.routee.net/viber/tracking/campaign/62d4a3cc-6f32-4ba2-b99a-b661fb27fdd5")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Bearer 979f9b96-1df7-419e-af4f-da9966e38bca'

response = http.request(request)
puts response.read_body
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://connect.routee.net/viber/tracking/campaign/62d4a3cc-6f32-4ba2-b99a-b661fb27fdd5",
  "method": "GET",
  "headers": {
    "authorization": "Bearer 979f9b96-1df7-419e-af4f-da9966e38bca"
  }
}

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

NSDictionary *headers = @{ @"authorization": @"Bearer 979f9b96-1df7-419e-af4f-da9966e38bca"};

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@" https://connect.routee.net/viber/tracking/campaign/62d4a3cc-6f32-4ba2-b99a-b661fb27fdd5"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];

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];
A binary file was returned

You couldn't be authenticated

{
    "content": [
        {
            "trackingId": "2c5cd6fa-5d0f-41c6-b1cb-924287d3faf7",
            "to": "+30694xxxxxxxx",
            "from": "sender",
            "country": "GR",
            "status": {
                "status": "SEEN",
              	"reason": {
                    "detailedStatus": "Seen",
                    "description": "Message delivered successfully."
                },
                "date": "2017-08-11T12:36:46.146Z"
            },
            "campaign": "name of campaign",
            "campaignTrackingId": "62d4a3cc-6f32-4ba2-b99a-b661fb27fdd5",
            "applicationName": "default",
            "originatingService": "Viber",
            "direction": "Outbound",
            "ttl": "5000",
            "alternativeIosMessage": "This is a viber message!",
            "message": "This is a viber message!",
            "price": 0.00675,
            "viberAction": {
                "caption": "Go",
                "targetUrl": "https://www.xxxx"
            },
            "imageUrl": "http://www.xxxx"
        }
    ],
    "last": true,
    "totalPages": 1,
    "totalElements": 1,
    "numberOfElements": 1,
    "first": true,
    "size": 1,
    "number": 0
}

Path Params

campaignTrackingId
string
required

The tracking id of the viber campaign which includes the messages.

Query Params

page
int32

The page number to retrieve, default value is 0 (meaning the first page).

size
int32

The number of items to retrieve, default value is 20.

sort
int32

The field name that will be used to sort the results.

Headers

Authorization
string
required
 

RESPONSE PARAMETERS

KEY
DESCRIPTION

content.trackingId

The tracking id of the viber message.

content.to

The recipient number.

content.from

The name of the sender id.

content.groups

The groups that the recipient belongs to.

content.country

The country of the recipient.

content.status

Information about the status of the viber message.

content.status.status

The current status of the viber message.
Check here for possible values.

content.status.date

The updated date of the status.

content.status.reason

The reason of the status.

content.status.reason.detailedStatus

The current detailed status.
Check here for details.

content.status.reason.description

The description of the detailed status.

content.campaign

The name of the campaign that this message was send from.

content.campaignTrackingId

The id of the campaign that this message was send from.

content.applicationName

The name of the application that was used to send this message.

content.originatingService

The service that sent this message.

content.direction

The direction of this message.

content.ttl

Time range until message expires.

content.alternativeIosMessage

The alternative message that will be sent after TTL range expiration. Supported only for iOS devices.

content.message

The text of the viber message.

content.viberAction

Represents the action (button) of the viber message.

content.viberAction.caption

The displayed text on the button.

content.viberAction.targetUrl

The action which should be executed, when the recipient clicks on the button.

content.imageUrl

The url of image.

content.price

The cost of this message.

last

Whether the current page is the last one.

totalPages

The number of total pages.

totalElements

The total amount of elements for the current search.

numberOfElements

The number of elements currently on this page.

first

Whether the current page is the first one.

size

The requested page size.

number

The requested page number.

ERROR CODES

STATUS
CODE
DESCRIPTION

404

404009001

Campaign not found.

Suggest Edits

Delete a scheduled Viber campaign

When you no longer want to send an already scheduled viber campaign, deleting it is very simple.

 
deletehttps://connect.routee.net/viber/campaign/campaignTrackingId
curl --request DELETE \
  --url https://connect.routee.net/viber/campaign/2c96147b-fb5f-4cc2-9cea-374cc68f5408 \
  --header 'authorization: Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4'
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://connect.routee.net/viber/campaign/2c96147b-fb5f-4cc2-9cea-374cc68f5408")
  .delete(null)
  .addHeader("authorization", "Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4")
  .build();

Response response = client.newCall(request).execute();
var client = new RestClient("https://connect.routee.net/viber/campaign/2c96147b-fb5f-4cc2-9cea-374cc68f5408");
var request = new RestRequest(Method.DELETE);
request.AddHeader("authorization", "Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4");
IRestResponse response = client.Execute(request);
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://connect.routee.net/viber/campaign/2c96147b-fb5f-4cc2-9cea-374cc68f5408",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer 12dc9fe4-7df4-4786-8d7a-a46d307687f4"
  ),
));

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

curl_close($curl);

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

conn = http.client.HTTPSConnection("connect.routee.net"