List Contacts

Query Options

Search and filter contacts before paginating the results

  • search matches first name, last name, email, phone, and inbox provider.
  • filters accepts a JSON-encoded array of filter objects. Supported filter IDs are provider and subscribed.
  • A request can contain at most two filters, with each filter ID included once.
  • per_page defaults to 10 and cannot exceed 25.
GET
/v1/contacts

List Contacts in your workspace

Request body

searchstring

Search contact names, email addresses, phone numbers, and providers. Maximum 200 characters.

filtersarray

JSON-encoded array of `provider` or `subscribed` filter objects

pagenumber

Query parameter for the page number (default 1)

per_pagenumber

Query parameter for records per page. Defaults to `10` and has a maximum of `25`.

Request
cURL
curl --get "https://api.leadpush.io/v1/contacts" \
  --data-urlencode 'search=person@example.com' \
  --data-urlencode 'filters=[{"id":"subscribed","value":[true]}]' \
  --data-urlencode 'page=1' \
  --data-urlencode 'per_page=10' \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer {token}"
Response Example
{
  "data": [
    {
      "uuid": "<contact_uuid>",
      "subscribed": true,
      "attributes": {
        "first_name": "John",
        "last_name": "Doe",
        "email": "john_doe@leadpush.io",
        "phone": "+1234567890"
      },
      "created_at": "2021-01-01T00:00:00.000Z",
      "updated_at": "2021-01-01T00:00:00.000Z"
    }
  ],
  "meta": {
    "current_page": 1,
    "per_page": 10,
    "total": 100,
    "last_page": 10
  }
}