Node.js
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,
});
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"
}
Node.js
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,
});
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"
}
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.
Body Parameters
The email address of the contact.
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 create.
Hide custom properties
Array of objects. Each object must contain the ID of the segment that you’d like to add the contact to.
Hide segments
Array of topic subscriptions for the contact.
Hide topics
subscription
'opt_in' | 'opt_out'
required
The subscription status for this topic.