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_emailstringrequired

The contact ID (UUID) or email address.

Body Parameters

emailstring

New email address for the contact.

first_namestring | null

Contact first name. Pass null to clear.

last_namestring | null

Contact last name. Pass null to clear.

unsubscribedboolean

Whether the contact should be unsubscribed.

propertiesobject

Custom key-value properties. Replaces all existing properties.

topicsarray

Topic subscription updates. Only provided topics are updated; others remain unchanged.

idstringrequired

Topic ID.

subscriptionstringrequired

Subscription status: opt_in or opt_out.

Response Fields

objectstring

Always "contact".

idstring

The 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

Response
{
  "object": "contact",
  "id": "e169aa45-1ecf-4183-9955-b1499d5701d3"
}