Audiences
Contacts
Add and manage individual contacts within an audience. Contacts can also be imported via CSV in the dashboard.
Add and manage individual contacts within an audience. Contacts can also be imported via CSV in the dashboard.
POST
/audiences/:id/contactsAdd a single contact to an audience. If the email already exists in the audience the record is updated (upsert).
| Parameter | Type | Description |
|---|---|---|
emailrequired | string | Contact email address. |
first_name | string | Contact first name. |
last_name | string | Contact last name. |
POST
/audiences/:id/contacts/batchUpsert up to 1,000 contacts at once. Existing contacts (matched by email) are updated; new ones are inserted.
| Parameter | Type | Description |
|---|---|---|
contactsrequired | array | Array of contact objects. Each has email (required), first_name, last_name. |
curl -X POST https://api.eusend.dev/audiences/550e8400-e29b-41d4-a716-446655440000/contacts/batch \
-H "Authorization: Bearer eu_live_xxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"contacts": [
{ "email": "alice@example.com", "first_name": "Alice" },
{ "email": "bob@example.com", "first_name": "Bob" }
]
}'The rest of the contacts surface:
GET
/audiences/:id/contactsList contacts.
GET
/audiences/:id/contacts/:contactIdGet a contact.
PATCH
/audiences/:id/contacts/:contactIdUpdate contact (name, unsubscribed).
DELETE
/audiences/:id/contacts/:contactIdRemove a contact.