Add Subscriber
Add a new subscriber to an audience.
/audiences/{id}/subscribersPath Parameters
idstringRequiredThe ID of the audience to add the subscriber to.
Request Body
emailstringRequiredThe email address of the subscriber (must be a valid email format).
first_namestringThe first name of the subscriber.
last_namestringThe last name of the subscriber.
custom_fieldsobjectCustom fields for the subscriber (key-value pairs).
{
"object": "subscriber",
"id": 1234567890,
"audience_id": 1234567890,
"contact_id": 1234567890,
"email": "john.doe@example.com",
"first_name": "John",
"last_name": "Doe",
"custom_fields": {
"company": "Acme Corp",
"role": "Developer"
},
"subscribed": true,
"subscribed_at": "2021-01-01T00:00:00Z",
"unsubscribed_at": null,
"created_at": "2021-01-01T00:00:00Z",
"updated_at": "2021-01-01T00:00:00Z"
} {
"error": {
"code": 409,
"message": "Subscriber already exists"
},
"existing": {
"object": "subscriber",
"id": 1234567890,
"audience_id": 1234567890,
"contact_id": 1234567890,
"email": "john.doe@example.com",
"first_name": "John",
"last_name": "Doe",
"custom_fields": {
"company": "Acme Corp",
"role": "Developer"
},
"subscribed": true,
"subscribed_at": "2021-01-01T00:00:00Z",
"unsubscribed_at": null,
"created_at": "2021-01-01T00:00:00Z",
"updated_at": "2021-01-01T00:00:00Z"
}
} Get Subscriber
Retrieve details of a specific subscriber.
/audiences/{id}/subscribers/{subscriberId}Path Parameters
idstringRequiredThe ID of the audience.
subscriberIdstringRequiredThe ID of the subscriber to retrieve.
{
"object": "subscriber",
"id": 1234567890,
"audience_id": 1234567890,
"contact_id": 1234567890,
"email": "john.doe@example.com",
"first_name": "John",
"last_name": "Doe",
"custom_fields": {
"company": "Acme Corp",
"role": "Developer"
},
"subscribed": true,
"subscribed_at": "2021-01-01T00:00:00Z",
"unsubscribed_at": null,
"created_at": "2021-01-01T00:00:00Z",
"updated_at": "2021-01-01T00:00:00Z"
} {
"error": {
"code": 404,
"message": "Subscriber not found"
}
} Update Subscriber
Update subscriber information and preferences.
/audiences/{id}/subscribers/{subscriberId}Path Parameters
idstringRequiredThe ID of the audience.
subscriberIdstringRequiredThe ID of the subscriber to update.
Request Body
emailstringThe email address of the subscriber (must be a valid email format).
first_namestringThe first name of the subscriber.
last_namestringThe last name of the subscriber.
custom_fieldsobjectCustom fields for the subscriber (key-value pairs).
subscribedbooleanWhether the subscriber is subscribed (true) or unsubscribed (false).
{
"object": "subscriber",
"id": 1234567890,
"audience_id": 1234567890,
"contact_id": 1234567890,
"email": "john.updated@example.com",
"first_name": "John",
"last_name": "Updated",
"custom_fields": {
"company": "New Corp",
"role": "Senior Developer"
},
"subscribed": true,
"subscribed_at": "2021-01-01T00:00:00Z",
"unsubscribed_at": null,
"created_at": "2021-01-01T00:00:00Z",
"updated_at": "2021-01-01T12:00:00Z"
} {
"error": {
"code": 404,
"message": "Subscriber not found"
}
} Delete Subscriber
Delete a subscriber from an audience.
/audiences/{id}/subscribers/{subscriberId}Path Parameters
idstringRequiredThe ID of the audience.
subscriberIdstringRequiredThe ID of the subscriber to delete.
{
"object": "subscriber",
"id": 1234567890,
"audience_id": 1234567890,
"contact_id": 1234567890,
"email": "john.doe@example.com",
"deleted": true
} {
"error": {
"code": 404,
"message": "Subscriber not found"
}
} List Subscribers
Get all subscribers in an audience.
/audiences/{id}/subscribersPath Parameters
idstringRequiredThe ID of the audience to list subscribers from.
Query Parameters
pageintegerPage number for pagination (minimum: 1).
limitintegerNumber of subscribers to return (minimum: 1, maximum: 100).
subscribedstringFilter subscribers by subscription status. Can be ‘true’ or ‘false’.
{
"data": [
{
"object": "subscriber",
"id": 1234567890,
"audience_id": 1234567890,
"contact_id": 1234567890,
"email": "john.doe@example.com",
"first_name": "John",
"last_name": "Doe",
"custom_fields": {
"company": "Acme Corp",
"role": "Developer"
},
"subscribed": true,
"subscribed_at": "2021-01-01T00:00:00Z",
"unsubscribed_at": null,
"created_at": "2021-01-01T00:00:00Z",
"updated_at": "2021-01-01T00:00:00Z"
},
{
"object": "subscriber",
"id": 1234567891,
"audience_id": 1234567890,
"contact_id": 1234567891,
"email": "jane.smith@example.com",
"first_name": "Jane",
"last_name": "Smith",
"custom_fields": {
"company": "Tech Corp",
"role": "Manager"
},
"subscribed": true,
"subscribed_at": "2021-01-02T00:00:00Z",
"unsubscribed_at": null,
"created_at": "2021-01-02T00:00:00Z",
"updated_at": "2021-01-02T00:00:00Z"
}
],
"next_page_url": "https://api.emailit.com/v2/audiences/aud_1234567890/subscribers?page=2&limit=10&subscribed=true",
"previous_page_url": null
} {
"error": {
"code": 404,
"message": "Audience not found"
}
}