POST
/compat/wakatime/v1/users/{user}/heartbeats.bulkCreate multiple coding heartbeats
Creates multiple heartbeats for a user from a WakaTime-compatible request. Send a JSON array of heartbeat objects; each object can include fields such as entity, language, and created_at.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
userstringrequired
The username to create heartbeats for, or `current` to use the authenticated user.
An array of heartbeat objects; no individual fields are marked as required.
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
201Returns confirmation that the heartbeats were created.
Error handling
The user path parameter must identify the username or be set to current. Send a JSON array containing heartbeat objects; each supplied created_at value must be numeric.