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 https://cotlet.dev/api/v1/mautic/segments \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("mautic", "list_segments") const result = await cotlet.call('mautic', 'list_segments'); cotlet call mautic list_segments Example response
{
"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
}
]
}