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

# get_state_holidays Tool

> Get state holidays where telephone solicitation calls are prohibited

The `get_state_holidays` tool returns all states and their restricted holidays where telephone solicitation calls are prohibited. Use this to plan campaigns and avoid calling on state holidays.

## When to Use

* Planning campaign schedules around state holidays
* Building holiday-aware calling calendars
* Compliance auditing and reporting

## Parameters

<ParamField body="loginId" type="string">
  API key. Only required if not provided via the `x-dncscrub-api-key` HTTP header.
</ParamField>

## Response

<ResponseField name="success" type="boolean">
  Whether the API call succeeded.
</ResponseField>

<ResponseField name="holidays" type="array">
  List of all state holidays with calling restrictions.

  <Expandable title="holiday object">
    <ResponseField name="state" type="string">
      2-letter state code.
    </ResponseField>

    <ResponseField name="date" type="string">
      Date of the holiday.
    </ResponseField>

    <ResponseField name="name" type="string">
      Name of the holiday.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="stateCount" type="number">
  Number of unique states with restricted holidays.
</ResponseField>

<ResponseField name="holidayCount" type="number">
  Total number of restricted holidays.
</ResponseField>

<ResponseField name="errorCode" type="string">
  Machine-readable error code (when failed).
</ResponseField>

<ResponseField name="errorMessage" type="string">
  Human-readable error description (when failed).
</ResponseField>

## Examples

<Tabs>
  <Tab title="Request">
    ```json theme={null}
    {}
    ```
  </Tab>

  <Tab title="Response">
    ```json theme={null}
    {
      "success": true,
      "holidays": [
        {
          "state": "CA",
          "date": "2024-01-01",
          "name": "New Year's Day"
        },
        {
          "state": "CA",
          "date": "2024-07-04",
          "name": "Independence Day"
        },
        {
          "state": "NY",
          "date": "2024-01-01",
          "name": "New Year's Day"
        },
        {
          "state": "TX",
          "date": "2024-03-02",
          "name": "Texas Independence Day"
        }
      ],
      "stateCount": 3,
      "holidayCount": 4
    }
    ```
  </Tab>
</Tabs>

## Usage Notes

* Different states have different restricted holidays
* Some holidays are state-specific (e.g., Texas Independence Day)
* Federal holidays may not be restricted in all states
* Use this data to build state-aware calling calendars
* For real-time holiday checking, `is_time_legal_to_call` automatically accounts for holidays
