rembrembdocs

Node.js

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',
});
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
}

DELETE

/

contacts

/

:contact_id

/

segments

/

:segment_id

Node.js

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',
});
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
}

Documentation Index

Fetch the complete documentation index at: https://resend.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

Path Parameters

Either id or email must be provided.