curl --location --request PATCH 'https://api.weya.live/backend/api/holiday-list/toggle' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"enable": true
}'
{
"status": true,
"code": 200,
"message": "Holiday list setting updated successfully",
"errorMessage": null,
"data": []
}
Holiday Lists
Toggle Holiday Lists
Turn holiday lists on or off for your whole organization.
PATCH
/
api
/
holiday-list
/
toggle
curl --location --request PATCH 'https://api.weya.live/backend/api/holiday-list/toggle' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"enable": true
}'
{
"status": true,
"code": 200,
"message": "Holiday list setting updated successfully",
"errorMessage": null,
"data": []
}
Overview
Turn the holiday list feature on or off for your organization. This is an organization-wide setting, not a setting for one list. When it’s off, the Holiday List option is hidden when creating or editing a campaign in the dashboard. When you turn it on and your organization has no holiday lists yet, a default list named “India Holidays” is created from theIN template.
The setting doesn’t change calling: a campaign that has a holiday list still skips its dates when the setting is off, and the API accepts holidayListId either way.
Prerequisites
- An API key for your workspace
Endpoint
Request
curl --location --request PATCH 'https://api.weya.live/backend/api/holiday-list/toggle' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"enable": true
}'
Request Parameters
true to turn holiday lists on, false to turn them off. Must be a JSON boolean, not a string.Response
{
"status": true,
"code": 200,
"message": "Holiday list setting updated successfully",
"errorMessage": null,
"data": []
}
Error Handling
Errors returnstatus: false, with the reason in errorMessage.
- 400 Bad Request –
Enable field must be a boolean. - 404 Not Found –
Organization not found. - 401 Unauthorized – Missing or invalid API key.
- 500 Internal Server Error – Unexpected server error.
Was this page helpful?

