Path Parameters
Eitherid or email must be provided.
The Contact ID.
The Contact Email.
import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
// Remove by contact id
const { data, error } = await resend.contacts.segments.remove({
id: 'e169aa45-1ecf-4183-9955-b1499d5701d3',
segmentId: '78261eea-8f8b-4381-83c6-79fa7120f1cf',
});
// Remove by contact email
const { data, error } = await resend.contacts.segments.remove({
email: 'steve.wozniak@gmail.com',
segmentId: '78261eea-8f8b-4381-83c6-79fa7120f1cf',
});
{
"id": "78261eea-8f8b-4381-83c6-79fa7120f1cf",
"deleted": true
}
Remove an existing contact from a segment.
import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
// Remove by contact id
const { data, error } = await resend.contacts.segments.remove({
id: 'e169aa45-1ecf-4183-9955-b1499d5701d3',
segmentId: '78261eea-8f8b-4381-83c6-79fa7120f1cf',
});
// Remove by contact email
const { data, error } = await resend.contacts.segments.remove({
email: 'steve.wozniak@gmail.com',
segmentId: '78261eea-8f8b-4381-83c6-79fa7120f1cf',
});
{
"id": "78261eea-8f8b-4381-83c6-79fa7120f1cf",
"deleted": true
}
id or email must be provided.
import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
// Remove by contact id
const { data, error } = await resend.contacts.segments.remove({
id: 'e169aa45-1ecf-4183-9955-b1499d5701d3',
segmentId: '78261eea-8f8b-4381-83c6-79fa7120f1cf',
});
// Remove by contact email
const { data, error } = await resend.contacts.segments.remove({
email: 'steve.wozniak@gmail.com',
segmentId: '78261eea-8f8b-4381-83c6-79fa7120f1cf',
});
{
"id": "78261eea-8f8b-4381-83c6-79fa7120f1cf",
"deleted": true
}
Was this page helpful?