---
updatedAt: 2026-06-30T16:05:21.000Z
agentTools:
  projectIndex: https://docs.pelcro.com/llms.txt
---

# Update address

Update an existing address.

## Overview

Update an existing address. You can modify any address field except for addresses already associated with active subscriptions (country and state cannot be changed in that case).

**Example:** A customer moves to a new apartment in the same city. Update their shipping address with the new line1 and line2 values.

***

## Conditional Requirements

| Condition                                       | Behavior                                                        |
| ----------------------------------------------- | --------------------------------------------------------------- |
| Address is associated with a subscription       | Cannot update `country` or `state`                              |
| `is_default=true` and `is_default_updated=true` | Updates all customer's active subscriptions to use this address |

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "core-api",
    "version": "1.88"
  },
  "servers": [
    {
      "url": "https://www.pelcro.com/api/v1/core"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "x-bearer-format": "bearer"
      },
      "sec1": {
        "type": "apiKey",
        "in": "query",
        "name": "site_id"
      }
    }
  },
  "security": [
    {
      "sec0": [],
      "sec1": []
    }
  ],
  "paths": {
    "/addresses/{id}": {
      "put": {
        "summary": "Update address",
        "description": "Update an existing address.",
        "operationId": "api-core-update-address",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "required": true
          },
          {
            "name": "site_id",
            "in": "query",
            "description": "The unique identifier of the site associated with your account.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "customer_id",
            "in": "query",
            "description": "The unique identifier of the customer.",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "Bearer eyJ***"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "customer_id",
                  "type",
                  "line1",
                  "country"
                ],
                "properties": {
                  "first_name": {
                    "type": "string",
                    "description": "The address's first name that belongs to the customer",
                    "maxLength": 255
                  },
                  "last_name": {
                    "type": "string",
                    "description": "The address's last name that belongs to the customer",
                    "maxLength": 255
                  },
                  "type": {
                    "type": "string",
                    "description": "The address type, one of either \"shipping\" or \"billing\"",
                    "enum": [
                      "shipping",
                      "billing",
                      "account_primary"
                    ]
                  },
                  "line1": {
                    "type": "string",
                    "description": "The first line of the address.",
                    "maxLength": 255
                  },
                  "line2": {
                    "type": "string",
                    "description": "The second line of the address.",
                    "maxLength": 255
                  },
                  "city": {
                    "type": "string",
                    "description": "The name of a city, town, village, etc.",
                    "maxLength": 255
                  },
                  "state": {
                    "type": "string",
                    "description": "The two-letter code of the state, region, or province. Learn more [here](https://www.ncbi.nlm.nih.gov/books/NBK7254/).",
                    "maxLength": 255
                  },
                  "country": {
                    "type": "string",
                    "description": "The two-letter country codes as specified by ISO3166 alpha-2. Learn more [here](https://www.iban.com/country-codes).",
                    "maxLength": 2
                  },
                  "postal_code": {
                    "type": "string",
                    "description": "Postal code or zip associated with the address.",
                    "maxLength": 45
                  },
                  "phone": {
                    "type": "string",
                    "description": "Numeric phone number associated with the address."
                  },
                  "old_provider_id": {
                    "type": "string",
                    "description": "The old id for the customer if it is migrated.",
                    "maxLength": 191
                  },
                  "is_default": {
                    "type": "boolean",
                    "description": "Set this address as the new default. Only one default address of the same type can be set at all times.",
                    "default": false
                  },
                  "title": {
                    "type": "string",
                    "description": "The customer's title within the company.",
                    "maxLength": 255
                  },
                  "salutation": {
                    "type": "string",
                    "description": "A salutation for the address, such as Mr., Ms., Dr.",
                    "maxLength": 255
                  },
                  "company": {
                    "type": "string",
                    "description": "The company name associated with the address.",
                    "maxLength": 255
                  },
                  "department": {
                    "type": "string",
                    "description": "The department associated with the address.",
                    "maxLength": 255
                  },
                  "bypass_address_cleansing": {
                    "type": "boolean",
                    "description": "A boolean to bypass the address cleansing feature if enabled."
                  },
                  "delivery_instructions": {
                    "type": "string",
                    "description": "Optional delivery notes associated with this address.",
                    "maxLength": 500
                  },
                  "delivery_sequence_number": {
                    "type": "integer",
                    "description": "Optional integer representing the driver delivery order for the address",
                    "minimum": 1
                  },
                  "vendor_id": {
                    "type": "integer",
                    "format": "int32",
                    "description": "The vendor associated with this address if any"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success.",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"data\": {\n        \"id\": 6,\n        \"type\": \"shipping\",\n        \"user_id\": 14,\n        \"is_default\": false,\n        \"first_name\": \"first_name\",\n        \"last_name\": \"last_name\",\n        \"line1\": \"line1\",\n        \"line2\": \"line2\",\n        \"city\": \"city\",\n        \"country\": \"CA\",\n        \"company\": null,\n        \"title\": null,\n        \"department\": null,\n        \"state\": \"QC\",\n        \"postal_code\": \"postal_code\",\n        \"phone\": null,\n        \"old_provider_id\": \"test_old_provider\",\n        \"created_at\": 1620071559,\n        \"updated_at\": 1620071559,\n        \"vendor_id\": null,\n        \"salutation\": null,\n        \"delivery_instructions\": null,\n        \"delivery_sequence_number\": null\n    },\n    \"status\": \"success\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "integer",
                          "example": 6,
                          "default": 0
                        },
                        "type": {
                          "type": "string",
                          "example": "shipping"
                        },
                        "user_id": {
                          "type": "integer",
                          "example": 14,
                          "default": 0
                        },
                        "is_default": {
                          "type": "boolean",
                          "example": false,
                          "default": true
                        },
                        "first_name": {
                          "type": "string",
                          "example": "first_name"
                        },
                        "last_name": {
                          "type": "string",
                          "example": "last_name"
                        },
                        "line1": {
                          "type": "string",
                          "example": "line1"
                        },
                        "line2": {
                          "type": "string",
                          "example": "line2"
                        },
                        "city": {
                          "type": "string",
                          "example": "city"
                        },
                        "country": {
                          "type": "string",
                          "example": "CA"
                        },
                        "company": {},
                        "title": {},
                        "department": {},
                        "state": {
                          "type": "string",
                          "example": "QC"
                        },
                        "postal_code": {
                          "type": "string",
                          "example": "postal_code"
                        },
                        "phone": {},
                        "old_provider_id": {
                          "type": "string",
                          "example": "test_old_provider"
                        },
                        "created_at": {
                          "type": "integer",
                          "example": 1620071559,
                          "default": 0,
                          "format": "int64"
                        },
                        "updated_at": {
                          "type": "integer",
                          "example": 1620071559,
                          "default": 0,
                          "format": "int64"
                        },
                        "vendor_id": {
                          "type": "integer",
                          "example": null
                        },
                        "salutation": {
                          "type": "string",
                          "example": null
                        },
                        "delivery_instructions": {
                          "type": "string",
                          "example": null
                        },
                        "delivery_sequence_number": {
                          "type": "integer",
                          "example": null
                        }
                      }
                    },
                    "status": {
                      "type": "string",
                      "example": "success"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"error\": {\n    \"status\": 400,\n    \"message\": \"Invalid request, please try again.\"\n  }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "integer",
                          "example": 400,
                          "default": 0
                        },
                        "message": {
                          "type": "string",
                          "example": "Invalid request, please try again."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthenticated.",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"error\": \"Unauthenticated.\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "example": "Unauthenticated."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not found.",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"error\": {\n    \"status\": 404,\n    \"message\": \"Not found.\"\n  }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "integer",
                          "example": 404
                        },
                        "message": {
                          "type": "string",
                          "example": "Not found."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```

# Sibling pages

* [List addresses](https://docs.pelcro.com/reference/api-core-list-addresses.md)
* [Create address](https://docs.pelcro.com/reference/api-core-create-address.md)
* [Get address](https://docs.pelcro.com/reference/api-core-get-address.md)
* [Verify address](https://docs.pelcro.com/reference/api-core-verify-address.md)
* [Delete address](https://docs.pelcro.com/reference/api-core-delete-address.md)
* [Reassign to vendor](https://docs.pelcro.com/reference/api-core-reassign-to-vendor-address.md)