---
title: "Update a customer"
method: PATCH
path: "/accounting/customers/{customerId}"
tags: ["Customers"]
---

# Update a customer

`PATCH /accounting/customers/{customerId}`

## Request

- Base URL: `https://api.clearbooks.co.uk/v1`
- URL: `https://api.clearbooks.co.uk/v1/accounting/customers/{customerId}`
- Auth: OAuth 2 (authorization code, authorization URL `https://secure.clearbooks.co.uk/account/action/oauth/`, token URL `https://api.clearbooks.co.uk/oauth/token`, scopes: `accounting.customers:write`)

## Path parameters

- `customerId` integer, required

## Headers

- `X-Business-ID` integer

## Response `200`

Customer updated

- Customer
  - `id` integer
  - `name` string, required
  - `contactName` ContactName
    - `title` 'Mr' | 'Mrs' | 'Mr & Mrs' | 'Miss' | 'Ms' | 'Sir' | 'Rev' | 'Dr' | 'Ven' | 'Father' | 'Prof' | 'Dame' | 'Lord' | 'Lady'
    - `forenames` string
    - `surname` string
  - `email` string
  - `phone` string
  - `address` Address
    - `building` string
    - `line1` string
    - `line2` string
    - `town` string
    - `county` string
    - `postcode` string
    - `countryCode` string
  - `vatNumber` string
  - `companyNumber` string
  - `externalId` string: Identifier for this contact in an external system. Clear Books does not make use of this value beyond storing it for integrated applications.
  - `archived` boolean

## Other responses

- `400`: The request was malformed or missing required parameters
- `401`: A valid authorisation token is required to perform this action
- `403`: No permission was granted to perform this action
- `404`: The requested resource could not be found
- `422`: The request was well formed, but could not be actioned due to business rule constraints
- `429`: The application is making too many requests and has been rate limited

---

[API](https://skmtc.dev/clearbooks/apis/clear-books-api.md) · [All operations](https://skmtc.dev/clearbooks/apis/clear-books-api/llms.txt) · [OpenAPI document](https://skmtc.dev/clearbooks/apis/clear-books-api/revisions/5e46fa6863a7?raw)
