---
search:
  tags:
    - employees
    - POST
seo:
  description: >-
    Creates a new weekly working time entry or updates an… Reference for the
    POST /employees/{id}/weekly-working-time endpoint in the Leadtime Public API
    API.
sidebar:
  badge: POST
  label: Create or update weekly working time entry
title: Create or update weekly working time entry
type: openapi-operation
---
Creates a new weekly working time entry or updates an existing one for an employee.

**How it works:**
- If `id` is provided in the request body, updates the existing entry with that ID
- If `id` is omitted, creates a new entry

**What is weekly working time?**
Weekly working time defines the employee's work schedule:
- `workingDays`: Array of 7 numbers (Monday=0, Sunday=6), where 1 means the employee works that day, 0 means they don't
- `weeklyWorkingHours`: Total hours per week (maximum 168)
- `dateFrom`: Date when this configuration starts applying

**Active entry selection:**
- The active entry for a given date is the one with the most recent `dateFrom` that is still on or before that date
- If no entry exists for a date, no entry is considered active

**Returns:** The updated employee object with all weekly working time entries.

<Operation source="api-reference" id="employeescontroller-createorupdateweeklyworkingtime" />
