# PUT /api/v1/customers/{customer_id}

> Update customer

- **Tag:** customers
- **Operation ID:** `update_customer_api_v1_customers__customer_id__put`

## Description

Update an existing customer's information.

## Authentication

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

## Parameters

- `customer_id` (path, string, required)

## Request body

Schema: `CustomerUpdateRequest`

- `id` (string) — Customer UUID (set from URL path).
- `name` (string) — Updated customer name.
- `email` (string · email) — Updated email address.
- `address` (string) — Updated address.
- `phone` (string) — Updated phone number.
- `tax_id` (string) — Updated tax ID.
- `website` (string) — Updated website URL.
- `notes` (string) — Updated internal notes.
- `credit_limit_cents` (integer) — Updated credit limit in cents.
- `default_payment_term_id` (string) — Updated default payment term ID.
- `status` (CounterpartyStatus) — Updated status.
- `category` (string) — Updated category.
- `invoice_footer` (string) — Custom invoice footer/payment instructions for this customer.

## Responses

### 200 — Successful Response

Schema: `SuccessEnvelope_CustomerResponse_`

- `success` (boolean)
- `message` (string)
- `code` (string)
- `data` (CustomerResponse)

### 400 — Bad Request - Invalid input

### 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 PUT 'https://api.ondayzero.com/api/v1/customers/{customer_id}' \
  -H 'Authorization: Bearer dz_your_token' \
  -H 'x-business-id: YOUR_BUSINESS_ID' \
  -H 'Content-Type: application/json' \
  -d '{
  "id": "string",
  "name": "string",
  "email": "string",
  "address": "string",
  "phone": "string",
  "tax_id": "string"
}'
```

### JavaScript

```javascript
const response = await fetch('https://api.ondayzero.com/api/v1/customers/{customer_id}', {
  method: 'PUT',
  headers: {
    Authorization: 'Bearer dz_your_token',
    'x-business-id': 'YOUR_BUSINESS_ID',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "id": "string",
  "name": "string",
  "email": "string",
  "address": "string",
  "phone": "string",
  "tax_id": "string"
}),
});
const data = await response.json();
```

### Python

```python
import httpx

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

payload = {
  "id": "string",
  "name": "string",
  "email": "string",
  "address": "string",
  "phone": "string",
  "tax_id": "string"
}

response = httpx.put("https://api.ondayzero.com/api/v1/customers/{customer_id}", headers=headers, json=payload)
data = response.json()
```

## See also

- HTML version: https://www.ondayzero.com/docs/reference/customers/update-customer
- OpenAPI slice: https://www.ondayzero.com/docs/reference/customers/update-customer/openapi.json
- Other endpoints in **customers**: https://www.ondayzero.com/docs/reference/customers
