List segments

Segments with alias, type, active state and contact count.

GET https://cotlet.dev/api/v1/mautic/segments

read

Lists the segments of your Mautic. type is dynamic (filters decide who is in) or static (contacts are added by hand, by import, by a form or by a campaign). active is false when the segment is switched off but still listed. Use segment_id as the parameter of the other segment tools.

Parameters

No parameters.

Request

cURL
curl https://cotlet.dev/api/v1/mautic/segments \
  -H "Authorization: Bearer $COTLET_API_KEY"
Python
result = client.call("mautic", "list_segments")
Node.js
const result = await cotlet.call('mautic', 'list_segments');
CLI
cotlet call mautic list_segments

Example response

JSON

{
  "segments": [
    {
      "segment_id": 3,
      "name": "Newsletter",
      "alias": "newsletter",
      "type": "static",
      "active": true,
      "contacts": 1840
    },
    {
      "segment_id": 7,
      "name": "Webinar leads",
      "alias": "webinar-leads",
      "type": "dynamic",
      "active": true,
      "contacts": 212
    }
  ]
}

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.