> ## Documentation Index
> Fetch the complete documentation index at: https://docs.omneo.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Addresses

> Managing profile addresses via the Omneo API, add, update, and set defaults.

A profile can have multiple addresses, but only one default address at a time. The default address is used in shipping, communications, and personalisation contexts.

## Address fields

| Field            | Required | Description                               |
| ---------------- | -------- | ----------------------------------------- |
| `address_line_1` | Yes      | Street address                            |
| `city`           | Yes      | City or suburb                            |
| `country`        | Yes      | Country code (ISO 3166-1 alpha-2)         |
| `postcode`       | Yes      | Postal code                               |
| `address_line_2` | No       | Unit, apartment, or suite number          |
| `state`          | No       | State or province                         |
| `is_default`     | No       | Set this address as the profile's default |

## Adding an address

```shell theme={null}
curl -X POST https://api.[tenant].getomneo.com/api/v3/profiles/{profileId}/addresses \
  -H "Authorization: Bearer ${TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "address_line_1": "123 Collins Street",
    "city": "Melbourne",
    "state": "VIC",
    "postcode": "3000",
    "country": "AU",
    "is_default": true
  }'
```

## Listing a profile's addresses

```shell theme={null}
GET /api/v3/profiles/{profileId}/addresses
```

## Reading a specific address

```shell theme={null}
GET /api/v3/profiles/{profileId}/addresses/{addressId}
```

## Updating an address

```shell theme={null}
curl -X PUT https://api.[tenant].getomneo.com/api/v3/profiles/{profileId}/addresses/{addressId} \
  -H "Authorization: Bearer ${TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "postcode": "3001"
  }'
```

## Setting a default address

To change the default address, update the target address with `"is_default": true`. Omneo will unset the default on any other address automatically.

## Deleting an address

```shell theme={null}
DELETE /api/v3/profiles/{profileId}/addresses/{addressId}
```

## Notes

* Street address, city, country, and postcode are required when creating a new address.
* A profile's default address is also readable at the top-level profile object under the `address` key.
