import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.suppressions.add({
email: 'steve.wozniak@example.com',
});
curl -X POST 'https://api.resend.com/suppressions' \
-H 'Authorization: Bearer re_xxxxxxxxx' \
-H 'Content-Type: application/json' \
-d $'{
"email": "steve.wozniak@example.com"
}'
{
"object": "suppression",
"id": "e169aa45-1ecf-4183-9955-b1499d5701d3"
}
Add Suppression
Add an email address to the suppression list.
POST
/
suppressions
import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.suppressions.add({
email: 'steve.wozniak@example.com',
});
curl -X POST 'https://api.resend.com/suppressions' \
-H 'Authorization: Bearer re_xxxxxxxxx' \
-H 'Content-Type: application/json' \
-d $'{
"email": "steve.wozniak@example.com"
}'
{
"object": "suppression",
"id": "e169aa45-1ecf-4183-9955-b1499d5701d3"
}
The Suppressions API is currently in private beta and only available to a
limited number of users. APIs might change before GA.
Get in touch if you’re interested in testing
this feature.Once you have access, upgrade your Resend SDK to use the methods on this
page:
npm install resend@6.18.0-canary.0
Body Parameters
The email address to suppress.
import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.suppressions.add({
email: 'steve.wozniak@example.com',
});
curl -X POST 'https://api.resend.com/suppressions' \
-H 'Authorization: Bearer re_xxxxxxxxx' \
-H 'Content-Type: application/json' \
-d $'{
"email": "steve.wozniak@example.com"
}'
{
"object": "suppression",
"id": "e169aa45-1ecf-4183-9955-b1499d5701d3"
}
Was this page helpful?
⌘I