---
title: "Push heartbeats (WakaTime compatible)"
method: POST
path: "/api/hackatime/v1/users/{id}/heartbeats"
tags: ["WakaTime Compatibility"]
---

# Push heartbeats (WakaTime compatible)

`POST /api/hackatime/v1/users/{id}/heartbeats`

Endpoint used by WakaTime plugins to send heartbeat data to the server. This is the core endpoint for tracking time.

## Path parameters

- `id` string, required

## Request body

- object[] — Array of heartbeats. The single (non-bulk) variant only processes the first element of the array.
  - `entity` string — File path or entity being tracked
  - `type` string — Entity type, e.g. "file"
  - `time` number — Unix timestamp (seconds, float)
  - `project` string
  - `branch` string
  - `language` string
  - `is_write` boolean
  - `lineno` integer
  - `cursorpos` integer
  - `lines` integer
  - `category` string
  - `created_at` string, date_time
  - `dependencies` string[] — May also be sent as a string
  - `editor` string
  - `line_additions` integer
  - `line_deletions` integer
  - `machine` string
  - `operating_system` string
  - `project_root_count` integer
  - `user_agent` string
  - `plugin` string — Accepted but not persisted

## Response `202`

accepted

## Other responses

- `400` — no data provided
- `401` — unauthorized
- `403` — account pending deletion

## Changes

- **2026-06-07** (v1) `10d87f00ef0b` — 12 info
  - added the new optional request property `items/created_at`
  - added the new optional request property `items/dependencies`
  - added the new optional request property `items/editor`
  - added the new optional request property `items/line_additions`
  - …8 more
- **2026-01-27** (v1) `b6d6849481da` — 10 warning, 2 info
  - removed the request property `items/created_at`
  - removed the request property `items/dependencies`
  - removed the request property `items/editor`
  - removed the request property `items/line_additions`
  - …8 more

[Change history](https://skmtc.dev/hackclub/apis/hackatime-api/changes/api/hackatime/v1/users/:id/heartbeats/post.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/10d87f00ef0b/schema)
