Upload a suppression list
curl --request POST \
--url https://apiv2.vodex.ai/v1/contacts/dnc/import \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: text/csv' \
--data '<string>'import requests
url = "https://apiv2.vodex.ai/v1/contacts/dnc/import"
payload = "<string>"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "text/csv"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'text/csv'},
body: '<string>'
};
fetch('https://apiv2.vodex.ai/v1/contacts/dnc/import', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apiv2.vodex.ai/v1/contacts/dnc/import",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "<string>",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: text/csv"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://apiv2.vodex.ai/v1/contacts/dnc/import"
payload := strings.NewReader("<string>")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "text/csv")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://apiv2.vodex.ai/v1/contacts/dnc/import")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "text/csv")
.body("<string>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiv2.vodex.ai/v1/contacts/dnc/import")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'text/csv'
request.body = "<string>"
response = http.request(request)
puts response.read_body{
"added": 123,
"duplicates": 123,
"rejected": [
{
"index": 123,
"rowRef": "<string>",
"to": "<string>",
"reason": "<string>"
}
]
}{
"error": "not found"
}Do Not Contact
Upload a suppression list
Accepts a CSV either as the raw body or as csv in a JSON object. This
is how a regulator’s file lands — the common case where the addresses
belong to no contact in the system.
Rows that cannot be normalised are reported rather than dropped, because a suppression file that silently lost lines is worse than one that failed.
POST
/
contacts
/
dnc
/
import
Upload a suppression list
curl --request POST \
--url https://apiv2.vodex.ai/v1/contacts/dnc/import \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: text/csv' \
--data '<string>'import requests
url = "https://apiv2.vodex.ai/v1/contacts/dnc/import"
payload = "<string>"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "text/csv"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'text/csv'},
body: '<string>'
};
fetch('https://apiv2.vodex.ai/v1/contacts/dnc/import', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apiv2.vodex.ai/v1/contacts/dnc/import",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "<string>",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: text/csv"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://apiv2.vodex.ai/v1/contacts/dnc/import"
payload := strings.NewReader("<string>")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "text/csv")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://apiv2.vodex.ai/v1/contacts/dnc/import")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "text/csv")
.body("<string>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiv2.vodex.ai/v1/contacts/dnc/import")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'text/csv'
request.body = "<string>"
response = http.request(request)
puts response.read_body{
"added": 123,
"duplicates": 123,
"rejected": [
{
"index": 123,
"rowRef": "<string>",
"to": "<string>",
"reason": "<string>"
}
]
}{
"error": "not found"
}Authorizations
Tenant API key (vdx_live_…) as Authorization: Bearer.
Body
text/csvapplication/json
The body is of type string.