---
title: "Get latest heartbeat"
method: GET
path: "/api/v1/authenticated/heartbeats/latest"
tags: ["OAuth2-specific"]
---

# Get latest heartbeat

`GET /api/v1/authenticated/heartbeats/latest`

Returns the absolutely latest heartbeat processed for the user. Requires an OAuth2 access token with the `read` scope in the Bearer header. When the user has no non-test heartbeat, the response is `{ "heartbeat": null }`.

## Response `200`

successful

- union
  - object
    - `id` integer, required
    - `created_at` string, date_time
    - `time` number, required
    - `category` string
    - `project` string
    - `language` string
    - `editor` string
    - `operating_system` string
    - `machine` string
    - `entity` string
  - object — Returned when the user has no non-test heartbeat.
    - `heartbeat` object, nullable, required

## Other responses

- `401` — unauthorized — Returned when the OAuth access token is missing or invalid.
- `403` — insufficient scope

## Changes

> 27 revisions in range; 3 could not be searched.

- **2026-06-07** (v1) `10d87f00ef0b` — 2 breaking, 10 warning, 4 info
  - added `subschema #1: Latest heartbeat, subschema #2: No heartbeats yet` to the response body `oneOf` list for the response status `200`
  - the response's body type/format changed from `object`/`` to ``/`` for status `200`
  - removed the optional property `category` from the response with the `200` status
  - removed the optional property `created_at` from the response with the `200` status
  - …12 more
- **2026-01-27** (v1) `b6d6849481da` — 1 breaking, 15 info
  - the response's body type/format changed from ``/`` to `object`/`` for status `200`
  - the endpoint scheme security `Bearer AND ApiKeyAuth` was added to the API
  - the endpoint scheme security `Bearer` was removed from the API
  - api tag `Authenticated` added
  - …12 more

[Change history](https://skmtc.dev/hackclub/apis/hackatime-api/changes/api/v1/authenticated/heartbeats/latest/get.md)

---

[API](https://skmtc.dev/hackclub/apis/hackatime-api.md) · [All operations](https://skmtc.dev/hackclub/apis/hackatime-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/hackclub/hackatime-api/revisions/172c35ec816f/schema)
