import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.contacts.create({
email: '[email protected]',
firstName: 'Steve',
lastName: 'Wozniak',
unsubscribed: false,
});
{
"object": "contact",
"id": "479e3145-dd38-476b-932c-529ceb705947"
}
Create a contact.
import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.contacts.create({
email: '[email protected]',
firstName: 'Steve',
lastName: 'Wozniak',
unsubscribed: false,
});
{
"object": "contact",
"id": "479e3145-dd38-476b-932c-529ceb705947"
}
true, the contact will
be unsubscribed from all Broadcasts.import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.contacts.create({
email: '[email protected]',
firstName: 'Steve',
lastName: 'Wozniak',
unsubscribed: false,
});
{
"object": "contact",
"id": "479e3145-dd38-476b-932c-529ceb705947"
}
Was this page helpful?