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

# Push heartbeats in bulk (WakaTime compatible)

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

Bulk variant of the heartbeat ingest endpoint, used by WakaTime clients via the ".bulk" format extension. Resolves to the same controller action (push_heartbeats) which detects params["format"] == "bulk". Accepts up to 100 heartbeats per request and returns a per-heartbeat array of [attributes_or_error, status_code] pairs.

## Path parameters

- `id` string, required

## Request body

- object[] — Array of heartbeats (max 100). May be sent as a top-level JSON array, a text/plain JSON array, or wrapped as { hackatime: { heartbeats: [...] } }.
  - `entity` string
  - `type` string
  - `time` number
  - `project` string
  - `branch` string
  - `ai_model` string
  - `ai_session` string
  - `ai_subscription_plan` string
  - `ai_input_tokens` integer
  - `ai_output_tokens` integer
  - `ai_prompt_length` integer
  - `ai_line_changes` integer
  - `human_line_changes` integer
  - `language` string
  - `is_write` boolean
  - `lineno` integer
  - `cursorpos` integer
  - `lines` integer
  - `category` string
  - `created_at` string, date_time
  - `dependencies` string[]
  - `editor` string
  - `line_additions` integer
  - `line_deletions` integer
  - `machine` string
  - `operating_system` string
  - `project_root_count` integer
  - `user_agent` string
  - `plugin` string

## Response `201`

created

## Other responses

- `400` — no data or too many heartbeats
- `401` — unauthorized

---

[API](https://skmtc.net/hackclub/apis/hackatime-api.md) · [All operations](https://skmtc.net/hackclub/apis/hackatime-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/hackclub/hackatime-api/versions/4214f8ab061e/schema)
