Skip to content

Create or update a customer profile

POST
/customers

Resolves or creates the (channel, external_id) customer and merges any supplied profile fields. Returns 201 on first creation, 200 on a later merge. Requires a secret key.

object
email
string | null
name
string | null
>= 1 characters <= 128 characters
birthday
string | null
locale
string | null
social_handles
object | null
marketing_consent
object
email
string
Allowed values: opted_in opted_out unset
sms
string
Allowed values: opted_in opted_out unset
updated_at
string
channel
string
>= 1 characters <= 64 characters
external_id
required
string
>= 1 characters <= 256 characters

Existing customer merged.

object
customer_uuid
required
string format: uuid
channel
required
string
external_id
required
string
created
required
boolean
updated_at
string format: date-time

Customer created.

object
customer_uuid
required
string format: uuid
channel
required
string
external_id
required
string
created
required
boolean
updated_at
string format: date-time

External_id is missing or malformed.

object
error
required
object
code
required
string
Example
not_found
message
required
string
details
request_id
required
string
Example
req_9f8e7d6c5b4a3210

Missing or invalid API key or OAuth credential.

object
error
required
object
code
required
string
Example
not_found
message
required
string
details
request_id
required
string
Example
req_9f8e7d6c5b4a3210

The credential lacks the loyalty:write scope — a publishable key (publishable_key_forbidden), or an OAuth token, which is always read-only in v1 (insufficient_scope).

object
error
required
object
code
required
string
Example
not_found
message
required
string
details
request_id
required
string
Example
req_9f8e7d6c5b4a3210

The resolved customer was erased (GDPR) and can no longer accept profile writes.

object
error
required
object
code
required
string
Example
not_found
message
required
string
details
request_id
required
string
Example
req_9f8e7d6c5b4a3210

A profile field failed semantic validation (e.g. malformed email).

object
error
required
object
code
required
string
Example
not_found
message
required
string
details
request_id
required
string
Example
req_9f8e7d6c5b4a3210