curl --location --request PUT 'https://api.weya.live/backend/api/holiday-list/68a1f2c3b7c7d3f123456789' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"name": "India Holidays 2026",
"holidays": [
{ "label": "Republic Day", "date": "2026-01-26" },
{ "label": "Independence Day", "date": "2026-08-15" },
{ "label": "Gandhi Jayanti", "date": "2026-10-02" }
]
}'
{
"status": true,
"code": 200,
"message": "Holiday list updated successfully",
"errorMessage": null,
"data": {
"_id": "68a1f2c3b7c7d3f123456789",
"name": "India Holidays 2026",
"isDefault": true,
"holidays": [
{ "label": "Republic Day", "date": "2026-01-26" },
{ "label": "Independence Day", "date": "2026-08-15" },
{ "label": "Gandhi Jayanti", "date": "2026-10-02" }
],
"updatedAt": "2026-11-19T09:00:00.000Z"
}
}
Holiday Lists
Update Holiday List
Rename a holiday list, change its dates, or make it the default.
PUT
/
api
/
holiday-list
/
{id}
curl --location --request PUT 'https://api.weya.live/backend/api/holiday-list/68a1f2c3b7c7d3f123456789' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"name": "India Holidays 2026",
"holidays": [
{ "label": "Republic Day", "date": "2026-01-26" },
{ "label": "Independence Day", "date": "2026-08-15" },
{ "label": "Gandhi Jayanti", "date": "2026-10-02" }
]
}'
{
"status": true,
"code": 200,
"message": "Holiday list updated successfully",
"errorMessage": null,
"data": {
"_id": "68a1f2c3b7c7d3f123456789",
"name": "India Holidays 2026",
"isDefault": true,
"holidays": [
{ "label": "Republic Day", "date": "2026-01-26" },
{ "label": "Independence Day", "date": "2026-08-15" },
{ "label": "Gandhi Jayanti", "date": "2026-10-02" }
],
"updatedAt": "2026-11-19T09:00:00.000Z"
}
}
Overview
Update a holiday list. Send only the fields you want to change. If you sendholidays, it replaces the whole list of dates.
Prerequisites
- An API key for your workspace
- The holiday list’s ID (
_idfrom Get Holiday Lists), in your organization
Endpoint
Request
curl --location --request PUT 'https://api.weya.live/backend/api/holiday-list/68a1f2c3b7c7d3f123456789' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"name": "India Holidays 2026",
"holidays": [
{ "label": "Republic Day", "date": "2026-01-26" },
{ "label": "Independence Day", "date": "2026-08-15" },
{ "label": "Gandhi Jayanti", "date": "2026-10-02" }
]
}'
Request Parameters
The full list of holidays, replacing the current one. Each item has a
label and a date in YYYY-MM-DD format.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
{
"status": true,
"code": 200,
"message": "Holiday list updated successfully",
"errorMessage": null,
"data": {
"_id": "68a1f2c3b7c7d3f123456789",
"name": "India Holidays 2026",
"isDefault": true,
"holidays": [
{ "label": "Republic Day", "date": "2026-01-26" },
{ "label": "Independence Day", "date": "2026-08-15" },
{ "label": "Gandhi Jayanti", "date": "2026-10-02" }
],
"updatedAt": "2026-11-19T09:00:00.000Z"
}
}
Error Handling
Errors returnstatus: 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, orEach 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.
Was this page helpful?

