Update my time entry

Updates an editable self-owned entry using required optimistic versioning. Submitted, approved, voided, and period-locked entries are rejected.

PATCH/api/v1/time-entries/:id

Authorization

time:write_selfapi key scoperequired
Required scope when calling with an API key.

Path parameters

idstringrequired
Canonical time-entry ID

Example: time_01k2...

Request body

expected_versionnumberrequired
Version returned by the most recent read
work_datestringoptional
Replacement YYYY-MM-DD work date
duration_minutesnumberoptional
Replacement duration, 1–1440
project_idstringoptional
Replacement project
work_item_idstringoptional
Replacement canonical work-item attribution
category_keystringoptional
Replacement active category
billable_statusstringoptional"billable" | "non_billable" | "investment"
Replacement classification
notesstringoptional
Replacement notes; null clears notes
Example request
{
  "expected_version": 1,
  "duration_minutes": 105,
  "notes": "Completed implementation and tests"
}

Request

curl -X PATCH "https://www.digitalstack360.com/api/v1/time-entries/time_01k2..." \
  -H "Authorization: Bearer $DS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"expected_version":1,"duration_minutes":105,"notes":"Completed implementation and tests"}'

Examples use a placeholder key from your environment. Store your key in $DS_API_KEY — never commit it.

Response

200 OK
{
  "data": {
    "id": "time_01k2...",
    "duration_minutes": 105,
    "status": "draft",
    "version": 2
  },
  "meta": {
    "self_scoped": true
  }
}

Errors

401
missing_auth

No credentials provided

401
invalid_api_key

API key is invalid or revoked

400
bad_request

Missing or invalid request fields

403
scope_insufficient

Key lacks the required write scope

409
version_conflict

Entry changed after the supplied expected_version

410
entry_voided

Entry was already voided

423
entry_locked

Entry is submitted, approved, or otherwise locked

423
period_locked

Source or destination reporting period is locked