Skip to main content
POST
/
api
/
v3
/
admin
/
customers
/
{customer_id}
/
addresses
Spree Admin SDK
import { createAdminClient } from '@spree/admin-sdk'

const client = createAdminClient({
  baseUrl: 'https://your-store.com',
  secretKey: 'sk_xxx',
})

const address = await client.customers.addresses.create('cus_UkLWZg9DAJ', {
  first_name: 'Jane',
  last_name: 'Doe',
  address1: '350 Fifth Avenue',
  city: 'New York',
  postal_code: '10118',
  country_iso: 'US',
  state_abbr: 'NY',
  phone: '+1 212 555 1234',
  label: 'Office',
  is_default_shipping: true,
})
{
  "id": "addr_gbHJdmfrXB",
  "first_name": "Jane",
  "last_name": "Doe",
  "full_name": "Jane Doe",
  "address1": "350 Fifth Avenue",
  "address2": null,
  "postal_code": "10118",
  "city": "New York",
  "phone": "+12125551234",
  "company": null,
  "country_name": "United States of America",
  "country_iso": "US",
  "state_text": "NY",
  "state_abbr": "NY",
  "quick_checkout": false,
  "is_default_billing": false,
  "is_default_shipping": false,
  "state_name": "New York",
  "label": "Office",
  "metadata": {},
  "created_at": "2026-05-24T17:36:43.149Z",
  "updated_at": "2026-05-24T17:36:43.149Z",
  "customer_id": "cus_UkLWZg9DAJ"
}

Documentation Index

Fetch the complete documentation index at: https://spreecommerce.org/docs/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

x-spree-api-key
string
header
required

Secret API key for admin access

Authorization
string
header
required

JWT token for admin user authentication

Headers

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

Path Parameters

customer_id
string
required

Body

application/json
first_name
string
last_name
string
address1
string
address2
string
city
string
postal_code
string
country_iso
string

ISO-2 country code (e.g. US)

state_abbr
string

State/province abbreviation (e.g. NY)

phone
string
company
string
label
string
is_default_billing
boolean
is_default_shipping
boolean

Response

201 - application/json

address created