import { Resend } from 'resend';

const resend = new Resend('re_123456789');

// Delete by contact id
resend.contacts.remove({
  id: '520784e2-887d-4c25-b53c-4ad46ad38100',
  audienceId: '78261eea-8f8b-4381-83c6-79fa7120f1cf',
});

// Delete by contact email
resend.contacts.remove({
  email: 'acme@example.com',
  audienceId: '78261eea-8f8b-4381-83c6-79fa7120f1cf',
});
{
  "object": "contact",
  "contact": "520784e2-887d-4c25-b53c-4ad46ad38100",
  "deleted": true
}

Path Parameters

audienceId
string
required

The Audience ID.

id
string

The Contact ID.

email
string

The Contact email.

import { Resend } from 'resend';

const resend = new Resend('re_123456789');

// Delete by contact id
resend.contacts.remove({
  id: '520784e2-887d-4c25-b53c-4ad46ad38100',
  audienceId: '78261eea-8f8b-4381-83c6-79fa7120f1cf',
});

// Delete by contact email
resend.contacts.remove({
  email: 'acme@example.com',
  audienceId: '78261eea-8f8b-4381-83c6-79fa7120f1cf',
});
{
  "object": "contact",
  "contact": "520784e2-887d-4c25-b53c-4ad46ad38100",
  "deleted": true
}