---
title: "Update address"
method: PUT
path: "/customers/{customerId}/addresses/{id}"
tags: ["Admin Customers"]
---

# Update address

`PUT /customers/{customerId}/addresses/{id}`

## Request

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

Update address

## Path parameters

- `customerId` integer, required
- `id` integer, required

## Request body

- object
  - `first_name` string
  - `last_name` string
  - `company_name` string, nullable
  - `vat_id` string, nullable
  - `address` string
  - `city` string
  - `state` string, nullable
  - `country` string
  - `postcode` string
  - `phone` string
  - `email` string, nullable
  - `default_address` boolean

## Response `200`

Address updated.

## Other responses

- `400`: Invalid input
- `403`: Address does not belong to the customer.
- `404`: Not found
- `422`: Validation Error

---

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