# Use Business Units with API

**URL:** <https://community.hubspot.com/t/use-business-units-with-api/49381>\
**Category:** APIs & Integrations\
**Tags:** integrations\
**Created:** [January 7, 2022, 9:51am UTC](https://community.hubspot.com/t/use-business-units-with-api/49381 "2022-01-07T09:51:59Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![SZanni](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@SZanni](https://community.hubspot.com/u/SZanni)\
**Post date:** [January 7, 2022, 9:51am UTC](https://community.hubspot.com/t/use-business-units-with-api/49381/1 "2022-01-07T09:51:59Z")

</div>

Good morning,

I need to use Business Units with API.

I’ve found a property ‘hs\_all\_assigned\_business\_unit\_ids’ that I can use for contact, company, deal and custom objects.  
I see I can move objects through different business units using this property.

I didn’t find documentation related to this property, can I use it in an integration or are you planning to modify something in the future?

Also, it would be possibile to create custom properties related to single business units? I see I can do it through UI but I can’t do it though API with properties API.  
Please let me know, thank you

Sebastiano

---

<div class="post-metadata">

**Author:** ![TitiCuisset](https://avatars.discourse-cdn.com/v4/letter/t/8baadc/32.png) [@TitiCuisset](https://community.hubspot.com/u/TitiCuisset)\
**Post date:** [January 10, 2022, 8:47am UTC](https://community.hubspot.com/t/use-business-units-with-api/49381/2 "2022-01-10T08:47:29Z")

</div>

Hi @SZanni

Thank you for reaching out.

I want to tag some of our experts on this - @Teun @DanielSanchez do you have any thoughts for @SZanni on this?

Thank you!

Best

Tiphaine

---

<div class="post-metadata">

**Author:** ![LMeert](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/lmeert/32/103847_2.png) [@LMeert](https://community.hubspot.com/u/LMeert)\
**Post date:** [February 11, 2022, 4:18pm UTC](https://community.hubspot.com/t/use-business-units-with-api/49381/3 "2022-02-11T16:18:09Z")

</div>

Hello @SZanni, [@TitiCuisset](https://community.hubspot.com/t5/user/viewprofilepage/user-id/89150),  
Any news regarding this topic ?  
I have to build a custm object for a client and I was wondering how I could add the business unit field (similar to the one that’s automatically added to the contacts when you create multiple business units) to the new custom object.  
My use case is simple, my client manages 3 brands and each organizes conferences and events.  
I am creating an “Events” custom object and would like to tie each event to its own brand.  
Many thanks !

Ludwig

---

<div class="post-metadata">

**Author:** ![SZanni](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@SZanni](https://community.hubspot.com/u/SZanni)\
**Post date:** [February 11, 2022, 4:26pm UTC](https://community.hubspot.com/t/use-business-units-with-api/49381/4 "2022-02-11T16:26:50Z")

</div>

The property is added automatically for any object but at beginning it’s hidden. You can change this with property API.

---

<div class="post-metadata">

**Author:** ![LMeert](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/lmeert/32/103847_2.png) [@LMeert](https://community.hubspot.com/u/LMeert)\
**Post date:** [February 11, 2022, 6:04pm UTC](https://community.hubspot.com/t/use-business-units-with-api/49381/5 "2022-02-11T18:04:36Z")

</div>

Thanks, I’ve done that and indeed I can now see the business units field in my custom object properties.  
However, although I can select an option for the same field on a contact, the dropdown is empty on the custom object.  
Anything I’m missing here or do you reckon it’s a bug ? The feature is indeed quite recent so that may be the case. If so, do you have any idea where to report that ? (Quite new to this forum)

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [February 14, 2022, 1:55pm UTC](https://community.hubspot.com/t/use-business-units-with-api/49381/6 "2022-02-14T13:55:09Z")

</div>

@LMeert , could you send a screengrab of what you are seeing? Want to make sure I am clear 😀

---

<div class="post-metadata">

**Author:** ![LMeert](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/lmeert/32/103847_2.png) [@LMeert](https://community.hubspot.com/u/LMeert)\
**Post date:** [February 14, 2022, 2:09pm UTC](https://community.hubspot.com/t/use-business-units-with-api/49381/7 "2022-02-14T14:09:56Z")

</div>

Hi @dennisedson,  
Sure thing, here it is:

 ![LMeert_0-1644847045926.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/5/e/5e27fc6801b857db4321a32ccec5f80fe7517651.png)

This is a sample record on my “Events” custom object.  
I’ve switched the “hidden” attribute of the property “hs\_all\_assigned\_business\_unit\_ids” as Szanni suggested, so now it shows via the UI but I can’t select any value for this field.  
I also cannot edit the content of the dropdown since it’s a Hubspot generated field.  
What I’ve tried :  
- forcing the “externalOptions” to true =\> API call is a success but nothing changes  
- forcing the options of the dropdown to a test value =\> I get an error confirming this is read-only

Below is the same “Business unit” field for the contacts object :

 ![LMeert_1-1644847689917.png](https://d2qpr2jzcazej7.cloudfront.net/original/2X/3/31053b2855f463c1a78c830cb8b28dadf824645f.png)

If I’m not mistaken, and the “hs\_all\_assigned\_business\_unit\_ids” field is indeed automatically added to every object, then unhiding should be enough to have it work properly, i.e. display the list of the business units you have created.

Hope it’s clearer this way !  
Ludwig

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [February 14, 2022, 2:22pm UTC](https://community.hubspot.com/t/use-business-units-with-api/49381/8 "2022-02-14T14:22:38Z")

</div>

Perfecto!

I will try to reproduce and report back 👍

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [February 16, 2022, 1:52pm UTC](https://community.hubspot.com/t/use-business-units-with-api/49381/9 "2022-02-16T13:52:43Z")

</div>

FYI, I have asked the team and am waiting for some feedback 😀

---

<div class="post-metadata">

**Author:** ![LMeert](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/lmeert/32/103847_2.png) [@LMeert](https://community.hubspot.com/u/LMeert)\
**Post date:** [February 16, 2022, 4:06pm UTC](https://community.hubspot.com/t/use-business-units-with-api/49381/10 "2022-02-16T16:06:08Z")

</div>

Thanks @dennisedson much appreciated 🙏

---

<div class="post-metadata">

**Author:** ![LMeert](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/lmeert/32/103847_2.png) [@LMeert](https://community.hubspot.com/u/LMeert)\
**Post date:** [February 18, 2022, 10:18am UTC](https://community.hubspot.com/t/use-business-units-with-api/49381/11 "2022-02-18T10:18:30Z")

</div>

Hello @dennisedson,  
Any news re. this topic ? 🙂

Have a good day !  
Ludwig

---

<div class="post-metadata">

**Author:** ![Ryan\_Sessel](https://avatars.discourse-cdn.com/v4/letter/r/e56c9b/32.png) [@Ryan\_Sessel](https://community.hubspot.com/u/Ryan_Sessel)\
**Post date:** [December 5, 2023, 6:36pm UTC](https://community.hubspot.com/t/use-business-units-with-api/49381/12 "2023-12-05T18:36:50Z")

</div>

Was this matter resolved? We have the same query.

Thanks so much

---

<div class="post-metadata">

**Author:** ![darren-kb](https://avatars.discourse-cdn.com/v4/letter/d/ee59a6/32.png) [@darren-kb](https://community.hubspot.com/u/darren-kb)\
**Post date:** [April 18, 2022, 7:54pm UTC](https://community.hubspot.com/t/use-business-units-with-api/49381/13 "2022-04-18T19:54:37Z")

</div>

Good Afternoon,

I am currently building an integration between HubSpot and NetSuite. We have separate product lines, and so are using the business units to separate the contacts in hubspot for each of the product lines.

However, I cannot seem to find any documentation as to how to set the business unit property for a contact via the API. We are currently using the v1 API, but I am open to using the v3 API if that is what I need to do.

I do see that there is a property called “hs\_all\_assigned\_business\_unit\_ids” in the contact API, but I am unclear how to set the business unit ID’s or how I can get the business unit ID values to set.

Can anyone clarify this for me?

Thanks so much for any guidance!

Darren Nay

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [April 20, 2022, 12:28am UTC](https://community.hubspot.com/t/use-business-units-with-api/49381/14 "2022-04-20T00:28:41Z")

</div>

@darren-kb ,

I am asking about this 😀

---

<div class="post-metadata">

**Author:** ![darren-kb](https://avatars.discourse-cdn.com/v4/letter/d/ee59a6/32.png) [@darren-kb](https://community.hubspot.com/u/darren-kb)\
**Post date:** [April 20, 2022, 3:40pm UTC](https://community.hubspot.com/t/use-business-units-with-api/49381/15 "2022-04-20T15:40:12Z")

</div>

Thank you! Any guidance that you could provide would be appreciated very much! I reached out to HubSpot support also and they had told me that it may not be available in the API until the Business Units feature was out of Beta, but he did not sound sure.

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [April 20, 2022, 11:09pm UTC](https://community.hubspot.com/t/use-business-units-with-api/49381/16 "2022-04-20T23:09:58Z")

</div>

@darren-kb ,

I am merging this post with the other related post that you are already a part of

---

<div class="post-metadata">

**Author:** ![darren-kb](https://avatars.discourse-cdn.com/v4/letter/d/ee59a6/32.png) [@darren-kb](https://community.hubspot.com/u/darren-kb)\
**Post date:** [April 19, 2022, 10:07pm UTC](https://community.hubspot.com/t/use-business-units-with-api/49381/17 "2022-04-19T22:07:25Z")

</div>

Good Afternoon, has there been any traction on this question? I am also attempting to set the business unit for a contact via the API. I haven’t had any luck with anything I have tried thus far. I reached out to HubSpot support and they said that it may not be available to update via the API until the Business Units product has been released from Beta. They did not sound sure, however, so I thought I would reach out here and see if anyone else had had any luck with this.

Thanks for your help!

Darren

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [April 20, 2022, 11:09pm UTC](https://community.hubspot.com/t/use-business-units-with-api/49381/18 "2022-04-20T23:09:31Z")

</div>

Alright all,

Here is what is what I have been told. Presently, this is not possible and there is no timeline for it. Would any of you be willing to create an [idea post](https://community.hubspot.com/t5/Ideas/ct-p/ideas) and link back here. If we can create enough buzz on this, I think we can move the needle of prioritization of it!

---

<div class="post-metadata">

**Author:** ![BTeam0](https://avatars.discourse-cdn.com/v4/letter/b/e47774/32.png) [@BTeam0](https://community.hubspot.com/u/BTeam0)\
**Post date:** [March 5, 2023, 4:02am UTC](https://community.hubspot.com/t/use-business-units-with-api/49381/19 "2023-03-05T04:02:12Z")

</div>

Hello SZanni, did you manage to get a fxi for this, I’d appreciate if you did and you can share.

I ran into a similar problem and noticed an error in my API call. I was trying to insert a busness unit through the API end point for business unit

“hs\_all\_assigned\_business\_unit\_ids”: “GL- Business”

here ==\> Property values were not valid: [{\“isValid\”:false,\“message\”:\"Attempted to insert non-long value  
My value has a “-” in it, for example “GL-Business” as a business unit and i think that’s why it’s causing a failure.  
Can anyone help please?

---

<div class="post-metadata">

**Author:** ![SBussey](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@SBussey](https://community.hubspot.com/u/SBussey)\
**Post date:** [April 11, 2024, 12:19am UTC](https://community.hubspot.com/t/use-business-units-with-api/49381/20 "2024-04-11T00:19:13Z")

</div>

This error is indicating that you should use a number instead of text. Business units are identified by a numeric ID, and that property stores numeric ID and not strings.

I’m unsure if the property can be set, but it definitely does need to be a number (if it can be set at all.)
