NAV
shell php java python nodejs ruby c#

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

SMS

Send SMS Message

POST https://dashboard.360nrs.com/api/rest/sms

curl -X POST 'https://dashboard.360nrs.com/api/rest/sms' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN' \
-d '{
  "to": ["34666555444"],
  "from": "TEST",
  "message": "SMS text message"
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://dashboard.360nrs.com/api/rest/sms',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => '{
  "to": ["34666555444"],
  "from": "TEST",
  "message": "SMS text message"
}',
  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("https://dashboard.360nrs.com/api/rest/sms");
      HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
      connection.setRequestMethod("POST");
      connection.setRequestProperty("Authorization", "Basic YOUR_AUTH_TOKEN");
      connection.setRequestProperty("Accept", "application/json");
      String requestBody = "{ \"to\": [\"34666555444\"], \"from\": \"TEST\", \"message\": \"SMS text message\" }";
      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: 'https://dashboard.360nrs.com/api/rest/sms',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Basic YOUR_AUTH_TOKEN'
  },
  data: '{ "to": ["34666555444"], "from": "TEST", "message": "SMS text message" }'
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
import requests

url = "https://dashboard.360nrs.com/api/rest/sms"

payload = "{ \"to\": [\"34666555444\"], \"from\": \"TEST\", \"message\": \"SMS text message\" }"
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("https://dashboard.360nrs.com/api/rest/sms")

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 = "{ \"to\": [\"34666555444\"], \"from\": \"TEST\", \"message\": \"SMS text message\" }"

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("https://dashboard.360nrs.com/api/rest/sms");
      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", "{ \"to\": [\"34666555444\"], \"from\": \"TEST\", \"message\": \"SMS text message\" }",  ParameterType.RequestBody);
      IRestResponse response = client.Execute(request);
      Console.WriteLine(response.Content);
    }
  }
}

Response

HTTP Response Code 202 (ACCEPTED)

{
  "campaignId": 100000,
  "sendingId": 100001,
  "result": [
    {
      "accepted": true,
      "to": "34666555444",
      "id": "XXXXXXXXXXXXX",
      "parts": 1,
      "scheduledAt": null,
      "expiresAt": null
    }
  ]
}

HTTP Response Code 207 (MULTI-STATUS)

{
  "campaignId": 100000,
  "sendingId": 100001,
  "result": [
    {
      "accepted": true,
      "to": "34666555444",
      "id": "XXXXXXXXXXXXX",
      "parts": 1,
      "scheduledAt": null,
      "expiresAt": null
    },
    {
      "accepted": false,
      "to": "34",
      "error": {
        "code": 102,
        "description": "No valid recipients"
      }
    }
  ]
}

Error response (HTTP 400)

{
  "error": {
    "code": 102,
    "description": "No valid recipients"
  }
}

Parameters

Parameter Type Mandatory Description
message string Yes Text of message. At most, there can be 160 characters if it is not specified that the message is multi-part (see parts parameter). The text must be encoded in UTF-8.
to array Yes Mobile phone number to receive message. Must include the prefix (e.g. in Spain 34666666666). This field allows you to specify multiple recipients.
from string Yes Sender text, this label will consist of 15 numbers or 11 alphanumeric characters.
encoding string No Possible values are 'gsm', 'gsm-pt' and 'utf-16'. The value gsm for normal mailings with GSM7 coding and 160 characters per message, and the value utf-16 for UCS2 (UTF16) coding and 70 characters per message. If not specified, the default value is gsm.
scheduleDate string No Date of message sent 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.
expirationDate string No Message expiration date in UTC. Format YYYYmmddHHiiss (e.g. 20130215142000 would be 15 February 2013 at 14:20:00).
parts integer No Indicates the maximum number of parts into which the scheduled message will be divided. This variable is set to 1 by default, so if it is not specified and a message over 160 characters for gsm encoding is sent, the message will fail. Keep in mind that concatenated messages may only be 153 characters per part in gsm and 67 characters per part in utf-16 and each part is charged as one message. The server will only use the minimum necessary parts for sending the text even if the specified number of parts is higher than necessary. If the number of parts is less than that required for sending the text, the message will fail with error 105. The maximum number of parts allowed is 15.
notificationUrl string|array No URL to receive delivery notifications.
trans integer No Possible values are 1 and 0. With value 0, the server does not change any character in the message, as this is the default value. With value 1, the server modifies the common invalid characters in GSM7 to valid characters with the following translation table: 'á' => 'a', 'í'=>'i', 'ó'=>'o', 'ú'=>'u', 'ç'=>'Ç', 'Á'=>'A', 'Í'=>'I', 'Ó'=>'O', 'Ú'=>'U', 'À'=>'A', 'È'=>'E', 'Ì'=>'I', 'Ò'=>'O', 'Ù'=>'U', 'º' => '', 'ª' => '', 'Õ' => 'O', 'õ' => 'o', 'â' => 'a', 'ê' => 'e', 'î'=>'i', 'ô'=>'o', 'û'=>'u', ' '=>'A', 'Ê'=>'E', 'Î'=>'I', 'Ô'=>'O', 'Û'=>'U', 'ã' => 'a', 'Ã' => 'A'.
campaignName string No Campaign name. If specified, a campaign will be created with the name indicated in the dashboard and which will contain the mailing statistics. If a campaign with this name already exists, the delivery statistics will be added to the existing campaign.
tags array No campaignName is required if this parameter is specified. List of tags to add to the campaign. The tags can be used to filter the statistics in the dashboard.
certified boolean No If it is specified as true, the message will be sent as certified.
* Certified messages have additional cost
sub array No array with substitution variables that will be applied to the message.
splitParts boolean No For messages that exceed the maximum SMS length, the server will split the message into multiple SMS instead of using concatenated SMS. The default value is false.
flash boolean No Flash SMS is a message that appears directly on the device screen. Depending on the model and operating system it is possible to store it in the inbox and send concatenated messages.
availableTimes array No It indicates the times in which the SMS will be sent. Json objects are defined in the form:

[{"day": 1, "from": "09:00", "to": "21:00"}]

day: a day of the range between Monday to Sunday is indicated, it must be a number between 1 and 7. Optional: If not specified, the range will apply to all days of the week.
from: time that defines the start of the time range in UTC 24 hour format.
to: time that defines the end of the time range in UTC 24 hour format.
otpConfig object No In the case of adding the {OTP_CODE} variable within the parameter "message", the OTP code parameters can be specified. For example:

{"alpha": true, "length": 5}

alpha: indicates whether the code is alphanumeric or numeric. The default value is false.
length: length of the code. The minimum value is 3 and the maximum is 10. The default value is 4.
maxAttempts: maximum number of attempts. The minimum value is 1 and the maximum is 10. The default value is 3.
maxSecondsValidity: 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: 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 "".

Substitution variables

When using the sub parameter, the array must contain as many items as the send recipients, using the following format:

{
  "from": "TEST",
  "to": ["34666555444", "34666555333"],
  "message": "Hello {name}",
  "sub": [
    {"name": "first contact name"},
    {"name": "second contact name"}
  ]
}

Custom variables can be indicated in the message body. These variables will be replaced by the contact's custom variables or by the variables indicated in the sub parameter.

Multiple notification URLs

When using multiple notification URLs, the array must contain as many elements as the send recipients.

{
  "from": "TEST",
  "to": ["34666555444", "34666555333"],
  "message": "SMS text message",
  "notificationUrl": [
    "https://example.com/first-notification-url",
    "https://example.com/second-notification-url"
  ]
}

It is possible to specify a different notification url per recipient.
For this you have to use an array for the notificationUrl parameter. The array must contain as many elements as the send recipients.

Custom fields filters

It is possible to add the following filters to custom variables.

Filter Description Example Result
lower Return lowercase text. {name|lower} my name
upper Return text in uppercase. {name|upper} MY NAME
capitalize Return the text with the first letter of the first word in uppercase. {name|capitalize} My name
capitalizeAll Return the text with the first letter of each word in uppercase. {name|capitalizeAll} My Name
formatDotComma Returns the number with a dot as thousands separator and comma as decimal separator. {number|formatDotComma} 1.234,56
formatCommaDot Returns the number with a comma as thousands separator and dot as decimal separator. {number|formatCommaDot} 1,234.56
shorten Returns a shortened url. It must be a valid url. {url|shorten} https://nrs.so/xxxxxx

Delivery notifications

If you wish to receive delivery notifications in real time, you must specify the variable notificationUrl with the URL of the client where you want mailing status to be notified.

The operation involves specifying the URL where you want to make a request to our server for each HTTP request when a notification from the operator is received. To do this, the client must have an HTTP server capable of receiving such notifications.

Our server will send the variables using the GET method as the client wants. To do that in the URL that you send us, you have to write the variable name followed by an escape character that will contain the value; escape characters have the form of the % character followed by a letter. This is an example URL:

https://example.com/notify.php?sender=%p&phone=%P&status=%s

These are the defined escape characters:

To better explain the process, below is an example of the SMS message and its delivery notification.

First, we send the SMS with the notificationUrl variable to indicate the URL where we want to receive the delivery notification. We will add our mailing identifier to this URL to identify it unambiguously when we receive it. The final URL for the notification would be:

https://example.com/notify.php?sender=%p&phone=%P&status=%s&customId=123456

SMS information by message id

GET https://dashboard.360nrs.com/api/rest/sms/<ID>

curl -X GET 'https://dashboard.360nrs.com/api/rest/sms/<ID>' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://dashboard.360nrs.com/api/rest/sms/<ID>',
  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("https://dashboard.360nrs.com/api/rest/sms/<ID>");
      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: 'https://dashboard.360nrs.com/api/rest/sms/<ID>',
  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 = "https://dashboard.360nrs.com/api/rest/sms/<ID>"

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("https://dashboard.360nrs.com/api/rest/sms/<ID>")

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("https://dashboard.360nrs.com/api/rest/sms/<ID>");
      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

HTTP Response Code 200 (OK)

{
    "data": [
        {
            "id": "XXXXXXXXXXXXX",
            "from": "360NRS",
            "to": "34666555444",
            "message": "SMS text message",
            "campaignId": 123456,
            "sendingId": 234567,
            "isDelivered": true,
            "isClicked": false,
            "events": [
                {
                    "type": "sent",
                    "date": "2021-07-19T15:00:33+00:00",
                    "isMobile": false,
                    "browser": "",
                    "os": ""
                },
                {
                    "type": "delivered",
                    "date": "2021-07-19T15:00:33+00:00",
                    "isMobile": false,
                    "browser": "",
                    "os": ""
                }
            ],
            "customFields": {
                "email": "test@test.com",
                "phone": "34666555444",
                "name": "Name"
            },
            "links": {
                "self": "https://dashboard.360nrs.com/api/rest/sms/XXXXXXXXXXXXX"
            }
        }
    ]
}

Error response (HTTP 404)

{
    "error": {
        "code": 404,
        "description": "Resource not found"
    }
}
Parameter Type Mandatory Description
id string Yes Identifier of the message returned in the response of api/rest/sms in the id field. It is possible to specify multiple identifiers separated by commas.

Email

Send Email message

POST https://dashboard.360nrs.com/api/rest/mailing

curl -X POST 'https://dashboard.360nrs.com/api/rest/mailing' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN' \
-d '{
    "to": ["test@example.com"],
    "fromName": "Info",
    "fromEmail": "info@360nrs.com",
    "body": "<html><head><title>TEST</title></head><body><a href=\"https://example.com\">link</a></body></html>",
    "replyTo": "replyto@example.com",
    "subject": "TEST"
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://dashboard.360nrs.com/api/rest/mailing',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => '{
    "to": ["test@example.com"],
    "fromName": "Info",
    "fromEmail": "info@360nrs.com",
    "body": "<html><head><title>TEST</title></head><body><a href=\"https://example.com\">link</a></body></html>",
    "replyTo": "replyto@example.com",
    "subject": "TEST"
}',
  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("https://dashboard.360nrs.com/api/rest/mailing");
      HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
      connection.setRequestMethod("POST");
      connection.setRequestProperty("Authorization", "Basic YOUR_AUTH_TOKEN");
      connection.setRequestProperty("Accept", "application/json");
      String requestBody = "{ \"to\": [\"test@example.com\"], \"fromName\": \"Info\", \"fromEmail\": \"info@360nrs.com\", \"body\": \"<html><head><title>TEST</title></head><body><a href=\\\"https://example.com\\\">link</a></body></html>\", \"replyTo\": \"replyto@example.com\", \"subject\": \"TEST\" }";
      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: 'https://dashboard.360nrs.com/api/rest/mailing',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Basic YOUR_AUTH_TOKEN'
  },
  data: '{ "to": ["test@example.com"], "fromName": "Info", "fromEmail": "info@360nrs.com", "body": "<html><head><title>TEST</title></head><body><a href=\"https://example.com\">link</a></body></html>", "replyTo": "replyto@example.com", "subject": "TEST" }'
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
import requests

url = "https://dashboard.360nrs.com/api/rest/mailing"

payload = "{ \"to\": [\"test@example.com\"], \"fromName\": \"Info\", \"fromEmail\": \"info@360nrs.com\", \"body\": \"<html><head><title>TEST</title></head><body><a href=\\\"https://example.com\\\">link</a></body></html>\", \"replyTo\": \"replyto@example.com\", \"subject\": \"TEST\" }"
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("https://dashboard.360nrs.com/api/rest/mailing")

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 = "{ \"to\": [\"test@example.com\"], \"fromName\": \"Info\", \"fromEmail\": \"info@360nrs.com\", \"body\": \"<html><head><title>TEST</title></head><body><a href=\\\"https://example.com\\\">link</a></body></html>\", \"replyTo\": \"replyto@example.com\", \"subject\": \"TEST\" }"

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("https://dashboard.360nrs.com/api/rest/mailing");
      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", "{ \"to\": [\"test@example.com\"], \"fromName\": \"Info\", \"fromEmail\": \"info@360nrs.com\", \"body\": \"<html><head><title>TEST</title></head><body><a href=\\\"https://example.com\\\">link</a></body></html>\", \"replyTo\": \"replyto@example.com\", \"subject\": \"TEST\" }",  ParameterType.RequestBody);
      IRestResponse response = client.Execute(request);
      Console.WriteLine(response.Content);
    }
  }
}

Response

HTTP Response Code 202 (ACCEPTED)

{
  "campaignId": 100000,
  "sendingId": 100001,
  "result": [
    {
      "accepted": true,
      "to": "test@example.com",
      "id": "XXXXXXXXXXXXX",
      "scheduledAt": null
    }
  ]
}

HTTP Response Code 207 (MULTI-STATUS)

{
  "campaignId": 100000,
  "sendingId": 100001,
  "result": [
    {
      "accepted": true,
      "to": "test@example.com",
      "id": "XXXXXXXXXXXXX",
      "scheduledAt": null
    },
    {
      "accepted": false,
      "to": "invalidEmail",
      "error": {
        "code": 102,
        "description": "No valid recipients"
      }
    }
  ]
}

Error response (HTTP 400)

{
  "error": {
    "code": 102,
    "description": "No valid recipients"
  }
}

Parameters

Parameter Type Mandatory Description
body string No Email body in HTML format and UTF-8 encoding. Required without templateId.
templateId integer No Legacy template ID to send as the body of the email. Required without body. This ID refers to templates created from the previous version (https://dashboard.360nrs.com) of the 360NRS application. It is recommended to use the templateV2Id parameter when possible.
templateV2Id integer No Template ID to send as the body of the email. Required without body. This ID refers to the current version (https://app.360nrs.com) of the 360NRS application.
to array Yes Email addresses of the sending. This field allows you to specify multiple recipients.
cc array No Email addresses of the sending in carbon copy. This field allows you to specify multiple recipients.
bcc array No Email addresses of the sending in blind carbon copy. This field allows you to specify multiple recipients.
fromEmail string Yes Sender email The indicated email address must be validated on the 360NRS platform..
subject string Yes Brief summary of the subject of the message.
fromName string No Name of sender of the sending.
replyTo string Yes Address for responding to the message.
scheduleDate string No Date message sent in UTC format. If you need to send scheduled messages, the send date can be specified by indicating the date in the following format YYYYmmddHHiiss (ej. 20130215142000 would be 15 February 2013 at 14:20:00). For immediate mailings, this parameter does not have to be specified.
campaignName string No Campaign name. If specified, a campaign will be created with the name indicated in the dashboard and which will contain the mailing statistics. If a campaign with this name already exists, the delivery statistics will be added to the existing campaign.
tags array No campaignName is required if this parameter is specified. List of tags to add to the campaign. The tags can be used to filter the statistics in the dashboard.
certified boolean No If it is specified as true, the message will be sent as certified.
* Certified messages have an additional cost
sub array No Array with substitution variables that will be applied to the message.
attachments array No Email attachments. An array of objects is defined as follows:

[{
"name": "filename.txt",
"content": "Ci4vYmluL3pvb2tlZ...",
"contentType": "text/plain"
}]


name: file name.
content: file content in base64.
contentType: file content type.

* Attached files have an additional cost.
trackOpens boolean No Add a pixel to get opening statistics. The default value is true.
trackClicks boolean No Track the links to get click statistics. The default value is true.
otpConfig object No In the case of adding the {OTP_CODE} variable within the parameter "body", the OTP code parameters can be specified. For example:

{"alpha": true, "length": 5}

alpha: indicates whether the code is alphanumeric or numeric. The default value is false.
length: length of the code. The minimum value is 3 and the maximum is 10. The default value is 4.
maxAttempts: maximum number of attempts. The minimum value is 1 and the maximum is 10. The default value is 3.
maxSecondsValidity: 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: 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 "".

Substitution variables

When using the sub parameter, the array must contain as many items as the send recipients, using the following format:

{
  "to": ["test@example.com", "test2@example.com"],
  "fromName": "Info",
  "fromEmail": "info@360nrs.com",
  "body": "<html><head><title>TEST</title></head><body>Hello {name}, <a href=\"https://example.com\">link</a></body></html>",
  "replyTo": "replyto@example.com",
  "subject": "TEST",
  "sub": [
    {"name": "first contact name"},
    {"name": "second contact name"}
  ]
}

Custom variables can be indicated in the message body. These variables will be replaced by the contact's custom variables or by the variables indicated in the sub parameter.

Voice

Send Voice message

POST https://dashboard.360nrs.com/api/rest/voice

curl -X POST 'https://dashboard.360nrs.com/api/rest/voice' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN' \
-d '{
  "to": ["34666666666"],
  "message": "Esto es un test de mensaje de voz",
  "gender": "F",
  "language": "es_ES"
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://dashboard.360nrs.com/api/rest/voice',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => '{
  "to": ["34666666666"],
  "message": "Esto es un test de mensaje de voz",
  "gender": "F",
  "language": "es_ES"
}',
  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("https://dashboard.360nrs.com/api/rest/voice");
      HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
      connection.setRequestMethod("POST");
      connection.setRequestProperty("Authorization", "Basic YOUR_AUTH_TOKEN");
      connection.setRequestProperty("Accept", "application/json");
      String requestBody = "{ \"to\": [\"34666666666\"], \"message\": \"Esto es un test de mensaje de voz\", \"gender\": \"F\", \"language\": \"es_ES\" }";
      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: 'https://dashboard.360nrs.com/api/rest/voice',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Basic YOUR_AUTH_TOKEN'
  },
  data: '{ "to": ["34666666666"], "message": "Esto es un test de mensaje de voz", "gender": "F", "language": "es_ES" }'
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
import requests

url = "https://dashboard.360nrs.com/api/rest/voice"

payload = "{ \"to\": [\"34666666666\"], \"message\": \"Esto es un test de mensaje de voz\", \"gender\": \"F\", \"language\": \"es_ES\" }"
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("https://dashboard.360nrs.com/api/rest/voice")

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 = "{ \"to\": [\"34666666666\"], \"message\": \"Esto es un test de mensaje de voz\", \"gender\": \"F\", \"language\": \"es_ES\" }"

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("https://dashboard.360nrs.com/api/rest/voice");
      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", "{ \"to\": [\"34666666666\"], \"message\": \"Esto es un test de mensaje de voz\", \"gender\": \"F\", \"language\": \"es_ES\" }",  ParameterType.RequestBody);
      IRestResponse response = client.Execute(request);
      Console.WriteLine(response.Content);
    }
  }
}

Response

HTTP Response Code 202 (ACCEPTED)

{
  "campaignId": 100000,
  "sendingId": 100001,
  "result": [
    {
      "accepted": true,
      "to": "34666666666",
      "id": "XXXXXXXXXXXXX",
      "scheduledAt": null,
      "expiresAt": null
    }
  ]
}

HTTP Response Code 207 (MULTI-STATUS)

{
  "campaignId": 100000,
  "sendingId": 100001,
  "result": [
    {
      "accepted": true,
      "to": "34666666666",
      "id": "XXXXXXXXXXXXX",
      "scheduledAt": null,
      "expiresAt": null
    },
    {
      "accepted": false,
      "to": "34",
      "error": {
        "code": 102,
        "description": "No valid recipients"
      }
    }
  ]
}

Error response (HTTP 400)

{
  "error": {
    "code": 102,
    "description": "No valid recipients"
  }
}

Parameters

Parameter Type Required Description
message string Yes Message text. At most it can have 500 characters. The text must be encoded in UTF-8.
to array Yes Mobile phone number to receive message. Must include the prefix (e.g. in Spain 34666666666). This field allows you to specify multiple recipients.
language string Yes Language to convert the text; the options are:

'en_GB': English - United Kingdom,
'en_US': English - United States,
'es_ES': Spanish - España,
'es_US': Spanish - Latino,
'pt_PT': Portuguese - Portugal,
'pt_BR': Portuguese - Brazil,
'cmn_CN': Mandarin Chinese - China *,
'arb': Arab *,
'de_DE': German - Germany,
'fr_FR': French - France,
'it_IT': Italian - Italy,
'hi_IN': Indi - India *.

* Available only in female gender.
gender string Yes Gender of voice; the allowed values ​​are 'F' for a woman's voice and 'M' for a man's voice.
callers object No Object with the list of personalized senders by country to be used in the call. If the sender is not specified for a specific country, the default sender will be used. In order to st-up a customized sender, please contact the support department. Example:

{"ES": "6123456789", "PT": "6987654321"}
scheduleDate string No Date of message sent 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 messages, this parameter does not have to be specified.
retries integer No Maximum number of retries. Maximum 5. If not specified, there will be no retries.
expirationDate string No To determine the latest date on which the call can be performed. After this date, the call will be cancelled. By specifying the period of validity, retries will be automatically attempted, making the call again if the recipient does not answer. The date should be in the following format YYYYmmddHHiiss (e.g. 20130215142000 would be 15 February 2013 at 14:20).
campaignName string No Campaign name. If specified, a campaign will be created with the name indicated in the dashboard and which will contain the mailing statistics. If a campaign with this name already exists, the mailing statistics will be added to the existing campaign.
tags array No campaignName is required if this parameter is specified. List of tags to add to the campaign. The tags can be used to filter the statistics in the dashboard.
sub array No array with substitution variables that will be applied to the message.
amd boolean No Answer Machine Detection (AMD): Detects if the call has been answered by an answering machine, if so, automatically ends the call. The default value is false.

Substitution variables

Custom variables can be indicated in the message body. These variables will be replaced by the contact's custom variables or by the variables indicated in the sub parameter. When using the sub parameter, the array must contain as many items as the send recipients.

Send Voice message with an audio file

POST https://dashboard.360nrs.com/api/rest/voiceAudio

curl -X POST 'https://dashboard.360nrs.com/api/rest/voiceAudio' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN' \
-d '{
  "to": ["34666666666"],
  "audioUrl": "https://example.com/audio.mp3"
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://dashboard.360nrs.com/api/rest/voiceAudio',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => '{
  "to": ["34666666666"],
  "audioUrl": "https://example.com/audio.mp3"
}',
  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("https://dashboard.360nrs.com/api/rest/voiceAudio");
      HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
      connection.setRequestMethod("POST");
      connection.setRequestProperty("Authorization", "Basic YOUR_AUTH_TOKEN");
      connection.setRequestProperty("Accept", "application/json");
      String requestBody = "{ \"to\": [\"34666666666\"], \"audioUrl\": \"https://example.com/audio.mp3\" }";
      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: 'https://dashboard.360nrs.com/api/rest/voiceAudio',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Basic YOUR_AUTH_TOKEN'
  },
  data: '{ "to": ["34666666666"], "audioUrl": "https://example.com/audio.mp3" }'
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
import requests

url = "https://dashboard.360nrs.com/api/rest/voiceAudio"

payload = "{ \"to\": [\"34666666666\"], \"audioUrl\": \"https://example.com/audio.mp3\" }"
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("https://dashboard.360nrs.com/api/rest/voiceAudio")

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 = "{ \"to\": [\"34666666666\"], \"audioUrl\": \"https://example.com/audio.mp3\" }"

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("https://dashboard.360nrs.com/api/rest/voiceAudio");
      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", "{ \"to\": [\"34666666666\"], \"audioUrl\": \"https://example.com/audio.mp3\" }",  ParameterType.RequestBody);
      IRestResponse response = client.Execute(request);
      Console.WriteLine(response.Content);
    }
  }
}

Response

HTTP Response Code 202 (ACCEPTED)

{
  "campaignId": 100000,
  "sendingId": 100001,
  "result": [
    {
      "accepted": true,
      "to": "34666666666",
      "id": "XXXXXXXXXXXXX",
      "scheduledAt": null,
      "expiresAt": null
    }
  ]
}

Error response (HTTP 400)

{
  "error": {
    "code": 102,
    "description": "No valid recipients"
  }
}

Parameters

Parameter Type Required Description
to array Yes Mobile phone number to receive message. Must include the prefix (e.g. in Spain 34666666666). This field allows you to specify multiple recipients.
audioUrl string Yes URL of the audio to be sent. Example: https://example.com/audio.mp3
callers object No Object with the list of personalized senders by country to be used in the call. If the sender is not specified for a specific country, the default sender will be used. In order to st-up a customized sender, please contact the support department. Example:

{"ES": "6123456789", "PT": "6987654321"}
scheduleDate string No Date of message sent 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 messages, this parameter does not have to be specified.
retries integer No Maximum number of retries. Maximum 5. If not specified, there will be no retries.
expirationDate string No To determine the latest date on which the call can be performed. After this date, the call will be cancelled. By specifying the period of validity, retries will be automatically attempted, making the call again if the recipient does not answer. The date should be in the following format YYYYmmddHHiiss (e.g. 20130215142000 would be 15 February 2013 at 14:20).
campaignName string No Campaign name. If specified, a campaign will be created with the name indicated in the dashboard and which will contain the mailing statistics. If a campaign with this name already exists, the mailing statistics will be added to the existing campaign.
tags array No campaignName is required if this parameter is specified. List of tags to add to the campaign. The tags can be used to filter the statistics in the dashboard.
amd boolean No Answer Machine Detection (AMD): Detects if the call has been answered by an answering machine, if so, automatically ends the call. The default value is false.

Retry Policy

If the maximum number of retries is specified in the optional retries variable, the system will automatically retry unanswered calls. This functionality does not generate additional costs, since only the calls that are answered by the recipient will be charged.

When the system detects that the call has not been answered, the call is repeated after 10 minutes. The time elapsed from the unanswered call to the retry time will vary depending on the existing queue, but it is always greater than 10 minutes.

Landing SMS

Send Landing SMS message

POST https://dashboard.360nrs.com/api/rest/landingsms

curl -X POST 'https://dashboard.360nrs.com/api/rest/landingsms' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN' \
-d '{
  "to": ["34666555444"],
  "message": "TEST API LANDING {LAND_URL}",
  "from": "LANDINGAPI",
  "templateBody": "<html><head><title>LANDING TEST</title></head><body><h1>HELLO LANDING</h1></body></html>"
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://dashboard.360nrs.com/api/rest/landingsms',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => '{
  "to": ["34666555444"],
  "message": "TEST API LANDING {LAND_URL}",
  "from": "LANDINGAPI",
  "templateBody": "<html><head><title>LANDING TEST</title></head><body><h1>HELLO LANDING</h1></body></html>"
}',
  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("https://dashboard.360nrs.com/api/rest/landingsms");
      HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
      connection.setRequestMethod("POST");
      connection.setRequestProperty("Authorization", "Basic YOUR_AUTH_TOKEN");
      connection.setRequestProperty("Accept", "application/json");
      String requestBody = "{ \"to\": [\"34666555444\"], \"message\": \"TEST API LANDING {LAND_URL}\", \"from\": \"LANDINGAPI\", \"templateBody\": \"<html><head><title>LANDING TEST</title></head><body><h1>HELLO LANDING</h1></body></html>\" }";
      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: 'https://dashboard.360nrs.com/api/rest/landingsms',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Basic YOUR_AUTH_TOKEN'
  },
  data: '{ "to": ["34666555444"], "message": "TEST API LANDING {LAND_URL}", "from": "LANDINGAPI", "templateBody": "<html><head><title>LANDING TEST</title></head><body><h1>HELLO LANDING</h1></body></html>" }'
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
import requests

url = "https://dashboard.360nrs.com/api/rest/landingsms"

payload = "{ \"to\": [\"34666555444\"], \"message\": \"TEST API LANDING {LAND_URL}\", \"from\": \"LANDINGAPI\", \"templateBody\": \"<html><head><title>LANDING TEST</title></head><body><h1>HELLO LANDING</h1></body></html>\" }"
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("https://dashboard.360nrs.com/api/rest/landingsms")

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 = "{ \"to\": [\"34666555444\"], \"message\": \"TEST API LANDING {LAND_URL}\", \"from\": \"LANDINGAPI\", \"templateBody\": \"<html><head><title>LANDING TEST</title></head><body><h1>HELLO LANDING</h1></body></html>\" }"

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("https://dashboard.360nrs.com/api/rest/landingsms");
      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", "{ \"to\": [\"34666555444\"], \"message\": \"TEST API LANDING {LAND_URL}\", \"from\": \"LANDINGAPI\", \"templateBody\": \"<html><head><title>LANDING TEST</title></head><body><h1>HELLO LANDING</h1></body></html>\" }",  ParameterType.RequestBody);
      IRestResponse response = client.Execute(request);
      Console.WriteLine(response.Content);
    }
  }
}

Response

HTTP Response Code 202 (ACCEPTED)

{
  "campaignId": 100000,
  "sendingId": 100001,
  "result": [
    {
      "accepted": true,
      "to": "34666555444",
      "id": "XXXXXXXXXXXXX",
      "parts": 1,
      "scheduledAt": null,
      "expiresAt": null
    }
  ]
}

HTTP Response Code 207 (MULTI-STATUS)

{
  "campaignId": 100000,
  "sendingId": 100001,
  "result": [
    {
      "accepted": true,
      "to": "34666555444",
      "id": "XXXXXXXXXXXXX",
      "parts": 1,
      "scheduledAt": null,
      "expiresAt": null
    },
    {
      "accepted": false,
      "to": "34",
      "error": {
        "code": 102,
        "description": "No valid recipients"
      }
    }
  ]
}

Error response (HTTP 400)

{
  "error": {
    "code": 102,
    "description": "No valid recipients"
  }
}

Parameters

Parameter Type Mandatory Description
message string Yes Text of message. At most, there can be 160 characters if it is not specified that the message is multi-part (see parts parameter). The text must be encoded in UTF-8
to array Yes Mobile phone number to receive message. Must include the prefix (e.g. in Spain 34666666666). This field allows you to specify multiple recipients.
from string Yes Sender text, this label will consist of 15 numbers or 11 alphanumeric characters.
encoding string No Possible values are 'gsm', 'gsm-pt' and 'utf-16'. The value gsm for normal mailings with GSM7 coding and 160 characters per message, and the value utf-16 for UCS2 (UTF16) coding and 70 characters per message. If not specified, the default value is gsm.
scheduleDate string No Date of message sent 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.
expirationDate string No Message expiration date in UTC. Format YYYYmmddHHiiss (e.g. 20130215142000 would be 15 February 2013 at 14:20:00).
parts integer No Indicates the maximum number of parts into which the scheduled message will be divided. This variable is set to 1 by default, so if it is not specified and a message over 160 characters for gsm encoding is sent, the message will fail. Keep in mind that concatenated messages may only be 153 characters per part in gsm and 67 characters per part in utf-16 and each part is charged as one message. The server will only use the minimum necessary parts for sending the text even if the specified number of parts is higher than necessary. If the number of parts is less than that required for sending the text, the message will fail with error 105. The maximum number of parts allowed is 8.
notificationUrl string No URL to receive delivery notifications.
trans integer No Possible values are 1 and 0. With value 0, the server does not change any character in the message, as this is the default value. With value 1, the server modifies the common invalid characters in GSM7 to valid characters with the following translation table: 'á' => 'a', 'í'=>'i', 'ó'=>'o', 'ú'=>'u', 'ç'=>'Ç', 'Á'=>'A', 'Í'=>'I', 'Ó'=>'O', 'Ú'=>'U', 'À'=>'A', 'È'=>'E', 'Ì'=>'I', 'Ò'=>'O', 'Ù'=>'U', 'º' => '', 'ª' => '', 'Õ' => 'O', 'õ' => 'o', 'â' => 'a', 'ê' => 'e', 'î'=>'i', 'ô'=>'o', 'û'=>'u', ' '=>'A', 'Ê'=>'E', 'Î'=>'I', 'Ô'=>'O', 'Û'=>'U', 'ã' => 'a', 'Ã' => 'A'.
campaignName string No Campaign name. If specified, a campaign will be created with the name indicated in the dashboard and which will contain the mailing statistics. If a campaign with this name already exists, the delivery statistics will be added to the existing campaign.
tags array No campaignName is required if this parameter is specified. List of tags to add to the campaign. The tags can be used to filter the statistics in the dashboard.
certified boolean No If it is specified as true, the message will be sent as certified.
* Certified messages have additional cost
sub array No array with substitution variables that will be applied to the message.
splitParts boolean No For messages that exceed the maximum SMS length, the server will split the message into multiple SMS instead of using concatenated SMS. The default value is false.
flash boolean No Flash SMS is a message that appears directly on the device screen. Depending on the model and operating system it is possible to store it in the inbox and send concatenated messages.
templateBody string No Content of the landing page in HTML format and UTF-8 encoding. Required without templateId.
templateId integer No Legacy template ID to send as the content of the landing page. Required without templateBody. This ID refers to templates created from the previous version (https://dashboard.360nrs.com) of the 360NRS application. It is recommended to use the templateV2Id parameter when possible.
templateV2Id integer No Template ID to send as the content of the landing page. Required without templateBody. This ID refers to the current version (https://app.360nrs.com) of the 360NRS application.

Substitution variables

When using the sub parameter, the array must contain as many items as the send recipients, using the following format:

{
  "from": "TEST",
  "to": ["34666555444", "34666555333"],
  "message": "Hello {name}",
  "sub": [
    {"name": "first contact name"},
    {"name": "second contact name"}
  ]
}

Custom variables can be indicated in the message body. These variables will be replaced by the contact's custom variables or by the variables indicated in the sub parameter.

Custom fields filters

It is possible to add the following filters to custom variables.

Filtro Description Example Result
lower Return lowercase text {name|lower} my name
upper Return text in uppercase {name|upper} MY NAME
capitalize Return the text with the first letter of the first word in uppercase {name|capitalize} My name
capitalizeAll Return the text with the first letter of each word in uppercase {name|capitalizeAll} My Name
formatDotComma Returns the number with a dot as thousands separator and comma as decimal separator {number|formatDotComma} 1.234,56
formatCommaDot Returns the number with a comma as thousands separator and dot as decimal separator {number|formatCommaDot} 1,234.56
shorten Returns a shortened url. It must be a valid url. {url|shorten} https://nrs.so/xxxxxx

WhatsApp

Send WhatsApp template

POST https://dashboard.360nrs.com/api/rest/whatsapp

curl -X POST 'https://dashboard.360nrs.com/api/rest/whatsapp' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN' \
-d '{
    "templateId": 123,
    "from": "34666777555",
    "messages": [
        {
            "to": "34666555444"
        }
    ]
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://dashboard.360nrs.com/api/rest/whatsapp',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => '{
    "templateId": 123,
    "from": "34666777555",
    "messages": [
        {
            "to": "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("https://dashboard.360nrs.com/api/rest/whatsapp");
      HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
      connection.setRequestMethod("POST");
      connection.setRequestProperty("Authorization", "Basic YOUR_AUTH_TOKEN");
      connection.setRequestProperty("Accept", "application/json");
      String requestBody = "{ \"templateId\": 123, \"from\": \"34666777555\", \"messages\": [ { \"to\": \"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: 'https://dashboard.360nrs.com/api/rest/whatsapp',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Basic YOUR_AUTH_TOKEN'
  },
  data: '{ "templateId": 123, "from": "34666777555", "messages": [ { "to": "34666555444" } ] }'
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
import requests

url = "https://dashboard.360nrs.com/api/rest/whatsapp"

payload = "{ \"templateId\": 123, \"from\": \"34666777555\", \"messages\": [ { \"to\": \"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("https://dashboard.360nrs.com/api/rest/whatsapp")

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 = "{ \"templateId\": 123, \"from\": \"34666777555\", \"messages\": [ { \"to\": \"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("https://dashboard.360nrs.com/api/rest/whatsapp");
      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", "{ \"templateId\": 123, \"from\": \"34666777555\", \"messages\": [ { \"to\": \"34666555444\" } ] }",  ParameterType.RequestBody);
      IRestResponse response = client.Execute(request);
      Console.WriteLine(response.Content);
    }
  }
}

Response

HTTP Response Code 202 (ACCEPTED)

{
  "campaignId": 100000,
  "sendingId": 100001,
  "result": [
    {
      "accepted": true,
      "to": "34666555444",
      "id": "04c80b02-8c0c-4884-bab8-89d6bc1fe406"
    }
  ]
}

HTTP Response Code 207 (MULTI-STATUS)

{
  "campaignId": 100000,
  "sendingId": 100001,
  "result": [
    {
      "accepted": true,
      "to": "34666555444",
      "id": "8b4e5d35-dc16-4e2e-8a9c-c222db81f5ba"
    },
    {
      "accepted": false,
      "to": "34",
      "error": {
        "code": 102,
        "description": "The messages.1.to field does not contain a valid phone number"
      }
    }
  ]
}

Error response (HTTP 400)

{
  "error": {
    "code": 140,
    "description": "Invalid template"
  }
}

Parameters

Parameter Type Mandatory Description
templateId integer Yes ID of the WhatsApp template to be sent. The template must be approved for sending from the platform.
from string Yes Sender of the message. The sender must be registered on the platform.
messages array Yes Array of messages to send.
messages.*.to string Yes Mobile phone number to receive message. Must include the international prefix (e.g. in Spain 34666666666).
messages.*.headerFields array No* Array of positional substitution variables to be applied to the header. Required for templates with header variables.
messages.*.bodyFields array No* Array of positional substitution variables to apply to the message body. Required for templates with message variables.
messages.*.callToActionFields array No* Array of positional substitution variables to apply to interaction buttons. Required for templates with action variables.
messages.*.defaultAnswer array No Default response to the user's first message.
messages.*.buttonAnswers array No Array of positional responses to quick answer buttons.
messages.*.location object No* Location information. Required for templates containing location.
messages.*.location.lat string No* Latitude of the geographic point. Required for templates containing location.
messages.*.location.long string No* Longitude of the geographical point. Required for templates containing location.
messages.*.location.name string No Name of the location.
messages.*.location.address string No Address of the location.
campaignName string No Campaign name. If specified, a campaign will be created with the name indicated in the dashboard and which will contain the mailing statistics. If a campaign with this name already exists, the delivery statistics will be added to the existing campaign.
tags array No campaignName is required if this parameter is specified. List of tags to add to the campaign. The tags can be used to filter the statistics in the dashboard.

Sending examples

Examples of sending various types of WhatsApp templates.

Sending template with variables and auto-answers.

{
  "templateId": 123,
  "from": "34666777555",
  "messages": [
    {
      "to": "34666555444",
      "headerFields": ["headerField1"],
      "bodyFields": ["bodyField1", "bodyField2"],
      "callToActionFields": ["actionField1"],
      "defaultAnswer": "Example answer",
      "buttonAnswers": [
        "first button answer",
        "second button answer",
      ]
    }
  ]
}

Sending template with location.

{
  "templateId": 123,
  "from": "34666777555",
  "messages": [
    {
      "to": "34666555444",
      "location": {
        "lat": "39.92516922986921",
        "long": "-0.10572674363232447",
        "name": "NRS-Group",
        "address": "Carrer, Av. Arcadi Garcia Sanz, 19, 12540 Vila-real, Castelló"
      }
    }
  ]
}

Sending template with authentication code.

{
  "templateId": 123,
  "from": "34666777555",
  "messages": [
    {
      "to": "34666555444",
      "bodyFields": ["auth_code"]
    }
  ]
}

Conversation list

GET https://dashboard.360nrs.com/api/rest/whatsapp/conversations

curl -X GET 'https://dashboard.360nrs.com/api/rest/whatsapp/conversations' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://dashboard.360nrs.com/api/rest/whatsapp/conversations',
  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("https://dashboard.360nrs.com/api/rest/whatsapp/conversations");
      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: 'https://dashboard.360nrs.com/api/rest/whatsapp/conversations',
  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 = "https://dashboard.360nrs.com/api/rest/whatsapp/conversations"

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("https://dashboard.360nrs.com/api/rest/whatsapp/conversations")

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("https://dashboard.360nrs.com/api/rest/whatsapp/conversations");
      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": [
    {
      "from": "34666777555",
      "to": "34666555444",
      "totalMessages": 10,
      "status": "OPEN",
      "isSessionActive": true,
      "sessionExpiresAt": "2024-01-02T10:00:00+00:00",
      "createdAt": "2024-01-01T10:00:00+00:00",
      "updatedAt": "2024-01-01T10:00:00+00:00",
      "links": {
        "messages": "https://dashboard.360nrs.com/api/rest/whatsapp/conversations/34666777555/34666555444/messages"
      },
      "contact": {
        "data": {
          "msisdn": "34666555444",
          "firstName": "First",
          "lastName": "Last",
          "email": "email@example.com",
          "interest": "Interest example",
          "comment": "Comment example",
          "country": "ES"
        }
      }
    }
  ],
  "meta": {
    "pagination": {
      "total": 500,
      "count": 100,
      "per_page": 100,
      "current_page": 1,
      "total_pages": 5,
      "links": {
        "next": "https://dashboard.360nrs.com/api/rest/whatsapp/conversations&page=2"
      }
    }
  }
}

Filters

Parameter Description
limit Total number of conversations to display in a single request. Default value: 100. Maximum: 1000.
from Filter by sender.
to Filter by recipient.

Show a conversation

GET https://dashboard.360nrs.com/api/rest/whatsapp/conversations/<from>/<to>

curl -X GET 'https://dashboard.360nrs.com/api/rest/whatsapp/conversations/34666777555/34666555444' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://dashboard.360nrs.com/api/rest/whatsapp/conversations/34666777555/34666555444',
  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("https://dashboard.360nrs.com/api/rest/whatsapp/conversations/34666777555/34666555444");
      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: 'https://dashboard.360nrs.com/api/rest/whatsapp/conversations/34666777555/34666555444',
  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 = "https://dashboard.360nrs.com/api/rest/whatsapp/conversations/34666777555/34666555444"

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("https://dashboard.360nrs.com/api/rest/whatsapp/conversations/34666777555/34666555444")

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("https://dashboard.360nrs.com/api/rest/whatsapp/conversations/34666777555/34666555444");
      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": {
    "from": "34666777555",
    "to": "34666555444",
    "totalMessages": 10,
    "status": "OPEN",
    "isSessionActive": true,
    "sessionExpiresAt": "2024-01-02T10:00:00+00:00",
    "createdAt": "2024-01-01T10:00:00+00:00",
    "updatedAt": "2024-01-01T10:00:00+00:00",
    "links": {
      "messages": "https://dashboard.360nrs.com/api/rest/whatsapp/conversations/34666777555/34666555444/messages"
    },
    "contact": {
      "data": {
        "msisdn": "34666555444",
        "firstName": "First",
        "lastName": "Last",
        "email": "email@example.com",
        "interest": "Interest example",
        "comment": "Comment example",
        "country": "ES"
      }
    }
  }
}

Show the messages in a conversation

GET https://dashboard.360nrs.com/api/rest/whatsapp/conversations/<from>/<to>/messages

curl -X GET 'https://dashboard.360nrs.com/api/rest/whatsapp/conversations/34666777555/34666555444/messages' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://dashboard.360nrs.com/api/rest/whatsapp/conversations/34666777555/34666555444/messages',
  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("https://dashboard.360nrs.com/api/rest/whatsapp/conversations/34666777555/34666555444/messages");
      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: 'https://dashboard.360nrs.com/api/rest/whatsapp/conversations/34666777555/34666555444/messages',
  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 = "https://dashboard.360nrs.com/api/rest/whatsapp/conversations/34666777555/34666555444/messages"

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("https://dashboard.360nrs.com/api/rest/whatsapp/conversations/34666777555/34666555444/messages")

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("https://dashboard.360nrs.com/api/rest/whatsapp/conversations/34666777555/34666555444/messages");
      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": "f564433e-7cd1-47fa-af98-1bd632411b26",
      "type": "text",
      "msisdn": "34666555444",
      "content": "User response",
      "reactions": [],
      "sentAt": "2024-01-01T11:00:00+00:00",
      "deliveredAt": "2024-01-01T11:00:00+00:00",
      "readAt": "2024-01-01T11:01:00+00:00",
      "failedAt": null
    },
    {
      "id": "a8249e62-55a8-4f17-bf6c-c7ad2d844374",
      "type": "template",
      "msisdn": "34666777555",
      "content": "Template content",
      "reactions": ["👍"],
      "sentAt": "2024-01-01T10:00:00+00:00",
      "deliveredAt": "2024-01-01T10:00:00+00:00",
      "readAt": "2024-01-01T10:01:00+00:00",
      "failedAt": null
    }
  ],
  "meta": {
    "status": "OPEN",
    "isSessionActive": true,
    "sessionExpiresAt": "2024-01-02T10:00:00+00:00",
    "pagination": {
      "total": 500,
      "count": 100,
      "per_page": 100,
      "current_page": 1,
      "total_pages": 5,
      "links": {
        "next": "https://dashboard.360nrs.com/api/rest/whatsapp/conversations/34666777555/34666555444/messages&page=2"
      }
    }
  }
}

Filters

Parameter Description
limit Total number of messages to display in a single request. Default value: 100. Maximum: 1000.

Send a message to a conversation

POST https://dashboard.360nrs.com/api/rest/whatsapp/conversations/<from>/<to>/messages

curl -X POST 'https://dashboard.360nrs.com/api/rest/whatsapp/conversations/34666777555/34666555444/messages' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN' \
-d '{
    "content": "Message content"
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://dashboard.360nrs.com/api/rest/whatsapp/conversations/34666777555/34666555444/messages',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => '{
    "content": "Message content"
}',
  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("https://dashboard.360nrs.com/api/rest/whatsapp/conversations/34666777555/34666555444/messages");
      HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
      connection.setRequestMethod("POST");
      connection.setRequestProperty("Authorization", "Basic YOUR_AUTH_TOKEN");
      connection.setRequestProperty("Accept", "application/json");
      String requestBody = "{ \"content\": \"Message content\" }";
      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: 'https://dashboard.360nrs.com/api/rest/whatsapp/conversations/34666777555/34666555444/messages',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Basic YOUR_AUTH_TOKEN'
  },
  data: '{ "content": "Message content" }'
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
import requests

url = "https://dashboard.360nrs.com/api/rest/whatsapp/conversations/34666777555/34666555444/messages"

payload = "{ \"content\": \"Message content\" }"
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("https://dashboard.360nrs.com/api/rest/whatsapp/conversations/34666777555/34666555444/messages")

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 = "{ \"content\": \"Message content\" }"

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("https://dashboard.360nrs.com/api/rest/whatsapp/conversations/34666777555/34666555444/messages");
      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", "{ \"content\": \"Message content\" }",  ParameterType.RequestBody);
      IRestResponse response = client.Execute(request);
      Console.WriteLine(response.Content);
    }
  }
}

Parameters

Parameter Type Mandatory Description
content string Yes Content of the message. You can change the text format of your messages.

Scheduled messages

List

GET https://dashboard.360nrs.com/api/rest/scheduled

curl -X GET 'https://dashboard.360nrs.com/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 => 'https://dashboard.360nrs.com/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("https://dashboard.360nrs.com/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: 'https://dashboard.360nrs.com/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 = "https://dashboard.360nrs.com/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("https://dashboard.360nrs.com/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("https://dashboard.360nrs.com/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": "360NRS",
        "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 https://dashboard.360nrs.com/api/rest/scheduled

curl -X PUT 'https://dashboard.360nrs.com/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 => 'https://dashboard.360nrs.com/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("https://dashboard.360nrs.com/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: 'https://dashboard.360nrs.com/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 = "https://dashboard.360nrs.com/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("https://dashboard.360nrs.com/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("https://dashboard.360nrs.com/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 https://dashboard.360nrs.com/api/rest/scheduled

curl -X DELETE 'https://dashboard.360nrs.com/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 => 'https://dashboard.360nrs.com/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("https://dashboard.360nrs.com/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: 'https://dashboard.360nrs.com/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 = "https://dashboard.360nrs.com/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("https://dashboard.360nrs.com/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("https://dashboard.360nrs.com/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 https://dashboard.360nrs.com/api/rest/campaigns

curl -X GET 'https://dashboard.360nrs.com/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 => 'https://dashboard.360nrs.com/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("https://dashboard.360nrs.com/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: 'https://dashboard.360nrs.com/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 = "https://dashboard.360nrs.com/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("https://dashboard.360nrs.com/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("https://dashboard.360nrs.com/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": "https://dashboard.360nrs.com/api/rest/campaigns/1",
        "sendings": "https://dashboard.360nrs.com/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": "https://dashboard.360nrs.com/api/rest/sendings/1",
              "eventsReport": "https://dashboard.360nrs.com/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, apppush, webpush Example: ?channel=sms
beforeDate Show results prior to the indicated 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 date. The date must be specified in ISO 8601 format. Example: ?afterDate=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 y text2speech.
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 text2speech.
opened_unique: Total of unique openings. Not applicable to sms and text2speech.
clicked: The contact has clicked on a link included in the message. Not applicable to sms and text2speech.
clicked_unique: Total of unique clicks. Not applicable to sms and text2speech.
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 https://dashboard.360nrs.com/api/rest/contacts

curl -X GET 'https://dashboard.360nrs.com/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 => 'https://dashboard.360nrs.com/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("https://dashboard.360nrs.com/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: 'https://dashboard.360nrs.com/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 = "https://dashboard.360nrs.com/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("https://dashboard.360nrs.com/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("https://dashboard.360nrs.com/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": "https://dashboard.360nrs.com/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.
email 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 https://dashboard.360nrs.com/api/rest/contacts/<ID>

curl -X GET 'https://dashboard.360nrs.com/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 => 'https://dashboard.360nrs.com/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("https://dashboard.360nrs.com/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: 'https://dashboard.360nrs.com/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 = "https://dashboard.360nrs.com/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("https://dashboard.360nrs.com/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("https://dashboard.360nrs.com/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 https://dashboard.360nrs.com/api/rest/contacts

curl -X POST 'https://dashboard.360nrs.com/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 => 'https://dashboard.360nrs.com/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("https://dashboard.360nrs.com/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: 'https://dashboard.360nrs.com/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 = "https://dashboard.360nrs.com/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("https://dashboard.360nrs.com/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("https://dashboard.360nrs.com/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": "https://dashboard.360nrs.com/api/rest/contacts/1"
    }
  }
}

Error response

{
  "error": {
    "code": 422,
    "description": "The email field is required."
  }
}

Parameters

Parameter Type Required Description
email 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 https://dashboard.360nrs.com/api/rest/contacts/<ID>

curl -X PUT 'https://dashboard.360nrs.com/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 => 'https://dashboard.360nrs.com/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("https://dashboard.360nrs.com/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: 'https://dashboard.360nrs.com/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 = "https://dashboard.360nrs.com/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("https://dashboard.360nrs.com/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("https://dashboard.360nrs.com/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": "https://dashboard.360nrs.com/api/rest/contacts/1"
    }
  }
}

Error response

{
  "error": {
    "code": 422,
    "description": "The email field is required."
  }
}

Parameters

Parameter Type Required Description
email 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 https://dashboard.360nrs.com/api/rest/contacts/<ID>

curl -X DELETE 'https://dashboard.360nrs.com/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 => 'https://dashboard.360nrs.com/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("https://dashboard.360nrs.com/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: 'https://dashboard.360nrs.com/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 = "https://dashboard.360nrs.com/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("https://dashboard.360nrs.com/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("https://dashboard.360nrs.com/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 https://dashboard.360nrs.com/api/rest/groups

curl -X GET 'https://dashboard.360nrs.com/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 => 'https://dashboard.360nrs.com/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("https://dashboard.360nrs.com/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: 'https://dashboard.360nrs.com/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 = "https://dashboard.360nrs.com/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("https://dashboard.360nrs.com/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("https://dashboard.360nrs.com/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": "https://dashboard.360nrs.com/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 https://dashboard.360nrs.com/api/rest/groups/<ID>

curl -X GET 'https://dashboard.360nrs.com/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 => 'https://dashboard.360nrs.com/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("https://dashboard.360nrs.com/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: 'https://dashboard.360nrs.com/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 = "https://dashboard.360nrs.com/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("https://dashboard.360nrs.com/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("https://dashboard.360nrs.com/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 https://dashboard.360nrs.com/api/rest/groups

curl -X POST 'https://dashboard.360nrs.com/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 => 'https://dashboard.360nrs.com/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("https://dashboard.360nrs.com/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: 'https://dashboard.360nrs.com/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 = "https://dashboard.360nrs.com/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("https://dashboard.360nrs.com/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("https://dashboard.360nrs.com/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 https://dashboard.360nrs.com/api/rest/groups/<ID>

curl -X PUT 'https://dashboard.360nrs.com/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 => 'https://dashboard.360nrs.com/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("https://dashboard.360nrs.com/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: 'https://dashboard.360nrs.com/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 = "https://dashboard.360nrs.com/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("https://dashboard.360nrs.com/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("https://dashboard.360nrs.com/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 https://dashboard.360nrs.com/api/rest/groups/<ID>

curl -X DELETE 'https://dashboard.360nrs.com/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 => 'https://dashboard.360nrs.com/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("https://dashboard.360nrs.com/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: 'https://dashboard.360nrs.com/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 = "https://dashboard.360nrs.com/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("https://dashboard.360nrs.com/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("https://dashboard.360nrs.com/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.

Email validation

Validation list

GET https://dashboard.360nrs.com/api/rest/validation/emails

curl -X GET 'https://dashboard.360nrs.com/api/rest/validation/emails' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://dashboard.360nrs.com/api/rest/validation/emails',
  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("https://dashboard.360nrs.com/api/rest/validation/emails");
      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: 'https://dashboard.360nrs.com/api/rest/validation/emails',
  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 = "https://dashboard.360nrs.com/api/rest/validation/emails"

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("https://dashboard.360nrs.com/api/rest/validation/emails")

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("https://dashboard.360nrs.com/api/rest/validation/emails");
      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 (HTTP 200)

{
  "data": [
    {
      "id": 1,
      "status": "finished",
      "total": 10,
      "processed": 10,
      "valid": 9,
      "estimatedCost": 0.03,
      "cost": 0.03,
      "currency": "EUR",
      "createdAt": "2018-09-20T08:30:54+00:00",
      "updatedAt": "2018-09-20T08:31:00+00:00",
      "finishedAt": "2018-09-20T08:31:00+00:00",
      "resultUrl": "https://dashboard.360nrs.com/api/rest/validation/emails/1/result"
    }
  ],
  "meta": {
    "pagination": {
      "total": 500,
      "count": 100,
      "per_page": 100,
      "current_page": 1,
      "total_pages": 5,
      "links": {
        "next": "https://dashboard.360nrs.com/api/rest/validation/emails?page=2"
      }
    }
  }
}

Show a validation

GET https://dashboard.360nrs.com/api/rest/validation/emails/<ID>

curl -X GET 'https://dashboard.360nrs.com/api/rest/validation/emails/123' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://dashboard.360nrs.com/api/rest/validation/emails/123',
  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("https://dashboard.360nrs.com/api/rest/validation/emails/123");
      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: 'https://dashboard.360nrs.com/api/rest/validation/emails/123',
  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 = "https://dashboard.360nrs.com/api/rest/validation/emails/123"

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("https://dashboard.360nrs.com/api/rest/validation/emails/123")

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("https://dashboard.360nrs.com/api/rest/validation/emails/123");
      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 (HTTP 200)

{
  "data": {
    "id": 1,
    "status": "finished",
    "total": 2,
    "processed": 2,
    "valid": 1,
    "estimatedCost": 0.007,
    "cost": 0.007,
    "currency": "EUR",
    "createdAt": "2018-09-20T08:30:54+00:00",
    "updatedAt": "2018-09-20T08:31:00+00:00",
    "finishedAt": "2018-09-20T08:31:00+00:00",
    "resultUrl": "https://dashboard.360nrs.com/api/rest/validation/emails/1/result"
  }
}

Validation results (CSV)

GET https://dashboard.360nrs.com/api/rest/validation/emails/<ID>/result

curl -X GET 'https://dashboard.360nrs.com/api/rest/validation/emails/123/result' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://dashboard.360nrs.com/api/rest/validation/emails/123/result',
  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("https://dashboard.360nrs.com/api/rest/validation/emails/123/result");
      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: 'https://dashboard.360nrs.com/api/rest/validation/emails/123/result',
  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 = "https://dashboard.360nrs.com/api/rest/validation/emails/123/result"

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("https://dashboard.360nrs.com/api/rest/validation/emails/123/result")

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("https://dashboard.360nrs.com/api/rest/validation/emails/123/result");
      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);
    }
  }
}

Response (HTTP 200)

email;result
valid@example.com;deliverable
notvalid@example.com;undeliverable
unknown@example.com;risky

Validate emails

POST https://dashboard.360nrs.com/api/rest/validation/emails

curl -X POST 'https://dashboard.360nrs.com/api/rest/validation/emails' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN' \
-d '{
    "groupsIds": [1111],
    "force": false,
    "notificationUrl": "https://example.com/notificationUrl"
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://dashboard.360nrs.com/api/rest/validation/emails',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => '{
    "groupsIds": [1111],
    "force": false,
    "notificationUrl": "https://example.com/notificationUrl"
}',
  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("https://dashboard.360nrs.com/api/rest/validation/emails");
      HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
      connection.setRequestMethod("POST");
      connection.setRequestProperty("Authorization", "Basic YOUR_AUTH_TOKEN");
      connection.setRequestProperty("Accept", "application/json");
      String requestBody = "{ \"groupsIds\": [1111], \"force\": false, \"notificationUrl\": \"https://example.com/notificationUrl\" }";
      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: 'https://dashboard.360nrs.com/api/rest/validation/emails',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Basic YOUR_AUTH_TOKEN'
  },
  data: '{ "groupsIds": [1111], "force": false, "notificationUrl": "https://example.com/notificationUrl" }'
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
import requests

url = "https://dashboard.360nrs.com/api/rest/validation/emails"

payload = "{ \"groupsIds\": [1111], \"force\": false, \"notificationUrl\": \"https://example.com/notificationUrl\" }"
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("https://dashboard.360nrs.com/api/rest/validation/emails")

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 = "{ \"groupsIds\": [1111], \"force\": false, \"notificationUrl\": \"https://example.com/notificationUrl\" }"

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("https://dashboard.360nrs.com/api/rest/validation/emails");
      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", "{ \"groupsIds\": [1111], \"force\": false, \"notificationUrl\": \"https://example.com/notificationUrl\" }",  ParameterType.RequestBody);
      IRestResponse response = client.Execute(request);
      Console.WriteLine(response.Content);
    }
  }
}

Response

{
  "data": {
    "id": 2,
    "status": "pending",
    "total": 1,
    "processed": 0,
    "valid": 0,
    "estimatedCost": 0.0035,
    "cost": 0,
    "currency": "EUR",
    "createdAt": "2018-09-20T10:03:22+00:00",
    "updatedAt": "2018-09-20T10:03:22+00:00",
    "finishedAt": null,
    "resultUrl": null
  }
}

The validation is done in the following way, a request is made indicating the group IDs or emails to validate. It is possible to validate one or more groups. It is possible to validate one or more emails.

If the request is correct, the request will return the status "pending", which means that it is queued to be processed.

Once the validation process starts, it will notify with an "started" status and when it finishes it will notify with "finished" with the data with the total of processed and the total of valid among other data. Also in the "finished" notification the url will be received in order to obtain the complete detail.

Parameters

Parameter Type Mandatory Description
groupsIds array No (whenever there are emails) List of groups to be validated (consult groups endpoint) within the contacts API.
emails array No (whenever there are groupIds) List of emails to validate.
force boolean No In case of being true, emails that have already been verified will be verified. Default value false.
notificationUrl string No Callback URL in which progress notifications will be received (see notification annex)

Delete a validation

DELETE https://dashboard.360nrs.com/api/rest/validation/emails/<ID>

curl -X DELETE 'https://dashboard.360nrs.com/api/rest/validation/emails/123' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://dashboard.360nrs.com/api/rest/validation/emails/123',
  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("https://dashboard.360nrs.com/api/rest/validation/emails/123");
      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: 'https://dashboard.360nrs.com/api/rest/validation/emails/123',
  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 = "https://dashboard.360nrs.com/api/rest/validation/emails/123"

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("https://dashboard.360nrs.com/api/rest/validation/emails/123")

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("https://dashboard.360nrs.com/api/rest/validation/emails/123");
      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);
    }
  }
}

It is possible to eliminate a validation from your list of validations.

If the request has been successful, it will respond with an HTTP 204 code.

Notification examples

Notification STARTED

{
  "data": {
    "id": 2,
    "status": "started",
    "total": 1,
    "processed": 0,
    "valid": 0,
    "estimatedCost": 0.0035,
    "cost": 0.0035,
    "currency": "EUR",
    "createdAt": "2018-09-20T10:03:22+00:00",
    "updatedAt": "2018-09-20T10:03:22+00:00",
    "finishedAt": null,
    "resultUrl": null,
    "error": ""
  }
}

Notification FINISHED

{
  "data": {
    "id": 2,
    "status": "finished",
    "total": 1,
    "processed": 1,
    "valid": 1,
    "estimatedCost": 0.0035,
    "cost": 0.0035,
    "currency": "EUR",
    "createdAt": "2018-09-20T07:23:19+00:00",
    "updatedAt": "2018-09-20T07:23:56+00:00",
    "finishedAt": "2018-09-20T07:23:56+00:00",
    "resultUrl": "https://dashboard.360nrs.com/api/rest/validation/emails/2/result",
    "error": ""
  }
}

Notification FAILED

{
  "data": {
    "id": 2,
    "status": "failed",
    "total": 1,
    "processed": 0,
    "valid": 0,
    "estimatedCost": 0.0035,
    "cost": 0,
    "currency": "EUR",
    "createdAt": "2018-09-20T10:03:22+00:00",
    "updatedAt": "2018-09-20T10:03:22+00:00",
    "finishedAt": null,
    "resultUrl": null,
    "error": "Failed to process email validation"
  }
}

Blacklist

Listing of contacts in the blacklist

GET https://dashboard.360nrs.com/api/rest/v2/blacklist/{type}

curl -X GET 'https://dashboard.360nrs.com/api/rest/v2/blacklist/mailing' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://dashboard.360nrs.com/api/rest/v2/blacklist/mailing',
  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("https://dashboard.360nrs.com/api/rest/v2/blacklist/mailing");
      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: 'https://dashboard.360nrs.com/api/rest/v2/blacklist/mailing',
  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 = "https://dashboard.360nrs.com/api/rest/v2/blacklist/mailing"

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("https://dashboard.360nrs.com/api/rest/v2/blacklist/mailing")

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("https://dashboard.360nrs.com/api/rest/v2/blacklist/mailing");
      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": "mailing",
      "recipient": "test@example.com",
      "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": "https://dashboard.360nrs.com/api/rest/v2/blacklist/mailing?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 https://dashboard.360nrs.com/api/rest/v2/blacklist/{type}

curl -X PUT 'https://dashboard.360nrs.com/api/rest/v2/blacklist/mailing' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN' \
-d '{
  "recipient": "test@example.com"
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://dashboard.360nrs.com/api/rest/v2/blacklist/mailing',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => 'PUT',
  CURLOPT_POSTFIELDS => '{
  "recipient": "test@example.com"
}',
  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("https://dashboard.360nrs.com/api/rest/v2/blacklist/mailing");
      HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
      connection.setRequestMethod("PUT");
      connection.setRequestProperty("Authorization", "Basic YOUR_AUTH_TOKEN");
      connection.setRequestProperty("Accept", "application/json");
      String requestBody = "{ \"recipient\": \"test@example.com\" }";
      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: 'https://dashboard.360nrs.com/api/rest/v2/blacklist/mailing',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Basic YOUR_AUTH_TOKEN'
  },
  data: '{ "recipient": "test@example.com" }'
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
import requests

url = "https://dashboard.360nrs.com/api/rest/v2/blacklist/mailing"

payload = "{ \"recipient\": \"test@example.com\" }"
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("https://dashboard.360nrs.com/api/rest/v2/blacklist/mailing")

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\": \"test@example.com\" }"

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("https://dashboard.360nrs.com/api/rest/v2/blacklist/mailing");
      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\": \"test@example.com\" }",  ParameterType.RequestBody);
      IRestResponse response = client.Execute(request);
      Console.WriteLine(response.Content);
    }
  }
}

Response (HTTP 200)

{
  "data": {
    "type": "mailing",
    "recipient": "test@example.com",
    "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 https://dashboard.360nrs.com/api/rest/v2/blacklist/{type}

curl -X DELETE 'https://dashboard.360nrs.com/api/rest/v2/blacklist/mailing' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN' \
-d '{
  "recipient": "test@example.com"
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://dashboard.360nrs.com/api/rest/v2/blacklist/mailing',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => 'DELETE',
  CURLOPT_POSTFIELDS => '{
  "recipient": "test@example.com"
}',
  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("https://dashboard.360nrs.com/api/rest/v2/blacklist/mailing");
      HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
      connection.setRequestMethod("DELETE");
      connection.setRequestProperty("Authorization", "Basic YOUR_AUTH_TOKEN");
      connection.setRequestProperty("Accept", "application/json");
      String requestBody = "{ \"recipient\": \"test@example.com\" }";
      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: 'https://dashboard.360nrs.com/api/rest/v2/blacklist/mailing',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Basic YOUR_AUTH_TOKEN'
  },
  data: '{ "recipient": "test@example.com" }'
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
import requests

url = "https://dashboard.360nrs.com/api/rest/v2/blacklist/mailing"

payload = "{ \"recipient\": \"test@example.com\" }"
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("https://dashboard.360nrs.com/api/rest/v2/blacklist/mailing")

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\": \"test@example.com\" }"

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("https://dashboard.360nrs.com/api/rest/v2/blacklist/mailing");
      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\": \"test@example.com\" }",  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

Templates

List templates

GET https://dashboard.360nrs.com/api/rest/templates

curl -X GET 'https://dashboard.360nrs.com/api/rest/templates' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://dashboard.360nrs.com/api/rest/templates',
  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("https://dashboard.360nrs.com/api/rest/templates");
      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: 'https://dashboard.360nrs.com/api/rest/templates',
  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 = "https://dashboard.360nrs.com/api/rest/templates"

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("https://dashboard.360nrs.com/api/rest/templates")

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("https://dashboard.360nrs.com/api/rest/templates");
      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": "Template 1",
      "html": "<h1>Hello world</h1>",
      "createdAt": "2018-08-17T12:31:10+00:00",
      "updatedAt": null
    }
  ],
  "meta": {
    "pagination": {
      "total": 1,
      "count": 1,
      "per_page": 100,
      "current_page": 1,
      "total_pages": 1,
      "links": []
    }
  }
}

Show a template

GET https://dashboard.360nrs.com/api/rest/templates/<ID>

curl -X GET 'https://dashboard.360nrs.com/api/rest/templates/1' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://dashboard.360nrs.com/api/rest/templates/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("https://dashboard.360nrs.com/api/rest/templates/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: 'https://dashboard.360nrs.com/api/rest/templates/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 = "https://dashboard.360nrs.com/api/rest/templates/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("https://dashboard.360nrs.com/api/rest/templates/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("https://dashboard.360nrs.com/api/rest/templates/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 (HTTP 200)

{
  "data": {
    "id": 1,
    "name": "Template 1",
    "html": "<h1>Hello world</h1>",
    "createdAt": "2018-08-17T12:31:10+00:00",
    "updatedAt": null
  }
}

Create a new template

POST https://dashboard.360nrs.com/api/rest/templates

curl -X POST 'https://dashboard.360nrs.com/api/rest/templates' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN' \
-d '{
  "name": "New Template",
  "html": "<h1>Hello world</h1>"    
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://dashboard.360nrs.com/api/rest/templates',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => '{
  "name": "New Template",
  "html": "<h1>Hello world</h1>"    
}',
  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("https://dashboard.360nrs.com/api/rest/templates");
      HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
      connection.setRequestMethod("POST");
      connection.setRequestProperty("Authorization", "Basic YOUR_AUTH_TOKEN");
      connection.setRequestProperty("Accept", "application/json");
      String requestBody = "{ \"name\": \"New Template\", \"html\": \"<h1>Hello world</h1>\" }";
      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: 'https://dashboard.360nrs.com/api/rest/templates',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Basic YOUR_AUTH_TOKEN'
  },
  data: '{ "name": "New Template", "html": "<h1>Hello world</h1>" }'
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
import requests

url = "https://dashboard.360nrs.com/api/rest/templates"

payload = "{ \"name\": \"New Template\", \"html\": \"<h1>Hello world</h1>\" }"
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("https://dashboard.360nrs.com/api/rest/templates")

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\": \"New Template\", \"html\": \"<h1>Hello world</h1>\" }"

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("https://dashboard.360nrs.com/api/rest/templates");
      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\": \"New Template\", \"html\": \"<h1>Hello world</h1>\" }",  ParameterType.RequestBody);
      IRestResponse response = client.Execute(request);
      Console.WriteLine(response.Content);
    }
  }
}

Response (HTTP 201)

{
  "data": {
    "id": 1,
    "name": "New Template",
    "html": "<h1>Hello world</h1>",
    "createdAt": "2020-01-00T00:00:00+00:00",
    "updatedAt": "2020-01-00T00:00:00+00:00",
    "links": {
      "self": "https://dashboard.360nrs.com/api/rest/templates/1",
      "preview": "https://dashboard.360nrs.com/api/rest/templates/1/preview"
    }
  }
}
Parameter Type Required Description
name string Yes Template Name.
html string Yes Content of the template in HTML format and UTF-8 coding.

Update a template

PUT https://dashboard.360nrs.com/api/rest/templates/<ID>

curl -X PUT 'https://dashboard.360nrs.com/api/rest/templates/1' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN' \
-d '{
  "name": "New Template",
  "html": "<h1>Hello world</h1>"    
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://dashboard.360nrs.com/api/rest/templates/1',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => 'PUT',
  CURLOPT_POSTFIELDS => '{
  "name": "New Template",
  "html": "<h1>Hello world</h1>"    
}',
  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("https://dashboard.360nrs.com/api/rest/templates/1");
      HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
      connection.setRequestMethod("PUT");
      connection.setRequestProperty("Authorization", "Basic YOUR_AUTH_TOKEN");
      connection.setRequestProperty("Accept", "application/json");
      String requestBody = "{ \"name\": \"New Template\", \"html\": \"<h1>Hello world</h1>\" }";
      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: 'https://dashboard.360nrs.com/api/rest/templates/1',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Basic YOUR_AUTH_TOKEN'
  },
  data: '{ "name": "New Template", "html": "<h1>Hello world</h1>" }'
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
import requests

url = "https://dashboard.360nrs.com/api/rest/templates/1"

payload = "{ \"name\": \"New Template\", \"html\": \"<h1>Hello world</h1>\" }"
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("https://dashboard.360nrs.com/api/rest/templates/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 = "{ \"name\": \"New Template\", \"html\": \"<h1>Hello world</h1>\" }"

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("https://dashboard.360nrs.com/api/rest/templates/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", "{ \"name\": \"New Template\", \"html\": \"<h1>Hello world</h1>\" }",  ParameterType.RequestBody);
      IRestResponse response = client.Execute(request);
      Console.WriteLine(response.Content);
    }
  }
}

Response (HTTP 201)

{
  "data": {
    "id": 1,
    "name": "New Template",
    "html": "<h1>Hello world</h1>",
    "createdAt": "2020-01-00T00:00:00+00:00",
    "updatedAt": "2020-01-00T00:00:00+00:00",
    "links": {
      "self": "https://dashboard.360nrs.com/api/rest/templates/1",
      "preview": "https://dashboard.360nrs.com/api/rest/templates/1/preview"
    }
  }
}
Parameter Type Required Description
name string Yes Template Name.
html string Yes Content of the template in HTML format and UTF-8 coding.

Delete a template

DELETE https://dashboard.360nrs.com/api/rest/templates/<ID>

curl -X DELETE 'https://dashboard.360nrs.com/api/rest/templates/1' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://dashboard.360nrs.com/api/rest/templates/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("https://dashboard.360nrs.com/api/rest/templates/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: 'https://dashboard.360nrs.com/api/rest/templates/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 = "https://dashboard.360nrs.com/api/rest/templates/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("https://dashboard.360nrs.com/api/rest/templates/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("https://dashboard.360nrs.com/api/rest/templates/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.

Preview a template

GET https://dashboard.360nrs.com/api/rest/templates/<ID>/preview

curl -X GET 'https://dashboard.360nrs.com/api/rest/templates/1/preview' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://dashboard.360nrs.com/api/rest/templates/1/preview',
  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("https://dashboard.360nrs.com/api/rest/templates/1/preview");
      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: 'https://dashboard.360nrs.com/api/rest/templates/1/preview',
  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 = "https://dashboard.360nrs.com/api/rest/templates/1/preview"

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("https://dashboard.360nrs.com/api/rest/templates/1/preview")

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("https://dashboard.360nrs.com/api/rest/templates/1/preview");
      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);
    }
  }
}

The response will contain a preview of the template in HTML format.

Custom variables

Custom variables can be used on templates. These variables will be replaced by the contact's custom fields before sending by using the syntax {variable}.

For example, to include the custom variable "name" in a HTML template:

<html>
<head>
    <title>TEST</title>
</head>
<body>
    <h1>Hello {name}</h1>
</body>
</html>

The templates accept the following substitution patterns for HTML links.

Pattern Description
[unsubscribe_link] Link to the unsubscribe page.
[form_{ID}] Link to the form with id {ID}
[show_link] Link to preview the template from the web browser. Useful for mail sendings.
[attachment_{ID}] Link to the attachment with id {ID}

For example to include a link to the form with id "12":

<a href="[form_12]">Form link</a>

Templates V2

List templates

GET https://dashboard.360nrs.com/api/rest/v2/templates

curl -X GET 'https://dashboard.360nrs.com/api/rest/v2/templates' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://dashboard.360nrs.com/api/rest/v2/templates',
  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("https://dashboard.360nrs.com/api/rest/v2/templates");
      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: 'https://dashboard.360nrs.com/api/rest/v2/templates',
  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 = "https://dashboard.360nrs.com/api/rest/v2/templates"

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("https://dashboard.360nrs.com/api/rest/v2/templates")

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("https://dashboard.360nrs.com/api/rest/v2/templates");
      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": "Template 1",
      "type": "HTML",
      "createdAt": "2018-08-17T12:31:10+00:00",
      "updatedAt": null
    }
  ],
  "meta": {
    "pagination": {
      "total": 1,
      "count": 1,
      "per_page": 100,
      "current_page": 1,
      "total_pages": 1,
      "links": []
    }
  }
}

Show a template

GET https://dashboard.360nrs.com/api/rest/v2/templates/<ID>

curl -X GET 'https://dashboard.360nrs.com/api/rest/v2/templates/1' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://dashboard.360nrs.com/api/rest/v2/templates/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("https://dashboard.360nrs.com/api/rest/v2/templates/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: 'https://dashboard.360nrs.com/api/rest/v2/templates/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 = "https://dashboard.360nrs.com/api/rest/v2/templates/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("https://dashboard.360nrs.com/api/rest/v2/templates/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("https://dashboard.360nrs.com/api/rest/v2/templates/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 (HTTP 200)

{
  "data": {
    "id": 1,
    "name": "Template 1",
    "type": "HTML",
    "html": "<h1>Hello world</h1>",
    "createdAt": "2018-08-17T12:31:10+00:00",
    "updatedAt": null
  }
}

Create a new template

POST https://dashboard.360nrs.com/api/rest/v2/templates

curl -X POST 'https://dashboard.360nrs.com/api/rest/v2/templates' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN' \
-d '{
  "name": "New Template",
  "html": "<h1>Hello world</h1>"    
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://dashboard.360nrs.com/api/rest/v2/templates',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => '{
  "name": "New Template",
  "html": "<h1>Hello world</h1>"    
}',
  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("https://dashboard.360nrs.com/api/rest/v2/templates");
      HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
      connection.setRequestMethod("POST");
      connection.setRequestProperty("Authorization", "Basic YOUR_AUTH_TOKEN");
      connection.setRequestProperty("Accept", "application/json");
      String requestBody = "{ \"name\": \"New Template\", \"html\": \"<h1>Hello world</h1>\" }";
      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: 'https://dashboard.360nrs.com/api/rest/v2/templates',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Basic YOUR_AUTH_TOKEN'
  },
  data: '{ "name": "New Template", "html": "<h1>Hello world</h1>" }'
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
import requests

url = "https://dashboard.360nrs.com/api/rest/v2/templates"

payload = "{ \"name\": \"New Template\", \"html\": \"<h1>Hello world</h1>\" }"
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("https://dashboard.360nrs.com/api/rest/v2/templates")

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\": \"New Template\", \"html\": \"<h1>Hello world</h1>\" }"

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("https://dashboard.360nrs.com/api/rest/v2/templates");
      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\": \"New Template\", \"html\": \"<h1>Hello world</h1>\" }",  ParameterType.RequestBody);
      IRestResponse response = client.Execute(request);
      Console.WriteLine(response.Content);
    }
  }
}

Response (HTTP 201)

{
  "data": {
    "id": 1,
    "name": "New Template",
    "type": "HTML",
    "html": "<h1>Hello world</h1>",
    "createdAt": "2020-01-00T00:00:00+00:00",
    "updatedAt": "2020-01-00T00:00:00+00:00",
    "links": {
      "self": "https://dashboard.360nrs.com/api/rest/v2/templates/1",
      "preview": "https://dashboard.360nrs.com/api/rest/v2/templates/1/preview"
    }
  }
}
Parameter Type Required Description
name string Yes Template Name.
html string Yes Content of the template in HTML format and UTF-8 coding.

Update a template

PUT https://dashboard.360nrs.com/api/rest/v2/templates/<ID>

curl -X PUT 'https://dashboard.360nrs.com/api/rest/v2/templates/1' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN' \
-d '{
  "name": "New Template",
  "html": "<h1>Hello world</h1>"    
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://dashboard.360nrs.com/api/rest/v2/templates/1',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => 'PUT',
  CURLOPT_POSTFIELDS => '{
  "name": "New Template",
  "html": "<h1>Hello world</h1>"    
}',
  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("https://dashboard.360nrs.com/api/rest/v2/templates/1");
      HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
      connection.setRequestMethod("PUT");
      connection.setRequestProperty("Authorization", "Basic YOUR_AUTH_TOKEN");
      connection.setRequestProperty("Accept", "application/json");
      String requestBody = "{ \"name\": \"New Template\", \"html\": \"<h1>Hello world</h1>\" }";
      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: 'https://dashboard.360nrs.com/api/rest/v2/templates/1',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Basic YOUR_AUTH_TOKEN'
  },
  data: '{ "name": "New Template", "html": "<h1>Hello world</h1>" }'
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
import requests

url = "https://dashboard.360nrs.com/api/rest/v2/templates/1"

payload = "{ \"name\": \"New Template\", \"html\": \"<h1>Hello world</h1>\" }"
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("https://dashboard.360nrs.com/api/rest/v2/templates/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 = "{ \"name\": \"New Template\", \"html\": \"<h1>Hello world</h1>\" }"

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("https://dashboard.360nrs.com/api/rest/v2/templates/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", "{ \"name\": \"New Template\", \"html\": \"<h1>Hello world</h1>\" }",  ParameterType.RequestBody);
      IRestResponse response = client.Execute(request);
      Console.WriteLine(response.Content);
    }
  }
}

Response (HTTP 201)

{
  "data": {
    "id": 1,
    "name": "New Template",
    "type": "HTML",
    "html": "<h1>Hello world</h1>",
    "createdAt": "2020-01-00T00:00:00+00:00",
    "updatedAt": "2020-01-00T00:00:00+00:00",
    "links": {
      "self": "https://dashboard.360nrs.com/api/rest/v2/templates/1",
      "preview": "https://dashboard.360nrs.com/api/rest/v2/templates/1/preview"
    }
  }
}
Parameter Type Required Description
name string Yes Template Name.
html string Yes Content of the template in HTML format and UTF-8 coding.

Delete a template

DELETE https://dashboard.360nrs.com/api/rest/v2/templates/<ID>

curl -X DELETE 'https://dashboard.360nrs.com/api/rest/v2/templates/1' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://dashboard.360nrs.com/api/rest/v2/templates/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("https://dashboard.360nrs.com/api/rest/v2/templates/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: 'https://dashboard.360nrs.com/api/rest/v2/templates/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 = "https://dashboard.360nrs.com/api/rest/v2/templates/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("https://dashboard.360nrs.com/api/rest/v2/templates/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("https://dashboard.360nrs.com/api/rest/v2/templates/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.

Preview a template

GET https://dashboard.360nrs.com/api/rest/v2/templates/<ID>/preview

curl -X GET 'https://dashboard.360nrs.com/api/rest/v2/templates/1/preview' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://dashboard.360nrs.com/api/rest/v2/templates/1/preview',
  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("https://dashboard.360nrs.com/api/rest/v2/templates/1/preview");
      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: 'https://dashboard.360nrs.com/api/rest/v2/templates/1/preview',
  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 = "https://dashboard.360nrs.com/api/rest/v2/templates/1/preview"

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("https://dashboard.360nrs.com/api/rest/v2/templates/1/preview")

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("https://dashboard.360nrs.com/api/rest/v2/templates/1/preview");
      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);
    }
  }
}

The response will contain a preview of the template in HTML format.

Custom variables

Custom variables can be used on templates. These variables will be replaced by the contact's custom fields before sending by using the syntax {variable}.

For example, to include the custom variable "name" in a HTML template:

<html>
<head>
    <title>TEST</title>
</head>
<body>
    <h1>Hello {name}</h1>
</body>
</html>

The templates accept the following substitution patterns for HTML links.

Pattern Description
[unsubscribe_link] Link to the unsubscribe page.
[form_{ID}] Link to the form with id {ID}
[show_link] Link to preview the template from the web browser. Useful for mail sendings.
[attachment_{ID}] Link to the attachment with id {ID}

For example to include a link to the form with id "12":

<a href="[form_12]">Form link</a>

Forms

Create a form

POST https://dashboard.360nrs.com/api/rest/form

curl -X POST 'https://dashboard.360nrs.com/api/rest/forms' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN' \
-d '{
  "name": "My_form",
  "rejectButton": true,
  "backgroundUrl": "https://dashboard.360nrs.com/assets/login/img/wizard.jpg",
  "logoUrl": "https://dashboard.360nrs.com/assets/img/logo.png",
  "formFields": [
    {"type": "h3", "label": "Your opinion is very important to us"},
    {"type": "text", "label": "Name", "required": true, "description": "Insert your name", "placeholder": "Insert your name", "customField": "form_name"}
  ]
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://dashboard.360nrs.com/api/rest/forms',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => '{
  "name": "My_form",
  "rejectButton": true,
  "backgroundUrl": "https://dashboard.360nrs.com/assets/login/img/wizard.jpg",
  "logoUrl": "https://dashboard.360nrs.com/assets/img/logo.png",
  "formFields": [
    {"type": "h3", "label": "Your opinion is very important to us"},
    {"type": "text", "label": "Name", "required": true, "description": "Insert your name", "placeholder": "Insert your name", "customField": "form_name"}
  ]
}',
  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("https://dashboard.360nrs.com/api/rest/forms");
      HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
      connection.setRequestMethod("POST");
      connection.setRequestProperty("Authorization", "Basic YOUR_AUTH_TOKEN");
      connection.setRequestProperty("Accept", "application/json");
      String requestBody = "{ \"name\": \"My_form\", \"rejectButton\": true, \"backgroundUrl\": \"https://dashboard.360nrs.com/assets/login/img/wizard.jpg\", \"logoUrl\": \"https://dashboard.360nrs.com/assets/img/logo.png\", \"formFields\": [ {\"type\": \"h3\", \"label\": \"Your opinion is very important to us\"}, {\"type\": \"text\", \"label\": \"Name\", \"required\": true, \"description\": \"Insert your name\", \"placeholder\": \"Insert your name\", \"customField\": \"form_name\"} ] }";
      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: 'https://dashboard.360nrs.com/api/rest/forms',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Basic YOUR_AUTH_TOKEN'
  },
  data: '{ "name": "My_form", "rejectButton": true, "backgroundUrl": "https://dashboard.360nrs.com/assets/login/img/wizard.jpg", "logoUrl": "https://dashboard.360nrs.com/assets/img/logo.png", "formFields": [ {"type": "h3", "label": "Your opinion is very important to us"}, {"type": "text", "label": "Name", "required": true, "description": "Insert your name", "placeholder": "Insert your name", "customField": "form_name"} ] }'
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
import requests

url = "https://dashboard.360nrs.com/api/rest/forms"

payload = "{ \"name\": \"My_form\", \"rejectButton\": true, \"backgroundUrl\": \"https://dashboard.360nrs.com/assets/login/img/wizard.jpg\", \"logoUrl\": \"https://dashboard.360nrs.com/assets/img/logo.png\", \"formFields\": [ {\"type\": \"h3\", \"label\": \"Your opinion is very important to us\"}, {\"type\": \"text\", \"label\": \"Name\", \"required\": true, \"description\": \"Insert your name\", \"placeholder\": \"Insert your name\", \"customField\": \"form_name\"} ] }"
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("https://dashboard.360nrs.com/api/rest/forms")

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_form\", \"rejectButton\": true, \"backgroundUrl\": \"https://dashboard.360nrs.com/assets/login/img/wizard.jpg\", \"logoUrl\": \"https://dashboard.360nrs.com/assets/img/logo.png\", \"formFields\": [ {\"type\": \"h3\", \"label\": \"Your opinion is very important to us\"}, {\"type\": \"text\", \"label\": \"Name\", \"required\": true, \"description\": \"Insert your name\", \"placeholder\": \"Insert your name\", \"customField\": \"form_name\"} ] }"

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("https://dashboard.360nrs.com/api/rest/forms");
      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_form\", \"rejectButton\": true, \"backgroundUrl\": \"https://dashboard.360nrs.com/assets/login/img/wizard.jpg\", \"logoUrl\": \"https://dashboard.360nrs.com/assets/img/logo.png\", \"formFields\": [ {\"type\": \"h3\", \"label\": \"Your opinion is very important to us\"}, {\"type\": \"text\", \"label\": \"Name\", \"required\": true, \"description\": \"Insert your name\", \"placeholder\": \"Insert your name\", \"customField\": \"form_name\"} ] }",  ParameterType.RequestBody);
      IRestResponse response = client.Execute(request);
      Console.WriteLine(response.Content);
    }
  }
}

Example Request

{
  "name": "My_form",
  "rejectButton": true,
  "backgroundUrl": "https://dashboard.360nrs.com/assets/login/img/wizard.jpg",
  "logoUrl": "https://dashboard.360nrs.com/assets/img/logo.png",
  "formFields": [
    {
      "type": "h3",
      "label": "Your opinion is very important to us"
    },
    {
      "type": "text",
      "label": "Name",
      "required": true,
      "description": "Insert your name",
      "placeholder": "Insert your name",
      "customField": "form_name"
    },
    {
      "type": "email",
      "label": "Email",
      "required": true,
      "description": "Insert your email",
      "placeholder": "Insert your email",
      "customField": "form_email"
    },
    {
      "type": "radio",
      "label": "How satisfied are you with our platform?",
      "required": true,
      "description": "Select your response depending on your satisfaction",
      "customField": "form_satisfaction",
      "options": [
        {
          "label": "Very satisfied",
          "value": "10"
        },
        {
          "label": "Somewhat satisfied",
          "value": "8"
        },
        {
          "label": "Neither satisfied nor dissatisfied",
          "value": "6"
        },
        {
          "label": "Somewhat dissatisfied",
          "value": "4"
        },
        {
          "label": "Very dissatisfied",
          "value": "2"
        }
      ]
    }
  ]
}

Parameters

Parameter Type Required Description
name string Yes Unique name of the form.
editable boolean No 'true': once sent, the client can send it again.
'false': once sent, the client will not be able to send it again. true by default.
rejectButton boolean No 'true': in addition to Submit button, Reject button will appear. Reject button does not send the data.
'false': only Submit button will appear. false by default.
backgroundUrl string No Form background image url.
logoUrl string No Form logo image url.
formFields array Yes Set of elements that the form will have. See annex to see all the elements.

Form example:

Update a form

PUT https://dashboard.360nrs.com/api/rest/forms/<ID>

curl -X PUT 'https://dashboard.360nrs.com/api/rest/forms' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN' \
-d '{
  "name": "My_form",
  "rejectButton": true,
  "backgroundUrl": "https://dashboard.360nrs.com/assets/login/img/wizard.jpg",
  "logoUrl": "https://dashboard.360nrs.com/assets/img/logo.png",
  "formFields": [
    {"type": "h3", "label": "Your opinion is very important to us"},
    {"type": "text", "label": "Name", "required": true, "description": "Insert your name", "placeholder": "Insert your name", "customField": "form_name"}
  ]
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://dashboard.360nrs.com/api/rest/forms',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_CUSTOMREQUEST => 'PUT',
  CURLOPT_POSTFIELDS => '{
  "name": "My_form",
  "rejectButton": true,
  "backgroundUrl": "https://dashboard.360nrs.com/assets/login/img/wizard.jpg",
  "logoUrl": "https://dashboard.360nrs.com/assets/img/logo.png",
  "formFields": [
    {"type": "h3", "label": "Your opinion is very important to us"},
    {"type": "text", "label": "Name", "required": true, "description": "Insert your name", "placeholder": "Insert your name", "customField": "form_name"}
  ]
}',
  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("https://dashboard.360nrs.com/api/rest/forms");
      HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
      connection.setRequestMethod("PUT");
      connection.setRequestProperty("Authorization", "Basic YOUR_AUTH_TOKEN");
      connection.setRequestProperty("Accept", "application/json");
      String requestBody = "{ \"name\": \"My_form\", \"rejectButton\": true, \"backgroundUrl\": \"https://dashboard.360nrs.com/assets/login/img/wizard.jpg\", \"logoUrl\": \"https://dashboard.360nrs.com/assets/img/logo.png\", \"formFields\": [ {\"type\": \"h3\", \"label\": \"Your opinion is very important to us\"}, {\"type\": \"text\", \"label\": \"Name\", \"required\": true, \"description\": \"Insert your name\", \"placeholder\": \"Insert your name\", \"customField\": \"form_name\"} ] }";
      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: 'https://dashboard.360nrs.com/api/rest/forms',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Basic YOUR_AUTH_TOKEN'
  },
  data: '{ "name": "My_form", "rejectButton": true, "backgroundUrl": "https://dashboard.360nrs.com/assets/login/img/wizard.jpg", "logoUrl": "https://dashboard.360nrs.com/assets/img/logo.png", "formFields": [ {"type": "h3", "label": "Your opinion is very important to us"}, {"type": "text", "label": "Name", "required": true, "description": "Insert your name", "placeholder": "Insert your name", "customField": "form_name"} ] }'
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
import requests

url = "https://dashboard.360nrs.com/api/rest/forms"

payload = "{ \"name\": \"My_form\", \"rejectButton\": true, \"backgroundUrl\": \"https://dashboard.360nrs.com/assets/login/img/wizard.jpg\", \"logoUrl\": \"https://dashboard.360nrs.com/assets/img/logo.png\", \"formFields\": [ {\"type\": \"h3\", \"label\": \"Your opinion is very important to us\"}, {\"type\": \"text\", \"label\": \"Name\", \"required\": true, \"description\": \"Insert your name\", \"placeholder\": \"Insert your name\", \"customField\": \"form_name\"} ] }"
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("https://dashboard.360nrs.com/api/rest/forms")

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_form\", \"rejectButton\": true, \"backgroundUrl\": \"https://dashboard.360nrs.com/assets/login/img/wizard.jpg\", \"logoUrl\": \"https://dashboard.360nrs.com/assets/img/logo.png\", \"formFields\": [ {\"type\": \"h3\", \"label\": \"Your opinion is very important to us\"}, {\"type\": \"text\", \"label\": \"Name\", \"required\": true, \"description\": \"Insert your name\", \"placeholder\": \"Insert your name\", \"customField\": \"form_name\"} ] }"

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("https://dashboard.360nrs.com/api/rest/forms");
      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_form\", \"rejectButton\": true, \"backgroundUrl\": \"https://dashboard.360nrs.com/assets/login/img/wizard.jpg\", \"logoUrl\": \"https://dashboard.360nrs.com/assets/img/logo.png\", \"formFields\": [ {\"type\": \"h3\", \"label\": \"Your opinion is very important to us\"}, {\"type\": \"text\", \"label\": \"Name\", \"required\": true, \"description\": \"Insert your name\", \"placeholder\": \"Insert your name\", \"customField\": \"form_name\"} ] }",  ParameterType.RequestBody);
      IRestResponse response = client.Execute(request);
      Console.WriteLine(response.Content);
    }
  }
}

Parameters

Parameter Type Required Description
name string Yes Unique name of the form.
editable boolean No 'true': once sent, the client can send it again.
'false': once sent, the client will not be able to send it again. true by default.
rejectButton boolean No 'true': in addition to Submit button, Reject button will appear. Reject button does not send the data.
'false': only Submit button will appear. false by default.
backgroundUrl string No Form background image url.
logoUrl string No Form logo image url.
formFields array Yes Set of elements that the form will have. See annex to see all the elements.

Form list

GET https://dashboard.360nrs.com/api/rest/forms

curl -X GET 'https://dashboard.360nrs.com/api/rest/forms' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://dashboard.360nrs.com/api/rest/forms',
  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("https://dashboard.360nrs.com/api/rest/forms");
      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: 'https://dashboard.360nrs.com/api/rest/forms',
  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 = "https://dashboard.360nrs.com/api/rest/forms"

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("https://dashboard.360nrs.com/api/rest/forms")

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("https://dashboard.360nrs.com/api/rest/forms");
      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": "Form 1",
            "placeholder": "{FORM_1}",
            "createdAt": "2018-08-21T11:51:33+00:00",
            "updatedAt": null
        }
    ],
    "meta": {
        "pagination": {
            "total": 1,
            "count": 1,
            "per_page": 100,
            "current_page": 1,
            "total_pages": 1,
            "links": []
        }
    }
}

Show a form

GET https://dashboard.360nrs.com/api/rest/forms/<ID>

curl -X GET 'https://dashboard.360nrs.com/api/rest/forms/1' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://dashboard.360nrs.com/api/rest/forms/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("https://dashboard.360nrs.com/api/rest/forms/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: 'https://dashboard.360nrs.com/api/rest/forms/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 = "https://dashboard.360nrs.com/api/rest/forms/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("https://dashboard.360nrs.com/api/rest/forms/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("https://dashboard.360nrs.com/api/rest/forms/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": "Form 1",
        "placeholder": "{FORM_1}",
        "createdAt": "2018-08-21T11:51:33+00:00",
        "updatedAt": null
    }
}

Delete a form

DELETE https://dashboard.360nrs.com/api/rest/forms/<ID>

curl -X DELETE 'https://dashboard.360nrs.com/api/rest/forms/1' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_AUTH_TOKEN'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://dashboard.360nrs.com/api/rest/forms/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("https://dashboard.360nrs.com/api/rest/forms/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: 'https://dashboard.360nrs.com/api/rest/forms/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 = "https://dashboard.360nrs.com/api/rest/forms/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("https://dashboard.360nrs.com/api/rest/forms/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