---
title: "Update a Room"
method: PUT
path: "/locations/{locationId}/rooms/{roomId}"
tags: ["Rooms"]
---

# Update a Room

`PUT /locations/{locationId}/rooms/{roomId}`

## Request

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

Update one or more fields of a specified Room. All fields in the request body are optional. Only the specified fields will be updated.

## Request body

- UpdateRoomRequest
  - `name` string, required: A name for the room.
  - `indoorMap` object: Data used for indoor map related to this room. If this property is not provided or has a null value, then the map data will not be deleted.
    - `mapRoomId` string: The reference id for the room map. Setting this property to null disassociates the map from the room.
    - `color` string: Map Room Color

## Response `200`

A Room.

- UpdateRoomResponse
  - `roomId` string, uuid, required: The ID of the room.
  - `locationId` string, required: A unique location identifier. This is not guaranteed to be a valid UUID.
  - `name` string, required: A name for the room (e.g. Living Room)
  - `backgroundImage` string: Not currently in use.
  - `created` string, date-time: The timestamp of when a room was created in UTC.
  - `lastModified` string, date-time: The timestamp of when a room was last updated in UTC.
  - `indoorMap` object: Data used for indoor map
    - `mapRoomId` string: The reference id for the room map
    - `color` string: Map Room Color

## 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)
