Create Audience
Create a new audience for campaigns.
POST
/audiencesRequest Body
namestringRequiredThe name of the audience.
{
"object": "audience",
"id": 1234567890,
"name": "My Newsletter Audience",
"token": "aud_abc123def456",
"created_at": "2021-01-01T00:00:00Z",
"updated_at": "2021-01-01T00:00:00Z"
} {
"error": {
"code": 409,
"message": "Audience already exists"
},
"existing": {
"object": "audience",
"id": 1234567890,
"name": "My Newsletter Audience",
"token": "aud_abc123def456",
"created_at": "2021-01-01T00:00:00Z",
"updated_at": "2021-01-01T00:00:00Z"
}
} Get Audience
Retrieve details of a specific audience.
GET
/audiences/{id}Path Parameters
idstringRequiredThe ID of the audience to retrieve.
{
"object": "audience",
"id": 1234567890,
"name": "My Newsletter Audience",
"token": "aud_abc123def456",
"created_at": "2021-01-01T00:00:00Z",
"updated_at": "2021-01-01T00:00:00Z"
} {
"error": {
"code": 404,
"message": "Audience not found"
}
} Delete Audience
Delete an audience and all its subscribers.
DELETE
/audiences/{id}Path Parameters
idstringRequiredThe ID of the audience to delete.
{
"object": "audience",
"id": 1234567890,
"name": "My Newsletter Audience",
"deleted": true
} {
"error": {
"code": 404,
"message": "Audience not found"
}
} Update Audience
Update audience settings and metadata.
POST
/audiences/{id}Path Parameters
idstringRequiredThe ID of the audience to update.
Request Body
namestringThe new name for the audience.
{
"object": "audience",
"id": 1234567890,
"name": "Updated Newsletter Audience",
"token": "aud_abc123def456",
"created_at": "2021-01-01T00:00:00Z",
"updated_at": "2021-01-01T12:00:00Z"
} {
"error": {
"code": 404,
"message": "Audience not found"
}
} {
"error": {
"code": 409,
"message": "Audience name already exists"
}
} List Audiences
Get all audiences in your account.
GET
/audiencesQuery Parameters
pageintegerPage number for pagination (minimum: 1).
limitintegerNumber of audiences to return (minimum: 1, maximum: 100).
{
"data": [
{
"id": 1234567890,
"name": "My Newsletter Audience",
"created_at": "2021-01-01T00:00:00Z",
"updated_at": "2021-01-01T00:00:00Z"
},
{
"id": 1234567891,
"name": "Product Updates",
"created_at": "2021-01-02T00:00:00Z",
"updated_at": "2021-01-02T00:00:00Z"
}
],
"next_page_url": "https://api.emailit.com/v2/audiences?page=2&limit=10",
"previous_page_url": null
}