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

# Upsert Timesheet Entry

> Records or corrects one day's work times in the employee's timezone and recalculates period compliance.

Not available to API keys yet. It will need `time:write`.

## OpenAPI

````yaml api-reference/openapi.json POST /hris/upsert-timesheet-entry
openapi: 3.1.0
info:
  title: Toku API
  version: 1.0.0
servers:
  - url: https://api.toku.com
security:
  - bearerAuth: []
paths:
  /hris/upsert-timesheet-entry:
    post:
      operationId: upsertTimesheetEntry
      summary: Upsert Timesheet Entry
      description: >-
        Records or corrects one day's work times in the employee's timezone and
        recalculates period compliance.


        Not available to API keys yet. It will need `time:write`.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpsertTimesheetEntryRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpsertTimesheetEntryResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not found
        '409':
          description: Conflict
        '429':
          description: Response 429
components:
  schemas:
    UpsertTimesheetEntryRequest:
      type: object
      properties:
        roleInOrgID:
          type: string
          format: uuid
        workDate:
          type: string
          pattern: ^\d{4}-\d{2}-\d{2}$
        startTime:
          type: string
          pattern: ^([01]\d|2[0-3]):[0-5]\d$
        endTime:
          type: string
          pattern: ^([01]\d|2[0-3]):[0-5]\d$
        clockStartAt:
          type: string
        clockEndAt:
          type: string
        clockBreakMinutes:
          type: integer
          minimum: 0
          maximum: 1500
        clockExpectedUpdatedAt:
          type: string
        breakStartTime:
          type:
            - string
            - 'null'
          pattern: ^([01]\d|2[0-3]):[0-5]\d$
        breakEndTime:
          type:
            - string
            - 'null'
          pattern: ^([01]\d|2[0-3]):[0-5]\d$
        breaks:
          type: array
          items:
            type: object
            properties:
              start:
                type: string
                pattern: ^([01]\d|2[0-3]):[0-5]\d$
              end:
                type: string
                pattern: ^([01]\d|2[0-3]):[0-5]\d$
              kind:
                type: string
                enum:
                  - BREAK
                  - LUNCH
              paid:
                type: boolean
              worked:
                type: boolean
            required:
              - start
              - end
              - kind
          maxItems: 6
        note:
          type:
            - string
            - 'null'
          maxLength: 1000
      required:
        - workDate
        - startTime
        - endTime
    UpsertTimesheetEntryResponse:
      type: object
      properties: {}
      description: Request regeneration does not infer response shapes.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
````
