---
title: "Update a customer address"
method: PUT
path: "/customer-addresses/{id}"
tags: ["Customer Address"]
---

# Update a customer address

`PUT /customer-addresses/{id}`

## Request

- Base URL: `http://localhost:8000/api/shop`
- URL: `http://localhost:8000/api/shop/customer-addresses/{id}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/bagisto/apis/bagisto-shop-api/docs/customer-addresses/:id/put.ts> (a function with typed inputs; its response is checked against the schema)

Update an existing address. Requires Bearer token. Include addressId in the body.

## Path parameters

- `id` string, required

## Headers

- `X-STOREFRONT-KEY` string, required
- `X-Locale` string
- `X-Channel` string
- `X-Currency` string

## Request body

- object
  - `firstName` string
  - `lastName` string
  - `companyName` string
  - `vatId` string
  - `email` string, email
  - `phone` string
  - `address1` string
  - `address2` string
  - `city` string
  - `state` string
  - `postcode` string
  - `country` string
  - `defaultAddress` boolean: Set as default address

## Response `200`

Address updated.

## Other responses

- `400`: Invalid input
- `404`: Not found
- `422`: Validation Error

---

[API](https://skmtc.dev/bagisto/apis/bagisto-shop-api.md) - [All operations](https://skmtc.dev/bagisto/apis/bagisto-shop-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bagisto/apis/bagisto-shop-api/revisions/f619df36bf29?raw)
