---
title: "Update"
method: PATCH
path: "/devices/{device_id}"
tags: ["Devices"]
---

# Update

`PATCH /devices/{device_id}`

Update a device by ID.

## Path parameters

- `device_id` string, required

## Request body

- UpdateDeviceRequest
  - `name` string — The new name of the device. If excluded from the request, the device name is not updated.

## Response `200`

Successfully updated the device.

- Device
  - `object` 'device', required — The object type, which is always `device`.
  - `id` string, required — ID of the device.
  - `name` string, required — Name of the device.
  - `status` 'inactive' | 'activating' | 'online' | 'offline', required — The status of the device. - Inactive: The miru agent has not yet been installed / authenticated - Activating: The miru agent is currently being installed / authenticated (should only last for a few seconds) - Online: The miru agent has successfully pinged the server within the last 60 seconds. - Offline: The miru agent has not successfully pinged the server within the last 60 seconds (e.g. network issues, device is powered off, etc.)
  - `agent_version` string, nullable, required — The version of the agent the device is running.
  - `last_connected_at` string, date-time, nullable, required — Timestamp of when the device was last made an initial connection (this is not the same as the last time the device was seen).
  - `last_disconnected_at` string, date-time, nullable, required — Timestamp of when the device was last disconnected (this is not the same as the last time the device was seen).
  - `created_at` string, date-time, required — Timestamp of when the device was created.
  - `updated_at` string, date-time, required — Timestamp of when the device was last updated.

---

[API](https://skmtc.dev/mirurobotics/apis/miru-platform-api.md) · [All operations](https://skmtc.dev/mirurobotics/apis/miru-platform-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/mirurobotics/miru-platform-api/revisions/7f0f7fc868da/schema)
