---
title: "Create or update customer"
method: PUT
path: "/stores/{storeId}/customers"
tags: ["Customers"]
---

# Create or update customer

`PUT /stores/{storeId}/customers`

Create or update a customer profile. Uses the email address as the upsert
key — if a customer with that email exists, their profile is updated;
otherwise, a new customer is created.

## Profile fields
- `firstName` and `lastName` are set directly on the customer. A full
  display name is automatically generated from these fields.
- `phoneNumber` should be in E.164 format (e.g., `+12345678900`). If the
  number is new, it is added to the customer's contact information.

## Location
Providing `location` sets the customer's current location. Only the fields
you include are updated.

## Custom fields
Use `customFields` to store arbitrary key-value data on the customer (e.g.,
`pricing_plan`, `subscription_source`). Values can be strings, numbers, or
booleans. If a custom field doesn't exist yet, it is created automatically.

Requires the [`customers_write`](/docs/api-reference/scopes) scope.

## Path parameters

- `storeId` string, required

## Request body

- CustomerUpsertRequestSchema — Request body for creating or updating a customer profile. The email address is used as the upsert key.
  - `email` string, email, required — Customer email address. Used as the upsert key to find or create the customer.
  - `firstName` string — Customer first name
  - `lastName` string — Customer last name
  - `phoneNumber` string — Customer phone number in E.164 format (e.g., +12345678900). Appended to the existing phone list if not already present.
  - `location` CustomerLocationSchema — Customer location information.
    - `street1` string — Street address line 1
    - `street2` string — Street address line 2
    - `city` string — City name
    - `state` string — State or province name
    - `stateCode` string — State or province abbreviation
    - `postalCode` string — Postal or ZIP code
    - `country` string — Country name
    - `countryCode` string — ISO 3166-1 alpha-2 country code
    - `ianaTimeZoneName` string — IANA time zone identifier
    - `latitude` number — Latitude coordinate
    - `longitude` number — Longitude coordinate
  - `customFields` object — Custom field values as key-value pairs. Keys are field names and values can be strings, numbers, or booleans. The field type is determined automatically based on the value: - String values → STRING custom field - Number values → NUMBER custom field - Boolean values → BOOLEAN custom field - ISO 8601 datetime strings (e.g., "2026-02-24T12:15:00.000Z") → DATE custom field (auto-detected) If a field name does not already have a declaration, one is created automatically. For STRING fields, unique values are tracked as options (used for segment filtering dropdowns). NUMBER, BOOLEAN, and DATE fields do not track options.

## Response `200`

Existing customer updated

- CustomerUpsertResponseSchema — Response after creating or updating a customer profile.
  - `id` string, required — Redo customer ID
  - `email` string, required — Customer email address
  - `created` boolean, required — Whether a new customer was created (true) or an existing customer was updated (false).

## Other responses

- `201` — New customer created
- `400` — Invalid request body or invalid email address
- `500` — Internal server error
- `default` — Error

---

[API](https://skmtc.net/redoapp/apis/redo-api.md) · [All operations](https://skmtc.net/redoapp/apis/redo-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/redoapp/redo-api/versions/119714540a45/schema)
