POST
/users/{user}/heartbeats.bulkSubmit multiple heartbeats for a user
Submits multiple heartbeats for a specified user in one request. Send a JSON array of heartbeat objects to record activity in bulk.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
userstringrequired
Username to submit the heartbeats for, or `current` for the current user.
A JSON array containing multiple heartbeat objects.
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
Use user as a username or current to select the user for the heartbeats. The request body is an array, and the schema does not mark any item fields as required; use the documented types, such as a number for created_at.