# Phone API Request ; Query Available numbers present within account

**URL:** <https://devforum.zoom.us/t/phone-api-request-query-available-numbers-present-within-account/6083>\
**Category:** API and Webhooks\
**Created:** [September 30, 2019, 10:04pm UTC](https://devforum.zoom.us/t/phone-api-request-query-available-numbers-present-within-account/6083 "2019-09-30T22:04:59Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![snimmo](https://avatars.discourse-cdn.com/v4/letter/s/4bbf92/32.png) [@snimmo](https://devforum.zoom.us/u/snimmo)\
**Post date:** [September 30, 2019, 10:04pm UTC](https://devforum.zoom.us/t/phone-api-request-query-available-numbers-present-within-account/6083/1 "2019-09-30T22:04:59Z")

</div>

Within Zoom Phone API (documented here \> [https://marketplace.zoom.us/docs/api-reference/zoom-api/phone/listaccountphonenumbers](https://marketplace.zoom.us/docs/api-reference/zoom-api/phone/listaccountphonenumbers) ) able to query available numbers per site.

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [September 30, 2019, 10:31pm UTC](https://devforum.zoom.us/t/phone-api-request-query-available-numbers-present-within-account/6083/2 "2019-09-30T22:31:05Z")

</div>

Hey @snimmo, thanks for posting and using Zoom!

Have you used the `type=unassigned` query param? That will include numbers that have not been assigned (in other words, available) to your account.

 ![56%20PM](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/e/e9be9a774525473437127703af7daf5e8763a88e.png)

> **[List Account's Phone Numbers - Phone - Zoom API - API Reference](https://marketplace.zoom.us/docs/api-reference/zoom-api/phone/listaccountphonenumbers#request-parameters)**
>
> A Zoom account owner or admin can purchase phone numbers and assign them to Zoom phone users. Use this API to list all Zoom Phone numbers of a Zoom acco...

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![snimmo](https://avatars.discourse-cdn.com/v4/letter/s/4bbf92/32.png) [@snimmo](https://devforum.zoom.us/u/snimmo)\
**Post date:** [September 30, 2019, 11:01pm UTC](https://devforum.zoom.us/t/phone-api-request-query-available-numbers-present-within-account/6083/3 "2019-09-30T23:01:07Z")

</div>

@tommy, thanks for the answer there however I think I need to clarify my ask now;

So I’m running the following;

_Invoke-RestMethod ‘[https://api.zoom.us/v2/phone/numbers?page\_size=300](https://api.zoom.us/v2/phone/numbers?page_size=300)’ -Headers @{‘Authorization’ = “Bearer $Accesstoken”} -Method Get -ContentType ‘application/json’_

Within the response I’m getting back (note the page\_size);

![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/9/91e26a12c35c6221f9a4861b35fb1a957151e89f.png)

Also, is there a way (or to be added) to query by site so that the page return is smaller depending on the site size?

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [October 1, 2019, 6:49pm UTC](https://devforum.zoom.us/t/phone-api-request-query-available-numbers-present-within-account/6083/4 "2019-10-01T18:49:02Z")

</div>

Hey @snimmo,

I was able to reproduce the page\_size max being 100 and not 300. We are looking into this.

> [@snimmo](#):
>
> query by site so that the page return is smaller depending on the site size?

Can you explain further, I don’t understand?

When you say “site” do you mean Zoom account?

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![snimmo](https://avatars.discourse-cdn.com/v4/letter/s/4bbf92/32.png) [@snimmo](https://devforum.zoom.us/u/snimmo)\
**Post date:** [October 1, 2019, 7:07pm UTC](https://devforum.zoom.us/t/phone-api-request-query-available-numbers-present-within-account/6083/5 "2019-10-01T19:07:24Z")

</div>

@tommy,

Within Zoom phone UI, you have “Site” listed (in a follow up post since it doesn’t like multiple images in a post);

Now, those sites translate out to a GUID (using my account as the example);

![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/6/605615173edc29ca20083265868c7f3418143996.png)

Since we have multiple “sites” (as in physical offices), it’ll help to know how many numbers are left under that particular site and would reduce the size of the call since we’re not looking for _allll_ numbers in the account, just only at a site.

---

<div class="post-metadata">

**Author:** ![snimmo](https://avatars.discourse-cdn.com/v4/letter/s/4bbf92/32.png) [@snimmo](https://devforum.zoom.us/u/snimmo)\
**Post date:** [October 1, 2019, 7:08pm UTC](https://devforum.zoom.us/t/phone-api-request-query-available-numbers-present-within-account/6083/6 "2019-10-01T19:08:05Z")

</div>

Other screenshot;

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/e/ed0c7c1ebb2694c4ddb080dec1f3854179f54154.png)

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [October 1, 2019, 8:03pm UTC](https://devforum.zoom.us/t/phone-api-request-query-available-numbers-present-within-account/6083/7 "2019-10-01T20:03:31Z")

</div>

Hey @snimmo, the max page\_size is 100, [we have updated our documentation](https://marketplace.zoom.us/docs/api-reference/zoom-api/phone/listaccountphonenumbers#request-parameters).

As for the site, thank you for the clarification 🙂

Adding a site query param would be a great enhancement to the [GET /phone/numbers endpoint](https://marketplace.zoom.us/docs/api-reference/zoom-api/phone/listaccountphonenumbers). I will add this as a feature request.

Not sure if this helps, but we have a [GET /phone/sites/{siteId} endpoint](https://marketplace.zoom.us/docs/api-reference/zoom-api/phone-site/getasite).

You can [track our releases here](https://marketplace.zoom.us/docs/changelog) to see when the site query param gets released.

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![snimmo](https://avatars.discourse-cdn.com/v4/letter/s/4bbf92/32.png) [@snimmo](https://devforum.zoom.us/u/snimmo)\
**Post date:** [October 2, 2019, 1:32pm UTC](https://devforum.zoom.us/t/phone-api-request-query-available-numbers-present-within-account/6083/8 "2019-10-02T13:32:24Z")

</div>

@tommy, thanks for updating the docs.

About the site query, we _do_ get the name of the site (kudos) and it matches what we would see from the phone management GUI (also hurray). But the only number listed is the auto-receptionist (which is nice, but not sure if useful right now at least).

So to query available numbers by their site\_id value would be amazing to have. Also for the calling plans to site assignment, looking over the docs I’m not entirely sure how to validate E911 settings either and/or there isn’t anything in the user profile that states that (maybe defined somewhere within the site?). I’ll admit I haven’t dug much into it but figured it wouldn’t hurt to ask.

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [October 2, 2019, 10:08pm UTC](https://devforum.zoom.us/t/phone-api-request-query-available-numbers-present-within-account/6083/9 "2019-10-02T22:08:16Z")

</div>

Happy to help @snimmo, thanks for pointing this out to us! 🙂

As for the Zoom Phone E911 settings, can you elaborate on this?

Do you mean the emergency address settings?

 ![23%20PM](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/e/e631d6e51c4870e22baf7ba1d6f81e8dd5cd7c92.png)

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![snimmo](https://avatars.discourse-cdn.com/v4/letter/s/4bbf92/32.png) [@snimmo](https://devforum.zoom.us/u/snimmo)\
**Post date:** [October 3, 2019, 2:05pm UTC](https://devforum.zoom.us/t/phone-api-request-query-available-numbers-present-within-account/6083/10 "2019-10-03T14:05:30Z")

</div>

@tommy, yes that’s it.

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [October 3, 2019, 4:04pm UTC](https://devforum.zoom.us/t/phone-api-request-query-available-numbers-present-within-account/6083/11 "2019-10-03T16:04:26Z")

</div>

Hey @snimmo,

Have you seen our “Setting Up Emergency Addresses and Emergency Calling” page?

> **[Setting Up Emergency Addresses and Emergency Calling](https://support.zoom.us/hc/en-us/articles/360021062871-Setting-Up-Emergency-Addresses-and-Emergency-Calling)**
>
> Overview
> The emergency address is provided to first responders when dialing an emergency number. You must add emergency addresses to your account before buying direct phone numbers.
> You can also ro...

Let me know if this helps!

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![snimmo](https://avatars.discourse-cdn.com/v4/letter/s/4bbf92/32.png) [@snimmo](https://devforum.zoom.us/u/snimmo)\
**Post date:** [October 4, 2019, 2:08pm UTC](https://devforum.zoom.us/t/phone-api-request-query-available-numbers-present-within-account/6083/12 "2019-10-04T14:08:53Z")

</div>

@tommy, that looks good. I think I’m over thinking it just a bit.

In the meantime, I’ll keep an eye on the site query param release but continue to see if I can make things work as they stand currently.

Also, on the [GET /phone/numbers endpoint](https://marketplace.zoom.us/docs/api-reference/zoom-api/phone/listaccountphonenumbers), I don’t see where the next\_page\_token is supplied after running this (or if supplied before, where does one get it?);

_Invoke-RestMethod ‘[https://api.zoom.us/v2/phone/numbers?page\_size=100](https://api.zoom.us/v2/phone/numbers?page_size=100)’ -Headers @{‘Authorization’ = “Bearer $Accesstoken”} -Method Get -ContentType ‘application/json’_

![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/9/91f6892e368bfed0c4f82f93d6a7d76295ad56cb.png)

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [October 4, 2019, 4:54pm UTC](https://devforum.zoom.us/t/phone-api-request-query-available-numbers-present-within-account/6083/13 "2019-10-04T16:54:38Z")

</div>

Hey @snimmo,

Can you try supplying the following query param for pagination?

`page_number=2` I think our docs might be wrong.

`https://api.zoom.us/v2/phone/numbers?page_size=100&page_number=2`

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![snimmo](https://avatars.discourse-cdn.com/v4/letter/s/4bbf92/32.png) [@snimmo](https://devforum.zoom.us/u/snimmo)\
**Post date:** [October 4, 2019, 5:19pm UTC](https://devforum.zoom.us/t/phone-api-request-query-available-numbers-present-within-account/6083/14 "2019-10-04T17:19:24Z")

</div>

@tommy

It just displays the second page of results meaning I’d have to get the number of pages and then loop through them.

So, in my case, I’d have to run my query 30 times (one to get the number of pages, then loop another 29)

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [October 4, 2019, 6:38pm UTC](https://devforum.zoom.us/t/phone-api-request-query-available-numbers-present-within-account/6083/15 "2019-10-04T18:38:43Z")

</div>

Hey @snimmo,

The `page_count` tells you how many pages of `page_size` (100) there are.

So yes to get all of the data, you would have to make 29 requests.

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![snimmo](https://avatars.discourse-cdn.com/v4/letter/s/4bbf92/32.png) [@snimmo](https://devforum.zoom.us/u/snimmo)\
**Post date:** [October 7, 2019, 7:06pm UTC](https://devforum.zoom.us/t/phone-api-request-query-available-numbers-present-within-account/6083/16 "2019-10-07T19:06:59Z")

</div>

@tommy,

That’s a bit depressing but I guess it is what it is currently.

In that event, I’ll keep an eye on the releases for said API and any/all recaps from our Account Rep.

So, for the time being, I think we’re good to go in regards to get started on testing.

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [October 7, 2019, 7:44pm UTC](https://devforum.zoom.us/t/phone-api-request-query-available-numbers-present-within-account/6083/17 "2019-10-07T19:44:28Z")

</div>

Hey @snimmo!

Yes stay up to date on the releases 🙂

Let us know if you have other questions while testing!

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [October 8, 2019, 4:33pm UTC](https://devforum.zoom.us/t/phone-api-request-query-available-numbers-present-within-account/6083/18 "2019-10-08T16:33:24Z")

</div>

Hey @snimmo,

We are updating the [GET /phone/numbers endpoint](https://marketplace.zoom.us/docs/api-reference/zoom-api/phone/listaccountphonenumbers) and [GET /phone/sites/{siteId} endpoint](https://marketplace.zoom.us/docs/api-reference/zoom-api/phone-site/getasite) to fix a bug. [They will be re-released in November/December](https://marketplace.zoom.us/docs/guides/getting-started/stay-up-to-date/upcoming-changes/api). In the meantime please use the phone APIs that you see listed in [our docs](https://marketplace.zoom.us/docs/api-reference/zoom-api/phone).

Thanks, and sorry for the inconvenience.

---

<div class="post-metadata">

**Author:** ![snimmo](https://avatars.discourse-cdn.com/v4/letter/s/4bbf92/32.png) [@snimmo](https://devforum.zoom.us/u/snimmo)\
**Post date:** [October 9, 2019, 7:30pm UTC](https://devforum.zoom.us/t/phone-api-request-query-available-numbers-present-within-account/6083/19 "2019-10-09T19:30:02Z")

</div>

Hey @tommy,

Both GET pages 404.

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [October 9, 2019, 8:04pm UTC](https://devforum.zoom.us/t/phone-api-request-query-available-numbers-present-within-account/6083/20 "2019-10-09T20:04:53Z")

</div>

Hey @snimmo,

Yes we removed them from our docs until we fix the bug.

Thanks,  
Tommy

[Next page](https://devforum.zoom.us/t/phone-api-request-query-available-numbers-present-within-account/6083.md?page=2)
