# Customers

## Get customers list

> Retrieve list of customers with optional filters

```json
{"openapi":"3.0.0","info":{"title":"Gleantap External API","version":"1.0.0"},"tags":[{"name":"Contacts","description":"Contacts"}],"servers":[{"url":"https://api.gleantap.com","description":"Production server"}],"paths":{"/v2/ExternalApi/getCustomers":{"post":{"tags":["Contacts"],"summary":"Get customers list","description":"Retrieve list of customers with optional filters","operationId":"34ca237468cb769b2d1e7b41f622f8aa","parameters":[{"name":"X-API-KEY","in":"header","description":"Your API key","required":true,"schema":{"type":"string"}},{"name":"X-SECRET-KEY","in":"header","description":"Your Secret key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"required":["app_id"],"properties":{"app_id":{"type":"string"},"_id":{"type":"string"},"user_id":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"event_since_date":{"type":"string","format":"date"},"updated_since":{"type":"string","format":"date"},"limit":{"type":"integer","maximum":1000},"offset":{"type":"integer"},"fulldata":{"description":"If true, the response will include all data for the customer including visits, purchases, memberships, and sales notes","type":"boolean"},"events":{"description":"If true, the response will include all events for the customer","type":"boolean"}},"type":"object"}}}},"responses":{"200":{"description":"Customers list retrieved successfully","content":{"application/json":{"schema":{"properties":{"members":{"type":"array","items":{"properties":{"id":{"type":"string"},"firstname":{"type":"string"},"lastname":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"last_location":{"type":"string"},"email_optout":{"type":"integer"},"sms_optout":{"type":"integer"},"created_date":{"type":"string","format":"date-time"}},"type":"object"}}},"type":"object"}}}},"400":{"description":"Invalid request"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.gleantap.com/fetch-data/customers.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
