# Structure of Organization IDs

**URL:** <https://community.auth0.com/t/structure-of-organization-ids/109341>\
**Category:** Get Help\
**Tags:** organizations-management-api, management-api\
**Created:** [June 15, 2023, 5:02pm UTC](https://community.auth0.com/t/structure-of-organization-ids/109341 "2023-06-15T17:02:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![patrickfield33](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/patrickfield33/32/47616_2.png) [@patrickfield33](https://community.auth0.com/u/patrickfield33)\
**Post date:** [June 15, 2023, 5:02pm UTC](https://community.auth0.com/t/structure-of-organization-ids/109341/1 "2023-06-15T17:02:26Z")

</div>

Hey!

All of the organization IDs are in the shape of `org_abcdef0123456789` (start with org\_ and with a total length of 20 characters). Is this documented somewhere? Are the org IDs that do not follow this pattern?

The background is that we would like to add some type safety and avoid just passing around bare strings. We would like to create a wrapper type for OrganizationIds internally that enforces that they start with `org_` and have a length of 20 characters. So obviously I would like to make sure that this holds true for all org IDs.

Is this the rule or can we not rely on it?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [June 21, 2023, 4:27pm UTC](https://community.auth0.com/t/structure-of-organization-ids/109341/5 "2023-06-21T16:27:43Z")

</div>

Hey there @patrickfield33 welcome to the community!

> [@patrickfield33](#):
>
> The background is that we would like to add some type safety and avoid just passing around bare strings. We would like to create a wrapper type for OrganizationIds internally that enforces that they start with `org_` and have a length of 20 characters. So obviously I would like to make sure that this holds true for all org IDs.
> 
> Is this the rule or can we not rely on it?

Organization IDs being 20 characters is an implementation detail and it might change without notice at any time. We have no guarantees that it will always be 20 characters.

Hope this helps to clarify!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [July 5, 2023, 4:28pm UTC](https://community.auth0.com/t/structure-of-organization-ids/109341/6 "2023-07-05T16:28:16Z")

</div>

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