# API Update Holiday Hours

**URL:** <https://devforum.zoom.us/t/api-update-holiday-hours/104024>\
**Category:** Phone\
**Tags:** phone, webhooks, api\
**Created:** [February 16, 2024, 5:00pm UTC](https://devforum.zoom.us/t/api-update-holiday-hours/104024 "2024-02-16T17:00:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jniehoff](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jniehoff/32/55590_2.png) [@jniehoff](https://devforum.zoom.us/u/jniehoff)\
**Post date:** [February 16, 2024, 5:00pm UTC](https://devforum.zoom.us/t/api-update-holiday-hours/104024/1 "2024-02-16T17:00:57Z")

</div>

**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](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](https://api.zoom.us/v2/phone/ex) …
- 

```auto
  + 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”  
}  
]

---

<div class="post-metadata">

**Author:** ![gianni.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/gianni.zoom/32/32523_2.png) [@gianni.zoom](https://devforum.zoom.us/u/gianni.zoom)\
**Post date:** [April 15, 2024, 7:45pm UTC](https://devforum.zoom.us/t/api-update-holiday-hours/104024/2 "2024-04-15T19:45:04Z")

</div>

Hi @jniehoff ,

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