> For the complete Lynkow documentation index in agent-friendly format, see [llms.txt](/llms.txt).

# Create an address for the current customer

**Publié le** : 2026-08-19
**Catégorie** : Commerce

## `POST /customers/me/addresses`

**Create an address for the current customer**

Creates a saved address owned by the authenticated buyer. Both
`X-Lynkow-Pk` and `Authorization: Bearer <customer-session-token>` are
required. Site and customer identifiers are derived from the authenticated
request context and cannot be supplied in the body.

### Request Body

Content-Type: `application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `addressName` | string \| null | No |  |
| `firstName` | string | Yes | Required. 1-120 characters |
| `lastName` | string | Yes | Required. 1-120 characters |
| `company` | string \| null | No |  |
| `address1` | string | Yes | Required. 1-255 characters |
| `address2` | string \| null | No |  |
| `city` | string | Yes | Required. 1-120 characters |
| `postalCode` | string | Yes | Required. 1-32 characters |
| `province` | string \| null | No |  |
| `countryCode` | string | Yes | Required. ISO 3166-1 alpha-2 country code |
| `phone` | string \| null | No |  |
| `isDefaultShipping` | boolean | No | Whether this is the customer's default shipping address. Boolean |
| `isDefaultBilling` | boolean | No | Whether this is the customer's default billing address. Boolean |
| `metadata` | object | No | Custom key-value metadata |


### Responses

| Status | Description |
| --- | --- |
| `201` | Successful response |
| `401` | Missing or invalid storefront publishable key |
| `402` | The site subscription does not currently permit this operation |
| `403` | The storefront key origin is not allowed |
| `404` | Site, resource, or commerce feature not found |
| `422` | Validation error |


> **Notes:** Missing or invalid customer authentication returns 401. If the customer
> becomes non-writable before the transactional create, the operation
> returns 404. Validation failures return 422. Concurrent promotion of a
> default address may return 409. Storefront spam controls apply to this
> write.

### Examples

```curl
curl -X POST "https://api.lynkow.com/storefront/{siteId}/customers/me/addresses" \
  -H "X-Lynkow-Pk: lkw_pk_..." \
  -H "Authorization: Bearer <customer-session-token>" \
  -H "Content-Type: application/json" \
  -d "{ \"firstName\": \"Anna\", \"lastName\": \"Cooper\", \"address1\": \"1 Main Street\", \"city\": \"Madrid\", \"postalCode\": \"28001\", \"countryCode\": \"ES\", \"_hp\": \"\", \"_ts\": $(( $(date +%s) * 1000 - 5000 )) }"
```

---