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

# Update a customer

`PATCH /v1/customers/{customer_id}`

Updates a customer. Only the fields you send are changed. Requires the `customers:write` scope.

## Path parameters

- `customer_id` string, required

## Request body

- UpdateCustomerRequest
  - `email` string, email, nullable — The customer's email address. Used to identify the customer and send receipts.
  - `name` string, nullable — The customer's full name. Derived from `first_name` and `last_name` when those are provided instead.
  - `phone_number` string, nullable — The customer's phone number in E.164 format, e.g. `+2348012345678`.
  - `metadata` object, nullable — Your own key-value data attached to the customer, returned unchanged.

## Response `200`

Customer updated

- CustomerDetailResponse
  - `customer_id` string, required — Unique identifier for the customer, prefixed with `cust_`.
  - `email` string, email, required — The customer's email address.
  - `name` string, nullable — The customer's full name. `null` when not set.
  - `phone_number` string, nullable — The customer's phone number in E.164 format, e.g. `+2348012345678`.
  - `metadata` object, required — Your own key-value data attached to the customer.
  - `created_at` string, date-time, required — ISO 8601 timestamp when the customer was created.
  - `updated_at` string, date-time, required — ISO 8601 timestamp when the customer was last updated.

## Other responses

- `400` — Bad Request - Validation errors or invalid request format. Check the `details` object for field-specific validation errors. Common causes: missing required fields, invalid data types, values outside allowed ranges, or invalid formats.
- `401` — Unauthorized - Invalid, missing, or expired API key. Verify your API key is correctly formatted and included in the Authorization header as `Bearer sk_sandbox_...` or `Bearer sk_live_...`. Check that your key hasn't been revoked.
- `403` — Forbidden - API key does not have permission for the requested resource. Verify you're using the correct organization's API key and that you're not trying to access another organization's data.
- `404` — Not Found - The requested resource does not exist. Verify the resource ID is correct and that it belongs to your organization.
- `429` — Too Many Requests - Rate limit exceeded. Standard tier allows 100 requests per minute per API key. Wait a few seconds before retrying. Check X-RateLimit-Reset header for when the window resets.
- `500` — Internal Server Error - An unexpected error occurred while processing the request. Retry with exponential backoff. If the issue persists, contact support with your request context.

---

[API](https://skmtc.net/bachs/apis/bachs-api.md) · [All operations](https://skmtc.net/bachs/apis/bachs-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/bachs/bachs-api/versions/f29efa8a22df/schema)
