Skip to main content
POST
/
contacts
import { Resend } from 'resend';

const resend = new Resend('re_xxxxxxxxx');

const { data, error } = await resend.contacts.create({
  email: 'steve.wozniak@gmail.com',
  firstName: 'Steve',
  lastName: 'Wozniak',
  unsubscribed: false,
});
{
  "object": "contact",
  "id": "479e3145-dd38-476b-932c-529ceb705947"
}

Body Parameters

email
string
required
The email address of the contact.
unsubscribed
boolean
The Contact’s global subscription status. If set to true, the contact will be unsubscribed from all Broadcasts.
properties
object
A map of custom property keys and values to create.
import { Resend } from 'resend';

const resend = new Resend('re_xxxxxxxxx');

const { data, error } = await resend.contacts.create({
  email: 'steve.wozniak@gmail.com',
  firstName: 'Steve',
  lastName: 'Wozniak',
  unsubscribed: false,
});
{
  "object": "contact",
  "id": "479e3145-dd38-476b-932c-529ceb705947"
}