List segments

Saved segments under Contacts, within one list or across all contacts.

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

read

Reads the segments saved under Contacts > Segments: name, the list it belongs to (or all contacts) and how many contacts match now. Segments can be used in campaigns and autoresponders, so a segment name from here works as the segment of schedule_campaign.

Parameters

Parameters: list_segments
NameTypeDescription
list string string Only segments created within this list. Leave out for all.

Request

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

Example response

JSON

{
  "segments": [
    {
      "name": "Overdue for a cleaning",
      "list": "Patients",
      "contacts": 120
    },
    {
      "name": "New this month",
      "list": null,
      "contacts": 34
    }
  ]
}

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.