---
title: "Get heartbeat of a device which contains last seen information"
method: GET
path: "/device/v0/heartbeat/{id}/"
tags: ["device_Device Heartbeat"]
---

# Get heartbeat of a device which contains last seen information

`GET /device/v0/heartbeat/{id}/`

Retrieves the last-seen heartbeat record for a single device, including its most recent check-in timestamp.

Returns the device UUID, the last-seen timestamp, and a legacy status flag indicating whether the device was seen within the last 30 minutes (1) or not (0).

**About Get Device Heartbeat (v0)**

The heartbeat endpoint provides a lightweight alternative to a full device fetch when only connectivity recency is needed. The status field is a legacy binary indicator (1 = seen in the last 30 minutes, 0 = not seen) and should not be used as the sole signal for device availability in new integrations — use the timestamp directly for more precise evaluation. For bulk heartbeat queries across all devices within a time window, use /api/v2/heartbeat/.

**Key Fields**

device_id — UUID of the device

timestamp — ISO 8601 datetime of the device's last check-in

status — Legacy field: 1 if last seen within 30 minutes, 0 otherwise

**Common Use Cases**

Confirming a specific device is online before triggering a remote operation

Displaying last-seen timestamps in a device monitoring dashboard

Lightweight polling loop to detect when a device comes back online

**Best Practices**

Use timestamp rather than status for precision — status is a legacy 30-minute binary bucket and is not suitable for finer-grained availability logic

For checking connectivity across many devices in a time window, use /api/v2/heartbeat/ instead

Avoid polling this endpoint at high frequency; prefer event-driven or scheduled checks

## Path parameters

- `id` string, uuid, required

## Response `200`

Last seen details of the device

- object
  - `code` integer
  - `message` string
  - `content` DeviceEsperDeviceHeartbeat
    - `device_id` string, uuid — UUID of the device
    - `timestamp` string, date-time — Last seen time stamp of the device
    - `status` 0 | 1 — Legacy field representing whether the device was last seen in the last 30 minutes (returns 1) or not (returns 0).

## Other responses

- `401` — Authorization information is missing or invalid.
- `404` — Not found
- `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)
