Skip to main content
PUT

Overview

Update a holiday list. Send only the fields you want to change. If you send holidays, it replaces the whole list of dates.

Prerequisites

  • An API key for your workspace
  • The holiday list’s ID (_id from Get Holiday Lists), in your organization

Endpoint

Request

string
required
Your workspace API key. Create one from the profile menu in the dashboard → API Keys.
string
required
ID of the holiday list to update.

Request Parameters

string
New name for the holiday list. Can’t be empty.
array[object]
The full list of holidays, replacing the current one. Each item has a label and a date in YYYY-MM-DD format.
boolean
Set to true to make this the organization’s default list; the previous default stops being the default. false is ignored: to change the default, set another list to true.

Response

object
required
The updated holiday list.

Error Handling

Errors return status: false, with the reason in errorMessage.
  • 400 Bad Request – Holiday list name cannot be empty, Holidays must be an array, Each holiday must have a valid date and label, or Each holiday must have a valid date format.
  • 401 Unauthorized – Missing or invalid API key.
  • 404 Not Found – Holiday list not found: the list doesn’t exist in your organization.
  • 500 Internal Server Error – Unexpected server error.