> ## Documentation Index
> Fetch the complete documentation index at: https://docs.weya.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Holiday List

> Create a new Holiday List to prevent outbound campaigns from calling contacts on specified holidays.

Use this endpoint to create a new Holiday List. Holiday Lists allow you to define dates on which outbound campaigns should automatically avoid placing calls.

<Note>
  Only authenticated users can create Holiday Lists within their workspace.
</Note>

### OpenAPI

```yaml theme={null}
openapi: 3.1.0
info:
  title: Create Holiday List
  version: 1.0.0

paths:
  /api/holiday-lists:
    post:
      summary: Create a Holiday List
      description: Creates a new Holiday List for the authenticated workspace.
      tags:
        - Holiday Lists

      security:
        - bearerAuth: []

      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
                - holidays
              properties:
                name:
                  type: string
                  example: India Public Holidays
                description:
                  type: string
                  example: National holidays observed across India.
                holidays:
                  type: array
                  description: List of holidays to include.
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                        example: Republic Day
                      date:
                        type: string
                        format: date
                        example: "2026-01-26"

      responses:
        "201":
          description: Holiday List created successfully.

        "400":
          description: Invalid request.

        "401":
          description: Unauthorized.

        "500":
          description: Internal Server Error.

components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
```

## Authorizations

<ParamField header="Authorization" type="string" required>
  Bearer Token for the authenticated user.

  Format:

  `Authorization: Bearer YOUR_ACCESS_TOKEN`
</ParamField>

## Body Parameters

<ParamField body="name" type="string" required>
  Name of the Holiday List.
</ParamField>

<ParamField body="description" type="string">
  Optional description for the Holiday List.
</ParamField>

<ParamField body="holidays" type="array" required>
  Array of holidays to include in the Holiday List.
</ParamField>

## Example Request

```bash theme={null}
curl --location '{{baseUrl}}/api/holiday-lists' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
  "name": "India Public Holidays",
  "description": "National holidays observed across India.",
  "holidays": [
    {
      "name": "Republic Day",
      "date": "2026-01-26"
    },
    {
      "name": "Independence Day",
      "date": "2026-08-15"
    }
  ]
}'
```

## Successful Response

```json theme={null}
{
  "success": true,
  "message": "Holiday List created successfully.",
  "data": {
    "_id": "6863f5ab1e4d7f0012345678",
    "name": "India Public Holidays",
    "description": "National holidays observed across India.",
    "enabled": true,
    "holidayCount": 2,
    "createdAt": "2026-07-21T10:30:15.000Z",
    "updatedAt": "2026-07-21T10:30:15.000Z"
  }
}
```

## Response Fields

<ResponseField name="_id" type="string">
  Unique identifier of the Holiday List.
</ResponseField>

<ResponseField name="name" type="string">
  Name of the Holiday List.
</ResponseField>

<ResponseField name="description" type="string">
  Description of the Holiday List.
</ResponseField>

<ResponseField name="enabled" type="boolean">
  Indicates whether the Holiday List is active.
</ResponseField>

<ResponseField name="holidayCount" type="integer">
  Total number of holidays contained in the Holiday List.
</ResponseField>

<ResponseField name="createdAt" type="string">
  Timestamp when the Holiday List was created.
</ResponseField>

<ResponseField name="updatedAt" type="string">
  Timestamp when the Holiday List was last updated.
</ResponseField>

## Error Responses

### Bad Request (400)

```json theme={null}
{
  "success": false,
  "message": "Invalid request payload."
}
```

### Unauthorized (401)

```json theme={null}
{
  "success": false,
  "message": "Unauthorized"
}
```

### Internal Server Error (500)

```json theme={null}
{
  "success": false,
  "message": "Failed to create Holiday List."
}
```
