# Search clients

`POST https://testing-backend.estactics.com/api/clients/search`

Returns a list of clients, with only the fields you ask for.

Authentication: `Authorization: Bearer YOUR_API_KEY`. Required permission: `clients.VIEW`.

## Body parameters

- `fields` (array of string, required): The fields to return. Required.
- `filters` (array of object): Conditions to match. Items in the array are combined with OR, and fields inside one item with AND. See the Filtering guide.
- `orderBy` (object): Field to sort by. The field must also be listed in `fields`.
- `limit` (integer): How many records to return. Always set this, because leaving it out can return every record.
- `offset` (integer): How many records to skip.

## Example request body

```json
{
  "fields": [
    "id",
    "fullName",
    "stage"
  ],
  "filters": [
    {
      "city": {
        "mode": "EQ",
        "value": [
          "Limassol"
        ]
      }
    }
  ],
  "orderBy": {
    "id": "DESC"
  },
  "limit": 25,
  "offset": 0
}
```

## Example response

```json
{
  "success": true,
  "data": [
    {
      "id": 1042,
      "fullName": "Alex Morgan",
      "stage": {
        "id": 1,
        "name": "New",
        "icon": null,
        "color": null,
        "category": "ENTRY"
      }
    }
  ]
}
```
