Skip to main content
PATCH
/
api
/
v3
/
store
/
customer
Spree SDK
import { createSpreeClient } from '@spree/sdk'

const client = createSpreeClient({
  baseUrl: 'https://your-store.com',
  publishableKey: '<api-key>',
})

const customer = await client.store.customer.update({
  first_name: 'John',
  last_name: 'Doe',
}, {
  bearerToken: '<token>',
})
{
  "id": "cus_UkLWZg9DAJ",
  "email": "antonio@leuschkebrakus.co.uk",
  "first_name": "Updated",
  "last_name": "Name",
  "created_at": "2026-03-04T21:02:08.321Z",
  "updated_at": "2026-03-04T21:02:08.603Z",
  "addresses": [
    {
      "id": "addr_gbHJdmfrXB",
      "firstname": "John",
      "lastname": "Doe",
      "full_name": "John Doe",
      "address1": "108 Lovely Street",
      "address2": "Northwest",
      "city": "Herndon",
      "zipcode": "35005",
      "phone": "555-555-0199",
      "company": "Company",
      "country_name": "United States of America",
      "country_iso": "US",
      "state_text": "STATE_ABBR_108",
      "state_abbr": "STATE_ABBR_108",
      "quick_checkout": false,
      "state_name": "STATE_NAME_108"
    },
    {
      "id": "addr_UkLWZg9DAJ",
      "firstname": "John",
      "lastname": "Doe",
      "full_name": "John Doe",
      "address1": "107 Lovely Street",
      "address2": "Northwest",
      "city": "Herndon",
      "zipcode": "35005",
      "phone": "555-555-0199",
      "company": "Company",
      "country_name": "United States of America",
      "country_iso": "US",
      "state_text": "STATE_ABBR_107",
      "state_abbr": "STATE_ABBR_107",
      "quick_checkout": false,
      "state_name": "STATE_NAME_107"
    }
  ],
  "default_billing_address": {
    "id": "addr_gbHJdmfrXB",
    "firstname": "John",
    "lastname": "Doe",
    "full_name": "John Doe",
    "address1": "108 Lovely Street",
    "address2": "Northwest",
    "city": "Herndon",
    "zipcode": "35005",
    "phone": "555-555-0199",
    "company": "Company",
    "country_name": "United States of America",
    "country_iso": "US",
    "state_text": "STATE_ABBR_108",
    "state_abbr": "STATE_ABBR_108",
    "quick_checkout": false,
    "state_name": "STATE_NAME_108"
  },
  "default_shipping_address": {
    "id": "addr_UkLWZg9DAJ",
    "firstname": "John",
    "lastname": "Doe",
    "full_name": "John Doe",
    "address1": "107 Lovely Street",
    "address2": "Northwest",
    "city": "Herndon",
    "zipcode": "35005",
    "phone": "555-555-0199",
    "company": "Company",
    "country_name": "United States of America",
    "country_iso": "US",
    "state_text": "STATE_ABBR_107",
    "state_abbr": "STATE_ABBR_107",
    "quick_checkout": false,
    "state_name": "STATE_NAME_107"
  }
}

Authorizations

x-spree-api-key
string
header
required

Publishable API key for store access

Authorization
string
header
required

JWT token for authenticated customers

Headers

x-spree-api-key
string
required
Authorization
string
required

Body

application/json
first_name
string
Example:

"John"

last_name
string
Example:

"Doe"

email
string<email>
Example:

"customer@example.com"

password
string
Example:

"newpassword123"

password_confirmation
string
Example:

"newpassword123"

accepts_email_marketing
boolean
Example:

true

phone
string
Example:

"+1 555 123 4567"

Response

profile updated

id
string
required
email
string
required
first_name
string | null
required
last_name
string | null
required
created_at
string
required
updated_at
string
required
addresses
object[]
required
default_billing_address
object
required
default_shipping_address
object
required