List contacts

Contacts of the account, filtered by list, segment or search.

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

read

Reads the Contacts page: name, phone number, email, the lists the contact belongs to and whether the contact is subscribed. Filter by list name, by segment name or by a search. Page with next_cursor. The call reads only; it never texts anyone.

Parameters

Parameters: list_contacts
NameTypeDescription
list string string Name of a contact list.
segment string string Name of a segment, from list_segments.
query string string Name, phone number or email.
limit integer integer Page size.
cursor string string next_cursor from the previous call.

Request

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

Example response

JSON

{
  "contacts": [
    {
      "name": "Dana Whitfield",
      "phone": "+12125550147",
      "email": "dana.whitfield@example.com",
      "lists": [
        "Patients"
      ],
      "subscribed": true
    },
    {
      "name": "Marcus Lee",
      "phone": "+12125550163",
      "email": "marcus.lee@example.com",
      "lists": [
        "Patients",
        "Class reminders"
      ],
      "subscribed": true
    }
  ],
  "next_cursor": null
}

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.