Skip to main content
POST
https://api.resend.com
/
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.
segments
array
Array of objects. Each object must contain the ID of the segment that you’d like to add the contact to.
topics
array
Array of topic subscriptions for the contact.
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"
}