---
updatedAt: 2026-10-29T11:54:48.000Z
agentTools:
  projectIndex: https://docs.yotpo.com/llms.txt
---

# Create or Update Customer

Create or update customer in the Yotpo platform

> 👍 How to use this endpoint
>
> * Required parameters are listed below. For the full list of properties, see [Introduction to Customers](https://docs.yotpo.com/reference/introduction-to-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": "App partners API",
    "description": "Endpoints for apps that Yotpo merchants install. The app-level webhook is defined separately, in webhooks.json.",
    "version": "2"
  },
  "servers": [
    {
      "url": "https://developers.yotpo.com"
    }
  ],
  "security": [
    {
      "X-Yotpo-Token": []
    }
  ],
  "x-readme": {
    "headers": [],
    "explorer-enabled": false,
    "proxy-enabled": true
  },
  "paths": {
    "/core/v3/stores/{store_id}/customers": {
      "patch": {
        "summary": "Create or Update Customer",
        "description": "Create or update customer in the Yotpo platform",
        "operationId": "create-or-update-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": {
            "description": "Missing or invalid access token. Send a valid token in the `X-Yotpo-Token` header.",
            "content": {
              "application/json": {
                "examples": {
                  "Missing token": {
                    "summary": "No token sent (or sent as Authorization: Bearer)",
                    "value": {
                      "error": "invalid_request",
                      "error_description": "The access token is missing"
                    }
                  },
                  "Invalid token": {
                    "summary": "Token unknown, revoked or for another app",
                    "value": {
                      "error": "invalid_token",
                      "error_description": "The access token is invalid or has expired"
                    }
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "OAuth error code: `invalid_request` when no token was sent, `invalid_token` when the token is unknown, revoked or expired.",
                      "enum": [
                        "invalid_request",
                        "invalid_token"
                      ]
                    },
                    "error_description": {
                      "type": "string",
                      "description": "Human-readable reason for the error."
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "components": {
    "securitySchemes": {
      "X-Yotpo-Token": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Yotpo-Token",
        "description": "Send your app's access token for the merchant's store in the `X-Yotpo-Token` header of every request. To get a token, see [Generate Access Token](ref:generate-a-token). The API also reads the token from an `access_token` query parameter, but that isn't recommended: URLs end up in server and proxy logs. `Authorization: Bearer` is not supported."
      }
    }
  }
}
```

# Sibling pages

* [Introduction to Customers](https://docs.yotpo.com/reference/introduction-to-customers.md)
* [Retrieve Loyalty Customer Details by Email](https://docs.yotpo.com/reference/retrieve-loyalty-customer-details-by-email.md)