---
title: "Update Client"
method: PUT
path: "/clients/{id}"
tags: ["Clients"]
---

# Update Client

`PUT /clients/{id}`

## Request

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

## Path parameters

- `id` string, required

## Query parameters

- `include` string

## Request body

- ClientUpdateModelAttributes: Flat attributes-adapter request body (Content-Type application/json). Attribute fields and relationships live directly under `data` (no nested `attributes` / `relationships` envelopes). Each relationship is a resource identifier object ({ id, type }). Equivalent JSON:API (nested) shape: `ClientUpdateModel` sent as application/vnd.api+json.
  - `data` object, required
    - `name` string
    - `mobile` string
    - `email` string, nullable
    - `location` string, nullable

## Response `200`

Updated

- ClientsShowResponseAttributes: Single client response for Accept application/json (attributes adapter).
  - `data` ClientModelAttributes: Single client in attributes-adapter shape (Accept application/json). id, type, and attribute fields at top level; no nested attributes/relationships. The owner/user relationship keys may appear when include is used.
    - `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
- `404`: Not Found
- `422`: Unprocessable Entity

---

[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/a9136f78e9fb?raw)
