---
title: "Receive device state report and publish to Kafka for drift detection"
method: PUT
path: "/v2/devices/{id}/devicestate"
tags: ["device_Device"]
---

# Receive device state report and publish to Kafka for drift detection

`PUT /v2/devices/{id}/devicestate`

Accepts a device state report and forwards it (as-is) to Kafka topic `esper.device.device.state` after enriching with `tenant_id` and `device_id`.

## Path parameters

- `id` string, uuid, required

## Request body

- object
  - `event_ts` number — Event timestamp in milliseconds since epoch
  - `device_settings` object, required — Partial settings payload containing only changed keys (sparse object)

## Response `201`

Created

- object
  - `content` object

## Other responses

- `400` — Bad Request
- `401` — Authorization information is missing or invalid.
- `500` — Internal Server Error

---

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