Add Dnc Contacts Api
curl --request POST \
--url https://services.meetchase.ai/api/v1/contacts/dnc/add \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"emails": [
"jsmith@example.com"
]
}
'import requests
url = "https://services.meetchase.ai/api/v1/contacts/dnc/add"
payload = { "emails": ["jsmith@example.com"] }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({emails: ['jsmith@example.com']})
};
fetch('https://services.meetchase.ai/api/v1/contacts/dnc/add', 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://services.meetchase.ai/api/v1/contacts/dnc/add",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'emails' => [
'jsmith@example.com'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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://services.meetchase.ai/api/v1/contacts/dnc/add"
payload := strings.NewReader("{\n \"emails\": [\n \"jsmith@example.com\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://services.meetchase.ai/api/v1/contacts/dnc/add")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"emails\": [\n \"jsmith@example.com\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://services.meetchase.ai/api/v1/contacts/dnc/add")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"emails\": [\n \"jsmith@example.com\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Contacts
Add Contact to DNC List
Adds one or more email addresses to an organisation’s DNC list.
Path Parameters
organisation_id(int): Organisation ID to which DNC contacts are added.
Request Body
{
"emails": ["alice@example.com", "bob@example.com"]
}
Headers
X-API-Key: API key granting access to the organisation’s DNC list.
Response
- Returns a JSON message indicating how many contacts were inserted, e.g.
{ "message": "2 contact(s) successfully added to the DNC list." }
Errors
400 Bad Request: Payload fails validation (e.g. invalid email address).403 Forbidden: Authenticated user lacks CRUD rights for the organisation.
POST
/
api
/
v1
/
contacts
/
dnc
/
add
Add Dnc Contacts Api
curl --request POST \
--url https://services.meetchase.ai/api/v1/contacts/dnc/add \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"emails": [
"jsmith@example.com"
]
}
'import requests
url = "https://services.meetchase.ai/api/v1/contacts/dnc/add"
payload = { "emails": ["jsmith@example.com"] }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({emails: ['jsmith@example.com']})
};
fetch('https://services.meetchase.ai/api/v1/contacts/dnc/add', 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://services.meetchase.ai/api/v1/contacts/dnc/add",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'emails' => [
'jsmith@example.com'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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://services.meetchase.ai/api/v1/contacts/dnc/add"
payload := strings.NewReader("{\n \"emails\": [\n \"jsmith@example.com\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://services.meetchase.ai/api/v1/contacts/dnc/add")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"emails\": [\n \"jsmith@example.com\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://services.meetchase.ai/api/v1/contacts/dnc/add")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"emails\": [\n \"jsmith@example.com\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}⌘I