Update Contact
Update a contact by ID or email address. All body fields are optional; only provided fields will be updated.
PATCH
/contacts/{contact_id_or_email}Resend Compatibility: Partial -- Postflare supports lookup by email, and adds properties and topics fields.
Requires a full_access API key.
Path Parameters
contact_id_or_emailstringrequiredThe contact ID (UUID) or email address.
Body Parameters
emailstringNew email address for the contact.
first_namestring | nullContact first name. Pass null to clear.
last_namestring | nullContact last name. Pass null to clear.
unsubscribedbooleanWhether the contact should be unsubscribed.
propertiesobjectCustom key-value properties. Replaces all existing properties.
topicsarrayTopic subscription updates. Only provided topics are updated; others remain unchanged.
idstringrequiredTopic ID.
subscriptionstringrequiredSubscription status: opt_in or opt_out.
Response Fields
objectstringAlways "contact".
idstringThe contact ID.
curl -X PATCH 'https://api.postflare.app/contacts/e169aa45-1ecf-4183-9955-b1499d5701d3' \
-H 'Authorization: Bearer re_xxxxxxxxx' \
-H 'Content-Type: application/json' \
-d '{
"first_name": "Jane",
"unsubscribed": true
}'import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.contacts.update({
id: 'e169aa45-1ecf-4183-9955-b1499d5701d3',
audienceId: '<audience_id>', // Required by Resend SDK
firstName: 'Jane',
unsubscribed: true,
});Response
{
"object": "contact",
"id": "e169aa45-1ecf-4183-9955-b1499d5701d3"
}