---
title: "Get user heartbeats (Admin)"
method: GET
path: "/api/admin/v1/user/heartbeats"
tags: ["Admin"]
---

# Get user heartbeats (Admin)

`GET /api/admin/v1/user/heartbeats`

Get raw heartbeats for a user.

## Query parameters

- `user_id` string
- `date` string, date

## Response `200`

successful

- object
  - `user_id` integer
  - `heartbeats` object[]
    - `id` integer
    - `time` number
    - `lineno` integer, nullable
    - `cursorpos` integer, nullable
    - `is_write` boolean, nullable
    - `project` string, nullable
    - `language` string, nullable
    - `entity` string, nullable
    - `branch` string, nullable
    - `category` string, nullable
    - `editor` string, nullable
    - `machine` string, nullable
    - `user_agent` string, nullable
    - `ip_address` string, nullable
    - `lines` integer, nullable
    - `source_type` string, nullable
  - `total_count` integer
  - `has_more` boolean

## Other responses

- `404` — user not found
- `422` — invalid date filter

## Changes

- **2026-02-20** (v1) `3b1a9efa4afe` — 1 info
  - added the non-success response with the status `422`
- **2026-01-28** (v1) `a9eaba48a93a` — 1 breaking
  - for the `query` request parameter `date`, the type/format was changed from `string`/`` to `string`/`date`
- **2026-01-27** (v1) `b6d6849481da` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/hackclub/apis/hackatime-api/changes/api/admin/v1/user/heartbeats/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/78326ea7a9a9/schema)
