Navigation

Time Entries

Time entries are scoped to a task. Each entry has a duration, a billable flag, an optional note, and either a manual date_start/date_end window or a running-timer state.

GET /tasks/{taskId}/time-entries

Read all time logged on a task. The response includes per-user totals (with live duration for running timers) and a flat entries list.

{
  "users": [
    {
      "user_id": "...",
      "user_name": "Alice",
      "total_seconds": 5400,
      "entries": [...]
    }
  ],
  "total_seconds": 5400,
  "entries": [
    {
      "id": "...",
      "user_id": "...",
      "duration": 1800,
      "billable": 1,
      "note": "design work",
      "is_running": 0,
      "date_start": 1735689600,
      "date_end":   1735691400
    }
  ]
}

duration is in seconds. billable is a 0/1 boolean. is_running is 1 while a timer is active; duration ticks live in this state.

POST /tasks/{taskId}/time-entries

Three actions via the action field:

Manual entry (most common — Toggl-style sync)

curl -H "Authorization: Bearer kdt_..." \
     -H "Content-Type: application/json" \
     -d '{
       "action":"manual",
       "duration":1800,
       "billable":true,
       "note":"design work",
       "date_start":1735689600,
       "date_end":1735691400
     }' \
     https://api.konduit.work/v1/tasks/<id>/time-entries

duration in seconds, date_start / date_end as unix timestamps. Fires the time_logged automation trigger.

Start a running timer

curl -d '{"action":"start"}' ...
# Returns { "id": "...", "timer_started_at": 1735689600 }

Only one running timer per user per task is allowed.

Stop the running timer

curl -d '{"action":"stop"}' ...
# Returns { "id": "...", "duration": 1820 }

Stops the user's running timer on this task and computes the final duration. Fires the time_logged automation trigger.

Logging on behalf of another user (as_user)

Pass as_user: "<user_id>" to log time on behalf of another member — useful for service-account integrations syncing from Toggl/Harvest:

{ "action": "manual", "duration": 1800, "as_user": "user_id_xxx" }

Defaults to the API key creator if omitted. as_user must be a workspace member.

PATCH /tasks/{taskId}/time-entries/{entryId}

Edit a stopped time entry. Accepts:

  • duration (seconds)
  • note
  • billable
  • date_start, date_end

Authorization:

  • Master keys can edit any entry in the workspace
  • Scoped keys can only edit entries owned by the API key's creator
  • Running timers cannot be edited — stop them first

DELETE /tasks/{taskId}/time-entries/{entryId}

Permanent delete. Same authorization model as PATCH.

Next