---
search:
  tags:
    - holidays
    - PUT
seo:
  description: >-
    Updates the validity period (validTill) of a custom holiday year… Reference
    for the PUT /holidays/years/{yearId} endpoint in the Leadtime Public API
    API.
sidebar:
  badge: PUT
  label: Update holiday year
title: Update holiday year
type: openapi-operation
---
Updates the validity period (`validTill`) of a custom holiday year configuration.

**What this does:**
Changes how long a custom holiday configuration applies to future years. This is useful when you want to extend or limit the scope of your customizations.

**How `validTill` works:**
- **Set to a specific year** (e.g., `2026`): The configuration applies from the year's start year through 2026
  - Future years within this range will be automatically created as "derived" configurations
  - Years beyond `validTill` will use default holidays

- **Set to `null`**: The configuration applies indefinitely to all future years
  - All future years will automatically inherit this configuration as "derived" years
  - Useful for permanent company holidays that should always apply

**Example scenarios:**
1. **Temporary change**: You add a special holiday for 2024-2025 only
   - Create year 2024 with `validTill: 2025`
   - Both 2024 and 2025 will use the custom configuration
   - 2026 and beyond will use defaults

2. **Permanent company holiday**: You add "Company Foundation Day" that should always be a holiday
   - Create year 2024 with `validTill: null`
   - All future years will automatically include this holiday

3. **Extending validity**: You previously set `validTill: 2025` but want to extend to 2027
   - Update the year with `validTill: 2027`
   - Years 2026 and 2027 will now also use the custom configuration

**Note:** This endpoint only works on custom holiday years (those with an `id`). Default years cannot be updated - you must create a custom year first using `POST /holidays/years`.

<Operation source="api-reference" id="holidayscontroller-updateholidayyear" />
