Contacts
Contacts are the people in your email lists. The Contacts API allows you to create, retrieve, update, and delete contacts in your easymail account.
Overview
Each contact has a unique email address and can include additional information like name, language preference, and custom fields. Contacts can be added to one or more lists for targeted email campaigns.
Endpoints
| Method | Endpoint | Description |
|---|---|---|
| POST | /contacts | Create a new contact |
| GET | /contacts | List all contacts |
| GET | /contacts/{uuid} | Get a specific contact |
| PATCH | /contacts/{uuid} | Update a contact |
| DELETE | /contacts/{uuid} | Delete a contact |
| POST | /contacts/{uuid}/unsubscribe | Unsubscribe a contact from all mail |
| POST | /contacts/{uuid}/resubscribe | Reverse a contact's unsubscribe |
| GET | /contacts/{uuid}/events | List a contact's event timeline |
Contact Object
| Field | Type | Description |
|---|---|---|
uuid | string | Unique identifier for the contact |
email | string | Contact's email address |
first_name | string|null | Contact's first name |
last_name | string|null | Contact's last name |
phone | string|null | Contact's phone number |
external_id | string|null | External identifier for integration purposes |
language | string|null | ISO 639-1 language code (2 characters) |
country_code | string|null | ISO 3166-1 alpha-2 country code (2 characters) |
created_at | string | ISO 8601 timestamp (UTC) |
updated_at | string | ISO 8601 timestamp (UTC) |
Subscription status
Every contact has a subscription status describing whether it can be mailed:
subscribed— the contact can receive mail: neither unsubscribed nor undeliverable.unsubscribed— the contact has opted out of all mail.suppressed— the contact is undeliverable (for example, after a permanent bounce) and is held back from sending regardless of consent.
These values are not mutually exclusive: a contact can be both unsubscribed
and suppressed. subscribed is the exact complement — neither of the other two.
Filter a list by status with the status parameter on
List Contacts. Get Contact returns the
headline status along with detailed subscription, deliverability, and
engagement objects for a single contact. For the per-event history behind those
summaries — opens, clicks, bounces, subscribes, and purchases, in order — use
List Contact Events.
Set the opt-out with Unsubscribe Contact and
Resubscribe Contact. These act on the account-wide
consent only; they do not change list membership, and resubscribing does not
clear a suppressed state.