> ## Documentation Index
> Fetch the complete documentation index at: https://docs.shiftsheet.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Create or Update Entry

> Creates a new timesheet entry for a specific date, or updates the existing entry.

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

<ParamField body="userId" type="string" required>
  The unique identifier of the employee logging the time.
</ParamField>

<ParamField body="date" type="string" required>
  The date the work was performed (ISO 8601 format).
</ParamField>

<ParamField body="hoursWorked" type="number" required>
  The total number of hours worked on this date.
</ParamField>

<ParamField body="expectedHours" type="number">
  The expected number of hours for this shift. Defaults to 8 if not provided.
</ParamField>

<ParamField body="notes" type="string">
  Optional notes or comments about the shift.
</ParamField>

<ParamField body="taskId" type="string">
  Optional ID of a specific project or task this time should be allocated to.
</ParamField>

### Response

<ResponseExample>
  ```json theme={null}
  {
    "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"
    }
  }
  ```
</ResponseExample>
