Authentication
Each request made must include client authorisation in the header of the HTTP request. This will use basic HTTP access authentication.
The authorisation header is constructed by combining the username:apiPassword string and encoding it in Base64. This string is prefixed by the Authorization: Basic string.
For example, for the username username and password apiPassword, the resulting header would be:
Authorization: Basic dXNlcm5hbWU6YXBpUGFzc3dvcmQ=
Campaigns
Verified senders
Listing
It returns the list of verified senders (alias) registered for the account, indicating the channel they are enabled for and the country the registration corresponds to.
GET {{DASHBOARD_HOST}}/api/rest/senders
curl -X GET '{{DASHBOARD_HOST}}/api/rest/senders' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{DASHBOARD_HOST}}/api/rest/senders',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: Basic YOUR_AUTH_TOKEN',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import java.io.DataOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.HttpsURLConnection;
public class App {
public static void main(String[] args) {
try {
URL url = new URL("{{DASHBOARD_HOST}}/api/rest/senders");
HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("Authorization", "Basic YOUR_AUTH_TOKEN");
connection.setRequestProperty("Accept", "application/json");
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
} catch (Exception e) {
// TODO: handle exception
}
}
}
var axios = require('axios');
var config = {
method: 'get',
url: '{{DASHBOARD_HOST}}/api/rest/senders',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
url = "{{DASHBOARD_HOST}}/api/rest/senders"
payload = {}
headers = {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "net/http"
url = URI("{{DASHBOARD_HOST}}/api/rest/senders")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Content-Type"] = "application/json"
request["Authorization"] = "Basic YOUR_AUTH_TOKEN"
response = https.request(request)
puts response.read_body
using System;
using RestSharp;
namespace HelloWorldApplication {
class HelloWorld {
static void Main(string[] args) {
var client = new RestClient("{{DASHBOARD_HOST}}/api/rest/senders");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Basic YOUR_AUTH_TOKEN");
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
}
}
}
Response
{
"data": [
{
"sender": "MYBRAND",
"type": "sms",
"countryIso": "ES"
}
]
}
Response
| Field | Description |
|---|---|
| sender | Name of the registered sender. |
| type | Channel the sender is registered for. Possible values: sms, rcs. |
| countryIso | 2-letter ISO code of the country the sender is registered for. |
Scheduled messages
List
GET {{DASHBOARD_HOST}}/api/rest/scheduled
curl -X GET '{{DASHBOARD_HOST}}/api/rest/scheduled' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{DASHBOARD_HOST}}/api/rest/scheduled',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: Basic YOUR_AUTH_TOKEN',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import java.io.DataOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.HttpsURLConnection;
public class App {
public static void main(String[] args) {
try {
URL url = new URL("{{DASHBOARD_HOST}}/api/rest/scheduled");
HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("Authorization", "Basic YOUR_AUTH_TOKEN");
connection.setRequestProperty("Accept", "application/json");
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
} catch (Exception e) {
// TODO: handle exception
}
}
}
var axios = require('axios');
var config = {
method: 'get',
url: '{{DASHBOARD_HOST}}/api/rest/scheduled',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
url = "{{DASHBOARD_HOST}}/api/rest/scheduled"
payload = {}
headers = {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "net/http"
url = URI("{{DASHBOARD_HOST}}/api/rest/scheduled")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Content-Type"] = "application/json"
request["Authorization"] = "Basic YOUR_AUTH_TOKEN"
response = https.request(request)
puts response.read_body
using System;
using RestSharp;
namespace HelloWorldApplication {
class HelloWorld {
static void Main(string[] args) {
var client = new RestClient("{{DASHBOARD_HOST}}/api/rest/scheduled");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Basic YOUR_AUTH_TOKEN");
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
}
}
}
Response
Multi GUID
{
"result": [
{
"guid": "100",
"type": "SMS",
"sending_id": 123,
"updated_at": "2017-09-18 10:49:12",
"scheduled_at": "2017-11-11 10:10:10"
},
{
"guid": "101",
"type": "SMS",
"sending_id": 123,
"created_at": "2017-09-18 10:49:12",
"updated_at": "2017-09-18 10:49:12",
"scheduled_at": "2017-11-11 10:10:10"
},
{
"guid": "102",
"type": "SMS",
"sending_id": 123,
"created_at": "2017-09-18 10:49:12",
"updated_at": "2017-09-18 10:49:12",
"scheduled_at": "2017-11-11 10:10:10"
}
],
"total": 3
}
Single GUID
{
"result": {
"guid": "100",
"type": "SMS",
"content": {
"to": "34666555444",
"from": "SAMPLE",
"encoding": "gsm",
"message": "This is a test",
"campaignId": 456,
"sendingId": 123
},
"created_at": "2017-09-18 10:49:12",
"updated_at": "2017-09-18 10:49:12",
"scheduled_at": "2017-11-11 10:10:10"
},
"total": 1
}
Lists all scheduled mailings. Can be filtered by type (SMS or MAILING) and can specify one GUID, multiple GUIDs or no GUIDs (to list all).
The content of the message is not shown in the list, unless a single GUID is specified.
| Parameter | Type | Required | Description |
|---|---|---|---|
| guid | integer, array | No | Identifier of message or messages. One identifier, an array of identifiers or no identifiers can be used to show all. |
| type | string | No | SMS o MAILING |
| sendingId | integer | No | Identifier of the sending. |
Update
PUT {{DASHBOARD_HOST}}/api/rest/scheduled
curl -X PUT '{{DASHBOARD_HOST}}/api/rest/scheduled' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN' \
-d '{
"guid": [100,101],
"scheduleDate": "20171011093000"
}'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{DASHBOARD_HOST}}/api/rest/scheduled',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_POSTFIELDS => '{
"guid": [100,101],
"scheduleDate": "20171011093000"
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: Basic YOUR_AUTH_TOKEN',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import java.io.DataOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.HttpsURLConnection;
public class App {
public static void main(String[] args) {
try {
URL url = new URL("{{DASHBOARD_HOST}}/api/rest/scheduled");
HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
connection.setRequestMethod("PUT");
connection.setRequestProperty("Authorization", "Basic YOUR_AUTH_TOKEN");
connection.setRequestProperty("Accept", "application/json");
String requestBody = "{ \"guid\": [100,101], \"scheduleDate\": \"20171011093000\" }";
connection.setDoOutput(true);
DataOutputStream wr = new DataOutputStream(connection.getOutputStream());
wr.writeBytes(requestBody);
wr.flush();
wr.close();
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
} catch (Exception e) {
// TODO: handle exception
}
}
}
var axios = require('axios');
var config = {
method: 'put',
url: '{{DASHBOARD_HOST}}/api/rest/scheduled',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
},
data: '{ "guid": [100,101], "scheduleDate": "20171011093000" }'
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
url = "{{DASHBOARD_HOST}}/api/rest/scheduled"
payload = "{ \"guid\": [100,101], \"scheduleDate\": \"20171011093000\" }"
headers = {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
response = requests.request("PUT", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "net/http"
url = URI("{{DASHBOARD_HOST}}/api/rest/scheduled")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = "application/json"
request["Authorization"] = "Basic YOUR_AUTH_TOKEN"
request.body = "{ \"guid\": [100,101], \"scheduleDate\": \"20171011093000\" }"
response = https.request(request)
puts response.read_body
using System;
using RestSharp;
namespace HelloWorldApplication {
class HelloWorld {
static void Main(string[] args) {
var client = new RestClient("{{DASHBOARD_HOST}}/api/rest/scheduled");
client.Timeout = -1;
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization", "Basic YOUR_AUTH_TOKEN");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{ \"guid\": [100,101], \"scheduleDate\": \"20171011093000\" }", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
}
}
}
Response
{
"result": true,
"updated": 2
}
Updates the scheduled date of a mailing, multiple mailings or all scheduled mailings. Can be filtered by GUID and/or type.
| Parameter | Type | Required | Description |
|---|---|---|---|
| guid | integer, array | No | Identifier of message or messages. One identifier, an array of identifiers or no identifiers can be used to show all. |
| type | string | No | SMS o MAILING |
| scheduleDate | string | Yes | Date of sending message in UTC format. If you need to send scheduled messages, the delivery date can be specified by indicating the date in the following format YYYYmmddHHiiss (e.g. 20130215142000 would be 15 February 2013 at 14:20:00). For immediate mailings, this parameter does not have to be specified. |
Delete
DELETE {{DASHBOARD_HOST}}/api/rest/scheduled
curl -X DELETE '{{DASHBOARD_HOST}}/api/rest/scheduled' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN' \
-d '{
"guid": [100, 101]
}'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{DASHBOARD_HOST}}/api/rest/scheduled',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_POSTFIELDS => '{
"guid": [100, 101]
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: Basic YOUR_AUTH_TOKEN',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import java.io.DataOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.HttpsURLConnection;
public class App {
public static void main(String[] args) {
try {
URL url = new URL("{{DASHBOARD_HOST}}/api/rest/scheduled");
HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
connection.setRequestMethod("DELETE");
connection.setRequestProperty("Authorization", "Basic YOUR_AUTH_TOKEN");
connection.setRequestProperty("Accept", "application/json");
String requestBody = "{ \"guid\": [100, 101] }";
connection.setDoOutput(true);
DataOutputStream wr = new DataOutputStream(connection.getOutputStream());
wr.writeBytes(requestBody);
wr.flush();
wr.close();
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
} catch (Exception e) {
// TODO: handle exception
}
}
}
var axios = require('axios');
var config = {
method: 'delete',
url: '{{DASHBOARD_HOST}}/api/rest/scheduled',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
},
data: '{ "guid": [100, 101] }'
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
url = "{{DASHBOARD_HOST}}/api/rest/scheduled"
payload = "{ \"guid\": [100, 101] }"
headers = {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
response = requests.request("DELETE", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "net/http"
url = URI("{{DASHBOARD_HOST}}/api/rest/scheduled")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Content-Type"] = "application/json"
request["Authorization"] = "Basic YOUR_AUTH_TOKEN"
request.body = "{ \"guid\": [100, 101] }"
response = https.request(request)
puts response.read_body
using System;
using RestSharp;
namespace HelloWorldApplication {
class HelloWorld {
static void Main(string[] args) {
var client = new RestClient("{{DASHBOARD_HOST}}/api/rest/scheduled");
client.Timeout = -1;
var request = new RestRequest(Method.DELETE);
request.AddHeader("Authorization", "Basic YOUR_AUTH_TOKEN");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{ \"guid\": [100, 101] }", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
}
}
}
Response
{
"result": true,
"deleted": 2
}
Deletes a mailing, multiple mailings or all scheduled mailings. Can be filtered by GUID and/or type.
| Parameter | Type | Required | Description |
|---|---|---|---|
| guid | integer, array | No | Identifier of message or messages. One identifier, an array of identifiers or no identifiers can be used to show all. |
| type | string | No | SMS o MAILING |
Campaigns list
GET {{DASHBOARD_HOST}}/api/rest/campaigns
curl -X GET '{{DASHBOARD_HOST}}/api/rest/campaigns' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{DASHBOARD_HOST}}/api/rest/campaigns',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: Basic YOUR_AUTH_TOKEN',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import java.io.DataOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.HttpsURLConnection;
public class App {
public static void main(String[] args) {
try {
URL url = new URL("{{DASHBOARD_HOST}}/api/rest/campaigns");
HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("Authorization", "Basic YOUR_AUTH_TOKEN");
connection.setRequestProperty("Accept", "application/json");
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
} catch (Exception e) {
// TODO: handle exception
}
}
}
var axios = require('axios');
var config = {
method: 'get',
url: '{{DASHBOARD_HOST}}/api/rest/campaigns',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
url = "{{DASHBOARD_HOST}}/api/rest/campaigns"
payload = {}
headers = {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "net/http"
url = URI("{{DASHBOARD_HOST}}/api/rest/campaigns")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Content-Type"] = "application/json"
request["Authorization"] = "Basic YOUR_AUTH_TOKEN"
response = https.request(request)
puts response.read_body
using System;
using RestSharp;
namespace HelloWorldApplication {
class HelloWorld {
static void Main(string[] args) {
var client = new RestClient("{{DASHBOARD_HOST}}/api/rest/campaigns");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Basic YOUR_AUTH_TOKEN");
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
}
}
}
Response
{
"data": [
{
"id": 1,
"name": "My campaign",
"type": "basic",
"createdAt": "2018-12-27T11:31:16+00:00",
"updatedAt": "2018-12-27T11:31:16+00:00",
"links": {
"self": "{{DASHBOARD_HOST}}/api/rest/campaigns/1",
"sendings": "{{DASHBOARD_HOST}}/api/rest/campaigns/1/sendings"
},
"sendings": {
"data": [
{
"id": 1,
"campaignName": "My campaign",
"status": "OPENED",
"channel": "sms",
"total": 2,
"processed": 2,
"totalSmsParts": 4,
"cost": 0.02,
"currency": "EUR",
"tags": [],
"scheduledAt": null,
"expiresAt": null,
"startedAt": null,
"finishedAt": null,
"createdAt": "2018-12-27T11:31:16+00:00",
"updatedAt": "2018-12-27T11:31:22+00:00",
"events": {
"delivered": 2,
"opened": 0,
"opened_unique": 0,
"clicked": 0,
"clicked_unique": 0,
"unsubscribed": 0,
"hard_bounced": 0,
"complaint": 0,
"sent": 2,
"soft_bounced": 0,
"undelivered": 0,
"rejected": 0,
"expired": 0,
"unsubscribed_landing": 0
},
"links": {
"self": "{{DASHBOARD_HOST}}/api/rest/sendings/1",
"eventsReport": "{{DASHBOARD_HOST}}/api/rest/sendings/1/reports/events"
}
}
]
}
}
]
}
Filters
| Parameter | Description |
|---|---|
| name | Filter by campaign name. It is possible to use the character "*" as "wildcard". Example: ?name=CAMPAIGN_2020_* |
| channel | Filter by channel. Available values: sms, mailing, landing, text2speech, voice-interactive Example: ?channel=sms |
| beforeDate | Show results prior to the indicated creation date. The date must be specified in ISO 8601 format. Example: ?beforeDate=2019-01-01T00%3A00%3A00%2B00%3A00 |
| afterDate | Show results after the indicated creation date. The date must be specified in ISO 8601 format. Example: ?afterDate=2019-01-01T00%3A00%3A00%2B00%3A00 |
| updatedBeforeDate | Show results with last update prior to the indicated date. The date must be specified in ISO 8601 format. Example: ?updatedBeforeDate=2019-01-01T00%3A00%3A00%2B00%3A00 |
| updatedAfterDate | Show results with last update after the indicated date. The date must be specified in ISO 8601 format. Example: ?updatedAfterDate=2019-01-01T00%3A00%3A00%2B00%3A00 |
The parameters must be correctly encoded (urlencode) with respect to the RFC 3986 standard to be supported by the server.
Response fields
| Parameter | Description |
|---|---|
| name | Campaign name. |
| type | Campaign type. Possible values: basic, automatic, trigger, testab. |
| sendings | List of all the sendings associated with your campaign. For basic and automatic campaigns, the sendings number will always be 1. |
| sendings.*.status | Your sending status. Possible values: PENDING: Sending scheduled for a future date. SAVED: Saved sending. It will not be sent until the campaign is confirmed from the platform. SENDING: Sending in progress. PAUSED: Sending paused. FINISHED: Sending finished. CANCELLED: Sending cancelled. EDITING: The sending is being edited from the platform. OPENED: API shipments will report this status. Indicates that the sending can accept more messages. AUTOMATED: Automated sending, waiting for the automation conditions to be met. WAITING: "Trigger" sending, waiting for the sending conditions to be met. |
| sendings.*.channel | Sending channel. Possible values: sms, mailing, landing, text2speech, voice-interactive. |
| sendings.*.total | Total number of messages to be sent. |
| sendings.*.processed | Total number of messages sent. |
| sendings.*.totalSmsParts | Only applicable to SMS sendings. The total number of SMS parts sent for concatenated sendings will be indicated. |
| sendings.*.cost | Sending cost. |
| sendings.*.currency | Currency code for the cost. |
| sendings.*.tags | Tags assigned to the sending. |
| sendings.*.scheduledAt | Schedule date of the campaign. No message will be sent before this date. |
| sendings.*.expiresAt | Expiry date of the campaign. After this date, no more messages will be sent. |
| sendings.*.events | Summary of the total events occurred during the sending. Events: delivered: The message has been delivered to the contact. opened: The contact has opened the message. Not applicable to sms and voice. opened_unique: Total of unique openings. Not applicable to sms and voice. clicked: The contact has clicked on a link included in the message. Not applicable to sms and voice. clicked_unique: Total of unique clicks. Not applicable to sms and voice. unsubscribed: The contact has unsubscribed. hard_bounced: Total hard bounces generated by the campaign. Only applicable to mailing. complaint: The contact has marked the message as unwanted. sent: The message has been sent to the contact. soft_bounced: Total soft bounces generated by the campaign. Only applicable to mailing. undelivered: The message could not have been delivered to the contact. rejected: The attempt to send the message has been rejected. expired: The message has been rejected as the expiration date of the campaign has passed. unsubscribed_landing: The contact has unsubscribed using the landing page included in the message. |
Databases
Contacts
Contact list
GET {{DASHBOARD_HOST}}/api/rest/contacts
curl -X GET '{{DASHBOARD_HOST}}/api/rest/contacts?include=customFields,groups' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{DASHBOARD_HOST}}/api/rest/contacts?include=customFields,groups',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: Basic YOUR_AUTH_TOKEN',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import java.io.DataOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.HttpsURLConnection;
public class App {
public static void main(String[] args) {
try {
URL url = new URL("{{DASHBOARD_HOST}}/api/rest/contacts?include=customFields,groups");
HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("Authorization", "Basic YOUR_AUTH_TOKEN");
connection.setRequestProperty("Accept", "application/json");
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
} catch (Exception e) {
// TODO: handle exception
}
}
}
var axios = require('axios');
var config = {
method: 'get',
url: '{{DASHBOARD_HOST}}/api/rest/contacts?include=customFields,groups',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
url = "{{DASHBOARD_HOST}}/api/rest/contacts?include=customFields,groups"
payload = {}
headers = {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "net/http"
url = URI("{{DASHBOARD_HOST}}/api/rest/contacts?include=customFields,groups")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Content-Type"] = "application/json"
request["Authorization"] = "Basic YOUR_AUTH_TOKEN"
response = https.request(request)
puts response.read_body
using System;
using RestSharp;
namespace HelloWorldApplication {
class HelloWorld {
static void Main(string[] args) {
var client = new RestClient("{{DASHBOARD_HOST}}/api/rest/contacts?include=customFields,groups");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Basic YOUR_AUTH_TOKEN");
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
}
}
}
Response
{
"data": [
{
"id": 1,
"email": "email@example.com",
"phone": "34666666666",
"countryIso": "ES",
"landline": "900222222",
"name": "Name",
"surname": "Last name",
"createdAt": "2018-03-13T14:32:25+00:00",
"updatedAt": "2018-07-04T13:57:09+00:00",
"customFields": {
"data": [
{
"key": "color",
"type": "string",
"value": "green"
}
]
},
"groups": {
"data": [
{
"id": 1,
"name": "My Contact List"
}
]
}
}
],
"meta": {
"pagination": {
"total": 500,
"count": 100,
"per_page": 100,
"current_page": 1,
"total_pages": 5,
"links": {
"next": "{{DASHBOARD_HOST}}/api/rest/contacts?include=customFields%2Cgroups&page=2"
}
}
}
}
Filters
| Parameter | Description |
|---|---|
| limit | Total contacts to display in a single request. Default value: 100. Maximum: 1000. |
| include | Include associated subresources in the response. It is possible to specify multiple values separated by commas. Available values: customFields, groups. |
| Filter contacts for a specific email: email=myemail@example.com. | |
| phone | Filter contacts for a specific phone: phone=34666666666. |
| landline | Filter contacts for a specific landline phone: landline=900222222. |
| countryIso | Filter contacts for a specific country: countryIso=ES. |
| externalId | Filter contacts for a specific externalId: externalId=EXT1. |
Show a contact
GET {{DASHBOARD_HOST}}/api/rest/contacts/<ID>
curl -X GET '{{DASHBOARD_HOST}}/api/rest/contacts/1?include=customFields,groups' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{DASHBOARD_HOST}}/api/rest/contacts/1?include=customFields,groups',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: Basic YOUR_AUTH_TOKEN',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import java.io.DataOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.HttpsURLConnection;
public class App {
public static void main(String[] args) {
try {
URL url = new URL("{{DASHBOARD_HOST}}/api/rest/contacts/1?include=customFields,groups");
HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("Authorization", "Basic YOUR_AUTH_TOKEN");
connection.setRequestProperty("Accept", "application/json");
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
} catch (Exception e) {
// TODO: handle exception
}
}
}
var axios = require('axios');
var config = {
method: 'get',
url: '{{DASHBOARD_HOST}}/api/rest/contacts/1?include=customFields,groups',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
url = "{{DASHBOARD_HOST}}/api/rest/contacts/1?include=customFields,groups"
payload = {}
headers = {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "net/http"
url = URI("{{DASHBOARD_HOST}}/api/rest/contacts/1?include=customFields,groups")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Content-Type"] = "application/json"
request["Authorization"] = "Basic YOUR_AUTH_TOKEN"
response = https.request(request)
puts response.read_body
using System;
using RestSharp;
namespace HelloWorldApplication {
class HelloWorld {
static void Main(string[] args) {
var client = new RestClient("{{DASHBOARD_HOST}}/api/rest/contacts/1?include=customFields,groups");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Basic YOUR_AUTH_TOKEN");
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
}
}
}
Response
{
"data": {
"id": 1,
"email": "email@example.com",
"phone": "34666666666",
"countryIso": "ES",
"landline": "900222222",
"name": "Name",
"surname": "Last name",
"createdAt": "2018-03-13T14:32:25+00:00",
"updatedAt": "2018-07-04T13:57:09+00:00",
"customFields": {
"data": [
{
"key": "color",
"type": "string",
"value": "green"
}
]
},
"groups": {
"data": [
{
"id": 1,
"name": "My Contact List"
}
]
}
}
}
Filters
| Parameter | Description |
|---|---|
| include | Include associated subresources in the response. It is possible to specify multiple values separated by commas. Available values: customFields, groups. |
Create a new contact
POST {{DASHBOARD_HOST}}/api/rest/contacts
curl -X POST '{{DASHBOARD_HOST}}/api/rest/contacts' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN' \
-d '{
"email": "new.contact@example.com",
"phone": "3466666666",
"countryIso": "ES",
"groupsNames": ["My contact list"],
"customFields": [
{
"key": "company",
"value": "ACME inc."
}
]
}'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{DASHBOARD_HOST}}/api/rest/contacts',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => '{
"email": "new.contact@example.com",
"phone": "3466666666",
"countryIso": "ES",
"groupsNames": ["My contact list"],
"customFields": [
{
"key": "company",
"value": "ACME inc."
}
]
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: Basic YOUR_AUTH_TOKEN',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import java.io.DataOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.HttpsURLConnection;
public class App {
public static void main(String[] args) {
try {
URL url = new URL("{{DASHBOARD_HOST}}/api/rest/contacts");
HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
connection.setRequestMethod("POST");
connection.setRequestProperty("Authorization", "Basic YOUR_AUTH_TOKEN");
connection.setRequestProperty("Accept", "application/json");
String requestBody = "{ \"email\": \"new.contact@example.com\", \"phone\": \"3466666666\", \"countryIso\": \"ES\", \"groupsNames\": [\"My contact list\"], \"customFields\": [ { \"key\": \"company\", \"value\": \"ACME inc.\" } ] }";
connection.setDoOutput(true);
DataOutputStream wr = new DataOutputStream(connection.getOutputStream());
wr.writeBytes(requestBody);
wr.flush();
wr.close();
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
} catch (Exception e) {
// TODO: handle exception
}
}
}
var axios = require('axios');
var config = {
method: 'post',
url: '{{DASHBOARD_HOST}}/api/rest/contacts',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
},
data: '{ "email": "new.contact@example.com", "phone": "3466666666", "countryIso": "ES", "groupsNames": ["My contact list"], "customFields": [ { "key": "company", "value": "ACME inc." } ] }'
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
url = "{{DASHBOARD_HOST}}/api/rest/contacts"
payload = "{ \"email\": \"new.contact@example.com\", \"phone\": \"3466666666\", \"countryIso\": \"ES\", \"groupsNames\": [\"My contact list\"], \"customFields\": [ { \"key\": \"company\", \"value\": \"ACME inc.\" } ] }"
headers = {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "net/http"
url = URI("{{DASHBOARD_HOST}}/api/rest/contacts")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request["Authorization"] = "Basic YOUR_AUTH_TOKEN"
request.body = "{ \"email\": \"new.contact@example.com\", \"phone\": \"3466666666\", \"countryIso\": \"ES\", \"groupsNames\": [\"My contact list\"], \"customFields\": [ { \"key\": \"company\", \"value\": \"ACME inc.\" } ] }"
response = https.request(request)
puts response.read_body
using System;
using RestSharp;
namespace HelloWorldApplication {
class HelloWorld {
static void Main(string[] args) {
var client = new RestClient("{{DASHBOARD_HOST}}/api/rest/contacts");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Basic YOUR_AUTH_TOKEN");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{ \"email\": \"new.contact@example.com\", \"phone\": \"3466666666\", \"countryIso\": \"ES\", \"groupsNames\": [\"My contact list\"], \"customFields\": [ { \"key\": \"company\", \"value\": \"ACME inc.\" } ] }", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
}
}
}
Response (HTTP 201)
{
"data": {
"id": 1,
"email": "new.contact@example.com",
"phone": "3466666666",
"countryIso": "ES",
"landline": null,
"name": null,
"surname": null,
"createdAt": "2018-03-13T14:32:25+00:00",
"updatedAt": "2018-03-13T14:32:25+00:00",
"links": {
"self": "{{DASHBOARD_HOST}}/api/rest/contacts/1"
}
}
}
Error response
{
"error": {
"code": 422,
"description": "The email field is required."
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| string | Required when phone or landline is not specified |
Email of the new contact. | |
| phone | string | Required when email or landline is not specified |
Mobile phone number of the contact. |
| landline | string | Required when email or phone is not specified |
Landline phone number of the contact. |
| countryIso | string | Required when phone or landline is specified |
Two-letter ISO code of the contact's country. |
| groupsIds | array | Required if groupsNames is not specified |
List of groups to which the new contact will be added. To obtain group IDs please check the documentation for the corresponding endpoint. |
| groupsNames | array | Required if groupsIds is not specified |
Alternatively, if the list of group IDs is not available, a list with the group names to which the contact is to be added can be specified. |
| name | string | No | Contact name. |
| surname | string | No | Contact surname(s). |
| customFields[]key | string | No | Name of the custom field to be added. |
| customFields[]type | string | No | Type of custom field. Possible values: string, date, decimal. For date fields the value must be in ISO8601 format. Default value: string. |
| customFields[]value | string | No | Custom field value. |
Update a contact
PUT {{DASHBOARD_HOST}}/api/rest/contacts/<ID>
curl -X PUT '{{DASHBOARD_HOST}}/api/rest/contacts/1' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN' \
-d '{
"email": "new.contact@example.com",
"phone": "3466666666",
"countryIso": "ES",
"groupsNames": ["My contact list"],
"customFields": [
{
"key": "company",
"value": "ACME inc."
}
]
}'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{DASHBOARD_HOST}}/api/rest/contacts/1',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_POSTFIELDS => '{
"email": "new.contact@example.com",
"phone": "3466666666",
"countryIso": "ES",
"groupsNames": ["My contact list"],
"customFields": [
{
"key": "company",
"value": "ACME inc."
}
]
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: Basic YOUR_AUTH_TOKEN',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import java.io.DataOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.HttpsURLConnection;
public class App {
public static void main(String[] args) {
try {
URL url = new URL("{{DASHBOARD_HOST}}/api/rest/contacts/1");
HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
connection.setRequestMethod("PUT");
connection.setRequestProperty("Authorization", "Basic YOUR_AUTH_TOKEN");
connection.setRequestProperty("Accept", "application/json");
String requestBody = "{ \"email\": \"new.contact@example.com\", \"phone\": \"3466666666\", \"countryIso\": \"ES\", \"groupsNames\": [\"My contact list\"], \"customFields\": [ { \"key\": \"company\", \"value\": \"ACME inc.\" } ] }";
connection.setDoOutput(true);
DataOutputStream wr = new DataOutputStream(connection.getOutputStream());
wr.writeBytes(requestBody);
wr.flush();
wr.close();
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
} catch (Exception e) {
// TODO: handle exception
}
}
}
var axios = require('axios');
var config = {
method: 'put',
url: '{{DASHBOARD_HOST}}/api/rest/contacts/1',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
},
data: '{ "email": "new.contact@example.com", "phone": "3466666666", "countryIso": "ES", "groupsNames": ["My contact list"], "customFields": [ { "key": "company", "value": "ACME inc." } ] }'
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
url = "{{DASHBOARD_HOST}}/api/rest/contacts/1"
payload = "{ \"email\": \"new.contact@example.com\", \"phone\": \"3466666666\", \"countryIso\": \"ES\", \"groupsNames\": [\"My contact list\"], \"customFields\": [ { \"key\": \"company\", \"value\": \"ACME inc.\" } ] }"
headers = {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
response = requests.request("PUT", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "net/http"
url = URI("{{DASHBOARD_HOST}}/api/rest/contacts/1")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = "application/json"
request["Authorization"] = "Basic YOUR_AUTH_TOKEN"
request.body = "{ \"email\": \"new.contact@example.com\", \"phone\": \"3466666666\", \"countryIso\": \"ES\", \"groupsNames\": [\"My contact list\"], \"customFields\": [ { \"key\": \"company\", \"value\": \"ACME inc.\" } ] }"
response = https.request(request)
puts response.read_body
using System;
using RestSharp;
namespace HelloWorldApplication {
class HelloWorld {
static void Main(string[] args) {
var client = new RestClient("{{DASHBOARD_HOST}}/api/rest/contacts/1");
client.Timeout = -1;
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization", "Basic YOUR_AUTH_TOKEN");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{ \"email\": \"new.contact@example.com\", \"phone\": \"3466666666\", \"countryIso\": \"ES\", \"groupsNames\": [\"My contact list\"], \"customFields\": [ { \"key\": \"company\", \"value\": \"ACME inc.\" } ] }", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
}
}
}
Response (HTTP 200)
{
"data": {
"id": 1,
"email": "new.contact@example.com",
"phone": "3466666666",
"countryIso": "ES",
"landline": null,
"name": null,
"surname": null,
"createdAt": "2018-03-13T14:32:25+00:00",
"updatedAt": "2018-03-13T14:32:25+00:00",
"links": {
"self": "{{DASHBOARD_HOST}}/api/rest/contacts/1"
}
}
}
Error response
{
"error": {
"code": 422,
"description": "The email field is required."
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| string | Required when phone or landline is not specified |
Email of the new contact. | |
| phone | string | Required when email or landline is not specified |
Mobile phone number of the contact. |
| landline | string | Required when email or phone is not specified |
Landline phone number of the contact. |
| countryIso | string | Required when phone or landline is specified |
Two-letter ISO code of the contact's country. |
| groupsIds | array | Required if groupsNames is not specified |
List of groups to which the new contact will be added. To obtain group IDs please check the documentation for the corresponding endpoint. |
| groupsNames | array | Required if groupsIds is not specified |
Alternatively, if the list of group IDs is not available, a list with the group names to which the contact is to be added can be specified. |
| name | string | No | Contact name. |
| surname | string | No | Contact surname(s). |
| customFields[]key | string | No | Name of the custom field to be added. |
| customFields[]type | string | No | Type of custom field. Possible values: string, date, decimal. For date fields the value must be in ISO8601 format. Default value: string. |
| customFields[]value | string | No | Custom field value. |
Delete a contact
DELETE {{DASHBOARD_HOST}}/api/rest/contacts/<ID>
curl -X DELETE '{{DASHBOARD_HOST}}/api/rest/contacts/1' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{DASHBOARD_HOST}}/api/rest/contacts/1',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: Basic YOUR_AUTH_TOKEN',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import java.io.DataOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.HttpsURLConnection;
public class App {
public static void main(String[] args) {
try {
URL url = new URL("{{DASHBOARD_HOST}}/api/rest/contacts/1");
HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
connection.setRequestMethod("DELETE");
connection.setRequestProperty("Authorization", "Basic YOUR_AUTH_TOKEN");
connection.setRequestProperty("Accept", "application/json");
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
} catch (Exception e) {
// TODO: handle exception
}
}
}
var axios = require('axios');
var config = {
method: 'delete',
url: '{{DASHBOARD_HOST}}/api/rest/contacts/1',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
url = "{{DASHBOARD_HOST}}/api/rest/contacts/1"
payload = {}
headers = {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
response = requests.request("DELETE", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "net/http"
url = URI("{{DASHBOARD_HOST}}/api/rest/contacts/1")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Content-Type"] = "application/json"
request["Authorization"] = "Basic YOUR_AUTH_TOKEN"
response = https.request(request)
puts response.read_body
using System;
using RestSharp;
namespace HelloWorldApplication {
class HelloWorld {
static void Main(string[] args) {
var client = new RestClient("{{DASHBOARD_HOST}}/api/rest/contacts/1");
client.Timeout = -1;
var request = new RestRequest(Method.DELETE);
request.AddHeader("Authorization", "Basic YOUR_AUTH_TOKEN");
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
}
}
}
If the request has been successful, it will respond with an HTTP 204 code.
Groups
Groups list
GET {{DASHBOARD_HOST}}/api/rest/groups
curl -X GET '{{DASHBOARD_HOST}}/api/rest/groups' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{DASHBOARD_HOST}}/api/rest/groups',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: Basic YOUR_AUTH_TOKEN',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import java.io.DataOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.HttpsURLConnection;
public class App {
public static void main(String[] args) {
try {
URL url = new URL("{{DASHBOARD_HOST}}/api/rest/groups");
HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("Authorization", "Basic YOUR_AUTH_TOKEN");
connection.setRequestProperty("Accept", "application/json");
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
} catch (Exception e) {
// TODO: handle exception
}
}
}
var axios = require('axios');
var config = {
method: 'get',
url: '{{DASHBOARD_HOST}}/api/rest/groups',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
url = "{{DASHBOARD_HOST}}/api/rest/groups"
payload = {}
headers = {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "net/http"
url = URI("{{DASHBOARD_HOST}}/api/rest/groups")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Content-Type"] = "application/json"
request["Authorization"] = "Basic YOUR_AUTH_TOKEN"
response = https.request(request)
puts response.read_body
using System;
using RestSharp;
namespace HelloWorldApplication {
class HelloWorld {
static void Main(string[] args) {
var client = new RestClient("{{DASHBOARD_HOST}}/api/rest/groups");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Basic YOUR_AUTH_TOKEN");
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
}
}
}
Response
{
"data": [
{
"id": 1,
"name": "My contact list"
}
],
"meta": {
"pagination": {
"total": 500,
"count": 100,
"per_page": 100,
"current_page": 1,
"total_pages": 5,
"links": {
"next": "{{DASHBOARD_HOST}}/api/rest/groups?page=2"
}
}
}
}
Filters
| Parameter | Description |
|---|---|
| limit | Total contacts to display in a single request. Default value: 100. Maximum: 1000. |
Show a group
GET {{DASHBOARD_HOST}}/api/rest/groups/<ID>
curl -X GET '{{DASHBOARD_HOST}}/api/rest/groups/1' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{DASHBOARD_HOST}}/api/rest/groups/1',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: Basic YOUR_AUTH_TOKEN',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import java.io.DataOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.HttpsURLConnection;
public class App {
public static void main(String[] args) {
try {
URL url = new URL("{{DASHBOARD_HOST}}/api/rest/groups/1");
HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("Authorization", "Basic YOUR_AUTH_TOKEN");
connection.setRequestProperty("Accept", "application/json");
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
} catch (Exception e) {
// TODO: handle exception
}
}
}
var axios = require('axios');
var config = {
method: 'get',
url: '{{DASHBOARD_HOST}}/api/rest/groups/1',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
url = "{{DASHBOARD_HOST}}/api/rest/groups/1"
payload = {}
headers = {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "net/http"
url = URI("{{DASHBOARD_HOST}}/api/rest/groups/1")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Content-Type"] = "application/json"
request["Authorization"] = "Basic YOUR_AUTH_TOKEN"
response = https.request(request)
puts response.read_body
using System;
using RestSharp;
namespace HelloWorldApplication {
class HelloWorld {
static void Main(string[] args) {
var client = new RestClient("{{DASHBOARD_HOST}}/api/rest/groups/1");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Basic YOUR_AUTH_TOKEN");
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
}
}
}
Response
{
"data": {
"id": 1,
"name": "My contact list"
}
}
Create a new group
POST {{DASHBOARD_HOST}}/api/rest/groups
curl -X POST '{{DASHBOARD_HOST}}/api/rest/groups' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN' \
-d '{
"name": "My new contact list"
}'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{DASHBOARD_HOST}}/api/rest/groups',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => '{
"name": "My new contact list"
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: Basic YOUR_AUTH_TOKEN',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import java.io.DataOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.HttpsURLConnection;
public class App {
public static void main(String[] args) {
try {
URL url = new URL("{{DASHBOARD_HOST}}/api/rest/groups");
HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
connection.setRequestMethod("POST");
connection.setRequestProperty("Authorization", "Basic YOUR_AUTH_TOKEN");
connection.setRequestProperty("Accept", "application/json");
String requestBody = "{ \"name\": \"My new contact list\" }";
connection.setDoOutput(true);
DataOutputStream wr = new DataOutputStream(connection.getOutputStream());
wr.writeBytes(requestBody);
wr.flush();
wr.close();
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
} catch (Exception e) {
// TODO: handle exception
}
}
}
var axios = require('axios');
var config = {
method: 'post',
url: '{{DASHBOARD_HOST}}/api/rest/groups',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
},
data: '{ "name": "My new contact list" }'
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
url = "{{DASHBOARD_HOST}}/api/rest/groups"
payload = "{ \"name\": \"My new contact list\" }"
headers = {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "net/http"
url = URI("{{DASHBOARD_HOST}}/api/rest/groups")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request["Authorization"] = "Basic YOUR_AUTH_TOKEN"
request.body = "{ \"name\": \"My new contact list\" }"
response = https.request(request)
puts response.read_body
using System;
using RestSharp;
namespace HelloWorldApplication {
class HelloWorld {
static void Main(string[] args) {
var client = new RestClient("{{DASHBOARD_HOST}}/api/rest/groups");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Basic YOUR_AUTH_TOKEN");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{ \"name\": \"My new contact list\" }", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
}
}
}
Response (HTTP 201)
{
"data": {
"id": 1,
"name": "My new contact list"
}
}
Error response
{
"error": {
"code": 422,
"description": "The name field is required."
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | Name of the New Group. |
Update a group
PUT {{DASHBOARD_HOST}}/api/rest/groups/<ID>
curl -X PUT '{{DASHBOARD_HOST}}/api/rest/groups' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN' \
-d '{
"name": "My new contact list"
}'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{DASHBOARD_HOST}}/api/rest/groups',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_POSTFIELDS => '{
"name": "My new contact list"
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: Basic YOUR_AUTH_TOKEN',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import java.io.DataOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.HttpsURLConnection;
public class App {
public static void main(String[] args) {
try {
URL url = new URL("{{DASHBOARD_HOST}}/api/rest/groups");
HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
connection.setRequestMethod("PUT");
connection.setRequestProperty("Authorization", "Basic YOUR_AUTH_TOKEN");
connection.setRequestProperty("Accept", "application/json");
String requestBody = "{ \"name\": \"My new contact list\" }";
connection.setDoOutput(true);
DataOutputStream wr = new DataOutputStream(connection.getOutputStream());
wr.writeBytes(requestBody);
wr.flush();
wr.close();
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
} catch (Exception e) {
// TODO: handle exception
}
}
}
var axios = require('axios');
var config = {
method: 'put',
url: '{{DASHBOARD_HOST}}/api/rest/groups',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
},
data: '{ "name": "My new contact list" }'
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
url = "{{DASHBOARD_HOST}}/api/rest/groups"
payload = "{ \"name\": \"My new contact list\" }"
headers = {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
response = requests.request("PUT", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "net/http"
url = URI("{{DASHBOARD_HOST}}/api/rest/groups")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = "application/json"
request["Authorization"] = "Basic YOUR_AUTH_TOKEN"
request.body = "{ \"name\": \"My new contact list\" }"
response = https.request(request)
puts response.read_body
using System;
using RestSharp;
namespace HelloWorldApplication {
class HelloWorld {
static void Main(string[] args) {
var client = new RestClient("{{DASHBOARD_HOST}}/api/rest/groups");
client.Timeout = -1;
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization", "Basic YOUR_AUTH_TOKEN");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{ \"name\": \"My new contact list\" }", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
}
}
}
Response (HTTP 200)
{
"data": {
"id": 1,
"name": "My new contact list"
}
}
Error response
{
"error": {
"code": 422,
"description": "The name field is required."
}
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | string | Yes | Name of the New Group. |
Delete a group
DELETE {{DASHBOARD_HOST}}/api/rest/groups/<ID>
curl -X DELETE '{{DASHBOARD_HOST}}/api/rest/groups/1' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{DASHBOARD_HOST}}/api/rest/groups/1',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: Basic YOUR_AUTH_TOKEN',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import java.io.DataOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.HttpsURLConnection;
public class App {
public static void main(String[] args) {
try {
URL url = new URL("{{DASHBOARD_HOST}}/api/rest/groups/1");
HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
connection.setRequestMethod("DELETE");
connection.setRequestProperty("Authorization", "Basic YOUR_AUTH_TOKEN");
connection.setRequestProperty("Accept", "application/json");
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
} catch (Exception e) {
// TODO: handle exception
}
}
}
var axios = require('axios');
var config = {
method: 'delete',
url: '{{DASHBOARD_HOST}}/api/rest/groups/1',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
url = "{{DASHBOARD_HOST}}/api/rest/groups/1"
payload = {}
headers = {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
response = requests.request("DELETE", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "net/http"
url = URI("{{DASHBOARD_HOST}}/api/rest/groups/1")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Content-Type"] = "application/json"
request["Authorization"] = "Basic YOUR_AUTH_TOKEN"
response = https.request(request)
puts response.read_body
using System;
using RestSharp;
namespace HelloWorldApplication {
class HelloWorld {
static void Main(string[] args) {
var client = new RestClient("{{DASHBOARD_HOST}}/api/rest/groups/1");
client.Timeout = -1;
var request = new RestRequest(Method.DELETE);
request.AddHeader("Authorization", "Basic YOUR_AUTH_TOKEN");
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
}
}
}
If the request has been successful, it will respond with an HTTP 204 code.
Blacklist
Listing of contacts in the blacklist
GET {{DASHBOARD_HOST}}/api/rest/v2/blacklist/{type}
curl -X GET '{{DASHBOARD_HOST}}/api/rest/v2/blacklist/sms' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{DASHBOARD_HOST}}/api/rest/v2/blacklist/sms',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: Basic YOUR_AUTH_TOKEN',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import java.io.DataOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.HttpsURLConnection;
public class App {
public static void main(String[] args) {
try {
URL url = new URL("{{DASHBOARD_HOST}}/api/rest/v2/blacklist/sms");
HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("Authorization", "Basic YOUR_AUTH_TOKEN");
connection.setRequestProperty("Accept", "application/json");
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
} catch (Exception e) {
// TODO: handle exception
}
}
}
var axios = require('axios');
var config = {
method: 'get',
url: '{{DASHBOARD_HOST}}/api/rest/v2/blacklist/sms',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
url = "{{DASHBOARD_HOST}}/api/rest/v2/blacklist/sms"
payload = {}
headers = {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "net/http"
url = URI("{{DASHBOARD_HOST}}/api/rest/v2/blacklist/sms")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Content-Type"] = "application/json"
request["Authorization"] = "Basic YOUR_AUTH_TOKEN"
response = https.request(request)
puts response.read_body
using System;
using RestSharp;
namespace HelloWorldApplication {
class HelloWorld {
static void Main(string[] args) {
var client = new RestClient("{{DASHBOARD_HOST}}/api/rest/v2/blacklist/sms");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Basic YOUR_AUTH_TOKEN");
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
}
}
}
Response
{
"data": [
{
"type": "sms",
"recipient": "99000000000",
"isDefinitive": false,
"sendingId": 123,
"campaignName": "TEST_CAMPAIGN",
"createdAt": "2020-01-01T00:00:00+00:00"
}
],
"meta": {
"pagination": {
"total": 500,
"count": 100,
"per_page": 100,
"current_page": 1,
"total_pages": 5,
"links": {
"next": "{{DASHBOARD_HOST}}/api/rest/v2/blacklist/sms?page=2"
}
}
}
}
URL Parameters
| Parameter | Description |
|---|---|
| type | Blacklist type: sms, mailing, voice. |
Filters
| Parameter | Description |
|---|---|
| limit | Total of contacts to be shown in a single request. Default value: 100. Maximum: 1000. |
| recipient | Filter by recipient. Example: ?recipient=test%40example.com |
| sendingId | Filter by sendingId. Example: ?sendingId=123 |
Adding a contact to the blacklist
PUT {{DASHBOARD_HOST}}/api/rest/v2/blacklist/{type}
curl -X PUT '{{DASHBOARD_HOST}}/api/rest/v2/blacklist/sms' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN' \
-d '{
"recipient": "99000000000"
}'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{DASHBOARD_HOST}}/api/rest/v2/blacklist/sms',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_POSTFIELDS => '{
"recipient": "99000000000"
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: Basic YOUR_AUTH_TOKEN',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import java.io.DataOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.HttpsURLConnection;
public class App {
public static void main(String[] args) {
try {
URL url = new URL("{{DASHBOARD_HOST}}/api/rest/v2/blacklist/sms");
HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
connection.setRequestMethod("PUT");
connection.setRequestProperty("Authorization", "Basic YOUR_AUTH_TOKEN");
connection.setRequestProperty("Accept", "application/json");
String requestBody = "{ \"recipient\": \"99000000000\" }";
connection.setDoOutput(true);
DataOutputStream wr = new DataOutputStream(connection.getOutputStream());
wr.writeBytes(requestBody);
wr.flush();
wr.close();
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
} catch (Exception e) {
// TODO: handle exception
}
}
}
var axios = require('axios');
var config = {
method: 'put',
url: '{{DASHBOARD_HOST}}/api/rest/v2/blacklist/sms',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
},
data: '{ "recipient": "99000000000" }'
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
url = "{{DASHBOARD_HOST}}/api/rest/v2/blacklist/sms"
payload = "{ \"recipient\": \"99000000000\" }"
headers = {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
response = requests.request("PUT", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "net/http"
url = URI("{{DASHBOARD_HOST}}/api/rest/v2/blacklist/sms")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = "application/json"
request["Authorization"] = "Basic YOUR_AUTH_TOKEN"
request.body = "{ \"recipient\": \"99000000000\" }"
response = https.request(request)
puts response.read_body
using System;
using RestSharp;
namespace HelloWorldApplication {
class HelloWorld {
static void Main(string[] args) {
var client = new RestClient("{{DASHBOARD_HOST}}/api/rest/v2/blacklist/sms");
client.Timeout = -1;
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization", "Basic YOUR_AUTH_TOKEN");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{ \"recipient\": \"99000000000\" }", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
}
}
}
Response (HTTP 200)
{
"data": {
"type": "sms",
"recipient": "99000000000",
"isDefinitive": false,
"campaignName": null,
"createdAt": "2020-01-01T00:00:00+00:00"
}
}
URL Parameters
| Parameter | Description |
|---|---|
| type | Blacklist type: sms, mailing, voice. |
Parameters
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| recipient | string | Yes | Recipient to add to the blacklist. |
Removing a contact from the blacklist
DELETE {{DASHBOARD_HOST}}/api/rest/v2/blacklist/{type}
curl -X DELETE '{{DASHBOARD_HOST}}/api/rest/v2/blacklist/sms' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN' \
-d '{
"recipient": "99000000000"
}'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{DASHBOARD_HOST}}/api/rest/v2/blacklist/sms',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_POSTFIELDS => '{
"recipient": "99000000000"
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: Basic YOUR_AUTH_TOKEN',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import java.io.DataOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.HttpsURLConnection;
public class App {
public static void main(String[] args) {
try {
URL url = new URL("{{DASHBOARD_HOST}}/api/rest/v2/blacklist/sms");
HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
connection.setRequestMethod("DELETE");
connection.setRequestProperty("Authorization", "Basic YOUR_AUTH_TOKEN");
connection.setRequestProperty("Accept", "application/json");
String requestBody = "{ \"recipient\": \"99000000000\" }";
connection.setDoOutput(true);
DataOutputStream wr = new DataOutputStream(connection.getOutputStream());
wr.writeBytes(requestBody);
wr.flush();
wr.close();
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
} catch (Exception e) {
// TODO: handle exception
}
}
}
var axios = require('axios');
var config = {
method: 'delete',
url: '{{DASHBOARD_HOST}}/api/rest/v2/blacklist/sms',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
},
data: '{ "recipient": "99000000000" }'
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
url = "{{DASHBOARD_HOST}}/api/rest/v2/blacklist/sms"
payload = "{ \"recipient\": \"99000000000\" }"
headers = {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
response = requests.request("DELETE", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "net/http"
url = URI("{{DASHBOARD_HOST}}/api/rest/v2/blacklist/sms")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Content-Type"] = "application/json"
request["Authorization"] = "Basic YOUR_AUTH_TOKEN"
request.body = "{ \"recipient\": \"99000000000\" }"
response = https.request(request)
puts response.read_body
using System;
using RestSharp;
namespace HelloWorldApplication {
class HelloWorld {
static void Main(string[] args) {
var client = new RestClient("{{DASHBOARD_HOST}}/api/rest/v2/blacklist/sms");
client.Timeout = -1;
var request = new RestRequest(Method.DELETE);
request.AddHeader("Authorization", "Basic YOUR_AUTH_TOKEN");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{ \"recipient\": \"99000000000\" }", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
}
}
}
URL Parameters
| Parameter | Description |
|---|---|
| type | Blacklist type: sms, mailing, voice. |
Parameters
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| recipient | string | Yes | Recipient to remove from the blacklist. |
If the request has been correct it will be answered with a HTTP 204 code.
Templates and files
URL Shortener
Generation short URLs
POST {{DASHBOARD_HOST}}/api/rest/shortener/shorten
Request
curl -X POST '{{DASHBOARD_HOST}}/api/rest/shortener/shorten' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN' \
-d '{
"urls": [
{"longUrl": "https://example.com/test1"},
{"longUrl": "https://example.com/test2"},
{"longUrl": "invalidUrl"}
]
}'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{DASHBOARD_HOST}}/api/rest/shortener/shorten',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => '{
"urls": [
{"longUrl": "https://example.com/test1"},
{"longUrl": "https://example.com/test2"},
{"longUrl": "invalidUrl"}
]
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: Basic YOUR_AUTH_TOKEN',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import java.io.DataOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.HttpsURLConnection;
public class App {
public static void main(String[] args) {
try {
URL url = new URL("{{DASHBOARD_HOST}}/api/rest/shortener/shorten");
HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
connection.setRequestMethod("POST");
connection.setRequestProperty("Authorization", "Basic YOUR_AUTH_TOKEN");
connection.setRequestProperty("Accept", "application/json");
String requestBody = "{ \"urls\": [ {\"longUrl\": \"https://example.com/test1\"}, {\"longUrl\": \"https://example.com/test2\"}, {\"longUrl\": \"invalidUrl\"} ] }";
connection.setDoOutput(true);
DataOutputStream wr = new DataOutputStream(connection.getOutputStream());
wr.writeBytes(requestBody);
wr.flush();
wr.close();
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
} catch (Exception e) {
// TODO: handle exception
}
}
}
var axios = require('axios');
var config = {
method: 'post',
url: '{{DASHBOARD_HOST}}/api/rest/shortener/shorten',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
},
data: '{ "urls": [ {"longUrl": "https://example.com/test1"}, {"longUrl": "https://example.com/test2"}, {"longUrl": "invalidUrl"} ] }'
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
url = "{{DASHBOARD_HOST}}/api/rest/shortener/shorten"
payload = "{ \"urls\": [ {\"longUrl\": \"https://example.com/test1\"}, {\"longUrl\": \"https://example.com/test2\"}, {\"longUrl\": \"invalidUrl\"} ] }"
headers = {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "net/http"
url = URI("{{DASHBOARD_HOST}}/api/rest/shortener/shorten")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request["Authorization"] = "Basic YOUR_AUTH_TOKEN"
request.body = "{ \"urls\": [ {\"longUrl\": \"https://example.com/test1\"}, {\"longUrl\": \"https://example.com/test2\"}, {\"longUrl\": \"invalidUrl\"} ] }"
response = https.request(request)
puts response.read_body
using System;
using RestSharp;
namespace HelloWorldApplication {
class HelloWorld {
static void Main(string[] args) {
var client = new RestClient("{{DASHBOARD_HOST}}/api/rest/shortener/shorten");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Basic YOUR_AUTH_TOKEN");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{ \"urls\": [ {\"longUrl\": \"https://example.com/test1\"}, {\"longUrl\": \"https://example.com/test2\"}, {\"longUrl\": \"invalidUrl\"} ] }", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
}
}
}
Response
{
"data": [
{
"longUrl": "https://example.com/test1",
"shortUrl": "https://sms.tl/dvRINN",
"error": false
},
{
"longUrl": "https://example.com/test2",
"shortUrl": "https://sms.tl/GFA6Fm",
"error": false
},
{
"longUrl": "invalidUrl",
"shortUrl": null,
"error": true
}
]
}
Image generator
Generation of images
POST {{DASHBOARD_HOST}}/api/rest/images/generate
Request
curl -X POST '{{DASHBOARD_HOST}}/api/rest/images/generate' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN' \
-d '{
"images": [
{
"externalId": "test1",
"extension": "jpg",
"base64": "BASE64_ENCODED_STRING"
},
{
"externalId": "test2",
"extension": "png",
"base64": "BASE64_ENCODED_STRING"
}
]
}'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{DASHBOARD_HOST}}/api/rest/images/generate',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => '{
"images": [
{
"externalId": "test1",
"extension": "jpg",
"base64": "BASE64_ENCODED_STRING"
},
{
"externalId": "test2",
"extension": "png",
"base64": "BASE64_ENCODED_STRING"
}
]
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: Basic YOUR_AUTH_TOKEN',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import java.io.DataOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.HttpsURLConnection;
public class App {
public static void main(String[] args) {
try {
URL url = new URL("{{DASHBOARD_HOST}}/api/rest/images/generate");
HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
connection.setRequestMethod("POST");
connection.setRequestProperty("Authorization", "Basic YOUR_AUTH_TOKEN");
connection.setRequestProperty("Accept", "application/json");
String requestBody = "{ \"images\": [ { \"externalId\": \"test1\", \"extension\": \"jpg\", \"base64\": \"BASE64_ENCODED_STRING\" }, { \"externalId\": \"test2\", \"extension\": \"png\", \"base64\": \"BASE64_ENCODED_STRING\" } ] }";
connection.setDoOutput(true);
DataOutputStream wr = new DataOutputStream(connection.getOutputStream());
wr.writeBytes(requestBody);
wr.flush();
wr.close();
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
} catch (Exception e) {
// TODO: handle exception
}
}
}
var axios = require('axios');
var config = {
method: 'post',
url: '{{DASHBOARD_HOST}}/api/rest/images/generate',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
},
data: '{ "images": [ { "externalId": "test1", "extension": "jpg", "base64": "BASE64_ENCODED_STRING" }, { "externalId": "test2", "extension": "png", "base64": "BASE64_ENCODED_STRING" } ] }'
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
url = "{{DASHBOARD_HOST}}/api/rest/images/generate"
payload = "{ \"images\": [ { \"externalId\": \"test1\", \"extension\": \"jpg\", \"base64\": \"BASE64_ENCODED_STRING\" }, { \"externalId\": \"test2\", \"extension\": \"png\", \"base64\": \"BASE64_ENCODED_STRING\" } ] }"
headers = {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "net/http"
url = URI("{{DASHBOARD_HOST}}/api/rest/images/generate")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request["Authorization"] = "Basic YOUR_AUTH_TOKEN"
request.body = "{ \"images\": [ { \"externalId\": \"test1\", \"extension\": \"jpg\", \"base64\": \"BASE64_ENCODED_STRING\" }, { \"externalId\": \"test2\", \"extension\": \"png\", \"base64\": \"BASE64_ENCODED_STRING\" } ] }"
response = https.request(request)
puts response.read_body
using System;
using RestSharp;
namespace HelloWorldApplication {
class HelloWorld {
static void Main(string[] args) {
var client = new RestClient("{{DASHBOARD_HOST}}/api/rest/images/generate");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Basic YOUR_AUTH_TOKEN");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{ \"images\": [ { \"externalId\": \"test1\", \"extension\": \"jpg\", \"base64\": \"BASE64_ENCODED_STRING\" }, { \"externalId\": \"test2\", \"extension\": \"png\", \"base64\": \"BASE64_ENCODED_STRING\" } ] }", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
}
}
}
Response
{
"data": [
{
"externalId": "test1",
"imageUrl": "{{DASHBOARD_HOST}}/uploads/UCuh4pdOsW58ZEXX/1b4f0e9851971998e732078544c96b36c3d01cedf7caa332359d6f1d83567014.jpg",
"error": false
},
{
"externalId": "test2",
"imageUrl": "{{DASHBOARD_HOST}}/uploads/UCuh4pdOsW58ZEXX/60303ae22b998861bce3b28f33eec1be758a213c86c93c076dbe9f558c11c752.jpg",
"error": false
}
]
}
Parameters
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| externalId | string | Yes | External ID to identify the image in the response. |
| extension | string | Yes | Image extension. Allowed extensions: jpg, png. |
| base64 | string | Yes | Base64 encoded image. |
Events
Event Notifications
Introduction
The status notification service sets out to inform the customer's server about the events generated in the {{NAME}} service. Notifications will be made for mailings sent via any type of channel. This means that the customer can track each mailing in real time.
A single mailing can cause multiple events, so a bulk mailing may generate a significant number of notifications to the customer's server. To avoid server saturation, the events to be notified are queued up in {{NAME}}, so there may be a delay in delivering notifications if the customer's server is unable to manage the volume of notifications generated.
In order to enable this functionality, the customer must provide a URL where http POST requests will be made to notify an event.
Receiving new notification events
HTTP METHOD: POST Content-Type: application/x-www-form-urlencoded
Parameters
| Parameter | Type | Description |
|---|---|---|
| id | string | Alphanumeric identifier that was delivered in the message API. If the message was sent via the website, it will have no value. |
| channel | string | Indicates the channel of the mailing to which the notification refers. The possible values are: sms, mailing, landing, text2speech. |
| contactId | integer | Unique contact identifier. |
| campaignId | integer | Campaign identifier. If it was sent by API and you did not specify campaignName in the mailing, its value will be 0. |
| campaignName | string | Campaign name. If it was sent by API and you did not specify campaignName in the mailing, its chain value will be blank. |
| formId | integer | Unique form identifier. (Only for form events) |
| event | string | Indicates the event that has occurred. The possible values are: delivered, opened, clicked, unsubscribed, hard_bounced, complaint, sent, soft_bounced, undelivered, rejected, expired, unsubscribed_landing, form_opened, form_submitted, form_rejected. |
| extra | string | Extra parameter with additional information of the event in JSON format. The "form_submitted" event will contain the values entered in the form by the user in the following format: {"formValues":{"param1":"value1", "param2": "value2", ...}} The "clicked" event will contain the encoded url that has been clicked: {"url":"url_encoded"}. |
| smtpResponse | string | Optional variable defined for the email channel and for the events delivered, hard_bounced, soft_bounced. The response of the SMTP server of the recipient mail is returned. |
| eventDate | string | Date when event occured. |
Notifications will be retried up to 5 times in case the client's server responds with an HTTP code other than 200 OK.
The waiting period between notifications is progressive, so the first retry will be made within 1 minute, the second after 2 minutes since the previous retry, the third after 3 minutes, etc.
Events report by sending
Reporte de eventos
GET {{DASHBOARD_HOST}}/api/rest/sendings/<sendingId>/reports/events
curl -X GET '{{DASHBOARD_HOST}}/api/rest/sendings/1/reports/events' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{DASHBOARD_HOST}}/api/rest/sendings/1/reports/events',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Authorization: Basic YOUR_AUTH_TOKEN',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import java.io.DataOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.HttpsURLConnection;
public class App {
public static void main(String[] args) {
try {
URL url = new URL("{{DASHBOARD_HOST}}/api/rest/sendings/1/reports/events");
HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("Authorization", "Basic YOUR_AUTH_TOKEN");
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
} catch (Exception e) {
// TODO: handle exception
}
}
}
var axios = require('axios');
var config = {
method: 'get',
url: '{{DASHBOARD_HOST}}/api/rest/sendings/1/reports/events',
headers: {
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
url = "{{DASHBOARD_HOST}}/api/rest/sendings/1/reports/events"
payload = {}
headers = {
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "net/http"
url = URI("{{DASHBOARD_HOST}}/api/rest/sendings/1/reports/events")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Basic YOUR_AUTH_TOKEN"
response = https.request(request)
puts response.read_body
using System;
using RestSharp;
namespace HelloWorldApplication {
class HelloWorld {
static void Main(string[] args) {
var client = new RestClient("{{DASHBOARD_HOST}}/api/rest/sendings/1/reports/events");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Basic YOUR_AUTH_TOKEN");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
}
}
}
Filters
| Parameter | Description |
|---|---|
| beforeDate | Show the results previous to the indicated date. The date should be specified in ISO 8601 format. |
| afterDate | Show the results after the indicated date. The date should be specified in ISO 8601 format. |
| showCustomFields | If set to 1, shows the custom fields used. |
The parameters must be correctly encoded (urlencode) in relation to the standard RFC 3986 in order to be admitted by the server.
For example, to consult the event report between the dates 2019-01-01T00:00:00+00:00 y 2019-02-01T00:00:00+00:00:
{{DASHBOARD_HOST}}/api/rest/sendings/{sendingId}/reports/events?afterDate=2019-01-01T00%3A00%3A00%2B00%3A00&beforeDate=2019-02-01T00%3A00%3A00%2B00%3A00
Get the detailed report of events generated by a campaign. The response will be in text/csv format and will contain the following columns:
For voice campaigns:
campaignName,campaignId,sendingId,contactId,event,phone,email,landline,countryIso,callDurationSeconds,createdAt
For the other channels:
campaignName,campaignId,sendingId,contactId,event,phone,email,landline,countryIso,browser,os,url,createdAt
Keystroke report
Introduction
It returns a report with the telephone numbers together with the key pressed and the voice message.
Url
GET {{DASHBOARD_HOST}}/api/rest/sendings/<sendingId>/reports/keys
curl -X GET '{{DASHBOARD_HOST}}/api/rest/sendings/1/reports/keys' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{DASHBOARD_HOST}}/api/rest/sendings/1/reports/keys',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Authorization: Basic YOUR_AUTH_TOKEN',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import java.io.DataOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.HttpsURLConnection;
public class App {
public static void main(String[] args) {
try {
URL url = new URL("{{DASHBOARD_HOST}}/api/rest/sendings/1/reports/keys");
HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("Authorization", "Basic YOUR_AUTH_TOKEN");
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
} catch (Exception e) {
// TODO: handle exception
}
}
}
var axios = require('axios');
var config = {
method: 'get',
url: '{{DASHBOARD_HOST}}/api/rest/sendings/1/reports/keys',
headers: {
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
url = "{{DASHBOARD_HOST}}/api/rest/sendings/1/reports/keys"
payload = {}
headers = {
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "net/http"
url = URI("{{DASHBOARD_HOST}}/api/rest/sendings/1/reports/keys")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Basic YOUR_AUTH_TOKEN"
response = https.request(request)
puts response.read_body
using System;
using RestSharp;
namespace HelloWorldApplication {
class HelloWorld {
static void Main(string[] args) {
var client = new RestClient("{{DASHBOARD_HOST}}/api/rest/sendings/1/reports/keys");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Basic YOUR_AUTH_TOKEN");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
}
}
}
Filters
| Parameter | Description |
|---|---|
| beforeDate | Show the results previous to the indicated date. The date should be specified in ISO 8601 format. |
| afterDate | Show the results after the indicated date. The date should be specified in ISO 8601 format. |
The parameters must be correctly encoded (urlencode) in relation to the standard RFC 3986 in order to be admitted by the server.
For example, to consult the event report between the dates 2019-01-01T00:00:00+00:00 y 2019-02-01T00:00:00+00:00:
{{DASHBOARD_HOST}}/api/rest/sendings/{sendingId}/reports/keys?afterDate=2019-01-01T00%3A00%3A00%2B00%3A00&beforeDate=2019-02-01T00%3A00%3A00%2B00%3A00
Get the detailed keystrokes report for a voice interactive sending. The response will be in text/csv format and will contain the following columns: phonenumber, key, message
OTP
Generate code
POST {{DASHBOARD_HOST}}/api/rest/otp/generate
curl -X POST '{{DASHBOARD_HOST}}/api/rest/otp/generate' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN' \
-d '{
"recipient": "34666555444"
}'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{DASHBOARD_HOST}}/api/rest/otp/generate',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => '{
"recipient": "34666555444"
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: Basic YOUR_AUTH_TOKEN',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import java.io.DataOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.HttpsURLConnection;
public class App {
public static void main(String[] args) {
try {
URL url = new URL("{{DASHBOARD_HOST}}/api/rest/otp/generate");
HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
connection.setRequestMethod("POST");
connection.setRequestProperty("Authorization", "Basic YOUR_AUTH_TOKEN");
connection.setRequestProperty("Accept", "application/json");
String requestBody = "{ \"recipient\": \"34666555444\" }";
connection.setDoOutput(true);
DataOutputStream wr = new DataOutputStream(connection.getOutputStream());
wr.writeBytes(requestBody);
wr.flush();
wr.close();
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
} catch (Exception e) {
// TODO: handle exception
}
}
}
var axios = require('axios');
var config = {
method: 'post',
url: '{{DASHBOARD_HOST}}/api/rest/otp/generate',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
},
data: '{ "recipient": "34666555444" }'
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
url = "{{DASHBOARD_HOST}}/api/rest/otp/generate"
payload = "{ \"recipient\": \"34666555444\" }"
headers = {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "net/http"
url = URI("{{DASHBOARD_HOST}}/api/rest/otp/generate")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request["Authorization"] = "Basic YOUR_AUTH_TOKEN"
request.body = "{ \"recipient\": \"34666555444\" }"
response = https.request(request)
puts response.read_body
using System;
using RestSharp;
namespace HelloWorldApplication {
class HelloWorld {
static void Main(string[] args) {
var client = new RestClient("{{DASHBOARD_HOST}}/api/rest/otp/generate");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Basic YOUR_AUTH_TOKEN");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{ \"recipient\": \"34666555444\" }", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
}
}
}
Response
HTTP Response Code 200 (OK)
{
"data": {
"recipient": "34666555444",
"code": "1234",
"attempts": 0,
"maxAttempts": 3,
"maxSecondsValidity": 60,
"appId": "",
"createdAt": "2020-01-01T12:00:00+00:00",
"updatedAt": "2020-01-01T12:00:00+00:00",
"expiresAt": "2020-01-01T12:01:00+00:00"
}
}
Error response (HTTP 422)
{
"error": {
"code": 422,
"description": "The recipient field must be a valid phone or email."
}
}
Parameters
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| recipient | string | Yes | User's phone number or email. |
| alpha | boolean | No | Indicates whether the code is alphanumeric or numeric. The default value is false. |
| length | integer | No | Length of the code. The minimum value is 3 and the maximum is 10.The default value is 4. |
| maxAttempts | integer | No | Maximum number of attempts. The minimum value is 1 and the maximum is 10.The default value is 3. |
| maxSecondsValidity | integer | No | Maximum number of seconds between code generation and code validation. The minimum value is 30 and the maximum is 600.The default value is 60. |
| appId | string | No | The same phone or email can be validated at the same time as long as it is with a different appId.The default value is "". |
| rejectIfPendingCode | boolean | No | Prevents the generation of a new OTP code if a previous one exists in pending status. The default value is false. |
Check code
POST {{DASHBOARD_HOST}}/api/rest/otp/check
curl -X POST '{{DASHBOARD_HOST}}/api/rest/otp/check' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN' \
-d '{
"recipient": "34666555444",
"code": "1234"
}'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{DASHBOARD_HOST}}/api/rest/otp/check',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => '{
"recipient": "34666555444",
"code": "1234"
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: Basic YOUR_AUTH_TOKEN',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import java.io.DataOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.HttpsURLConnection;
public class App {
public static void main(String[] args) {
try {
URL url = new URL("{{DASHBOARD_HOST}}/api/rest/otp/check");
HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
connection.setRequestMethod("POST");
connection.setRequestProperty("Authorization", "Basic YOUR_AUTH_TOKEN");
connection.setRequestProperty("Accept", "application/json");
String requestBody = "{ \"recipient\": \"34666555444\", \"code\": \"1234\" }";
connection.setDoOutput(true);
DataOutputStream wr = new DataOutputStream(connection.getOutputStream());
wr.writeBytes(requestBody);
wr.flush();
wr.close();
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
} catch (Exception e) {
// TODO: handle exception
}
}
}
var axios = require('axios');
var config = {
method: 'post',
url: '{{DASHBOARD_HOST}}/api/rest/otp/check',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
},
data: '{ "recipient": "34666555444", "code": "1234" }'
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
url = "{{DASHBOARD_HOST}}/api/rest/otp/check"
payload = "{ \"recipient\": \"34666555444\", \"code\": \"1234\" }"
headers = {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "net/http"
url = URI("{{DASHBOARD_HOST}}/api/rest/otp/check")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request["Authorization"] = "Basic YOUR_AUTH_TOKEN"
request.body = "{ \"recipient\": \"34666555444\", \"code\": \"1234\" }"
response = https.request(request)
puts response.read_body
using System;
using RestSharp;
namespace HelloWorldApplication {
class HelloWorld {
static void Main(string[] args) {
var client = new RestClient("{{DASHBOARD_HOST}}/api/rest/otp/check");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Basic YOUR_AUTH_TOKEN");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{ \"recipient\": \"34666555444\", \"code\": \"1234\" }", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
}
}
}
Response
HTTP Response Code 200 (OK)
{
"data": {
"valid": true,
"reason": "Valid",
"otp": {
"data": {
"recipient": "34666555444",
"code": "1234",
"attempts": 1,
"maxAttempts": 3,
"maxSecondsValidity": 60,
"appId": "",
"createdAt": "2020-01-01T12:00:00+00:00",
"updatedAt": "2020-01-01T12:00:00+00:00",
"expiresAt": "2020-01-01T12:01:00+00:00"
}
}
}
}
{
"data": {
"valid": false,
"reason": "Expired",
"otp": {
"data": {
"recipient": "34666555444",
"code": "1234",
"attempts": 1,
"maxAttempts": 3,
"maxSecondsValidity": 60,
"appId": "",
"createdAt": "2020-01-01T12:00:00+00:00",
"updatedAt": "2020-01-01T12:00:00+00:00",
"expiresAt": "2020-01-01T12:01:00+00:00"
}
}
}
}
Error response (HTTP 422)
{
"error": {
"code": 422,
"description": "The recipient field is required."
}
}
Parameters
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| recipient | string | Yes | User's phone number or email. |
| code | string | Yes | Code to check. |
| caseSensitive | boolean | No | Use case-sensitive code comparison. The default value is false. |
| appId | string | No | The same phone or email can be validated at the same time as long as it is with a different appId.The default value is "". |
Responses
| Reason | Valid | Description |
|---|---|---|
| Valid | Yes | The code is valid. |
| Invalid code | No | The code is not valid. |
| Maximum attempts reached | No | The number of attempts has exceeded the maximum. |
| Expired | No | The validation time has exceeded the maximum. |
Account
It returns account information such as username, email, time zone, language, balance, creation date, country and currency.
GET {{DASHBOARD_HOST}}/api/rest/account
curl -X GET '{{DASHBOARD_HOST}}/api/rest/account' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{DASHBOARD_HOST}}/api/rest/account',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: Basic YOUR_AUTH_TOKEN',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import java.io.DataOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.HttpsURLConnection;
public class App {
public static void main(String[] args) {
try {
URL url = new URL("{{DASHBOARD_HOST}}/api/rest/account");
HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("Authorization", "Basic YOUR_AUTH_TOKEN");
connection.setRequestProperty("Accept", "application/json");
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
} catch (Exception e) {
// TODO: handle exception
}
}
}
var axios = require('axios');
var config = {
method: 'get',
url: '{{DASHBOARD_HOST}}/api/rest/account',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
url = "{{DASHBOARD_HOST}}/api/rest/account"
payload = {}
headers = {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "net/http"
url = URI("{{DASHBOARD_HOST}}/api/rest/account")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Content-Type"] = "application/json"
request["Authorization"] = "Basic YOUR_AUTH_TOKEN"
response = https.request(request)
puts response.read_body
using System;
using RestSharp;
namespace HelloWorldApplication {
class HelloWorld {
static void Main(string[] args) {
var client = new RestClient("{{DASHBOARD_HOST}}/api/rest/account");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Basic YOUR_AUTH_TOKEN");
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
}
}
}
Organization
The organization APIs allow managing the users that belong to the authenticated user's organization: inviting new users, listing them, activating, deactivating or removing them, distributing balance between them and listing the campaigns of the whole organization.
To use them, the authenticated user must belong to an organization and have the user management permission required by each operation. These are the same permissions that apply to the user management of the platform:
| Operation | Required permission |
|---|---|
| Invitations list | View invitations |
| Creating and resending invitations | Create invitations |
| Cancelling invitations | Delete invitations |
| Users list | View users |
| Activating and deactivating users | Edit users |
| Removing users | Delete users |
| Transferring balance | Edit users |
| Organization campaigns list | View users and View statistics |
If the user does not belong to an organization, the response will have an HTTP 403 code and the description User does not belong to an organization. If the user does not have the required permission, the response will have an HTTP 403 code and the description User is not allowed to perform this action.
Operations on a specific resource (an invitation or a user) can only be performed on resources of the user's own organization. If the identifier does not exist or belongs to another organization, the response will have an HTTP 404 code.
Lists are paginated. The limit parameter sets the total of results per page (default value: 100, maximum: 1000) and the page parameter sets the page to retrieve. The response includes the pagination information in the meta.pagination field.
Invitations
Invitations list
GET {{DASHBOARD_HOST}}/api/rest/organization/invitations
curl -X GET '{{DASHBOARD_HOST}}/api/rest/organization/invitations?status=pending' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{DASHBOARD_HOST}}/api/rest/organization/invitations?status=pending',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: Basic YOUR_AUTH_TOKEN',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import java.io.DataOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.HttpsURLConnection;
public class App {
public static void main(String[] args) {
try {
URL url = new URL("{{DASHBOARD_HOST}}/api/rest/organization/invitations?status=pending");
HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("Authorization", "Basic YOUR_AUTH_TOKEN");
connection.setRequestProperty("Accept", "application/json");
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
} catch (Exception e) {
// TODO: handle exception
}
}
}
var axios = require('axios');
var config = {
method: 'get',
url: '{{DASHBOARD_HOST}}/api/rest/organization/invitations?status=pending',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
url = "{{DASHBOARD_HOST}}/api/rest/organization/invitations?status=pending"
payload = {}
headers = {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "net/http"
url = URI("{{DASHBOARD_HOST}}/api/rest/organization/invitations?status=pending")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Content-Type"] = "application/json"
request["Authorization"] = "Basic YOUR_AUTH_TOKEN"
response = https.request(request)
puts response.read_body
using System;
using RestSharp;
namespace HelloWorldApplication {
class HelloWorld {
static void Main(string[] args) {
var client = new RestClient("{{DASHBOARD_HOST}}/api/rest/organization/invitations?status=pending");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Basic YOUR_AUTH_TOKEN");
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
}
}
}
Response
{
"data": [
{
"id": 12,
"email": "john.doe@example.com",
"role": "user",
"status": "pending",
"createdAt": "2026-10-13T09:30:00+00:00",
"expiresAt": "2026-10-14T09:30:00+00:00"
}
],
"meta": {
"pagination": {
"total": 1,
"count": 1,
"per_page": 100,
"current_page": 1,
"total_pages": 1,
"links": []
}
}
}
It returns the invitations of the organization in any status, including cancelled ones, sorted from newest to oldest.
Filters
| Parameter | Description |
|---|---|
| limit | Total of invitations to be shown in a single request. Default value: 100. Maximum: 1000. |
| status | Filter by invitation status. Available values: pending, accepted, cancelled, expired. Example: ?status=pending. |
| Filter by invited email. It must match exactly. Example: ?email=john.doe%40example.com. | |
| role | Filter by invitation role. Available values: admin, user. Example: ?role=admin. |
| beforeDate | Show invitations created before the indicated date. The date must be specified in ISO 8601 format. Example: ?beforeDate=2026-01-01T00%3A00%3A00%2B00%3A00. |
| afterDate | Show invitations created after the indicated date. The date must be specified in ISO 8601 format. Example: ?afterDate=2026-01-01T00%3A00%3A00%2B00%3A00. |
The parameters must be correctly encoded (urlencode) with respect to the RFC 3986 standard to be supported by the server.
Response fields
| Parameter | Description |
|---|---|
| id | Invitation identifier. |
| Email the invitation has been sent to. | |
| role | Role the user will have after accepting the invitation. Possible values: admin, user. |
| status | Invitation status. Possible values: pending: Invitation sent, not accepted yet and not expired. accepted: The recipient has accepted the invitation. cancelled: The invitation has been cancelled. expired: The invitation has expired without being accepted. |
| createdAt | Invitation creation date. |
| expiresAt | Invitation expiration date. After this date the invitation can no longer be accepted. |
Creating an invitation
POST {{DASHBOARD_HOST}}/api/rest/organization/invitations
curl -X POST '{{DASHBOARD_HOST}}/api/rest/organization/invitations' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN' \
-d '{
"email": "john.doe@example.com",
"role": "user"
}'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{DASHBOARD_HOST}}/api/rest/organization/invitations',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => '{
"email": "john.doe@example.com",
"role": "user"
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: Basic YOUR_AUTH_TOKEN',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import java.io.DataOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.HttpsURLConnection;
public class App {
public static void main(String[] args) {
try {
URL url = new URL("{{DASHBOARD_HOST}}/api/rest/organization/invitations");
HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
connection.setRequestMethod("POST");
connection.setRequestProperty("Authorization", "Basic YOUR_AUTH_TOKEN");
connection.setRequestProperty("Accept", "application/json");
String requestBody = "{ \"email\": \"john.doe@example.com\", \"role\": \"user\" }";
connection.setDoOutput(true);
DataOutputStream wr = new DataOutputStream(connection.getOutputStream());
wr.writeBytes(requestBody);
wr.flush();
wr.close();
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
} catch (Exception e) {
// TODO: handle exception
}
}
}
var axios = require('axios');
var config = {
method: 'post',
url: '{{DASHBOARD_HOST}}/api/rest/organization/invitations',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
},
data: '{ "email": "john.doe@example.com", "role": "user" }'
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
url = "{{DASHBOARD_HOST}}/api/rest/organization/invitations"
payload = "{ \"email\": \"john.doe@example.com\", \"role\": \"user\" }"
headers = {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "net/http"
url = URI("{{DASHBOARD_HOST}}/api/rest/organization/invitations")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request["Authorization"] = "Basic YOUR_AUTH_TOKEN"
request.body = "{ \"email\": \"john.doe@example.com\", \"role\": \"user\" }"
response = https.request(request)
puts response.read_body
using System;
using RestSharp;
namespace HelloWorldApplication {
class HelloWorld {
static void Main(string[] args) {
var client = new RestClient("{{DASHBOARD_HOST}}/api/rest/organization/invitations");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Basic YOUR_AUTH_TOKEN");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{ \"email\": \"john.doe@example.com\", \"role\": \"user\" }", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
}
}
}
Response (HTTP 201)
{
"data": {
"id": 12,
"email": "john.doe@example.com",
"role": "user",
"status": "pending",
"createdAt": "2026-10-13T09:30:00+00:00",
"expiresAt": "2026-10-14T09:30:00+00:00"
}
}
Error response (HTTP 429)
{
"error": {
"code": 429,
"description": "Too many invitation emails to this address, try again later"
}
}
It invites a new user to join the organization. The recipient will receive an email with a link to accept the invitation, set their password and complete their profile. The invitation expires after 24 hours.
Parameters
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| string | Yes | Email of the user to invite. Maximum length: 255 characters. It cannot have another pending invitation in the organization or be in use by another user of the platform. | |
| role | string | Yes | Role the user will have after accepting the invitation. Available values: admin, user. |
If the invitation has been created successfully, the response will have an HTTP 201 code and the created invitation. The response fields are the same as in the invitations list.
If any parameter is not valid, the response will have an HTTP 422 code.
Sending limits
To prevent mass sending of emails, sending invitations is limited:
- One invitation email can be sent every 10 minutes to the same recipient. The limit applies both when creating and when resending invitations, including when inviting again an email whose invitation has just been cancelled.
- Each organization can send a maximum of 25 invitation emails per hour.
If any of these limits is exceeded, the invitation will not be created or resent and the response will have an HTTP 429 code. The Retry-After header indicates the seconds to wait before trying again.
Cancelling an invitation
POST {{DASHBOARD_HOST}}/api/rest/organization/invitations/<ID>/cancel
curl -X POST '{{DASHBOARD_HOST}}/api/rest/organization/invitations/12/cancel' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{DASHBOARD_HOST}}/api/rest/organization/invitations/12/cancel',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: Basic YOUR_AUTH_TOKEN',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import java.io.DataOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.HttpsURLConnection;
public class App {
public static void main(String[] args) {
try {
URL url = new URL("{{DASHBOARD_HOST}}/api/rest/organization/invitations/12/cancel");
HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
connection.setRequestMethod("POST");
connection.setRequestProperty("Authorization", "Basic YOUR_AUTH_TOKEN");
connection.setRequestProperty("Accept", "application/json");
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
} catch (Exception e) {
// TODO: handle exception
}
}
}
var axios = require('axios');
var config = {
method: 'post',
url: '{{DASHBOARD_HOST}}/api/rest/organization/invitations/12/cancel',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
url = "{{DASHBOARD_HOST}}/api/rest/organization/invitations/12/cancel"
payload = {}
headers = {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "net/http"
url = URI("{{DASHBOARD_HOST}}/api/rest/organization/invitations/12/cancel")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request["Authorization"] = "Basic YOUR_AUTH_TOKEN"
response = https.request(request)
puts response.read_body
using System;
using RestSharp;
namespace HelloWorldApplication {
class HelloWorld {
static void Main(string[] args) {
var client = new RestClient("{{DASHBOARD_HOST}}/api/rest/organization/invitations/12/cancel");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Basic YOUR_AUTH_TOKEN");
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
}
}
}
Error response (HTTP 409)
{
"error": {
"code": 409,
"description": "Only pending invitations can be cancelled"
}
}
It cancels a pending invitation. The link sent to the recipient is no longer valid, but the invitation remains in the invitations list with the cancelled status.
URL Parameters
| Parameter | Description |
|---|---|
| ID | Invitation identifier. |
If the request is successful, the response will have an HTTP 204 code.
Only invitations with the pending status can be cancelled. Otherwise, the response will have an HTTP 409 code.
Resending an invitation
POST {{DASHBOARD_HOST}}/api/rest/organization/invitations/<ID>/resend
curl -X POST '{{DASHBOARD_HOST}}/api/rest/organization/invitations/12/resend' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{DASHBOARD_HOST}}/api/rest/organization/invitations/12/resend',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: Basic YOUR_AUTH_TOKEN',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import java.io.DataOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.HttpsURLConnection;
public class App {
public static void main(String[] args) {
try {
URL url = new URL("{{DASHBOARD_HOST}}/api/rest/organization/invitations/12/resend");
HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
connection.setRequestMethod("POST");
connection.setRequestProperty("Authorization", "Basic YOUR_AUTH_TOKEN");
connection.setRequestProperty("Accept", "application/json");
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
} catch (Exception e) {
// TODO: handle exception
}
}
}
var axios = require('axios');
var config = {
method: 'post',
url: '{{DASHBOARD_HOST}}/api/rest/organization/invitations/12/resend',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
url = "{{DASHBOARD_HOST}}/api/rest/organization/invitations/12/resend"
payload = {}
headers = {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "net/http"
url = URI("{{DASHBOARD_HOST}}/api/rest/organization/invitations/12/resend")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request["Authorization"] = "Basic YOUR_AUTH_TOKEN"
response = https.request(request)
puts response.read_body
using System;
using RestSharp;
namespace HelloWorldApplication {
class HelloWorld {
static void Main(string[] args) {
var client = new RestClient("{{DASHBOARD_HOST}}/api/rest/organization/invitations/12/resend");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Basic YOUR_AUTH_TOKEN");
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
}
}
}
Error response (HTTP 409)
{
"error": {
"code": 409,
"description": "Only pending invitations can be resent"
}
}
It sends the invitation email to the recipient again and renews its expiration: the invitation will expire 24 hours after being resent.
URL Parameters
| Parameter | Description |
|---|---|
| ID | Invitation identifier. |
If the request is successful, the response will have an HTTP 204 code.
Only invitations with the pending status can be resent. Otherwise, the response will have an HTTP 409 code. To invite again an email whose invitation has expired or has been cancelled, create a new invitation.
Resending is subject to the same sending limits as creating invitations.
Users
Users list
GET {{DASHBOARD_HOST}}/api/rest/organization/users
curl -X GET '{{DASHBOARD_HOST}}/api/rest/organization/users' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{DASHBOARD_HOST}}/api/rest/organization/users',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: Basic YOUR_AUTH_TOKEN',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import java.io.DataOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.HttpsURLConnection;
public class App {
public static void main(String[] args) {
try {
URL url = new URL("{{DASHBOARD_HOST}}/api/rest/organization/users");
HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("Authorization", "Basic YOUR_AUTH_TOKEN");
connection.setRequestProperty("Accept", "application/json");
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
} catch (Exception e) {
// TODO: handle exception
}
}
}
var axios = require('axios');
var config = {
method: 'get',
url: '{{DASHBOARD_HOST}}/api/rest/organization/users',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
url = "{{DASHBOARD_HOST}}/api/rest/organization/users"
payload = {}
headers = {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "net/http"
url = URI("{{DASHBOARD_HOST}}/api/rest/organization/users")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Content-Type"] = "application/json"
request["Authorization"] = "Basic YOUR_AUTH_TOKEN"
response = https.request(request)
puts response.read_body
using System;
using RestSharp;
namespace HelloWorldApplication {
class HelloWorld {
static void Main(string[] args) {
var client = new RestClient("{{DASHBOARD_HOST}}/api/rest/organization/users");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Basic YOUR_AUTH_TOKEN");
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
}
}
}
Response
{
"data": [
{
"id": 101,
"username": "john",
"email": "john@example.com",
"roles": [
"admin"
],
"status": "active",
"balance": 125.5,
"balance_limit": 0,
"effective_balance": 125.5,
"language": "es",
"createdAt": "2026-01-15T10:00:00+00:00"
},
{
"id": 102,
"username": "alice",
"email": "alice@example.com",
"roles": [
"user"
],
"status": "active",
"balance": 48.2,
"balance_limit": 0,
"effective_balance": 48.2,
"language": "en",
"createdAt": "2026-03-02T08:45:00+00:00"
}
],
"meta": {
"pagination": {
"total": 2,
"count": 2,
"per_page": 100,
"current_page": 1,
"total_pages": 1,
"links": []
}
}
}
It returns the active and deactivated users of the organization, including the authenticated user. Removed users are not included.
Filters
| Parameter | Description |
|---|---|
| limit | Total of users to be shown in a single request. Default value: 100. Maximum: 1000. |
| role | Filter by role. Example: ?role=admin. |
| status | Filter by status. Available values: active, disabled. Example: ?status=active. |
| search | Search by username or email. It returns the users whose username or email contains the indicated text. Example: ?search=alice. |
Response fields
| Parameter | Description |
|---|---|
| id | User identifier. |
| username | Username. |
| User email. | |
| roles | Roles assigned to the user. Example: ["admin"]. |
| status | User status. Possible values: active: The user can access the platform and the API. disabled: The user is deactivated and cannot access the platform or the API. |
| balance | User account balance. For postpaid users it can be negative, as it reflects the consumption made. |
| balance_limit | User credit limit. For postpaid users it is a negative value indicating the credit granted. For prepaid users it is 0. |
| effective_balance | Balance available for sending. For prepaid users it matches balance. For postpaid users it is the available credit: balance minus balance_limit. |
| language | User language. Example: en. |
| createdAt | User creation date. |
Deactivating a user
POST {{DASHBOARD_HOST}}/api/rest/organization/users/<ID>/deactivate
curl -X POST '{{DASHBOARD_HOST}}/api/rest/organization/users/102/deactivate' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{DASHBOARD_HOST}}/api/rest/organization/users/102/deactivate',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: Basic YOUR_AUTH_TOKEN',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import java.io.DataOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.HttpsURLConnection;
public class App {
public static void main(String[] args) {
try {
URL url = new URL("{{DASHBOARD_HOST}}/api/rest/organization/users/102/deactivate");
HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
connection.setRequestMethod("POST");
connection.setRequestProperty("Authorization", "Basic YOUR_AUTH_TOKEN");
connection.setRequestProperty("Accept", "application/json");
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
} catch (Exception e) {
// TODO: handle exception
}
}
}
var axios = require('axios');
var config = {
method: 'post',
url: '{{DASHBOARD_HOST}}/api/rest/organization/users/102/deactivate',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
url = "{{DASHBOARD_HOST}}/api/rest/organization/users/102/deactivate"
payload = {}
headers = {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "net/http"
url = URI("{{DASHBOARD_HOST}}/api/rest/organization/users/102/deactivate")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request["Authorization"] = "Basic YOUR_AUTH_TOKEN"
response = https.request(request)
puts response.read_body
using System;
using RestSharp;
namespace HelloWorldApplication {
class HelloWorld {
static void Main(string[] args) {
var client = new RestClient("{{DASHBOARD_HOST}}/api/rest/organization/users/102/deactivate");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Basic YOUR_AUTH_TOKEN");
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
}
}
}
Error response (HTTP 409)
{
"error": {
"code": 409,
"description": "Users can not deactivate themselves"
}
}
It deactivates a user of the organization. While deactivated, the user cannot access the platform or the API. The user keeps their balance and credit limit.
URL Parameters
| Parameter | Description |
|---|---|
| ID | User identifier. |
If the request is successful, the response will have an HTTP 204 code. Deactivating a user that is already deactivated has no effect.
Users cannot deactivate themselves. In that case, the response will have an HTTP 409 code.
Activating a user
POST {{DASHBOARD_HOST}}/api/rest/organization/users/<ID>/activate
curl -X POST '{{DASHBOARD_HOST}}/api/rest/organization/users/102/activate' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{DASHBOARD_HOST}}/api/rest/organization/users/102/activate',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: Basic YOUR_AUTH_TOKEN',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import java.io.DataOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.HttpsURLConnection;
public class App {
public static void main(String[] args) {
try {
URL url = new URL("{{DASHBOARD_HOST}}/api/rest/organization/users/102/activate");
HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
connection.setRequestMethod("POST");
connection.setRequestProperty("Authorization", "Basic YOUR_AUTH_TOKEN");
connection.setRequestProperty("Accept", "application/json");
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
} catch (Exception e) {
// TODO: handle exception
}
}
}
var axios = require('axios');
var config = {
method: 'post',
url: '{{DASHBOARD_HOST}}/api/rest/organization/users/102/activate',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
url = "{{DASHBOARD_HOST}}/api/rest/organization/users/102/activate"
payload = {}
headers = {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "net/http"
url = URI("{{DASHBOARD_HOST}}/api/rest/organization/users/102/activate")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request["Authorization"] = "Basic YOUR_AUTH_TOKEN"
response = https.request(request)
puts response.read_body
using System;
using RestSharp;
namespace HelloWorldApplication {
class HelloWorld {
static void Main(string[] args) {
var client = new RestClient("{{DASHBOARD_HOST}}/api/rest/organization/users/102/activate");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Basic YOUR_AUTH_TOKEN");
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
}
}
}
It reactivates a deactivated user, who will be able to access the platform and the API again.
URL Parameters
| Parameter | Description |
|---|---|
| ID | User identifier. |
If the request is successful, the response will have an HTTP 204 code. Activating a user that is already active has no effect.
Removing a user
DELETE {{DASHBOARD_HOST}}/api/rest/organization/users/<ID>
curl -X DELETE '{{DASHBOARD_HOST}}/api/rest/organization/users/102' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{DASHBOARD_HOST}}/api/rest/organization/users/102',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: Basic YOUR_AUTH_TOKEN',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import java.io.DataOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.HttpsURLConnection;
public class App {
public static void main(String[] args) {
try {
URL url = new URL("{{DASHBOARD_HOST}}/api/rest/organization/users/102");
HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
connection.setRequestMethod("DELETE");
connection.setRequestProperty("Authorization", "Basic YOUR_AUTH_TOKEN");
connection.setRequestProperty("Accept", "application/json");
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
} catch (Exception e) {
// TODO: handle exception
}
}
}
var axios = require('axios');
var config = {
method: 'delete',
url: '{{DASHBOARD_HOST}}/api/rest/organization/users/102',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
url = "{{DASHBOARD_HOST}}/api/rest/organization/users/102"
payload = {}
headers = {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
response = requests.request("DELETE", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "net/http"
url = URI("{{DASHBOARD_HOST}}/api/rest/organization/users/102")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Content-Type"] = "application/json"
request["Authorization"] = "Basic YOUR_AUTH_TOKEN"
response = https.request(request)
puts response.read_body
using System;
using RestSharp;
namespace HelloWorldApplication {
class HelloWorld {
static void Main(string[] args) {
var client = new RestClient("{{DASHBOARD_HOST}}/api/rest/organization/users/102");
client.Timeout = -1;
var request = new RestRequest(Method.DELETE);
request.AddHeader("Authorization", "Basic YOUR_AUTH_TOKEN");
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
}
}
}
Error response (HTTP 409)
{
"error": {
"code": 409,
"description": "Users can not remove themselves from the organization"
}
}
It removes a user from the organization. The removed user will not be able to access the platform or the API.
The remaining balance and credit limit of the removed user are transferred to the user making the request. Their campaigns are still shown in the organization campaigns list.
URL Parameters
| Parameter | Description |
|---|---|
| ID | User identifier. |
If the request is successful, the response will have an HTTP 204 code.
Users cannot remove themselves. In that case, the response will have an HTTP 409 code.
Balance transfers
Transferring balance between users
POST {{DASHBOARD_HOST}}/api/rest/organization/transfers/effective-balance
curl -X POST '{{DASHBOARD_HOST}}/api/rest/organization/transfers/effective-balance' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN' \
-d '{
"fromUserId": 101,
"toUserId": 102,
"amount": 50
}'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{DASHBOARD_HOST}}/api/rest/organization/transfers/effective-balance',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => '{
"fromUserId": 101,
"toUserId": 102,
"amount": 50
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: Basic YOUR_AUTH_TOKEN',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import java.io.DataOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.HttpsURLConnection;
public class App {
public static void main(String[] args) {
try {
URL url = new URL("{{DASHBOARD_HOST}}/api/rest/organization/transfers/effective-balance");
HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
connection.setRequestMethod("POST");
connection.setRequestProperty("Authorization", "Basic YOUR_AUTH_TOKEN");
connection.setRequestProperty("Accept", "application/json");
String requestBody = "{ \"fromUserId\": 101, \"toUserId\": 102, \"amount\": 50 }";
connection.setDoOutput(true);
DataOutputStream wr = new DataOutputStream(connection.getOutputStream());
wr.writeBytes(requestBody);
wr.flush();
wr.close();
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
} catch (Exception e) {
// TODO: handle exception
}
}
}
var axios = require('axios');
var config = {
method: 'post',
url: '{{DASHBOARD_HOST}}/api/rest/organization/transfers/effective-balance',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
},
data: '{ "fromUserId": 101, "toUserId": 102, "amount": 50 }'
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
url = "{{DASHBOARD_HOST}}/api/rest/organization/transfers/effective-balance"
payload = "{ \"fromUserId\": 101, \"toUserId\": 102, \"amount\": 50 }"
headers = {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "net/http"
url = URI("{{DASHBOARD_HOST}}/api/rest/organization/transfers/effective-balance")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request["Authorization"] = "Basic YOUR_AUTH_TOKEN"
request.body = "{ \"fromUserId\": 101, \"toUserId\": 102, \"amount\": 50 }"
response = https.request(request)
puts response.read_body
using System;
using RestSharp;
namespace HelloWorldApplication {
class HelloWorld {
static void Main(string[] args) {
var client = new RestClient("{{DASHBOARD_HOST}}/api/rest/organization/transfers/effective-balance");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Basic YOUR_AUTH_TOKEN");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{ \"fromUserId\": 101, \"toUserId\": 102, \"amount\": 50 }", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
}
}
}
Response (HTTP 201)
{
"data": {
"id": 98765,
"status": "completed",
"fromUserId": 101,
"toUserId": 102,
"amount": 50,
"createdAt": "2026-10-13T11:15:00+00:00"
}
}
Error response (HTTP 402)
{
"error": {
"code": 111,
"description": "Not enough credits"
}
}
It transfers balance available for sending (effective_balance) from one user of the organization to another. The source user can be any user of the organization, including the authenticated user.
How the balance is transferred depends on the billing type of the users:
- Prepaid: account balance (
balance) is transferred. - Postpaid: credit limit (
balance_limit) is transferred. The source user cannot transfer more credit limit than they have.
Both users must have the same billing type. The transfer is recorded in the movement history of both users.
Parameters
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| fromUserId | integer | Yes | Source user identifier. It must belong to the organization. |
| toUserId | integer | Yes | Destination user identifier. It must belong to the organization and be different from the source user. |
| amount | number | Yes | Amount to transfer, in the account currency. It must be greater than 0 and have a maximum of 2 decimals. |
Response fields
If the transfer is successful, the response will have an HTTP 201 code and the following fields:
| Parameter | Description |
|---|---|
| id | Transfer identifier. |
| status | Transfer status. Transfers are made immediately, so its value is always completed. |
| fromUserId | Source user identifier. |
| toUserId | Destination user identifier. |
| amount | Transferred amount. |
| createdAt | Transfer date. |
Transfer errors
| HTTP code | Error code | Description |
|---|---|---|
| 402 | 111 | Not enough credits: The source user does not have enough available balance. |
| 409 | 409 | Balance can only be transferred between users with the same billing type (prepaid or postpaid): The users have different billing types. |
| 409 | 409 | Balance can not be transferred between these users: Balance cannot be transferred between the indicated users. |
| 422 | 422 | One or more parameters are not valid. |
Organization campaigns
Organization campaigns list
GET {{DASHBOARD_HOST}}/api/rest/organization/campaigns
curl -X GET '{{DASHBOARD_HOST}}/api/rest/organization/campaigns?userId=102' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{DASHBOARD_HOST}}/api/rest/organization/campaigns?userId=102',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: Basic YOUR_AUTH_TOKEN',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import java.io.DataOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.HttpsURLConnection;
public class App {
public static void main(String[] args) {
try {
URL url = new URL("{{DASHBOARD_HOST}}/api/rest/organization/campaigns?userId=102");
HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("Authorization", "Basic YOUR_AUTH_TOKEN");
connection.setRequestProperty("Accept", "application/json");
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
} catch (Exception e) {
// TODO: handle exception
}
}
}
var axios = require('axios');
var config = {
method: 'get',
url: '{{DASHBOARD_HOST}}/api/rest/organization/campaigns?userId=102',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
url = "{{DASHBOARD_HOST}}/api/rest/organization/campaigns?userId=102"
payload = {}
headers = {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "net/http"
url = URI("{{DASHBOARD_HOST}}/api/rest/organization/campaigns?userId=102")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Content-Type"] = "application/json"
request["Authorization"] = "Basic YOUR_AUTH_TOKEN"
response = https.request(request)
puts response.read_body
using System;
using RestSharp;
namespace HelloWorldApplication {
class HelloWorld {
static void Main(string[] args) {
var client = new RestClient("{{DASHBOARD_HOST}}/api/rest/organization/campaigns?userId=102");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Basic YOUR_AUTH_TOKEN");
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
}
}
}
Response
{
"data": [
{
"id": 1,
"name": "My campaign",
"type": "basic",
"createdAt": "2026-10-01T11:31:16+00:00",
"updatedAt": "2026-10-01T11:31:16+00:00",
"sendings": {
"data": [
{
"id": 1,
"campaignName": "My campaign",
"status": "OPENED",
"channel": "sms",
"total": 2,
"processed": 2,
"totalSmsParts": 4,
"cost": 0.02,
"currency": "EUR",
"tags": [],
"scheduledAt": null,
"expiresAt": null,
"startedAt": null,
"finishedAt": null,
"createdAt": "2026-10-01T11:31:16+00:00",
"updatedAt": "2026-10-01T11:31:22+00:00",
"events": {
"delivered": 2,
"opened": 0,
"opened_unique": 0,
"clicked": 0,
"clicked_unique": 0,
"unsubscribed": 0,
"hard_bounced": 0,
"complaint": 0,
"sent": 2,
"soft_bounced": 0,
"undelivered": 0,
"rejected": 0,
"expired": 0,
"unsubscribed_landing": 0
}
}
]
},
"owner": {
"data": {
"id": 102,
"username": "alice",
"email": "alice@example.com"
}
}
}
],
"meta": {
"pagination": {
"total": 1,
"count": 1,
"per_page": 100,
"current_page": 1,
"total_pages": 1,
"links": []
}
}
}
It returns the campaigns of all the users of the organization, sorted from newest to oldest. Campaigns of removed users are also included.
Filters
| Parameter | Description |
|---|---|
| limit | Total of campaigns to be shown in a single request. Default value: 100. Maximum: 1000. |
| userId | Filter by the user that owns the campaign. Example: ?userId=102. |
| name | Filter by campaign name. It is possible to use the character "*" as "wildcard". Example: ?name=CAMPAIGN_2020_*. |
| channel | Filter by channel. Available values: sms, mailing, landing, text2speech, voice-interactive. Example: ?channel=sms. |
| beforeDate | Show results prior to the indicated creation date. The date must be specified in ISO 8601 format. Example: ?beforeDate=2019-01-01T00%3A00%3A00%2B00%3A00. |
| afterDate | Show results after the indicated creation date. The date must be specified in ISO 8601 format. Example: ?afterDate=2019-01-01T00%3A00%3A00%2B00%3A00. |
| updatedBeforeDate | Show results with last update prior to the indicated date. The date must be specified in ISO 8601 format. Example: ?updatedBeforeDate=2019-01-01T00%3A00%3A00%2B00%3A00. |
| updatedAfterDate | Show results with last update after the indicated date. The date must be specified in ISO 8601 format. Example: ?updatedAfterDate=2019-01-01T00%3A00%3A00%2B00%3A00. |
The parameters must be correctly encoded (urlencode) with respect to the RFC 3986 standard to be supported by the server.
Response fields
The fields of each campaign are the same as in the campaigns list, except for the links of the campaigns and their sendings, which are not included. In addition, the following field is included:
| Parameter | Description |
|---|---|
| owner.data.id | Identifier of the user that owns the campaign. |
| owner.data.username | Username of the campaign owner. |
| owner.data.email | Email of the campaign owner. |
Coverage
Returns the complete SMS coverage by network.
GET {{DASHBOARD_HOST}}/api/rest/sms/coverage
curl -X GET '{{DASHBOARD_HOST}}/api/rest/sms/coverage' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{DASHBOARD_HOST}}/api/rest/sms/coverage',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: Basic YOUR_AUTH_TOKEN',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import java.io.DataOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.HttpsURLConnection;
public class App {
public static void main(String[] args) {
try {
URL url = new URL("{{DASHBOARD_HOST}}/api/rest/sms/coverage");
HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("Authorization", "Basic YOUR_AUTH_TOKEN");
connection.setRequestProperty("Accept", "application/json");
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
} catch (Exception e) {
// TODO: handle exception
}
}
}
var axios = require('axios');
var config = {
method: 'get',
url: '{{DASHBOARD_HOST}}/api/rest/sms/coverage',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
url = "{{DASHBOARD_HOST}}/api/rest/sms/coverage"
payload = {}
headers = {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "net/http"
url = URI("{{DASHBOARD_HOST}}/api/rest/sms/coverage")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Content-Type"] = "application/json"
request["Authorization"] = "Basic YOUR_AUTH_TOKEN"
response = https.request(request)
puts response.read_body
using System;
using RestSharp;
namespace HelloWorldApplication {
class HelloWorld {
static void Main(string[] args) {
var client = new RestClient("{{DASHBOARD_HOST}}/api/rest/sms/coverage");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Basic YOUR_AUTH_TOKEN");
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
}
}
}
Response
{
"data": [
{
"countryIso": "AD",
"countryName": "Andorra",
"networkName": "Default",
"mcc": "213",
"mnc": null,
"cost": 0.065,
"currencyCode": "EUR",
"currencySymbol": "€"
},
{
"countryIso": "AD",
"countryName": "Andorra",
"networkName": "Servei De Tele. DAndorra",
"mcc": "213",
"mnc": "003",
"cost": 0.065,
"currencyCode": "EUR",
"currencySymbol": "€"
},
{
"countryIso": "AE",
"countryName": "United Arab Emirates",
"networkName": "Default",
"mcc": "424",
"mnc": null,
"cost": 0.0868,
"currencyCode": "EUR",
"currencySymbol": "€"
}
]
}
Returns the SMS coverage grouped by country indicating the minimum and maximum cost of each country.
GET {{DASHBOARD_HOST}}/api/rest/sms/coverageByCountry
curl -X GET '{{DASHBOARD_HOST}}/api/rest/sms/coverageByCountry' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '{{DASHBOARD_HOST}}/api/rest/sms/coverageByCountry',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Authorization: Basic YOUR_AUTH_TOKEN',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
import java.io.DataOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.HttpsURLConnection;
public class App {
public static void main(String[] args) {
try {
URL url = new URL("{{DASHBOARD_HOST}}/api/rest/sms/coverageByCountry");
HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setRequestProperty("Authorization", "Basic YOUR_AUTH_TOKEN");
connection.setRequestProperty("Accept", "application/json");
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
} catch (Exception e) {
// TODO: handle exception
}
}
}
var axios = require('axios');
var config = {
method: 'get',
url: '{{DASHBOARD_HOST}}/api/rest/sms/coverageByCountry',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
import requests
url = "{{DASHBOARD_HOST}}/api/rest/sms/coverageByCountry"
payload = {}
headers = {
'Content-Type': 'application/json',
'Authorization': 'Basic YOUR_AUTH_TOKEN'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
require "uri"
require "net/http"
url = URI("{{DASHBOARD_HOST}}/api/rest/sms/coverageByCountry")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Content-Type"] = "application/json"
request["Authorization"] = "Basic YOUR_AUTH_TOKEN"
response = https.request(request)
puts response.read_body
using System;
using RestSharp;
namespace HelloWorldApplication {
class HelloWorld {
static void Main(string[] args) {
var client = new RestClient("{{DASHBOARD_HOST}}/api/rest/sms/coverageByCountry");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Basic YOUR_AUTH_TOKEN");
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
}
}
}
Response
{
"data": [
{
"countryIso": "AD",
"countryName": "Andorra",
"networks": [
"Servei De Tele. DAndorra"
],
"minCost": 0.065,
"maxCost": 0.065,
"currencyCode": "EUR",
"currencySymbol": "€"
},
{
"countryIso": "AE",
"countryName": "United Arab Emirates",
"networks": [
"DU",
"Etisalat"
],
"minCost": 0.0868,
"maxCost": 0.0868,
"currencyCode": "EUR",
"currencySymbol": "€"
}
]
}
Errors
| Error Code | HTTP Code | Description |
|---|---|---|
| 0 | 202 | Accepted for delivery |
| 101 | 500 | Internal Database error |
| 102 | 400 | No valid recipients |
| 103 | 401 | Username or password unknown |
| 104 | 400 | Text message missing |
| 105 | 400 | Text message too long |
| 106 | 400 | Sender missing |
| 107 | 400 | Sender too long |
| 108 | 400 | No valid Datetime for send |
| 109 | 400 | Notification URL incorrect |
| 110 | 400 | Exceeded maximum parts allowed or incorrect number of parts |
| 111 | 402 | Not enough credits |
| 112 | 401 | IP address not allowed |
| 113 | 400 | Invalid coding |
| 114 | 400 | Invalid subject |
| 115 | 400 | Sender is not verified |
| 116 | 400 | Invalid replyTo |
| 117 | 400 | ReplyTo is not verified |
| 118 | 401 | Email blocked for exceeding the hard-bounced limit allowed |
| 119 | 400 | Invalid expiration date |
| 120 | 400 | Invalid GUID |
| 121 | 400 | Invalid scheduled date |
| 122 | 500 | Update error |
| 123 | 500 | Delete error |
| 125 | 400 | Invalid JSON |
| 126 | 400 | Empty campaign name |
| 130 | 400 | Invalid voice language |
| 131 | 400 | Invalid voice gender |
| 132 | 400 | Invalid voice caller |
| 133 | 400 | Invalid audio URL |
| 134 | 400 | Unsupported audio format |
| 140 | 400 | Template missing |
| 141 | 400 | Missing landing placeholder |
| 142 | 400 | Can't split variable placeholders |
| 150 | 400 | Missing billing profile |
| 151 | 400 | Error retrieving TPV url |
| 152 | 400 | Invalid VAT |
| 153 | 400 | Invalid method |
| 154 | 400 | Invalid conversion rate |
| 155 | 400 | Max limit reached |
| 156 | 400 | Min limit reached |
| 157 | 400 | Error generating invoice |
| 160 | 400 | Invalid voice interactive language |
| 161 | 400 | Invalid voice interactive gender |
| 162 | 400 | Invalid voice interactive caller |
| 163 | 400 | Invalid voice interactive audio URL |
| 164 | 400 | Unsupported voice interactive audio format |
| 165 | 400 | Invalid voice interactive speech type |
| 166 | 400 | Ivalid voice interactive menu option type |
| 167 | 400 | Trying to save an existing campaign |
| 168 | 400 | Empty speech type |
| 169 | 400 | Empty menu |
| 170 | 400 | Empty phone key |
| 171 | 400 | Phone Key is not a number |
| 172 | 400 | Phone key out of range |
| 173 | 400 | Empty menu options for sub menu |
| 174 | 400 | Empty phone prefix for call transfer |
| 175 | 400 | Empty phone for call transfer |
| 176 | 400 | Call retries value is not an integer |
| 177 | 400 | Call retries value out of range |
| 178 | 400 | Cost limit value is not an integer |
| 179 | 400 | Speech retries value is not an integer |
| 180 | 400 | Speech retries value out of range |
| 181 | 400 | Speech timeout seconds value is not an integer |
| 182 | 400 | Speech timeout seconds value out of range |
| 183 | 400 | Available times value is not an array |
| 184 | 400 | Available times day is not an integer |
| 185 | 400 | Available times day out of range |
| 186 | 400 | Available times from hour format error |
| 187 | 400 | Available times to hour format error |
| 188 | 400 | Available times from hour is greater than to hour |
| 189 | 400 | Missing available time object property |
| 190 | 400 | Call Retries is specified but its value is empty |
| 191 | 400 | Cost limit is specified but its value is empty |
| 192 | 400 | Speech Retries is specified but its value is empty |
| 193 | 400 | Speech timeout seconds is specified but its value is empty |
| 194 | 400 | Available times is specified but its value is empty |
| 195 | 400 | No valid contacts external IDs |
| 196 | 400 | Available times range is too short |
| 422 | 422 | Input validation error |
Annexes
IP range
To avoid problems, if you expect traffic from our API (notifications for delivery reports), you should add the following IP ranges to your firewall:
- 89.17.205.192/26
- 89.17.219.128/26
GSM character set
GSM basic character set
| 0x00 | 0x10 | 0x20 | 0x30 | 0x40 | 0x50 | 0x60 | 0x70 | |
| 0x00 | @ | Δ | SP | 0 | ¡ | P | ¿ | p |
| 0x01 | £ | _ | ! | 1 | A | Q | a | q |
| 0x02 | $ | Φ | " | 2 | B | R | b | r |
| 0x03 | ¥ | Γ | # | 3 | C | S | c | s |
| 0x04 | è | Λ | ¤ | 4 | D | T | d | t |
| 0x05 | é | Ω | % | 5 | E | U | e | u |
| 0x06 | ù | Π | & | 6 | F | V | f | v |
| 0x07 | ì | Ψ | ' | 7 | G | W | g | w |
| 0x08 | ò | Σ | ( | 8 | H | X | h | x |
| 0x09 | Ç | Θ | ) | 9 | I | Y | i | y |
| 0x0A | LF | Ξ | * | : | J | Z | j | z |
| 0x0B | Ø | ESC | + | ; | K | Ä | k | ä |
| 0x0C | ø | Æ | , | < | L | Ö | l | ö |
| 0x0D | CR | æ | - | = | M | Ñ | m | ñ |
| 0x0E | Å | ß | . | > | N | Ü | n | ü |
| 0x0F | å | É | / | ? | O | § | o | à |
* Special characters
GSM extended character set
| 0x00 | 0x10 | 0x20 | 0x30 | 0x40 | 0x50 | 0x60 | 0x70 | |
| 0x00 | | | |||||||
| 0x01 | ||||||||
| 0x02 | ||||||||
| 0x03 | ||||||||
| 0x04 | ^ | |||||||
| 0x05 | € | |||||||
| 0x06 | ||||||||
| 0x07 | ||||||||
| 0x08 | { | |||||||
| 0x09 | } | |||||||
| 0x0A | FF | |||||||
| 0x0B | SS2 | |||||||
| 0x0C | [ | |||||||
| 0x0D | CR2 | ~ | ||||||
| 0x0E | ] | |||||||
| 0x0F | \ |
* Special characters
GSM-PT character set
GSM-PT basic character set
| 0x00 | 0x10 | 0x20 | 0x30 | 0x40 | 0x50 | 0x60 | 0x70 | |
| 0x00 | @ | Δ | SP | 0 | Í | P | ~ | p |
| 0x01 | £ | _ | ! | 1 | A | Q | a | q |
| 0x02 | $ | ª | " | 2 | B | R | b | r |
| 0x03 | ¥ | Ç | # | 3 | C | S | c | s |
| 0x04 | ê | À | º | 4 | D | T | d | t |
| 0x05 | é | ∞ | % | 5 | E | U | e | u |
| 0x06 | ú | ^ | & | 6 | F | V | f | v |
| 0x07 | í | \ | ' | 7 | G | W | g | w |
| 0x08 | ó | € | ( | 8 | H | X | h | x |
| 0x09 | ç | Ó | ) | 9 | I | Y | i | y |
| 0x0A | LF | | | * | : | J | Z | j | z |
| 0x0B | Ô | ESC | + | ; | K | Ã | k | ã |
| 0x0C | ô | Â | , | < | L | Õ | l | õ |
| 0x0D | CR | â | - | = | M | Ú | m | ` |
| 0x0E | Á | Ê | . | > | N | Ü | n | ü |
| 0x0F | á | É | / | ? | O | § | o | à |
* Special characters
** Characters different from GSM
GSM-PT extended character set
| 0x00 | 0x10 | 0x20 | 0x30 | 0x40 | 0x50 | 0x60 | 0x70 | |
| 0x00 | | | |||||||
| 0x01 | À | Â | ||||||
| 0x02 | Φ | |||||||
| 0x03 | Γ | |||||||
| 0x04 | ^ | |||||||
| 0x05 | ê | Ω | Ú | € | ú | |||
| 0x06 | Π | |||||||
| 0x07 | Ψ | |||||||
| 0x08 | Σ | { | ||||||
| 0x09 | ç | Θ | } | Í | í | |||
| 0x0A | FF | |||||||
| 0x0B | Ô | SS2 | Ã | ã | ||||
| 0x0C | ô | [ | Õ | õ | ||||
| 0x0D | CR2 | ~ | ||||||
| 0x0E | Á | ] | ||||||
| 0x0F | á | Ê | \ | Ó | ó | â |
* Special characters
** Characters different from GSM
Sending Restrictions by Country
Many countries have regulations designed to protect users from unwanted communications, both via SMS and voice calls. To ensure your campaigns reach their destination correctly and avoid blocks or penalties, it is essential to adhere to these rules.
Each country defines its own conditions and restrictions regarding commercial communications, so it is important to understand and respect the specifics of each. It is important to keep in mind that these conditions and restrictions are subject to the current legislation of each country and may change. {{NAME}} is not responsible for non-compliance with these policies; the responsibility lies with the client.
Below, you will find the restrictions for the main countries so you can operate safely and effectively. If you have any questions or if the recipient country is not listed below, we recommend contacting our customer service team.
Preliminary Considerations
- In all countries, customer consent is required to receive SMS or voice calls.
- For promotional SMS messages, an unsubscribe option must be included in the SMS content.
🇫🇷 France
Commercial or promotional SMS messages sent to France must comply with certain legal regulations, which are described below. Transactional messages, however, are not subject to these restrictions.
Prohibited Content
Sending messages related to politics, religion, gambling, or unsolicited promotions is strictly prohibited.
Time Restrictions
Marketing SMS messages can only be sent Monday through Saturday, between 8:00 AM and 10:00 PM. Any messages sent outside of these hours will be automatically blocked and scheduled for resending at the next permitted time. That is, if you try to send an SMS on Sunday at 2:00 PM, it won't be sent until Monday at 8:00 AM.
Sender Conditions
Contact {{SUPPORT_EMAIL}} for more information and to validate your sender.
Recipient Unsubscribe
It is mandatory to add the STOP au [STOP_CODE] as an opt-out instruction at the end of your marketing SMS messages to France.
🇪🇸 Spain
SMS messages sent to Spain have certain legal conditions. Any SMS identified as marketing content will be subject to the conditions listed in the sections below.
Prohibited Content
Sending messages related to political or religious topics, gambling, or unsolicited promotions is strictly prohibited.
🇬🇧 United Kingdom
SMS messages sent to the United Kingdom are limited to certain regulatory conditions. Any SMS messages identified as marketing content will be subject to the conditions listed below.
Prohibited Content
Sending messages related to political or religious themes or unsolicited promotions is strictly prohibited.
If you send adult or gambling content, you must ensure that the recipient's age has been verified in compliance with PSA and Ofcom Guidelines.
🇺🇸 United States
Commercial or promotional SMS messages sent to the United States must comply with certain legal regulations, which are described below. Transactional messages, however, are not subject to these restrictions.
Restricted Content
The use of public URL shorteners, such as bit.ly or tinyurl, is not permitted. However, the use of custom domains within these services is permitted. Therefore, you may use {{NAME}}'s own URL shortener.
In addition, sending messages containing sexually explicit or pornographic content, abusive or harassing material, information related to firearms, including fireworks, or references to alcohol, tobacco, or illegal drugs is strictly prohibited. Sending messages about gambling, investment opportunities, the repeated sending or receiving of one-time access codes (OTPs) on behalf of other providers, activities considered high financial risk, loans or loan forgiveness, credit repair services, debt collection, or tax-related matters is also prohibited. Likewise, content linked to cryptocurrency, including those related to OTPs, unsolicited real estate inquiries such as WeBuyHomes, or promotions associated with multi-level marketing is not permitted.
Sender Conditions
Contact {{SUPPORT_EMAIL}} for more information and to validate your sender.
🇨🇴 Colombia
Time Restrictions
Marketing SMS messages can only be sent Monday through Friday, between 7:00 AM and 7:00 PM, and Saturdays from 8:00 AM to 3:00 PM. Sending promotional messages is not permitted on Sundays and public holidays. Any messages sent outside of these hours will be automatically blocked and scheduled for forwarding at the next permitted time. This means that if you attempt to send an SMS on Sunday at 2:00 PM, it will not be sent until Monday at 8:00 AM.
Restricted Content
Promotional SMS content may, in some cases, require prior registration before sending. Additionally, the {{NAME}} platform may automatically add the sender's name to the beginning of the message or include a URL at the end, depending on the channel's or destination country's conditions.
Prohibited Content
Sending messages related to political or religious topics, gambling, or unsolicited promotions is strictly prohibited.
🇮🇪 Ireland
Before sending any marketing traffic, the express consent (opt-in) of mobile device users is required.
Restricted Content
Sending messages related to politics, religion, gambling, or unsolicited promotions is strictly prohibited.
Sender Terms
Contact {{SUPPORT_EMAIL}} for more information and to validate your sender.























