> ## Documentation Index
> Fetch the complete documentation index at: https://docs.yuko.so/llms.txt
> Use this file to discover all available pages before exploring further.

# Create or update a customer identity

Creates a new customer identity or updates an existing one.

**POST /customer-identities/create-or-update**

**Creating:** If no customer identity exists for the provided `platform` and `platform_customer_id` combination, a new customer identity is created.

* If the provided email matches an existing Yuko customer, the identity is linked to that customer.
* If the provided email does not match any existing customer, a new customer is created and the identity is linked to them.

**Updating:** If a customer identity already exists for the provided `platform` and `platform_customer_id` combination, it is updated with any new information provided in the request.

* No changes to the linked customer record will occur during an update.

#### **Authorizations**

**Authorization**

**string**

**header**

**required**

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

#### **Body**

**application/json**

**customer\_identity**

**object**

**required**

Show child attributes

**customer\_identity.platform**

**string**

**required**

The ecommerce platform this identity originates from.

Example:

`"woocommerce"`

**customer\_identity.platform\_customer\_id**

**string**

**required**

The customer's unique identifier in the external platform.

Example:

`"cust_19238475"`

**customer\_identity.email**

**string\<email>**

**required**

The customer's email address in the external platform.

Example:

`"jane@doe.com"`

**customer\_identity.first\_name**

**string | null**

The customer's first name in the external platform.

Example:

`"Jane"`

**customer\_identity.last\_name**

**string | null**

The customer's last name in the external platform.

Example:

`"Doe"`

#### **Response**

**200 - application/json**

Customer identity successfully created or updated.

**customer\_identity**

**object**

Hide child attributes

**customer\_identity.uuid**

**string\<uuid>**

Unique identifier for the customer identity in Yuko.

Example:

`"a1b2c3d4-e5f6-7890-abcd-ef1234567890"`

**customer\_identity.customer\_uuid**

**string\<uuid>**

The UUID of the Yuko customer this identity is linked to.

Example:

`"63a2c89a-9936-4bc0-9d5f-93db46110b76"`

**customer\_identity.platform**

**string**

The ecommerce platform this identity originates from.

Example:

`"woocommerce"`

**customer\_identity.platform\_customer\_id**

**string | null**

The customer's unique identifier in the external platform.

Example:

`"cust_19238475"`

**customer\_identity.first\_name**

**string | null**

The customer's first name in the external platform.

Example:

`"Jane"`

**customer\_identity.last\_name**

**string | null**

The customer's last name in the external platform.

Example:

`"Doe"`

**customer\_identity.email**

**string\<email>**

The customer's email address in the external platform.

Example:

`"jane@doe.com"`

**customer\_identity.created\_at**

**string\<date-time>**

The date and time when the customer identity was created in Yuko.

Example:

`"2026-03-09T14:02:06.000Z"`

**customer\_identity.updated\_at**

**string\<date-time>**

The date and time when the customer identity was last updated in Yuko.

Example:

`"2026-03-09T14:02:06.000Z"`
