Can't update/set a contact's business unit property via Hubspot API?

388 Views Asked by At

Posting this as a question because I couldn't find any existing documentation for this, but I've gotten it working for me.

Each business unit seems to have a hidden 'unit_id' that I could only find by manually assigning the business unit to a contact through the web app, then using /contacts/v1/contact/vid/{}/profile?hapikey={}&property=hs_all_assigned_business_unit_ids&propertyMode=value_only to view how the business unit appears on the backend.

Create/update a contact's business unit by targeting the hs_all_assigned_business_unit_ids property with the discovered unit_id via Hubspot's contact API; should look something like this appended to your 'properties' array:

{'property': 'hs_all_assigned_business_unit_ids', 'value': '204941'}

To select/assign multiple, join the unit_ids with semicolons and no spaces like so: 'value': '103298;204941'

0

There are 0 best solutions below