List segments

Saved segments of a list with the conditions each one is built from.

GET https://cotlet.dev/api/v1/emailoctopus/lists/{list_id}/segments

read

Returns the reusable segments shown on the Segments tab of the Contacts page: name, match type (all, any or none) and the conditions in the words of the segment editor. Use a segment name as the segment parameter of list_contacts, set_campaign_recipients and unsubscribe_contacts. One-off segments built inside a campaign are not saved, so they do not appear.

Parameters

Parameters: list_segments
NameTypeDescription
list_id string required string List ID from list_lists.

Request

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

Example response

JSON

{
  "segments": [
    {
      "name": "Clicked in last 90 days",
      "match": "all",
      "conditions": [
        "Campaign activity: clicked, any campaign within the last 90 days"
      ]
    },
    {
      "name": "Did not open: Autumn offer",
      "match": "all",
      "conditions": [
        "Campaign activity: did not open, Autumn offer",
        "Campaign activity: was sent, Autumn offer"
      ]
    }
  ]
}

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.