Skip to main content
Contact Properties can be used to store additional information about your Contacts and then personalize your Broadcasts. Resend includes a few default properties:
  • first_name: The first name of the contact.
  • last_name: The last name of the contact.
  • unsubscribed: Whether the contact is unsubscribed from all Broadcasts.
  • email: The email address of the contact.

Add Custom Contact Properties

You can create additional custom Contact Properties for your Contacts to store additional information. These properties can be used to personalize your Broadcasts across all Segments. Each Contact Property has a key, a value, and optional fallback value.
  • key: The key of the property (must be alphanumeric and underscore only, max 50 characters).
  • value: The value of the property (may be a string or number).
  • fallback_value: The fallback value of the property (must match the type of the property).
You can also create Contact Properties via the API or SDKs.
import { Resend } from 'resend';

const resend = new Resend('re_xxxxxxxxx');

const { data, error } = await resend.contactProperties.create({
  key: 'company_name',
  type: 'string',
  fallbackValue: 'Acme Corp',
});

Add Properties to a Contact

When you create a Contact Property you can provide a fallback value. This value will be used whenever you don’t provide a custom value for a Contact. To provide a custom value for a Contact, you can use the dashboard:
  1. Go to the Contacts page.
  2. Click the more options button and then Edit Contact.
  3. Add the property key and value.
  4. Click on the Save button.
You can also add properties to a Contact when you create a 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,
  properties: {
    company_name: 'Acme Corp',
  },
});
Or you can update a Contact to add or change a property value using the update contact endpoint.
import { Resend } from 'resend';

const resend = new Resend('re_xxxxxxxxx');

// Update by contact id
const { data, error } = await resend.contacts.update({
  id: 'e169aa45-1ecf-4183-9955-b1499d5701d3',
  properties: {
    company_name: 'Acme Corp',
  },
});

// Update by contact email
const { data, error } = await resend.contacts.update({
  email: 'acme@example.com',
  properties: {
    company_name: 'Acme Corp',
  },
});
When you create or update a Contact with properties, the properties are added to the Contact, but only if the property key already exists and the value type is valid. You can list all Contact Properties to see all available properties.
If the properties don’t exist, they are not added to the Contact and the call fails. An error is returned.
Yes, property keys are case sensitive. If you create a property with a key of “company_name”, you cannot use “CompanyName” or “company_Name” in your Contacts.
If the value isn’t the right type, the property value is not added to the Contact and the call fails. An error is returned.

Use Contact Properties in Broadcasts

You can use Contact Properties in your Broadcasts to personalize your emails. You can also use Contact Properties in your Broadcast HTML and Text content when you create a Broadcast using the API or SDKs.