curl
curl -X POST "https://api.deliveryman.ai/api/v2/suppression-list/" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "alex@draftss.com",
"workspace_id": 12,
"type": "unsubscribes"
}'import requests
url = "https://api.deliveryman.ai/api/v2/suppression-list/"
payload = {
"email": "jsmith@example.com",
"workspace_id": 123,
"type": "unsubscribes"
}
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({email: 'jsmith@example.com', workspace_id: 123, type: 'unsubscribes'})
};
fetch('https://api.deliveryman.ai/api/v2/suppression-list/', 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://api.deliveryman.ai/api/v2/suppression-list/",
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([
'email' => 'jsmith@example.com',
'workspace_id' => 123,
'type' => 'unsubscribes'
]),
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://api.deliveryman.ai/api/v2/suppression-list/"
payload := strings.NewReader("{\n \"email\": \"jsmith@example.com\",\n \"workspace_id\": 123,\n \"type\": \"unsubscribes\"\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://api.deliveryman.ai/api/v2/suppression-list/")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"jsmith@example.com\",\n \"workspace_id\": 123,\n \"type\": \"unsubscribes\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.deliveryman.ai/api/v2/suppression-list/")
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 \"email\": \"jsmith@example.com\",\n \"workspace_id\": 123,\n \"type\": \"unsubscribes\"\n}"
response = http.request(request)
puts response.read_body{
"email": "<string>",
"type": "bounces",
"workspace_id": 123,
"added_on": "2023-11-07T05:31:56Z"
}{
"email": "<string>",
"type": "bounces",
"workspace_id": 123,
"added_on": "2023-11-07T05:31:56Z"
}{
"message": "<string>"
}{
"message": "<string>"
}Suppression List
Add Suppressed Email
Adds an address to a workspace’s suppression list. Emails to it are rejected until it’s removed. Adding an address that’s already on the list returns the existing entry.
POST
/
api
/
v2
/
suppression-list
/
curl
curl -X POST "https://api.deliveryman.ai/api/v2/suppression-list/" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "alex@draftss.com",
"workspace_id": 12,
"type": "unsubscribes"
}'import requests
url = "https://api.deliveryman.ai/api/v2/suppression-list/"
payload = {
"email": "jsmith@example.com",
"workspace_id": 123,
"type": "unsubscribes"
}
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({email: 'jsmith@example.com', workspace_id: 123, type: 'unsubscribes'})
};
fetch('https://api.deliveryman.ai/api/v2/suppression-list/', 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://api.deliveryman.ai/api/v2/suppression-list/",
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([
'email' => 'jsmith@example.com',
'workspace_id' => 123,
'type' => 'unsubscribes'
]),
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://api.deliveryman.ai/api/v2/suppression-list/"
payload := strings.NewReader("{\n \"email\": \"jsmith@example.com\",\n \"workspace_id\": 123,\n \"type\": \"unsubscribes\"\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://api.deliveryman.ai/api/v2/suppression-list/")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"jsmith@example.com\",\n \"workspace_id\": 123,\n \"type\": \"unsubscribes\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.deliveryman.ai/api/v2/suppression-list/")
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 \"email\": \"jsmith@example.com\",\n \"workspace_id\": 123,\n \"type\": \"unsubscribes\"\n}"
response = http.request(request)
puts response.read_body{
"email": "<string>",
"type": "bounces",
"workspace_id": 123,
"added_on": "2023-11-07T05:31:56Z"
}{
"email": "<string>",
"type": "bounces",
"workspace_id": 123,
"added_on": "2023-11-07T05:31:56Z"
}{
"message": "<string>"
}{
"message": "<string>"
}Authorizations
Your API key. In the dashboard, go to Integrations and open Deliveryman API Keys to create one.
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
Email address to suppress.
Workspace to add the entry to.
Whether the address is suppressed because it bounced (bounces) or opted out (unsubscribes). Defaults to unsubscribes.
Available options:
bounces, unsubscribes Response
Already Suppressed
An address that emails won't be sent to.
Suppressed email address.
bounces if the address bounced, unsubscribes if it opted out.
Available options:
bounces, unsubscribes Workspace the entry belongs to.
When the address was added to the list. ISO 8601, UTC.