Create Customer

POST/store/:storeCode/customers
publishable key

Create a customer after auth registration (token-exchange flows).

Typically used when registration issues a registration token rather than creating the customer inline. Prefer `sdk.store.auth.register` for emailpass, which already creates the customer.

Path Parameters
storeCoderequiredstring

Store slug in the URL (first argument to every SDK store method).

Query Parameters
fieldsstring

Comma-separated fields to include. Prefix with `*` to expand a relation (e.g. `id,*variants`).

Request Body

Schema

Copy
HttpTypes.StoreCreateCustomer

Properties

emailrequiredstring

Customer email.

first_namestring

First name.

last_namestring

Last name.

phonestring

Phone number.

company_namestring

Company name.

metadataRecord<string, unknown>

Custom metadata.

Response

Status

200OK

Schema

Copy
HttpTypes.StoreCustomerResponse

Properties

customerrequiredStoreCustomer

The created customer.