> ## 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 Time Tracking Assignment

> Enables or disables time tracking for an employee with mode, template, timezone and effective dates.

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

## OpenAPI

````yaml api-reference/openapi.json POST /hris/upsert-time-tracking-assignment
openapi: 3.1.0
info:
  title: Toku API
  version: 1.0.0
servers:
  - url: https://api.toku.com
security:
  - bearerAuth: []
paths:
  /hris/upsert-time-tracking-assignment:
    post:
      operationId: upsertTimeTrackingAssignment
      summary: Upsert Time Tracking Assignment
      description: >-
        Enables or disables time tracking for an employee with mode, template,
        timezone and effective dates.


        Not available to API keys yet. It will need `time:write`.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpsertTimeTrackingAssignmentRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpsertTimeTrackingAssignmentResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not found
        '409':
          description: Conflict
        '429':
          description: Response 429
components:
  schemas:
    UpsertTimeTrackingAssignmentRequest:
      type: object
      properties:
        roleInOrgID:
          type: string
          format: uuid
        enabled:
          type: boolean
        mode:
          type: string
          enum:
            - MANUAL
            - AUTOPILOT
        timeTrackingScheduleTemplateID:
          type:
            - string
            - 'null'
          format: uuid
        timezone:
          type: string
          minLength: 1
          maxLength: 80
        shortBreakPay:
          type:
            - string
            - 'null'
          enum:
            - PAID
            - UNPAID
            - null
        mealBreakPay:
          type:
            - string
            - 'null'
          enum:
            - PAID
            - UNPAID
            - null
        breakPayNote:
          type:
            - string
            - 'null'
          maxLength: 1000
        weeklyHoursLimit:
          type:
            - number
            - 'null'
          minimum: 0.5
          maximum: 168
        effectiveFrom:
          type: string
          pattern: ^\d{4}-\d{2}-\d{2}$
        effectiveTo:
          type:
            - string
            - 'null'
          pattern: ^\d{4}-\d{2}-\d{2}$
      required:
        - roleInOrgID
        - enabled
    UpsertTimeTrackingAssignmentResponse:
      type: object
      properties:
        roleTimeTrackingAssignmentID:
          type: string
        enabled:
          type: boolean
      required:
        - roleTimeTrackingAssignmentID
        - enabled
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
````
