import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
// Remove by email
const { data, error } = await resend.suppressions.batch.remove({
emails: ['steve.wozniak@example.com', 'susan.kare@example.com'],
});
// Remove by id
const { data, error } = await resend.suppressions.batch.remove({
ids: ['e169aa45-1ecf-4183-9955-b1499d5701d3'],
});
# Remove by email
curl -X POST 'https://api.resend.com/suppressions/batch/remove' \
-H 'Authorization: Bearer re_xxxxxxxxx' \
-H 'Content-Type: application/json' \
-d $'{
"emails": ["steve.wozniak@example.com", "susan.kare@example.com"]
}'
# Remove by id
curl -X POST 'https://api.resend.com/suppressions/batch/remove' \
-H 'Authorization: Bearer re_xxxxxxxxx' \
-H 'Content-Type: application/json' \
-d $'{
"ids": ["e169aa45-1ecf-4183-9955-b1499d5701d3"]
}'
{
"data": [
{
"object": "suppression",
"id": "e169aa45-1ecf-4183-9955-b1499d5701d3",
"deleted": true
}
]
}
Remove Suppressions
Remove up to 100 suppressions from the suppression list at once.
POST
/
suppressions
/
batch
/
remove
import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
// Remove by email
const { data, error } = await resend.suppressions.batch.remove({
emails: ['steve.wozniak@example.com', 'susan.kare@example.com'],
});
// Remove by id
const { data, error } = await resend.suppressions.batch.remove({
ids: ['e169aa45-1ecf-4183-9955-b1499d5701d3'],
});
# Remove by email
curl -X POST 'https://api.resend.com/suppressions/batch/remove' \
-H 'Authorization: Bearer re_xxxxxxxxx' \
-H 'Content-Type: application/json' \
-d $'{
"emails": ["steve.wozniak@example.com", "susan.kare@example.com"]
}'
# Remove by id
curl -X POST 'https://api.resend.com/suppressions/batch/remove' \
-H 'Authorization: Bearer re_xxxxxxxxx' \
-H 'Content-Type: application/json' \
-d $'{
"ids": ["e169aa45-1ecf-4183-9955-b1499d5701d3"]
}'
{
"data": [
{
"object": "suppression",
"id": "e169aa45-1ecf-4183-9955-b1499d5701d3",
"deleted": true
}
]
}
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
Provide eitheremails or ids, but not both.
The email addresses to remove from the suppression list. Must contain between
1 and 100 email addresses.
The suppression IDs to remove from the suppression list. Must contain between
1 and 100 IDs.
import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
// Remove by email
const { data, error } = await resend.suppressions.batch.remove({
emails: ['steve.wozniak@example.com', 'susan.kare@example.com'],
});
// Remove by id
const { data, error } = await resend.suppressions.batch.remove({
ids: ['e169aa45-1ecf-4183-9955-b1499d5701d3'],
});
# Remove by email
curl -X POST 'https://api.resend.com/suppressions/batch/remove' \
-H 'Authorization: Bearer re_xxxxxxxxx' \
-H 'Content-Type: application/json' \
-d $'{
"emails": ["steve.wozniak@example.com", "susan.kare@example.com"]
}'
# Remove by id
curl -X POST 'https://api.resend.com/suppressions/batch/remove' \
-H 'Authorization: Bearer re_xxxxxxxxx' \
-H 'Content-Type: application/json' \
-d $'{
"ids": ["e169aa45-1ecf-4183-9955-b1499d5701d3"]
}'
{
"data": [
{
"object": "suppression",
"id": "e169aa45-1ecf-4183-9955-b1499d5701d3",
"deleted": true
}
]
}
Was this page helpful?
⌘I