Skip to main content
PUT
Update customer

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Customer Id

Body

application/json

Names, email, phone, country code, group and tier IDs, status, and tag items, where supported, are trimmed of surrounding whitespace and reject blank or whitespace-only strings. When email, phone or country_code is supplied, the resulting stored contacts must retain at least one email or phone. Contact uniqueness is global across users and stores, including collisions with usernames.

first_name
string
Required string length: 1 - 255
last_name
string
Required string length: 1 - 255
email
string<email> | null

Customer email; null clears the email subject to the contact invariant.

Minimum string length: 1
phone
string | null

10 ASCII digits without country code; null clears the phone subject to the contact invariant.

Minimum string length: 1
Pattern: ^[0-9]{10}$
country_code
string

Country code, e.g. +91. If a nonempty phone changes and country_code is omitted, it is set to +91; otherwise an omitted country code is preserved.

Required string length: 1 - 5
Pattern: ^\+?\d{1,4}$
customer_group_id
string | null

Moves the customer to a different Customer Group. Null removes the customer from its group (rejected when the store has customer groups enabled). A non-null ID must belong to the store's configured groups.

Required string length: 1 - 255
business
object | null

Null or an empty object leaves business details unchanged. Null name or business_type clears that field; null registered_address leaves addresses unchanged.

tags
string[]
Minimum string length: 1
attributes
CustomerAttributePayload · object[]

Attribute values to set on the customer. Each entry targets an existing store attribute by key (its ULID or slug); send null as the value to clear one. Omit the field to leave attributes unchanged. An empty array leaves existing attributes unchanged.

metadata
object | null

The customer's own data as key-value pairs. Merged into what the customer has: each key sent is set, a key sent as null is removed, keys not sent are kept; null or {} changes nothing. At most 50 keys and 16 KB as JSON.

Response

OK

message
string
success
boolean
content
object