curl --request DELETE \
--url https://api.politicalcomms.com/v1/email/suppressions \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"scope": "org",
"emails": [
"voter@example.com"
]
}
'import requests
url = "https://api.politicalcomms.com/v1/email/suppressions"
payload = {
"scope": "org",
"emails": ["voter@example.com"]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({scope: 'org', emails: ['voter@example.com']})
};
fetch('https://api.politicalcomms.com/v1/email/suppressions', 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.politicalcomms.com/v1/email/suppressions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'scope' => 'org',
'emails' => [
'voter@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://api.politicalcomms.com/v1/email/suppressions"
payload := strings.NewReader("{\n \"scope\": \"org\",\n \"emails\": [\n \"voter@example.com\"\n ]\n}")
req, _ := http.NewRequest("DELETE", 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.delete("https://api.politicalcomms.com/v1/email/suppressions")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"scope\": \"org\",\n \"emails\": [\n \"voter@example.com\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.politicalcomms.com/v1/email/suppressions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"scope\": \"org\",\n \"emails\": [\n \"voter@example.com\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"removed": 123,
"submitted": 123
}
}Remove Suppressions
Lift suppressions on up to 5,000 addresses. Removing an address that was not suppressed is not an error.
Early access. This endpoint returns 403 EMAIL_EARLY_ACCESS until the email product reaches general availability. The contract below is stable and safe to build against.
curl --request DELETE \
--url https://api.politicalcomms.com/v1/email/suppressions \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"scope": "org",
"emails": [
"voter@example.com"
]
}
'import requests
url = "https://api.politicalcomms.com/v1/email/suppressions"
payload = {
"scope": "org",
"emails": ["voter@example.com"]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({scope: 'org', emails: ['voter@example.com']})
};
fetch('https://api.politicalcomms.com/v1/email/suppressions', 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.politicalcomms.com/v1/email/suppressions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'scope' => 'org',
'emails' => [
'voter@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://api.politicalcomms.com/v1/email/suppressions"
payload := strings.NewReader("{\n \"scope\": \"org\",\n \"emails\": [\n \"voter@example.com\"\n ]\n}")
req, _ := http.NewRequest("DELETE", 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.delete("https://api.politicalcomms.com/v1/email/suppressions")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"scope\": \"org\",\n \"emails\": [\n \"voter@example.com\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.politicalcomms.com/v1/email/suppressions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"scope\": \"org\",\n \"emails\": [\n \"voter@example.com\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"removed": 123,
"submitted": 123
}
}Authorizations
Authenticate every request by passing your API key in the X-API-Key header. Keys are scoped to your organization hierarchy.
Headers
Optional idempotency key: a unique string of 16-200 printable ASCII characters (a UUID is recommended). Retrying the write with the same key within 24 hours returns the stored response of the first call with an X-Idempotent-Replayed: true response header instead of executing it again. Reusing a key with a different request body returns 422 (IDEMPOTENCY_MISMATCH); a duplicate sent while the first call is still running returns 409 with a Retry-After header. Keys are scoped per endpoint and organization.
16 - 200