Lists
API reference for listing your contact lists and how many contacts each one has.
List contact lists#
GET/api/v1/lists
Every list in the workspace with how many contacts it has, sorted by name.
Request
curl https://agent.maillayer.com/api/v1/lists \ -H "Authorization: Bearer $MAILLAYER_KEY"
Response · 200
{
"data": [
{ "id": "3c9e…", "name": "Customers", "contacts": 1883 },
{ "id": "8a12…", "name": "Newsletter", "contacts": 3240 }
]
}Lists are created when you add a contact to a list name that doesn't exist yet; see the Contacts API. Use list names or ids when creating a campaign.