---
updatedAt: 2026-08-25T18:58:43.000Z
agentTools:
  projectIndex: https://loyaltyapi.yotpo.com/llms.txt
---

# Create/Update Customer Record

This endpoint both creates and updates a customer’s record in the Yotpo system. Use this primarily to notify Yotpo when you add a customer manually in your admin, or a customer changes their email address.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "api-settings",
    "version": "2.0"
  },
  "servers": [
    {
      "url": "https://loyalty.yotpo.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "X-API-KEY": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-KEY",
        "description": "Your account API key can be found in the \"Settings\" section of your Yotpo loyalty admin. See [Yotpo Authentication](https://loyaltyapi.yotpo.com/reference/authentication) to learn how to generate your API key."
      },
      "X-GUID": {
        "type": "apiKey",
        "in": "header",
        "name": "X-GUID",
        "description": "The Globally Unique Identifier found in the \"Settings\" section of your Yotpo loyalty admin. See [Yotpo Authentication](https://loyaltyapi.yotpo.com/reference/authentication) to learn how to generate your GUID."
      }
    }
  },
  "security": [
    {
      "X-API-KEY": [],
      "X-GUID": []
    }
  ],
  "paths": {
    "/api/v2/customers": {
      "post": {
        "summary": "Create/Update Customer Record",
        "description": "This endpoint both creates and updates a customer’s record in the Yotpo system. Use this primarily to notify Yotpo when you add a customer manually in your admin, or a customer changes their email address.",
        "operationId": "createupdate-customer-records",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "email"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "The identifier used to uniquely identify the customer in your system. Required if implementing a generic e-commerce integration."
                  },
                  "email": {
                    "type": "string",
                    "description": "The customer's email address."
                  },
                  "first_name": {
                    "type": "string",
                    "description": "The customer's first name."
                  },
                  "last_name": {
                    "type": "string",
                    "description": "The customer's last name."
                  },
                  "phone_number": {
                    "type": "string",
                    "description": "The customer's phone number in E.164 format. e.g +14155552671"
                  },
                  "country_iso_code": {
                    "type": "string",
                    "description": "Only use if unable to send phone_number in full E.164 format. If phone_number is passed in full E.164 format with country_iso_code, this string will be ignored. Example: \"US\", \"GB\", i.e."
                  },
                  "has_account": {
                    "type": "boolean",
                    "description": "Whether the customer has an account with the eCommerce platform."
                  },
                  "platform_account_created_at": {
                    "type": "string",
                    "description": "Date and time when the customer created an account with your store. The parameter can can be date only, or include the exact time as well.",
                    "format": "date"
                  },
                  "opted_in": {
                    "type": "boolean",
                    "description": "Whether the customer should be opted in to loyalty program. If null, will rely on the account settings of opt in."
                  },
                  "pos_account_id": {
                    "type": "string",
                    "description": "The Point of Sale unique account identifier. This parameter is used to integrate Yotpo with a Point of Sale interface and can be retrieved using the Fetch Customer Details endpoint."
                  },
                  "tags": {
                    "type": "string",
                    "description": "A comma separated list of tags (or collections) this customer belongs to. Note: This will overwrite existing tags."
                  },
                  "opted_in_at": {
                    "type": "string",
                    "description": "Date and time when the customer was opted in to the loyalty program.",
                    "format": "date"
                  }
                }
              },
              "examples": {
                "Body Params": {
                  "value": {
                    "id": "CUS_1231H9UQOW9H23",
                    "email": "john@example.com",
                    "first_name": "John",
                    "last_name": "Smith",
                    "phone_number": "+14155552671"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "201",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "x-internal": false
      }
    }
  },
  "x-readme": {
    "headers": [
      {
        "value": "application/json",
        "key": "Content-Type"
      }
    ],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```

# Sibling pages

* [Set Customer Birthday](https://loyaltyapi.yotpo.com/reference/set-customer-birthday.md)
* [Set/Update Customer Anniversary](https://loyaltyapi.yotpo.com/reference/createupdate-customer-anniversary.md)
* [Get Customer Anniversary](https://loyaltyapi.yotpo.com/reference/get-customer-anniversary.md)
* [Remove Customer Anniversary](https://loyaltyapi.yotpo.com/reference/remove-customer-anniversary.md)
* [Fetch Customer Details](https://loyaltyapi.yotpo.com/reference/fetch-customer-details.md)
* [Fetch All Recently Updated Customers](https://loyaltyapi.yotpo.com/reference/fetch-all-recently-updated-customers.md)
* [Get Customer Tags](https://loyaltyapi.yotpo.com/reference/get-customer-tags.md)
* [Add Customer Tags](https://loyaltyapi.yotpo.com/reference/add-customer-tags.md)
* [Remove Customer Tags](https://loyaltyapi.yotpo.com/reference/remove-customer-tags.md)