Suppress Contact
curl --request POST \
--url https://api.example.com/api/v1/contact-lists/{listId}/contacts/{id}/suppress \
--header 'Content-Type: application/json' \
--data '
{
"reason": "<string>"
}
'import requests
url = "https://api.example.com/api/v1/contact-lists/{listId}/contacts/{id}/suppress"
payload = { "reason": "<string>" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({reason: '<string>'})
};
fetch('https://api.example.com/api/v1/contact-lists/{listId}/contacts/{id}/suppress', 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.example.com/api/v1/contact-lists/{listId}/contacts/{id}/suppress",
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([
'reason' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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.example.com/api/v1/contact-lists/{listId}/contacts/{id}/suppress"
payload := strings.NewReader("{\n \"reason\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.example.com/api/v1/contact-lists/{listId}/contacts/{id}/suppress")
.header("Content-Type", "application/json")
.body("{\n \"reason\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/contact-lists/{listId}/contacts/{id}/suppress")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"reason\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyContacts
Suppress Contact
Suppress a contact to stop sending emails
POST
/
api
/
v1
/
contact-lists
/
{listId}
/
contacts
/
{id}
/
suppress
Suppress Contact
curl --request POST \
--url https://api.example.com/api/v1/contact-lists/{listId}/contacts/{id}/suppress \
--header 'Content-Type: application/json' \
--data '
{
"reason": "<string>"
}
'import requests
url = "https://api.example.com/api/v1/contact-lists/{listId}/contacts/{id}/suppress"
payload = { "reason": "<string>" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({reason: '<string>'})
};
fetch('https://api.example.com/api/v1/contact-lists/{listId}/contacts/{id}/suppress', 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.example.com/api/v1/contact-lists/{listId}/contacts/{id}/suppress",
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([
'reason' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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.example.com/api/v1/contact-lists/{listId}/contacts/{id}/suppress"
payload := strings.NewReader("{\n \"reason\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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.example.com/api/v1/contact-lists/{listId}/contacts/{id}/suppress")
.header("Content-Type", "application/json")
.body("{\n \"reason\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/contact-lists/{listId}/contacts/{id}/suppress")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"reason\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodySuppress a contact to prevent them from receiving any emails. Unlike deletion, suppression preserves the contact record and email history.
Path Parameters
string
required
The unique list ID (e.g.,
lst_abc123).string
required
The unique contact ID (e.g.,
cnt_abc123).Request Body
string
required
Reason for suppression. One of:
manual- Manual suppression by adminunsubscribed- Contact unsubscribedbounced- Email address bouncedcomplained- Contact reported as spamspam_trap- Address identified as spam trap
Examples
import { MailBreeze } from "mailbreeze";
const mailbreeze = new MailBreeze({ apiKey: "sk_live_xxx" });
const contacts = mailbreeze.contacts("lst_abc123");
// Suppress manually
await contacts.suppress("cnt_abc123", "manual");
// Suppress due to bounce
await contacts.suppress("cnt_def456", "bounced");
console.log("Contact suppressed");
from mailbreeze import MailBreeze
client = MailBreeze(api_key="sk_live_xxx")
contacts = client.contacts("lst_abc123")
# Suppress manually
await contacts.suppress("cnt_abc123", "manual")
# Suppress due to bounce
await contacts.suppress("cnt_def456", "bounced")
print("Contact suppressed")
client := mailbreeze.NewClient("sk_live_xxx")
contacts := client.Contacts("lst_abc123")
// Suppress manually
err := contacts.Suppress(ctx, "cnt_abc123", "manual")
if err != nil {
log.Fatal(err)
}
// Suppress due to bounce
err = contacts.Suppress(ctx, "cnt_def456", "bounced")
fmt.Println("Contact suppressed")
$mailbreeze = new MailBreeze('sk_live_xxx');
// Suppress manually
$mailbreeze->contacts->suppress('lst_abc123', 'cnt_abc123', ['reason' => 'manual']);
// Suppress due to bounce
$mailbreeze->contacts->suppress('lst_abc123', 'cnt_def456', ['reason' => 'bounced']);
echo "Contact suppressed";
let client = Client::new("sk_live_xxx");
let contacts = client.contacts("lst_abc123");
// Suppress manually
contacts.suppress("cnt_abc123", SuppressReason::Manual).await?;
// Suppress due to bounce
contacts.suppress("cnt_def456", SuppressReason::Bounced).await?;
println!("Contact suppressed");
curl -X POST "https://api.mailbreeze.com/api/v1/contact-lists/lst_abc123/contacts/cnt_abc123/suppress" \
-H "Authorization: Bearer sk_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"reason": "manual"
}'
Response
Returns204 No Content on success with no response body.
Suppression Reasons
| Reason | Description | Typical Use Case |
|---|---|---|
manual | Manual suppression | Admin removing contact, legal request |
unsubscribed | User opted out | Unsubscribe link clicked |
bounced | Hard bounce | Invalid email address |
complained | Spam complaint | User marked email as spam |
spam_trap | Known spam trap | Address identified as honeypot |
Errors
| Code | HTTP Status | Description |
|---|---|---|
CONTACT_NOT_FOUND | 404 | Contact with this ID doesn’t exist |
LIST_NOT_FOUND | 404 | List with this ID doesn’t exist |
ALREADY_SUPPRESSED | 409 | Contact is already suppressed |
VALIDATION_ERROR | 400 | Invalid suppression reason |
Notes
Suppressed contacts are automatically added to the domain’s global suppression list. They won’t receive emails from any list in your domain.
What happens when a contact is suppressed:
- Contact status changes to
suppressed - Email is added to global suppression list
- All future sends to this email are blocked
- Contact record and history are preserved
- Contact appears in list stats as suppressed