---
title: "Create address for a customer"
method: POST
path: "/customers/{customerId}/addresses"
tags: ["Admin Customers"]
---

# Create address for a customer

`POST /customers/{customerId}/addresses`

## Request

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

Create address for a customer

## Path parameters

- `customerId` integer, required

## Request body

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

## Response `201`

Address created.

## Other responses

- `400`: Invalid input
- `422`: Validation failure.

---

[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)
