List customers and leads
List customers and leads from Customers & Leads.
GET https://cotlet.dev/api/v1/method-crm/customers
read
Returns each contact with its ID, name, type, assigned user and lead status for leads. Results come in pages; follow next_cursor until it is null. It returns only the contacts your Method user may see.
Parameters
| Name | Type | Description |
|---|---|---|
| query string | string | Search text for the name. |
| contact_type string | string | customer or lead. Default both. |
| cursor string | string | Next page cursor from the previous call. |
Request
curl https://cotlet.dev/api/v1/method-crm/customers \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("method-crm", "list_customers") const result = await cotlet.call('method-crm', 'list_customers'); cotlet call method-crm list_customers Example response
{
"contacts": [
{
"contact_id": "C-2041",
"name": "Ortega Kitchens",
"type": "customer",
"assigned_to": "Dana Whitfield"
},
{
"contact_id": "C-2077",
"name": "Lopez Fencing",
"type": "lead",
"assigned_to": "Dana Whitfield",
"lead_status": "Contacted"
}
],
"next_cursor": null
}