Methods
Create
CreateWithContext
Request Parameters
CreateContactRequest
The email address of the contact
Deprecated: The audience ID to add the contact to. Omit this field to create a global contact. Use the Segments API for contact organization instead.
Whether the contact is unsubscribed from emails. Defaults to
false.The contact’s first name
The contact’s last name
Custom key-value pairs for global contacts (when
audience_id is omitted).Important: Currently, the Resend API only accepts string values for properties. Non-string values (numbers, booleans, etc.) will be rejected by the API with a validation error.Example: map[string]any{"tier": "premium", "age": "30", "active": "true"}Response
CreateContactResponse
Object type (“contact”)
The unique identifier for the created contact
Examples
Create Global Contact
Create Contact with Properties
Create Audience Contact (Deprecated)
With Context
Notes
- Global contacts (without
audience_id) support custom properties - Audience-specific contacts (with
audience_id) do not support custom properties - The
audience_idfield is deprecated; use the Segments API for organizing contacts