---
title: "Device Health Check"
method: GET
path: "/v2/devices/{device_id}/health"
tags: ["Devices"]
---

# Device Health Check

`GET /v2/devices/{device_id}/health`

Health check endpoint for device monitoring.

Called by the device itself using its device-specific JWT token.
The `current_device` dependency handles authentication and updates
lastSeenAt before this handler runs.

### Parameters:
- `device_id` (PydanticObjectId): Must match the device ID in the JWT token
- `device` (Device): Authenticated device from JWT (via current_device)

### Returns:
- `DeviceHealthResponse`: Device health status

### Raises:
- 404: If device_id does not match the authenticated device's ID

## Path parameters

- `device_id` string, required

## Headers

- `authorization` string, nullable

## Response `200`

Successful Response

- DeviceHealthResponse — Response schema for device health check.
  - `status` string, required — Health status (ok/error)
  - `deviceId` string, required — Device ID
  - `lastSeenAt` string, date-time, nullable — Last time the device was active
  - `deviceStatus` 'active' | 'inactive' | 'blocked' | 'pending_activation', required — Device status enumeration.

## Other responses

- `404` — Device not found.
- `422` — Validation Error

---

[API](https://skmtc.net/loyalty/apis/loyaltydog.md) · [All operations](https://skmtc.net/loyalty/apis/loyaltydog/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/loyalty/loyaltydog/revisions/42b7b22af2b6/schema)
