Segments are currently in private beta and only available to a limited
number of users. APIs might change before GA.To use the methods on this page, you must upgrade your Resend SDK:Get in touch if you’re interested in testing
this feature.
import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.segments.remove(
  '78261eea-8f8b-4381-83c6-79fa7120f1cf',
);
{
  "object": "segment",
  "id": "78261eea-8f8b-4381-83c6-79fa7120f1cf",
  "deleted": true
}
Remove an existing segment.
import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.segments.remove(
  '78261eea-8f8b-4381-83c6-79fa7120f1cf',
);
{
  "object": "segment",
  "id": "78261eea-8f8b-4381-83c6-79fa7120f1cf",
  "deleted": true
}
npm install resend@6.3.0-canary.0
import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.segments.remove(
  '78261eea-8f8b-4381-83c6-79fa7120f1cf',
);
{
  "object": "segment",
  "id": "78261eea-8f8b-4381-83c6-79fa7120f1cf",
  "deleted": true
}
Was this page helpful?