List contacts
Contacts of one list with name, phone number and email.
GET https://cotlet.dev/api/v1/clicksend/lists/{list_id}/contacts
read
Returns the contacts of one list, 50 to a page; pass next_cursor back as cursor for the next page. query matches a phone number, an email or a name inside the list. Phone numbers come back as ClickSend stores them, with the country code. contact_id goes into remove_contact.
Parameters
| Name | Type | Description |
|---|---|---|
| list_id integer required | integer | Contact list ID from list_contact_lists. |
| query string | string | Phone number, email or name to find inside the list. |
| cursor string | string | Next page cursor from the previous call. |
Request
curl https://cotlet.dev/api/v1/clicksend/lists/1/contacts \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("clicksend", "list_contacts", {"list_id":1}) const result = await cotlet.call('clicksend', 'list_contacts', {"list_id":1}); cotlet call clicksend list_contacts --data '{"list_id":1}' Example response
{
"contacts": [
{
"contact_id": 9012841,
"first_name": "Lena",
"last_name": "Ortiz",
"phone_number": "+447700900142",
"email": "lena@example.com"
}
],
"next_cursor": null
}