API Reference
API Reference

/time-tracking/employees/:id/time-entries

Creates a single time entry for the specified employee. Required scope: w_time_tracking.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
🚧

This endpoint uses the w_time_tracking scope, which must be enabled through the Integrations section found within the Settings menu.

This endpoint supports both user tokens and account tokens.

Entry types

The type field determines which additional fields are required:

typerequired fieldsoptional fields
time-entryclock_in_time, clock_out_timenote, override_overlapping
clock-inclock_in_timeoverride_overlapping
clock-outclock_out_timenote, override_overlapping
ergani-clock-in(none — timestamp assigned server-side)override_overlapping
ergani-clock-out(none — timestamp assigned server-side)note, override_overlapping

ergani-* types are for the Greek Ergani work registry and do not accept an explicit timestamp.

📘

With user tokens, clock-in, clock-out, ergani-clock-in, and ergani-clock-out only act on the token owner's own time entries — even managers and admins cannot clock another employee in or out on their behalf. Use the time-entry type (with both clock_in_time and clock_out_time) to record entries for other employees, or use an account token.

Setting override_overlapping: true archives any overlapping time entries for the same employee. When an active clock-in exists, subsequent clock-in requests will return a conflict error even if override_overlapping: true — the employee must be clocked out first.

Validation rules

  • Time format: ISO 8601 with a timezone designator — UTC (Z) or a numeric offset (e.g. 2024-09-27T09:00:00Z, 2024-09-27T11:00:00+02:00). Times are stored in UTC.
  • Seconds and milliseconds: Truncated to the start of the minute server-side (e.g. 09:00:45.123 is persisted as 09:00:00.000).
  • Clock-out time: Must be greater than or equal to clock-in time, and on the same date as clock-in or exactly at the start of the next day in the employee's timezone.
  • Employee start date: Time entries cannot be prior to the employee's start date (compared against the employee's local time).
  • Active clock: Cannot clock in if the employee already has an active clock.
  • Clock-out: Cannot clock out if the employee has no active clock.

Response

The response shape depends on the submitted type. Time strings are returned as ISO 8601 in UTC (with the Z suffix, e.g. 2024-09-27T09:00:00.000Z) — see GET /time-tracking/time-entries for details. Responses also include a timezone field with the IANA timezone resolved for the timesheet — use it to render wall-clock time when needed.

time-entry

Returns the created entry.

{
  "type": "time-entry",
  "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "clock_in_time": "2024-09-27T09:00:00.000Z",
  "clock_out_time": "2024-09-27T17:00:00.000Z",
  "note": null,
  "timezone": "Europe/London"
}
keytypedescription
typestringtime-entry
uuidstringUUID of the created entry
clock_in_timestringClock-in time in UTC (with Z suffix)
clock_out_timestringClock-out time in UTC (with Z suffix)
notestring | nullNote attached to the entry
timezonestringIANA timezone resolved for the timesheet (e.g. Europe/London, Etc/UTC)

clock-in / ergani-clock-in

Returns a single object describing the resulting active clock.

{
  "type": "clock-in",
  "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "clock_in_time": "2024-09-27T09:00:00.000Z",
  "subsequent_clock_in_times": [],
  "timezone": "Europe/London"
}
keytypedescription
typestringclock-in or ergani-clock-in
uuidstringUUID of the active clock entry
clock_in_timestringClock-in time in UTC (with Z suffix)
subsequent_clock_in_timesstring[]Clock-in timestamps (UTC) that were aggregated into this active clock (empty when none)
timezonestringIANA timezone resolved for the timesheet

clock-out / ergani-clock-out

Returns a JSON array of the entries closed by the clock-out. A single clock-out can close multiple prior clock-ins, so this may contain more than one element.

[
  {
    "type": "clock-out",
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "clock_in_time": "2024-09-27T09:00:00.000Z",
    "clock_out_time": "2024-09-27T17:00:00.000Z",
    "note": "End of shift",
    "worked_hours": 8,
    "worked_minutes": 0,
    "timezone": "Europe/London"
  }
]
keytypedescription
typestringclock-out or ergani-clock-out
uuidstringUUID of the closed entry
clock_in_timestringClock-in time of the closed entry in UTC (with Z suffix)
clock_out_timestringClock-out time in UTC (with Z suffix)
worked_hoursintegerWhole hours worked in the closed entry
worked_minutesintegerRemaining minutes (0–59) after worked_hours
notestring | nullNote attached to the entry
timezonestringIANA timezone resolved for the timesheet

Error responses

StatusCodeDescription
400Invalid request body or validation error (e.g. invalid time format, clock_out_time before clock_in_time, or clock_out_time more than one day after clock_in_time in the employee's timezone)
403timeTracking.erganiRestrictionEmployee uses Ergani-related time tracking, or Ergani operation attempted for non-Ergani employee
403timeEntry.previousToEmployeeStartDateNotPermittedTime entry is prior to employee's start date
403timeTrackingPolicy.notAssignedEmployee does not have a time tracking policy assigned
404employee.notExistsEmployee not found
409clockIn.conflictingEntriesExistEmployee already has an active clock (when attempting clock-in)
409timeEntryCreate.conflictingEntriesExistConflicting time entries exist (when override_overlapping is false)
422clockOut.activeEntryNotExistsEmployee has no active clock (when attempting clock-out)
422clockOut.isBeforeClockInClock-out time is before clock-in time
500timeTracking.lockErrorConcurrent modification error. Retry the request.
Path Params
string
required

SPI key of the employee

Body Params
string
required

Entry type. One of: time-entry, clock-in, clock-out, ergani-clock-in, ergani-clock-out

string

ISO 8601 clock-in timestamp with timezone designator (UTC Z or numeric offset). Stored in UTC. Seconds and milliseconds are truncated to the start of the minute. Required for time-entry and clock-in types.

string

ISO 8601 clock-out timestamp with timezone designator (UTC Z or numeric offset). Stored in UTC. Seconds and milliseconds are truncated to the start of the minute. Required for time-entry and clock-out types.

string

Optional note. Supported by time-entry, clock-out, ergani-clock-out types.

boolean

When true, archives any overlapping time entries.

Responses

Language
Credentials
Header
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json