> Index of every page: https://docs.merchantservicedepot.com/llms.txt

# Update address


`POST /v1/addresses/{address_id}`

Only the fields you send change.

Auth: a secret key with the `addresses.update` permission. Returns `200` with Address.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `addressId` | path | string | Yes | The address id in the request path. |
| `city` | body | string | No | The locality or city. |

## Request

**curl**

```curl
curl -X POST "https://payments-api-sandbox.merchantservicedepot.com/v1/addresses/{address_id}" \
  -H "Authorization: Bearer $MYELA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "city": "Manchester"
}'
```

**Node**

```node
const res = await fetch("https://payments-api-sandbox.merchantservicedepot.com/v1/addresses/{address_id}", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MYELA_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "city": "Manchester"
  }),
});

if (!res.ok) {
  const { error } = await res.json();
  // Branch on error.code — never on error.message.
  throw new Error(error.code);
}
const data = await res.json();
```

**Python**

```python
import os
import requests

res = requests.post(
    "https://payments-api-sandbox.merchantservicedepot.com/v1/addresses/{address_id}",
    headers={
        "Authorization": f"Bearer {os.environ['MYELA_API_KEY']}",
    },
    json={
        "city": "Manchester"
    },
)

if not res.ok:
    # Branch on error["code"] — never on error["message"].
    raise RuntimeError(res.json()["error"]["code"])
data = res.json()
```

## Response

| Field | Type | Description |
| --- | --- | --- |
| `id` | string | Unique address identifier. |
| `object` | "address" | Stable resource discriminator. |
| `customerId` | string | Customer that owns the address. |
| `firstName` | string | Recipient first name. |
| `lastName` | string | Recipient last name. |
| `line1` | string | Street address. |
| `city` | string | City or locality. |
| `postalCode` | string | Postal code. |
| `country` | string | Two-letter country code. |
| `createdAt` | string | ISO 8601 creation timestamp. |

```json
{
  "id": "addr_01JEXAMPLE",
  "object": "address",
  "customerId": "cus_01JEXAMPLE",
  "firstName": "Ada",
  "lastName": "Lovelace",
  "line1": "12 Marylebone Road",
  "city": "London",
  "postalCode": "NW1 5JD",
  "country": "GB",
  "createdAt": "2026-08-10T20:49:51.653Z"
}
```

Source: https://docs.merchantservicedepot.com/api-reference/update-address/
