---
title: "Updating a device."
method: PATCH
path: "/devices/{deviceId}"
tags: ["Devices"]
---

# Updating a device.

`PATCH /devices/{deviceId}`

Updates a device.

## Path parameters

- `deviceId` string, required

## Request body

- UpdateDeviceRequest
  - `name` string — The name of the device.
  - `metadata` object — Metadata about the device.
  - `location` Location — either latitude and longitude is required, or one of streetAddress/city/state
    - `name` string — commmon name to identify location by
    - `latitude` number
    - `longitude` number
    - `streetAddress` string
    - `city` string
    - `state` string
    - `country` string
    - `additionalMetadata` AdditionalMetadata — flat json object, defaults to {} and returned as {} if not provided
      - `type` 'string' | 'number' | 'boolean' — What type the value of the metadata value is
      - `value` object — value of the metadata. Must be a string, number, or boolean

## Response `204`

The device was successfully updated.

## Other responses

- `400` — The request is unparsable.
- `401` — The provided token is either expired or invalid.
- `404` — The given device ID was not found.
- `422` — The given request contains one or more errors.
- `429` — The maximum number of requests per second has been exceeded.
- `500` — An internal error happened when processing the request.

---

[API](https://skmtc.net/flocksafety/apis/oauth-api.md) · [All operations](https://skmtc.net/flocksafety/apis/oauth-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/flocksafety/oauth-api/revisions/126df7964ba5/schema)
