List segments
Lists the segments of one list, or of all lists.
GET https://cotlet.dev/api/v1/campaign-monitor/segments
read
Returns each segment with its ID, title and the list it belongs to. A segment belongs to exactly one list. Use the IDs as recipients in create_campaign_draft.
Parameters
| Name | Type | Description |
|---|---|---|
| list_id string | string | Only segments of this list. Leave out for every list. |
| cursor string | string | Next page cursor from the previous call. |
| limit integer | integer | How many items to return per page. |
Request
curl https://cotlet.dev/api/v1/campaign-monitor/segments \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("campaign-monitor", "list_segments") const result = await cotlet.call('campaign-monitor', 'list_segments'); cotlet call campaign-monitor list_segments Example response
{
"segments": [
{
"segment_id": "9e2b5d8a1c7f4630b4a9d2e5f8c13706",
"title": "Autumn sale: not opened",
"list_id": "f2a9b7c1d3e44f08a6b5c4d3e2f10987"
}
],
"next_cursor": null
}