---
title: "Update device metadata"
method: PUT
path: "/api/v1/devices/{deviceId}/metadata"
tags: ["Devices"]
---

# Update device metadata

`PUT /api/v1/devices/{deviceId}/metadata`

Device metadata represent configuration of the relationship between the plgd cloud and the device. It's not configuration of the device itself. [Shadow](https%3A%2F%2Fplgd.dev%2Ffeatures%2Fdevice-shadow%2F) configuration is part of the metadata. By setting this value you control if the shadow for this device is kept up to date or not.

## Path parameters

- `deviceId` string, uuid, required

## Request body

- DeviceMetadata
  - `status` object — Unix timestamp in nanoseconds.
    - `value` 'OFFLINE' | 'ONLINE'
    - `validUntil` string, int64
  - `shadowSynchronization` 'UNSET' | 'ENABLED' | 'DISABLED'

## Response `200`

Metadata successfuly updated.

## Other responses

- `400` — Bad Request
- `401` — Not authorized
- `404` — Entity was not found.

## Changes

- **2021-07-27** `4d121732b593` — 1 info
  - endpoint added
- **2020-04-11** `562192db9767` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/plgd-dev/apis/plgd-http-gateway/changes/api/v1/devices/:deviceId/metadata/put.md)

---

[API](https://skmtc.dev/plgd-dev/apis/plgd-http-gateway.md) · [All operations](https://skmtc.dev/plgd-dev/apis/plgd-http-gateway/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/plgd-dev/plgd-http-gateway/revisions/daf228bd321e/schema)
