import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
// Remove by suppression ids
const { data, error } = await resend.suppressions.batch.remove({
ids: ['e169aa45-1ecf-4183-9955-b1499d5701d3'],
});
// Remove by emails
const { data, error } = await resend.suppressions.batch.remove({
emails: ['steve.wozniak@example.com', 'susan.kare@example.com'],
});
$resend = Resend::client('re_xxxxxxxxx');
// Remove by suppression ids
$resend->suppressions->batch->remove([
'ids' => ['e169aa45-1ecf-4183-9955-b1499d5701d3'],
]);
// Remove by emails
$resend->suppressions->batch->remove([
'emails' => ['steve.wozniak@example.com', 'susan.kare@example.com'],
]);
use resend_rs::{Resend, Result, types::BatchRemoveSuppressionOptions};
#[tokio::main]
async fn main() -> Result<()> {
let resend = Resend::new("re_xxxxxxxxx");
// Remove by email
let opt_emails = BatchRemoveSuppressionOptions::new()
.add_emails(vec!["steve.wozniak@example.com", "susan.kare@example.com"]);
let _data = resend.suppressions.batch_remove(opt_emails).await?;
// Remove by id
let opt_ids =
BatchRemoveSuppressionOptions::new().add_ids(vec!["e169aa45-1ecf-4183-9955-b1499d5701d3"]);
let _data = resend.suppressions.batch_remove(opt_ids).await?;
Ok(())
}
# Remove by suppression ids
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"]
}'
# Remove by emails
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 email
resend suppressions batch remove --file suppressions.json
# Remove by id
resend suppressions batch remove --file suppression-ids.json --ids
{
"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 suppression ids
const { data, error } = await resend.suppressions.batch.remove({
ids: ['e169aa45-1ecf-4183-9955-b1499d5701d3'],
});
// Remove by emails
const { data, error } = await resend.suppressions.batch.remove({
emails: ['steve.wozniak@example.com', 'susan.kare@example.com'],
});
$resend = Resend::client('re_xxxxxxxxx');
// Remove by suppression ids
$resend->suppressions->batch->remove([
'ids' => ['e169aa45-1ecf-4183-9955-b1499d5701d3'],
]);
// Remove by emails
$resend->suppressions->batch->remove([
'emails' => ['steve.wozniak@example.com', 'susan.kare@example.com'],
]);
use resend_rs::{Resend, Result, types::BatchRemoveSuppressionOptions};
#[tokio::main]
async fn main() -> Result<()> {
let resend = Resend::new("re_xxxxxxxxx");
// Remove by email
let opt_emails = BatchRemoveSuppressionOptions::new()
.add_emails(vec!["steve.wozniak@example.com", "susan.kare@example.com"]);
let _data = resend.suppressions.batch_remove(opt_emails).await?;
// Remove by id
let opt_ids =
BatchRemoveSuppressionOptions::new().add_ids(vec!["e169aa45-1ecf-4183-9955-b1499d5701d3"]);
let _data = resend.suppressions.batch_remove(opt_ids).await?;
Ok(())
}
# Remove by suppression ids
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"]
}'
# Remove by emails
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 email
resend suppressions batch remove --file suppressions.json
# Remove by id
resend suppressions batch remove --file suppression-ids.json --ids
{
"data": [
{
"object": "suppression",
"id": "e169aa45-1ecf-4183-9955-b1499d5701d3",
"deleted": true
}
]
}
Body Parameters
Provide eitheremails or ids, but not both.
array
The email addresses to remove from the suppression list. Must contain between
1 and 100 email addresses.
array
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 suppression ids
const { data, error } = await resend.suppressions.batch.remove({
ids: ['e169aa45-1ecf-4183-9955-b1499d5701d3'],
});
// Remove by emails
const { data, error } = await resend.suppressions.batch.remove({
emails: ['steve.wozniak@example.com', 'susan.kare@example.com'],
});
$resend = Resend::client('re_xxxxxxxxx');
// Remove by suppression ids
$resend->suppressions->batch->remove([
'ids' => ['e169aa45-1ecf-4183-9955-b1499d5701d3'],
]);
// Remove by emails
$resend->suppressions->batch->remove([
'emails' => ['steve.wozniak@example.com', 'susan.kare@example.com'],
]);
use resend_rs::{Resend, Result, types::BatchRemoveSuppressionOptions};
#[tokio::main]
async fn main() -> Result<()> {
let resend = Resend::new("re_xxxxxxxxx");
// Remove by email
let opt_emails = BatchRemoveSuppressionOptions::new()
.add_emails(vec!["steve.wozniak@example.com", "susan.kare@example.com"]);
let _data = resend.suppressions.batch_remove(opt_emails).await?;
// Remove by id
let opt_ids =
BatchRemoveSuppressionOptions::new().add_ids(vec!["e169aa45-1ecf-4183-9955-b1499d5701d3"]);
let _data = resend.suppressions.batch_remove(opt_ids).await?;
Ok(())
}
# Remove by suppression ids
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"]
}'
# Remove by emails
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 email
resend suppressions batch remove --file suppressions.json
# Remove by id
resend suppressions batch remove --file suppression-ids.json --ids
{
"data": [
{
"object": "suppression",
"id": "e169aa45-1ecf-4183-9955-b1499d5701d3",
"deleted": true
}
]
}
Was this page helpful?
⌘I