---
title: "Create Address"
method: POST
path: "/user-address"
tags: ["User Management"]
---

# Create Address

`POST /user-address`

## Request

- Base URL: `https://queries.test.envia.com`
- URL: `https://queries.test.envia.com/user-address`
- Auth: HTTP bearer

Creates and saves a new address entry in the user's address book. Saved addresses can be quickly reused when creating shipments, eliminating the need to re-enter full address details each time.

**When to use:** Call this endpoint when a user wants to store a frequently used origin or destination address for future shipments, or when onboarding a new customer whose address should be saved for repeat orders.

**Prerequisites:**
- Valid JWT token in the Authorization header
- A `user_id` identifying the address owner
- A complete `address` object with required fields: `name`, `street`, `city`, `state`, `zipcode`, and `country`

**Key behaviors:**
- Returns the newly created `address_id` which can be referenced in future shipment creation calls
- The `country` field must be a valid two-letter ISO country code (e.g., `MX`, `US`, `CO`)
- Optional fields include `company`, `street2`, and `phone`
- Duplicate addresses are not automatically detected; the same address can be saved multiple times
- Saved addresses can be retrieved with `GET /all-addresses` and managed with `PUT /user-address/{address_id}` or `DELETE /user-address/{address_id}`

## Request body

- object
  - `user_id` integer, required: User ID
  - `address` object, required: Address information
    - `name` string, required: Full name
    - `company` string: Company name
    - `street` string, required: Street address
    - `street2` string: Street address line 2
    - `city` string, required: City
    - `state` string, required: State/Province
    - `zipcode` string, required: ZIP/Postal code
    - `country` string, required: Country code
    - `phone` string: Phone number

## Response `200`

Successful response

- object
  - `success` boolean: Indicates if the request was successful
  - `data` object: Created address information
    - `address_id` integer: Address ID
    - `user_id` integer: User ID
    - `address` object: Address information

---

[API](https://skmtc.dev/envia/apis/envia-queries-api.md) - [All operations](https://skmtc.dev/envia/apis/envia-queries-api/llms.txt) - [OpenAPI document](https://skmtc.dev/envia/apis/envia-queries-api/revisions/56f601a52f3f?raw)
