Need help setting "Missed Call Routing" for users

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

https://api.zoom.us/v2/phone/extension/$($ExtensionID)/call_handling/settings/business_hours

Description
I am trying to use this API endpoint to remotely set a user’s Business Hours Call Handling “When a call is not answered” routing to point to a target Call Queue with PowerShell.

Error?
I’m essentially just getting a (400) Bad Request error from the server. I’m pretty sure my JSON file is not constructed properly, but the API documentation does not have any code examples for changing the Call Handling pieces. There is a discrepancy between the naming conventions in the documentation and what I’m seeing in PowerShell.

  • Documentation says to use the call_not_answered_action property, but a GET command of the call handling settings shows the property is called action.
  • Documentation says to use forward_to_extension_id, but a GET command of the call handling settings shows the property is called just forward_to.

Needless to say, I’m stuck and seeking some assistance here. I’ve spent several hours trying to reformat the JSON request, both with the details in the documentation, and those pulled directly with a GET command from the API itself, and neither are working.

How To Reproduce
Steps to reproduce the behavior:
1. Body:

        # Create the necessary JSON body for the PATCH request
        $settingsBody = @{
            settings = @{
                routing = @{
                    action = 7
                    forward_to = @{
                        extension_type = "callQueue"
                        id   = "$CallQueueID"
                    }
                }
            }
        } | ConvertTo-Json -Depth 5

2. API Call:

Invoke-WebRequest -Method PATCH -Uri $settingsEndpoint -Headers $apiHeaders -Body $settingsBody -ContentType “application/json”

Any assistance would be greatly appreciated. Thank you!

Hi @MithosAurion
Thanks for reaching out to us!
I have done some testing on my end and it seems like you are not passing the right json body.
Can you please try something like this:

{

  "sub_setting_type": "call_forwarding",
   "settings": {
    "call_not_answer_action": 10,
    "forward_to_extension_id": "target_call_queue_id",
    "greeting_prompt_id": ""
  }
}

Find more examples here: Call Handling API guide

Good morning Elisa,

Thank you for your reply and update.

Using your information and cross-references gleaned from a GET command in the API with a Call Queue actively set for myself, I was able to discover the appropriate body setup for the JSON in this case:

Using this, I successfully updated the Business Hours missed call routing target to the desired Call Queue.

However, I want to point out, this was exceptionally difficult to figure out because the name of the properties are different in PATCH than GET (call_not_answer_action vs action, forward_to_extension_id vs forward_to), and the “routing” subsetting property is technically the top hierarchy but was not actually needed at all.

You can consider this closed/resolved.