{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/hourtick/main/json-schema/hourtick-time-entry-schema.json",
  "title": "TimeEntry",
  "description": "Live duration = accumulatedSeconds + (now − timerStartedAt)/1000 while running.",
  "x-generated": "2026-10-08",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/hourtick-v1-openapi.json#/components/schemas/TimeEntry",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "workspaceId": {
      "type": "string",
      "format": "uuid"
    },
    "userId": {
      "type": "string"
    },
    "projectId": {
      "type": "string",
      "format": "uuid"
    },
    "taskId": {
      "type": "string",
      "format": "uuid",
      "description": "Task type"
    },
    "workItemId": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid",
      "description": "The task this time is for, if any"
    },
    "notes": {
      "type": "string"
    },
    "spentDate": {
      "type": "string",
      "format": "date",
      "description": "The day the time belongs to (user's time zone)."
    },
    "timezone": {
      "type": "string"
    },
    "accumulatedSeconds": {
      "type": "integer",
      "description": "Seconds banked from completed runs."
    },
    "timerStartedAt": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Epoch ms when the current run started; null when stopped."
    },
    "billable": {
      "type": "boolean"
    },
    "lockedReason": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        null,
        "invoiced",
        "approved",
        "submitted"
      ]
    },
    "version": {
      "type": "integer"
    },
    "deletedAt": {
      "type": [
        "integer",
        "null"
      ]
    },
    "createdAt": {
      "type": "integer"
    },
    "updatedAt": {
      "type": "integer"
    }
  }
}