Wakapi unofficial
POST/v1/users/{user}/heartbeats.bulk

Create multiple heartbeats

Creates multiple heartbeats for the specified user. Submit a JSON array of heartbeat objects containing the activity data you want to record. The schema does not mark any fields within the heartbeat objects as required.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

1 parameter · 25 body fields
userstringrequired
The username to submit the heartbeats for, or `current`.

An array of heartbeat objects containing activity data.

ai_input_tokensintegeroptional
ai_line_changesintegeroptional
ai_output_tokensintegeroptional
ai_prompt_lengthintegeroptional
ai_sessionstringoptional
branchstringoptional
categorystringoptional
created_atnumberoptional
https://gorm.io/docs/conventions.html#CreatedAt
cursorposintegeroptional
editorstringoptional
ignored because editor might be parsed differently by wakatime
entitystringoptional
human_line_changesintegeroptional
is_writebooleanoptional
languagestringoptional
line_additionsintegeroptional
line_deletionsintegeroptional
linenointegeroptional
linesintegeroptional
machinestringoptional
ignored because wakatime api doesn't return machines currently
operating_systemstringoptional
ignored because os might be parsed differently by wakatime
projectstringoptional
project_root_countintegeroptional
timenumberoptional
note: on sqlite, table will have an additional column `time_real`, introduced "manually" by migration 20260111 see https://github.com/muety/wakapi/issues/882 for details
typestringoptional
user_agentstringoptional

1 status code
201Returns the created heartbeats.

Error handling

The user path parameter must identify a username or be current. The request body must be a JSON array of heartbeat objects; no fields are marked as required within each object.