---
title: "Update a client"
method: PATCH
path: "/clients/{id}"
tags: ["Clients"]
---

# Update a client

`PATCH /clients/{id}`

## Request

- Base URL: `https://api.soraban.com`
- URL: `https://api.soraban.com/clients/{id}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/soraban/apis/soraban-private-api/docs/clients/:id/patch.ts> (a function with typed inputs; its response is checked against the schema)

Updates contact details, and optionally reassigns the advisor.

Changing `email` also moves the underlying login identity, so the client signs in with the new address immediately. Set `notify_old_email` to tell the previous address that the change happened.

## Request body

- ClientUpdateRequest
  - `fname` string
  - `lname` string
  - `email` string, email: Changing this also moves the client's login identity.
  - `phone_number` string
  - `work_phone_number` string
  - `work_phone_extension` string
  - `preferred_contact_method` string
  - `time_zone` string
  - `external_user_id` string
  - `assigned_advisor_id` integer: Reassigns the advisor. Rejected for firms on the newer contact management model.
  - `notify_old_email` boolean: Tell the previous address that the email changed.
  - `access` string: Firm access level for this user.

## Response `200`

The updated client.

- Client
  - `id` integer
  - `email` string, nullable
  - `fname` string, nullable
  - `lname` string, nullable
  - `full_name` string, nullable
  - `time_zone` string, nullable
  - `phone_number` string, nullable
  - `preferred_name` string, nullable
  - `created_at` string, date-time
  - `last_activity_at` string, date-time, nullable
  - `preferred_sign_in_method` string, nullable
  - `active` boolean, nullable: False for a client marked inactive.
  - `work_phone_number` string, nullable
  - `work_phone_extension` string, nullable
  - `work_email` string, nullable
  - `external_user_id` string, nullable
  - `entities` ClientEntityMembership[]
    - `entity_id` integer
    - `entity_name` string, nullable
    - `entity_type` string, nullable
    - `external_entity_id` string, nullable
    - `role` string, nullable
    - `firm_role_id` integer, nullable
    - `tags` EntityTag[]: Tags as objects.
      - `id` integer
      - `name` string
  - `assigned_advisor_id` integer, nullable: Only present for firms on the older contact management model.
  - `assigned_advisor` string, nullable: Only present for firms on the older contact management model.

## Other responses

- `403`: Missing or invalid API key, or the record does not belong to your firm.
- `422`: The request was understood but rejected. See `error` for the reason.
- `500`: Something failed on Soraban's side.

---

[API](https://skmtc.dev/soraban/apis/soraban-private-api.md) - [All operations](https://skmtc.dev/soraban/apis/soraban-private-api/llms.txt) - [OpenAPI document](https://skmtc.dev/soraban/apis/soraban-private-api/revisions/1c230fa547ad?raw)
