Skip to content
myela

type is required and is either billing or shipping — a customer has one default of each, so a request that does not say which is refused rather than guessed.

Set default address

POST/v1/addresses/{address_id}/defaultLink

type is required and is either billing or shipping — a customer has one default of each, so a request that does not say which is refused rather than guessed.

SandboxSecret keyaddresses.setDefault

Request fields

Edit a field and the generated request updates immediately.

Path parameters
stringrequired

The address id in the request path.

Request body
stringrequired

Which address role becomes the default.

Response contract

The successful wire shape and errors an integration should branch on.

200

Address

application/json
idstringrequired
Unique address identifier.
object"address"required
Stable resource discriminator.
customerIdstringrequired
Customer that owns the address.
firstNamestring
Recipient first name.
lastNamestring
Recipient last name.
line1string
Street address.
citystring
City or locality.
postalCodestring
Postal code.
countrystring
Two-letter country code.
createdAtstringrequired
ISO 8601 creation timestamp.
Example response
{
  "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"
}
Error responses
401authentication_failed

The key is missing, malformed, revoked, or invalid for this environment.

403permission_denied

The key does not have addresses.setDefault.

404not_found

The resource does not exist for this merchant.

422invalid_request

One or more request fields are invalid.