List segment contacts

Contacts in one segment, with email and points.

GET https://cotlet.dev/api/v1/mautic/segment-contacts

read

Returns the contacts of one segment, the same list as View X Contacts on the segment. A dynamic segment shows the members Mautic last calculated, so a contact who just matched the filters can be missing until the next segment update. Pass next_cursor back as cursor for the next page.

Parameters

Parameters: list_segment_contacts
NameTypeDescription
segment_id integer required integer Segment ID from list_segments.
limit integer integer Maximum contacts per page.
cursor string string Next page cursor from the previous call.

Request

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

Example response

JSON

{
  "segment": "webinar-leads",
  "contacts": [
    {
      "contact_id": 1042,
      "name": "Ana Lopez",
      "email": "ana@example.com",
      "points": 42
    },
    {
      "contact_id": 1388,
      "name": "Tom Becker",
      "email": "tom@example.com",
      "points": 18
    }
  ],
  "next_cursor": null
}

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.