Skip to main content
POST
/
api
/
public
/
v1
/
timesheets
Create or Update Entry
curl --request POST \
  --url https://api.example.com/api/public/v1/timesheets \
  --header 'Content-Type: application/json' \
  --data '
{
  "userId": "<string>",
  "date": "<string>",
  "hoursWorked": 123,
  "expectedHours": 123,
  "notes": "<string>",
  "taskId": "<string>"
}
'
{
  "data": {
    "id": "ent_111...",
    "timesheetId": "ts_222...",
    "date": "2026-05-18T00:00:00.000Z",
    "hoursWorked": 8.5,
    "expectedHours": 8,
    "notes": "Stayed late to finish the report",
    "createdAt": "2026-05-18T17:30:00.000Z",
    "updatedAt": "2026-05-18T17:30:00.000Z"
  }
}
The API will automatically create a draft Timesheet wrapper (usually a weekly period) if one does not already exist for the given date.

Body Parameters

userId
string
required
The unique identifier of the employee logging the time.
date
string
required
The date the work was performed (ISO 8601 format).
hoursWorked
number
required
The total number of hours worked on this date.
expectedHours
number
The expected number of hours for this shift. Defaults to 8 if not provided.
notes
string
Optional notes or comments about the shift.
taskId
string
Optional ID of a specific project or task this time should be allocated to.

Response

{
  "data": {
    "id": "ent_111...",
    "timesheetId": "ts_222...",
    "date": "2026-05-18T00:00:00.000Z",
    "hoursWorked": 8.5,
    "expectedHours": 8,
    "notes": "Stayed late to finish the report",
    "createdAt": "2026-05-18T17:30:00.000Z",
    "updatedAt": "2026-05-18T17:30:00.000Z"
  }
}