API Update Holiday Hours

API Endpoint(s) and/or Zoom API Event(s)

PATCH /phone/extension/{extensionId}/call_handling/settings/holiday_hours

Description
So I am trying to mass update the holiday hours for call queues and auto receptionist. I have a template with settings to use. I can pull the object and it is a JSON object, but if I pass it right back to another ext it fails with an invalid JSON object. If I remove the Holiday ID, the error remains the same.

I’ve tried building the object manually and it still fails.

Error?

Invoke-RestMethod -Method Patch -Uri “https://api.zoom.us/v2/phone/extension/hi0Zo95xTn2yz2lYcjgIjA/call_handling/settings/holiday_hours” -Headers $headers -Body $simplifiedList
Invoke-RestMethod : {“code”:300,“message”:“Request Body should be a valid JSON object.”}
At line:1 char:1

  • Invoke-RestMethod -Method Patch -Uri "https://api.zoom.us/v2/phone/ex
  •   + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
      + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
    
    

How To Reproduce
Steps to reproduce the behavior:
*1.https:/api.zoom.us/v2/phone/extension/{extensionId}/call_handling/settings/holiday_hours
*2. Standard auth token - this doesn’t present issues anywhere else in my work
*3. Invalid JSON object as described above.

Below is the layout of the object I am trying to pass, once it is converted to a JSON object in powershell.

[
{
“settings”: {
“from”: “2024-02-19T00:00:00Z”,
“to”: “2024-02-20T00:00:00Z”,
“name”: “Presidents Day”
},
“sub_setting_type”: “holiday”
},
{
“settings”: {
“from”: “2024-03-29T00:00:00Z”,
“to”: “2024-03-30T00:00:00Z”,
“name”: “Good Friday”
},
“sub_setting_type”: “holiday”
},
{
“settings”: {
“from”: “2024-05-27T00:00:00Z”,
“to”: “2024-05-28T00:00:00Z”,
“name”: “Memorial Day”
},
“sub_setting_type”: “holiday”
},
{
“settings”: {
“from”: “2024-06-19T00:00:00Z”,
“to”: “2024-06-20T00:00:00Z”,
“name”: “Juneteenth”
},
“sub_setting_type”: “holiday”
},
{
“settings”: {
“from”: “2024-07-03T13:00:00Z”,
“to”: “2024-07-05T00:00:00Z”,
“name”: “July 3/4”
},
“sub_setting_type”: “holiday”
},
{
“settings”: {
“from”: “2024-09-02T00:00:00Z”,
“to”: “2024-09-03T00:00:00Z”,
“name”: “Labor Day”
},
“sub_setting_type”: “holiday”
},
{
“settings”: {
“from”: “2024-12-24T13:00:00Z”,
“to”: “2024-12-26T00:00:00Z”,
“name”: “Christmas Eve/Day”
},
“sub_setting_type”: “holiday”
},
{
“settings”: {
“from”: “2025-11-24T00:00:00Z”,
“to”: “2025-11-29T00:00:00Z”,
“name”: “Thanksgiving”
},
“sub_setting_type”: “holiday”
}
]

Hi @jniehoff ,

When you send a singular object as opposed to an array of objects, does it still fail?