# GET /api/v1/advisory-firms/{firm_id}/clients

> List firm clients

- **Tag:** advisory-firms
- **Operation ID:** `list_firm_clients_api_v1_advisory_firms__firm_id__clients_get`

## Description

List all users with the 'client' role in this firm, with their assigned businesses.

## Authentication

Bearer token in `Authorization` header.
Required header: `x-business-id: <business uuid>`.

## Parameters

- `firm_id` (path, string, required)
- `search` (query, string, optional) — Search by client name or email

## Responses

### 200 — Successful Response

Schema: `FirmClientsListResponse`

- `items` (array · FirmClientResponse · required) → `FirmClientResponse`
  - `id` (string · required)
  - `email` (string · required)
  - `first_name` (string)
  - `last_name` (string)
  - `photo_url` (string)
  - `businesses` (array · object) — Businesses this client can access [{id, name}]
- `total` (integer · required)

### 401 — Unauthorized - Authentication required

### 403 — Forbidden - Insufficient permissions

### 404 — Not Found - Resource does not exist

### 422 — Validation Error

Schema: `HTTPValidationError`

- `detail` (array · ValidationError) → `ValidationError`
  - `loc` (array · string | integer · required)
  - `msg` (string · required)
  - `type` (string · required)
  - `input` (object)
  - `ctx` (object)

## Code samples

### cURL

```bash
curl -X GET 'https://api.ondayzero.com/api/v1/advisory-firms/{firm_id}/clients' \
  -H 'Authorization: Bearer dz_your_token' \
  -H 'x-business-id: YOUR_BUSINESS_ID'
```

### JavaScript

```javascript
const response = await fetch('https://api.ondayzero.com/api/v1/advisory-firms/{firm_id}/clients', {
  method: 'GET',
  headers: {
    Authorization: 'Bearer dz_your_token',
    'x-business-id': 'YOUR_BUSINESS_ID',
  },
});
const data = await response.json();
```

### Python

```python
import httpx

headers = {
    "Authorization": "Bearer dz_your_token",
    "x-business-id": "YOUR_BUSINESS_ID",
}

response = httpx.get("https://api.ondayzero.com/api/v1/advisory-firms/{firm_id}/clients", headers=headers)
data = response.json()
```

## See also

- HTML version: https://www.ondayzero.com/docs/reference/advisory-firms/list-firm-clients
- OpenAPI slice: https://www.ondayzero.com/docs/reference/advisory-firms/list-firm-clients/openapi.json
- Other endpoints in **advisory-firms**: https://www.ondayzero.com/docs/reference/advisory-firms
