---
updatedAt: 2026-10-29T08:22:22.000Z
agentTools:
  projectIndex: https://docs.yotpo.com/llms.txt
---

# Create or update customer

Creates a customer in your Yotpo store.

> 👍 How to use this endpoint
>
> * Required parameters are listed below. For the full list of properties, see [About customers](https://docs.yotpo.com/reference/customers).
> * To see an example request, click **Examples** in the payload on the right.
> * To skip a parameter, enter "null" or exclude it from the payload.

> 👍 Want to check if a customer was registered successfully with Yotpo?
>
> Wait 60 seconds and then use the [Retrieve customers](https://docs.yotpo.com/reference/retrieve-customers) endpoint.

> 📘 Identifying the customer
>
> Send `external_id`, `email`, or both. A customer sent with only `phone_number` is rejected with a 400 error. If a customer with the same identifier already exists, it's updated.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Yotpo API V3",
    "description": "Yotpo API V3 endpoints on api.yotpo.com. Webhook events are defined separately, in webhooks.json.",
    "version": "3.0"
  },
  "servers": [
    {
      "url": "https://api.yotpo.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "X-Yotpo-Token": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Yotpo-Token",
        "description": "Your Yotpo account access token. See [Authentication](https://core-api.yotpo.com/reference/yotpo-authentication) to learn how to generate your access token."
      }
    },
    "responses": {
      "Unauthorized": {
        "description": "Unauthorized. The access token in `X-Yotpo-Token` is invalid or expired, and the body is plain text. Generate a new token with [Generate access token](ref:yotpo-authentication). If the request also has an `Authorization: Bearer` header, the API checks that header instead of `X-Yotpo-Token` and returns `Bad token; invalid JSON` as JSON. Remove the `Authorization` header and send the token in `X-Yotpo-Token` only.",
        "content": {
          "text/plain": {
            "schema": {
              "type": "string",
              "example": "unauthorized"
            }
          },
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string",
                  "description": "Error message.",
                  "example": "Bad token; invalid JSON"
                }
              }
            },
            "examples": {
              "Authorization header sent": {
                "value": "{\n  \"message\": \"Bad token; invalid JSON\"\n}"
              }
            }
          }
        }
      },
      "Forbidden": {
        "description": "Forbidden. The request has no `X-Yotpo-Token` header.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string",
                  "description": "Error message.",
                  "example": "Forbidden"
                }
              }
            },
            "examples": {
              "Missing token": {
                "value": "{\n  \"message\": \"Forbidden\"\n}"
              }
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "X-Yotpo-Token": []
    }
  ],
  "paths": {
    "/core/v3/stores/{store_id}/customers": {
      "patch": {
        "summary": "Create or update customer",
        "description": "Creates a customer in your Yotpo store.",
        "operationId": "create-customer",
        "parameters": [
          {
            "name": "store_id",
            "in": "path",
            "description": "The store ID (app_key).",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "customer"
                ],
                "properties": {
                  "customer": {
                    "type": "object",
                    "description": "Identifiers and properties of the customer. Send `external_id` or `email` (or both); a customer identified only by `phone_number` is rejected. If a customer with the same identifier exists, it's updated.",
                    "properties": {
                      "external_id": {
                        "type": "string",
                        "description": "A unique customer identifier, used to create profiles, attribute events, and merge profiles. If you don't have a unique identifier for the customer, omit this property. On Shopify, use the Shopify customer ID."
                      },
                      "email": {
                        "type": "string",
                        "description": "The email address of the customer."
                      },
                      "phone_number": {
                        "type": "string",
                        "description": "The phone number of the customer in E.164 format. Phone number is not a unique identifier: multiple customers may share a phone number."
                      },
                      "first_name": {
                        "type": "string",
                        "description": "The first name of the customer."
                      },
                      "last_name": {
                        "type": "string",
                        "description": "The last name of the customer."
                      },
                      "gender": {
                        "type": "string",
                        "description": "The gender of the customer. F (Female), M (Male), or Other.",
                        "enum": [
                          "F",
                          "M",
                          "Other"
                        ]
                      },
                      "account_created_at": {
                        "type": "string",
                        "description": "The date the account was originally created in the store. Must be in ISO 8601 format.",
                        "format": "date-time"
                      },
                      "account_updated_at": {
                        "type": "string",
                        "description": "The timestamp when the customer's account was last updated. Must be in ISO 8601 format (in UTC).",
                        "format": "date-time"
                      }
                    }
                  }
                }
              },
              "examples": {
                "Create Customer": {
                  "value": {
                    "customer": {
                      "external_id": "ak123798684365sdfkj",
                      "email": "name@example.com",
                      "phone_number": "+14155552671",
                      "first_name": "Tom",
                      "last_name": "Smith",
                      "gender": "M",
                      "account_created_at": "2020-09-08T08:43:27Z"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK. The response has no body."
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"errors\": [\n    {\n      \"message\": \"external_id must be supplied\"\n    }\n  ]\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "message": {
                            "type": "string",
                            "example": "external_id must be supplied",
                            "description": "What's wrong with the request, usually naming the missing or invalid field. Meant for logs; the wording can change, so don't parse it."
                          }
                        }
                      },
                      "description": "The validation errors. Usually one item."
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          }
        },
        "x-internal": false
      }
    }
  },
  "x-readme": {
    "headers": [
      {
        "value": "application/json",
        "key": "Content-Type"
      }
    ],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```

# Sibling pages

* [About customers](https://docs.yotpo.com/reference/customers.md)
* [Retrieve customers](https://docs.yotpo.com/reference/retrieve-customers.md)