# ID ranges

**URL:** <https://community.hubspot.com/t/id-ranges/16349>\
**Category:** APIs & Integrations\
**Tags:** object\
**Created:** [September 20, 2019, 6:12am UTC](https://community.hubspot.com/t/id-ranges/16349 "2019-09-20T06:12:41Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Johannes-mue](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/johannes-mue/32/59606_2.png) [@Johannes-mue](https://community.hubspot.com/u/Johannes-mue)\
**Post date:** [September 20, 2019, 6:12am UTC](https://community.hubspot.com/t/id-ranges/16349/1 "2019-09-20T06:12:41Z")

</div>

Hi,

What are the ID ranges used in the API? I need to know in order to find the correct type to handle them in our integration. Please mention a general range in the form [start,end], and possible exceptions if there are any.

Thanks

---

<div class="post-metadata">

**Author:** ![Derek\_Gervais](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/derek_gervais/32/17429_2.png) [@Derek\_Gervais](https://community.hubspot.com/u/Derek_Gervais)\
**Post date:** [September 20, 2019, 7:56pm UTC](https://community.hubspot.com/t/id-ranges/16349/2 "2019-09-20T19:56:37Z")

</div>

If you’re referring to object IDs, for practical purposes we use 64-bit unsigned integers, so something like a Java long should allow you to store any object IDs.

If you’re referring to some other IDs, can you clarify which they are?

---

<div class="post-metadata">

**Author:** ![Johannes-mue](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/johannes-mue/32/59606_2.png) [@Johannes-mue](https://community.hubspot.com/u/Johannes-mue)\
**Post date:** [September 22, 2019, 9:28am UTC](https://community.hubspot.com/t/id-ranges/16349/3 "2019-09-22T09:28:22Z")

</div>

Hi Derek,

Well, I am interested in all IDs that you expose in the API really. Are there other IDs I need to consider that have a different format? Maybe the portal id is a non object ID? I explicitly asked for a specific range rather than a datatype, so that I can better validate them; So is the ID range actually [0,18446744073709551615], or rather [1,18446744073709551615]?

Regards,

Johanens M.

---

<div class="post-metadata">

**Author:** ![Derek\_Gervais](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/derek_gervais/32/17429_2.png) [@Derek\_Gervais](https://community.hubspot.com/u/Derek_Gervais)\
**Post date:** [September 23, 2019, 5:57pm UTC](https://community.hubspot.com/t/id-ranges/16349/4 "2019-09-23T17:57:52Z")

</div>

Hey @Johannes-mue,

There are a number of different types of ID that HubSpot uses in different tools. Some tools like forms use GUIDs, like the old example from my account below. There is no hard range on a GUID like this, but they’ll all generally follow the same format.

Object records have numeric IDs, and these are stored in memory as 64 bit unsigned integers. While technically you’re correct that the current full range of object IDs is between 1 and (2^64) -1, in reality the highest existing object ID is _significant_ lower. Portal IDs are the same, except the highest portal ID is even lower, given that each portal can have many objects.

I’m not 100% sure what specifically you’re looking to do: If you have any other questions and/or details on what your goal is, I’d be happy to keep digging into this with you.

---

<div class="post-metadata">

**Author:** ![gtaco](https://avatars.discourse-cdn.com/v4/letter/g/b9e5f3/32.png) [@gtaco](https://community.hubspot.com/u/gtaco)\
**Post date:** [October 17, 2024, 10:04pm UTC](https://community.hubspot.com/t/id-ranges/16349/5 "2024-10-17T22:04:46Z")

</div>

I did run into an issue with the [Conversations API - HubSpot docs](https://developers.hubspot.com/docs/api/conversations/conversations) API

I have a newer inbox id that is 7952967017, which I am getting an error that it is out of bounds.

When I call the following endpoint [https://api.hubapi.com/conversations/v3/conversations/threads?inboxId=7952967017](https://api.hubapi.com/conversations/v3/conversations/threads?inboxId=7952967017)’

I am passing the inboxId to get the threads for that inbox. But with newer inboxes, I am noticing that the inboxId is numerically out of bounds because the API is trying to parse it as an integer instead of a string. The error I am getting is

%{“correlationId” =\> “da3cc9c1-abc8-46ab-92d1-c21a5cf66aad”, “message” =\> “Invalid input JSON on line -1, column -1: Cannot deserialize value of type `int` from String \“7952967017\”: Overflow: numeric value (7952967017) out of range of int (-2147483648 -2147483647)”, “status” =\> “error”}

Any help is appreciated

---

<div class="post-metadata">

**Author:** ![gtaco](https://avatars.discourse-cdn.com/v4/letter/g/b9e5f3/32.png) [@gtaco](https://community.hubspot.com/u/gtaco)\
**Post date:** [October 17, 2024, 10:08pm UTC](https://community.hubspot.com/t/id-ranges/16349/6 "2024-10-17T22:08:59Z")

</div>

I did have an issue with an out of bounds integer on the [Conversations API - HubSpot docs](https://developers.hubspot.com/docs/api/conversations/conversations) API.

When I call the following endpoint [https://api.hubapi.com/conversations/v3/conversations/threads?inboxId=7952967017](https://api.hubapi.com/conversations/v3/conversations/threads?inboxId=7952967017)’

I am passing the inboxId to get the threads for that inbox. But with newer inboxes, I am noticing that the inboxId is numerically out of bounds because the API is trying to parse it as an integer instead of a string. The error I am getting is

%{“correlationId” =\> “da3cc9c1-abc8-46ab-92d1-c21a5cf66aad”, “message” =\> “Invalid input JSON on line -1, column -1: Cannot deserialize value of type `int` from String \“7952967017\”: Overflow: numeric value (7952967017) out of range of int (-2147483648 -2147483647)”, “status” =\> “error”}

Any help is apprecaited!
