---
title: "Update a Device"
method: PUT
path: "/app/v1/devices/{device_id}"
tags: ["devices"]
---

# Update a Device

`PUT /app/v1/devices/{device_id}`

## Path parameters

- `device_id` string, uuid, required

## Request body

- DeviceUpdateInput
  - `attributes` DeviceAttribute — Device Attributes
  - `custom_attributes` CustomAttributes
  - `measurement_types` string[] — Measurement types
  - `name` string — name
  - `status` 'active' | 'archived'
  - `start_date` union — Start date of attributes. If start_date is provided and end_date is not provided, it defaults to the range [start_date, max]. If both start_date and end_date are not provided, it defaults to the range [current year month, next existing year month - 1]
    - string — Year month formatted as YYYYMM
    - 'min' | 'max' — Year month shorthand
  - `end_date` union — End date of attributes. If end_date is provided and start_date is not provided, it defaults to the range [min, start_date]. If both start_date and end_date are not provided, it defaults to the range [current year month, next existing year month - 1]
    - string — Year month formatted as YYYYMM
    - 'min' | 'max' — Year month shorthand

## Response `200`

successful operation

- DeviceWithFacility
  - `created_at` string, date-time
  - `updated_at` string, date-time
  - `created_by` string, uuid
  - `updated_by` string, uuid
  - `attributes` DeviceAttribute — Device Attributes
  - `custom_attributes` CustomAttributes
  - `facility` FacilityNameAndId
    - `custom_attributes` CustomAttributes
    - `id` string, uuid
    - `name` string
  - `facility_id` string, uuid — facility_id
  - `id` string, uuid
  - `measurement_types` string[] — measurement_types
  - `name` string — Device name
  - `status` 'active' | 'archived'
  - `type_id` string — Device type
  - `measurement_series` DeviceMeasurementSeries[]
    - `description` string
    - `id` string, uuid
    - `measurement_type` string
    - `unit` string
  - `description` string
  - `units` string
  - `value` union
    - string
    - number
    - boolean

---

[API](https://skmtc.net/validere/apis/carbonhub-api.md) · [All operations](https://skmtc.net/validere/apis/carbonhub-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/validere/carbonhub-api/revisions/053edab62415/schema)
