---
title: "Update a Location"
method: PUT
path: "/locations/{locationId}"
tags: ["Locations"]
---

# Update a Location

`PUT /locations/{locationId}`

## Request

- Base URL: `https://api.smartthings.com/v1`
- URL: `https://api.smartthings.com/v1/locations/{locationId}`
- Auth: OAuth 2
  - Implicit: `https://auth-global.api.smartthings.com`
  - Scopes: `w:locations:*`
- TypeScript: <https://skmtc.dev/smartthings/apis/smartthings-api/docs/locations/:locationId/put.ts> (a function with typed inputs; its response is checked against the schema)

Update one or more fields of a specified Location.
All fields in the request body are optional. Only the specified fields will be updated.
Exception: the location name is required.
Other exception: if the latitude or longitude is updated, and no new timezone is provided,
a new timezone will be picked based on the latitude and longitude.

## Request body

- UpdateLocationRequest
  - `name` string, required: A name for the Location.
  - `latitude` number: A geographical latitude.
  - `longitude` number: A geographical longitude.
  - `regionRadius` integer: The radius in meters around latitude and longitude which defines this Location.
  - `temperatureScale` string: The desired temperature scale used for the Location. Values include F and C.
  - `timeZoneId` string: An ID matching the Java Time Zone ID of the location. If this is not provided, the service will try to choose a time zone based on the latitude and longitude.
  - `locale` string: We expect a POSIX locale but we also accept an IETF BCP 47 language tag.
  - `additionalProperties` object: Additional information about the Location that allows SmartThings to further define your Location.

## Response `200`

A Location.

- UpdateLocationResponse
  - `locationId` string, required: A unique location identifier. This is not guaranteed to be a valid UUID.
  - `name` string, required: A name given for the location (eg. Home)
  - `countryCode` string, required: An ISO Alpha-3 country code. (i.e. GBR, USA)
  - `latitude` number: A geographical latitude.
  - `longitude` number: A geographical longitude.
  - `regionRadius` integer: The radius in meters around latitude and longitude which defines this location.
  - `temperatureScale` string: The desired temperature scale used within location. Value can be F or C.
  - `timeZoneId` string: A valid Java Time Zone ID for the location. This can be specified in the create or update request, or it can be generated based on the latitude and longitude.
  - `locale` string: We expect a POSIX locale but we also accept an IETF BCP 47 language tag.
  - `backgroundImage` string: Not currently in use.
  - `additionalProperties` object: Additional information about the location that allows SmartThings to further define your location.
  - `parent` LocationParent: The parent of a Location. Intended to be used only in MFU contexts.
    - `type` 'LOCATIONGROUP' | 'ACCOUNT': The type of the Location's parent.
    - `id` string, ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$: The ID of the parent
  - `created` string, date-time: The timestamp of when a location was created in UTC.
  - `lastModified` string, date-time: The timestamp of when a location was last updated in UTC.

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `403`: Forbidden
- `422`: Unprocessable Entity
- `429`: Too many requests
- `default`: Unexpected error

---

[API](https://skmtc.dev/smartthings/apis/smartthings-api.md) - [All operations](https://skmtc.dev/smartthings/apis/smartthings-api/llms.txt) - [OpenAPI document](https://skmtc.dev/smartthings/apis/smartthings-api/revisions/2788a4236800?raw)
