---
title: "Update a location"
method: POST
path: "/v1/location/{location_id}"
tags: ["Locations"]
---

# Update a location

`POST /v1/location/{location_id}`

## Request

- Base URL: `https://api.navigateai.co`
- URL: `https://api.navigateai.co/v1/location/{location_id}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/navigate/apis/navigateai-api/docs/v1/location/:location_id/post.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `location_id` string, required

## Request body

- UpdateLocationRequest
  - `custom_fields` object, nullable: Partial update of custom fields. Only specified fields will be updated.
  - `reference_key` string, nullable
  - `market_id` string, nullable: ID of the market this location belongs to. Must reference an existing market in your organization.

## Response `200`

OK

- LocationResponse
  - `location` LocationExternalSchema, required
    - `id` string, required
    - `address_1` string, required
    - `address_2` string, nullable, required
    - `city` string, required
    - `state` string, required
    - `zip_code` string, required
    - `lat` number, nullable, required
    - `lon` number, nullable, required
    - `reference_key` string, nullable, required: Optional unique identifier for this location in your system.
    - `market_id` string, nullable, required: ID of the market this location belongs to.
    - `market_name` string, nullable, required: Deprecated: prefer market_id. Name of the geographic market this location belongs to.
    - `custom_fields` object, nullable, required: Arbitrary key-value metadata. Supports partial updates.

---

[API](https://skmtc.dev/navigate/apis/navigateai-api.md) - [All operations](https://skmtc.dev/navigate/apis/navigateai-api/llms.txt) - [OpenAPI document](https://skmtc.dev/navigate/apis/navigateai-api/revisions/912b48581de7?raw)
