Change a customer's fields, replacing metadata wholesale
Update editable fields. Send only what changes.
/v1/customers/{customer_id}Editor- Operation id
- patch_customer
- Access
- A viewer is refused.
/v1/customers/{customer_id}Update editable fields. Send only what changes.
An empty body is refused with 400 no_fields_to_update rather than
silently succeeding.
metadata replaces the whole object. To add one key, send the existing
object with the new key in it.
Changing email to one another customer already holds is refused with 409
customer_email_taken. Sending an empty string for email, company or
country clears that field.
Tenancy: the request is scoped to one workspace, and the credential presented is what selects it. A caller with no membership in that workspace is refused with 404, which is indistinguishable from a workspace that does not exist.
Authorisation: editor, admin or owner. A viewer receives 403 insufficient_role.
Access: Authorization: Bearer carrying either a realm access token or an API key. A key must hold the customers:write scope, and the workspace role of the person who owns it must meet the floor above.
A realm-issued access token, presented as Authorization: Bearer <token>. It acts as the person who signed in, and every operation resolves their workspace role live from the membership record.
In: header
Path Parameters
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PATCH "https://example.com/v1/customers/497f6eca-6276-4993-bfeb-53cbbbba6f08" \ -H "Content-Type: application/json" \ -d '{ "company": "Northwind Group", "metadata": { "plan": "enterprise", "csm": "dana" } }'{ "id": "9f1d6c4e-6b6e-4b31-9a5b-2f1c9a4d5e60", "display_name": "Sam Okafor", "email": "sam.okafor@northwind.example", "company": "Northwind Group", "country": "GB", "metadata": { "plan": "enterprise", "csm": "dana" }, "created_at": "2026-02-03T09:41:00+00:00", "updated_at": "2026-08-14T13:07:22+00:00"}