rembrembdocs

Node.js

import { Resend } from 'resend';

const resend = new Resend('re_xxxxxxxxx');

// Update by contact id
const { data, error } = await resend.contacts.update({
  id: 'e169aa45-1ecf-4183-9955-b1499d5701d3',
  unsubscribed: true,
});

// Update by contact email
const { data, error } = await resend.contacts.update({
  email: 'acme@example.com',
  unsubscribed: true,
});
import { Resend } from 'resend';

const resend = new Resend('re_xxxxxxxxx');

// Update by contact id
const { data, error } = await resend.contacts.update({
  id: 'e169aa45-1ecf-4183-9955-b1499d5701d3',
  unsubscribed: true,
});

// Update by contact email
const { data, error } = await resend.contacts.update({
  email: 'acme@example.com',
  unsubscribed: true,
});
{
  "object": "contact",
  "id": "479e3145-dd38-476b-932c-529ceb705947"
}

Node.js

import { Resend } from 'resend';

const resend = new Resend('re_xxxxxxxxx');

// Update by contact id
const { data, error } = await resend.contacts.update({
  id: 'e169aa45-1ecf-4183-9955-b1499d5701d3',
  unsubscribed: true,
});

// Update by contact email
const { data, error } = await resend.contacts.update({
  email: 'acme@example.com',
  unsubscribed: true,
});
import { Resend } from 'resend';

const resend = new Resend('re_xxxxxxxxx');

// Update by contact id
const { data, error } = await resend.contacts.update({
  id: 'e169aa45-1ecf-4183-9955-b1499d5701d3',
  unsubscribed: true,
});

// Update by contact email
const { data, error } = await resend.contacts.update({
  email: 'acme@example.com',
  unsubscribed: true,
});
{
  "object": "contact",
  "id": "479e3145-dd38-476b-932c-529ceb705947"
}

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.

Body Parameters

The first name of the contact.

The last name of the contact.

The Contact’s global subscription status. If set to true, the contact will be unsubscribed from all Broadcasts.

A map of custom property keys and values to update.

Hide custom properties