List contacts

Contacts of one list with their properties, filtered by segment or email address.

GET https://cotlet.dev/api/v1/mailjet/lists/{list_id}/contacts

read

Lists the contacts of one contact list with their email address, subscription state and contact properties such as first name. segment narrows it to a segment from list_segments, and search matches a complete email address. Pass next_cursor back as cursor for the next page. The response also carries the total number of matching contacts.

Parameters

Parameters: list_contacts
NameTypeDescription
list_id integer required integer Contact list ID from list_contact_lists.
segment string string Name of a segment from list_segments.
search string string A complete email address to look for.
cursor string string next_cursor from the previous call.

Request

cURL
curl https://cotlet.dev/api/v1/mailjet/lists/1/contacts \
  -H "Authorization: Bearer $COTLET_API_KEY"
Python
result = client.call("mailjet", "list_contacts", {"list_id":1})
Node.js
const result = await cotlet.call('mailjet', 'list_contacts', {"list_id":1});
CLI
cotlet call mailjet list_contacts --data '{"list_id":1}'

Example response

JSON

{
  "total": 197,
  "contacts": [
    {
      "email": "sam@example.com",
      "subscribed": true,
      "properties": {
        "firstname": "Sam",
        "country": "GB"
      }
    },
    {
      "email": "lena@example.org",
      "subscribed": true,
      "properties": {
        "firstname": "Lena",
        "country": "DE"
      }
    }
  ],
  "next_cursor": "2"
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.