# Unable to create my first Room Location due to missing parent\_location\_id

**URL:** <https://devforum.zoom.us/t/unable-to-create-my-first-room-location-due-to-missing-parent-location-id/130849>\
**Category:** API and Webhooks\
**Tags:** api\
**Created:** [April 2, 2025, 5:05pm UTC](https://devforum.zoom.us/t/unable-to-create-my-first-room-location-due-to-missing-parent-location-id/130849 "2025-04-02T17:05:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![desautelsj](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/desautelsj/32/23584_2.png) [@desautelsj](https://devforum.zoom.us/u/desautelsj)\
**Post date:** [April 2, 2025, 5:05pm UTC](https://devforum.zoom.us/t/unable-to-create-my-first-room-location-due-to-missing-parent-location-id/130849/1 "2025-04-02T17:05:18Z")

</div>

I am trying to create my first location by making a `POST` request to `https://api.zoom.us/v2/rooms/locations`.

When I make my HTTP request, the Zoom API seems to mandate that I provide a value in the `parent_location_id` field. This makes perfect sense when you are creating a floor inside a building, creating a building in a city, creating a city in a province, etc. However, it doesn’t make (to me anyway) when you are creating the top level location (say, a country for example). In this scenario, there is no “parent”. The location you are trying to create is the top-most location in the hierarchy.

I have tried specifying a null value, an empty string and I have also tried omitting the `parent_location_id` field in my HTTP request like so:

First attempt: `{"name":"Country 1","parent_location_id":null}`  
Secont attempt: `{"name":"Country 1","parent_location_id":""}`  
Third attempt: `{"name":"Country 1"}`

but the API rejects my three attempts and returns the following error message:

```auto
{"code":300,"message":"Validation Failed.","errors":[{"field":"parent_location_id","message":"Missing field."}]}

```

I have tried specifying a bogus parent Id, like so: `{"name":"Country 1","parent_location_id":"BOGUS-ID"}`

but it gets rejected because the ID i specified is not valid: `{"code":4801,"message":"Location does not exist: BOGUS-ID."}`.

So I’m at a loss. I don’t know how to create my first location.

---

<div class="post-metadata">

**Author:** ![elisa.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/elisa.zoom/32/47836_2.png) [@elisa.zoom](https://devforum.zoom.us/u/elisa.zoom)\
**Post date:** [April 4, 2025, 1:34pm UTC](https://devforum.zoom.us/t/unable-to-create-my-first-room-location-due-to-missing-parent-location-id/130849/2 "2025-04-04T13:34:35Z")

</div>

Hey @desautelsj  
Have you tried calling the List Room locations first?

> **[Rooms APIs](https://developers.zoom.us/docs/api/rooms/#tag/zoom-rooms-location/GET/rooms/locations)**
>
> API reference for: Rooms

I found a. [support article](https://support.zoom.com/hc/en/article?id=zm_kb&sysparm_article=KB0063345&_gl=1*4h70fm*_gcl_aw*R0NMLjE3NDM2MTAwNTUuQ2p3S0NBand3TE9fQmhCMkVpd0F4MmUtM19DVk91aUdnVkxsVVRoZFlrc1BFaG5rLVk4SXUzbHh1bjVTSUpWa1lHSnd4WE9Gc0pNUEZSb0M2REVRQXZEX0J3RQ..*_gcl_au*NzYzMzkyOTQyLjE3NDI4NDIzMjE.*_ga*MTAxNzQ1NTQyMi4xNzQyODQyMjQx*_ga_L8TBF28DDX*MTc0Mzc3MDIwNS42Ni4xLjE3NDM3NzM1OTguMC4wLjA.) linked in our docs about that too

---

<div class="post-metadata">

**Author:** ![desautelsj](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/desautelsj/32/23584_2.png) [@desautelsj](https://devforum.zoom.us/u/desautelsj)\
**Post date:** [April 5, 2025, 1:35pm UTC](https://devforum.zoom.us/t/unable-to-create-my-first-room-location-due-to-missing-parent-location-id/130849/3 "2025-04-05T13:35:41Z")

</div>

@elisa.zoom When I get the list of room locations I get the following result:

```auto
REQUEST:
GET https://api.zoom.us/v2/rooms/locations?page_size=100

RESPONSE:
HTTP/1.1 200 OK
{"page_size":100,"next_page_token":"","locations":[]}

```

As you can see, there are no locations which I expected since I haven’t added my first location yet.

---

<div class="post-metadata">

**Author:** ![desautelsj](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/desautelsj/32/23584_2.png) [@desautelsj](https://devforum.zoom.us/u/desautelsj)\
**Post date:** [April 6, 2025, 12:40am UTC](https://devforum.zoom.us/t/unable-to-create-my-first-room-location-due-to-missing-parent-location-id/130849/4 "2025-04-06T00:40:12Z")

</div>

After a lot of trial and error, I finally figured it out. What was preventing me from adding a new location was actually the combination of two problems:

First, I discovered that you need to define your location structure by making the following API call:

```auto
PUT https://api.zoom.us/v2/rooms/locations/structure
{"structures":["building","floor"]}

```

“building” and “floor” are 2 of a possible 6 allowable values: `country` , `state` , `city` , `campus` , `building` and `floor`

Once you have defined your desired structure, you can add new locations.

Second thing I discovered, you must use your account Id as the parent id of a top-most location (such as a country for example). Like this example:

```auto
POST https://api.zoom.us/v2/rooms/locations
{"name":"ZoomNet Integration Testing: Building A","parent_location_id":"VjZoEArIT5y-<...snip...>"}

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [April 7, 2025, 12:40am UTC](https://devforum.zoom.us/t/unable-to-create-my-first-room-location-due-to-missing-parent-location-id/130849/5 "2025-04-07T00:40:26Z")

</div>

Closed on April 7, 2025, 12:40am UTC

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
