curl --location 'https://api.weya.live/backend/api/holiday-list' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"name": "India Holidays",
"isDefault": true,
"holidays": [
{ "label": "Republic Day", "date": "2026-01-26" },
{ "label": "Independence Day", "date": "2026-08-15" }
]
}'
{
"status": true,
"code": 201,
"message": "Holiday list created successfully",
"errorMessage": null,
"data": {
"_id": "68a1f2c3b7c7d3f123456789",
"name": "India Holidays",
"isDefault": true,
"holidays": [
{ "label": "Republic Day", "date": "2026-01-26" },
{ "label": "Independence Day", "date": "2026-08-15" }
],
"createdAt": "2026-01-02T10:00:00.000Z",
"updatedAt": "2026-01-02T10:00:00.000Z"
}
}
Holiday Lists
Create Holiday List
Create a list of dates on which campaigns should not place calls.
POST
/
api
/
holiday-list
curl --location 'https://api.weya.live/backend/api/holiday-list' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"name": "India Holidays",
"isDefault": true,
"holidays": [
{ "label": "Republic Day", "date": "2026-01-26" },
{ "label": "Independence Day", "date": "2026-08-15" }
]
}'
{
"status": true,
"code": 201,
"message": "Holiday list created successfully",
"errorMessage": null,
"data": {
"_id": "68a1f2c3b7c7d3f123456789",
"name": "India Holidays",
"isDefault": true,
"holidays": [
{ "label": "Republic Day", "date": "2026-01-26" },
{ "label": "Independence Day", "date": "2026-08-15" }
],
"createdAt": "2026-01-02T10:00:00.000Z",
"updatedAt": "2026-01-02T10:00:00.000Z"
}
}
Overview
Create a holiday list in your organization. Campaigns that use it don’t place calls on its dates. To start from a country’s public holidays, fetch them with Get Template Holidays and send them asholidays.
Prerequisites
- An API key for your workspace
Endpoint
Request
curl --location 'https://api.weya.live/backend/api/holiday-list' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"name": "India Holidays",
"isDefault": true,
"holidays": [
{ "label": "Republic Day", "date": "2026-01-26" },
{ "label": "Independence Day", "date": "2026-08-15" }
]
}'
Request Parameters
The holidays. Each item has:
label– name of the holidaydate– the date, inYYYY-MM-DDformat (a full ISO 8601 timestamp is cut to its date)
Set to
true to make this the organization’s default list, preselected when creating a campaign in the dashboard. The previous default stops being the default.Response
{
"status": true,
"code": 201,
"message": "Holiday list created successfully",
"errorMessage": null,
"data": {
"_id": "68a1f2c3b7c7d3f123456789",
"name": "India Holidays",
"isDefault": true,
"holidays": [
{ "label": "Republic Day", "date": "2026-01-26" },
{ "label": "Independence Day", "date": "2026-08-15" }
],
"createdAt": "2026-01-02T10:00:00.000Z",
"updatedAt": "2026-01-02T10:00:00.000Z"
}
}
Error Handling
Errors returnstatus: false, with the reason in errorMessage.
- 400 Bad Request
Holiday list name is requiredorHolidays must be an array.isDefault must be a boolean when provided.Each holiday must have a valid date and label, orInvalid date format for holiday.A holiday list with this name already exists for your organization.
- 401 Unauthorized – Missing or invalid API key.
- 500 Internal Server Error – Unexpected server error.
Was this page helpful?

