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

Parameters: list_customers
NameTypeDescription
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
curl https://cotlet.dev/api/v1/method-crm/customers \
  -H "Authorization: Bearer $COTLET_API_KEY"
Python
result = client.call("method-crm", "list_customers")
Node.js
const result = await cotlet.call('method-crm', 'list_customers');
CLI
cotlet call method-crm list_customers

Example response

JSON

{
  "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
}

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.