---
title: "List Clients"
method: GET
path: "/clients"
tags: ["Clients"]
---

# List Clients

`GET /clients`

## Request

- Base URL: `https://api.purplegrain.com/api/v1`
- URL: `https://api.purplegrain.com/api/v1/clients`
- Auth: HTTP bearer

The caller's client contact book, ordered by name. Pass owner_id/owner_type
to read an organization's clients (requires edit rights on the
organization). Pass q to search by name or location.

## Query parameters

- `owner_id` string
- `owner_type` 'User' | 'Organization'
- `q` string
- `page` integer
- `per_page` integer
- `include` string

## Response `200`

Clients for the requested owner. When the `include` query parameter is used, the response may contain an `included` array (JSON:API) or inlined related resources (application/json).

- ClientsIndexResponseAttributes: List clients response for Accept application/json (attributes adapter).
  - `data` ClientModelAttributes[]
    - `id` string
    - `type` string
    - `name` string
    - `mobile` string, nullable
    - `email` string, nullable
    - `location` string, nullable
    - `tasks_count` integer
    - `last_task_at` string, date-time, nullable
    - `created_at` string, date-time
    - `updated_at` string, date-time
    - `owner` object: Present when include=owner
    - `user` object: Present when include=user
  - `meta` PaginationMeta
    - `current_page` number
    - `next_page` number, nullable
    - `prev_page` number, nullable

## Other responses

- `401`: Unauthorized
- `403`: Forbidden

---

[API](https://skmtc.dev/purplegrain/apis/purple-grain-api.md) · [All operations](https://skmtc.dev/purplegrain/apis/purple-grain-api/llms.txt) · [OpenAPI document](https://skmtc.dev/purplegrain/apis/purple-grain-api/revisions/06540345bbbc?raw)
