---
title: "Update Location"
method: PATCH
path: "/api/v1/locations/{location_id}"
tags: ["Basics"]
---

# Update Location

`PATCH /api/v1/locations/{location_id}`

Updates a location's name, country, and/or prompt associations. Only supplied fields change; omitting `prompt_ids` preserves existing associations. Returns a before/after snapshot.

## Path parameters

- `location_id` string, uuid, required

## Request body

- object
  - `website_id` string, uuid, required
  - `location` string — New name. Trimmed; blank rejected.
  - `country` string — New country (case-insensitive, supported).
  - `prompt_ids` string[] — Replace active associations. Omit to keep existing; `[]` clears them.

## Response `200`

Location updated

- object
  - `id` string, uuid, required
  - `location` string, required
  - `country` string, nullable
  - `before` object
    - `location` string
    - `country` string, nullable

## Other responses

- `400` — Bad request - Validation error
- `401` — Unauthorized - Invalid or missing API key
- `403` — Forbidden - You don't have access to this website
- `404` — Not found - Location not found
- `500` — Internal server error

---

[API](https://skmtc.net/athenahq/apis/athenahq-api.md) · [All operations](https://skmtc.net/athenahq/apis/athenahq-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/athenahq/athenahq-api/versions/6c5d71622cb9/schema)
