APIs & Integrations

pritamgb
Member

How to assign multiple values to a multiple checkboxes property using contact's create or update api

SOLVE

I am using contact's create or update API to update the information of a contact. Also, I have created a custom property which is a multiple checkboxes property. I want to assign multiple values to this field using API. How I can achieve that?

 

Example:

custom property name:           abc_xyz

values: pqr, efg, uvw, etc.

 

Lets say I want to assign pqr, uvw to property abc_xyz.

1 Accepted solution
Willson
Solution
HubSpot Employee
HubSpot Employee

How to assign multiple values to a multiple checkboxes property using contact's create or update api

SOLVE

Hey @pritamgb 

 

You can send the selected options as strings with each option separated by a semi-colon.

{
"property_name":"internal_value1;internal_value2"
}

This would then update to show multiple values per the multi-checkbox selection.

 

I hope this helps!

Product Manager @ HubSpot

View solution in original post

2 Replies 2
GinoMaul
Participant

How to assign multiple values to a multiple checkboxes property using contact's create or update api

SOLVE

How about if "property_name" has a value of "internal_value0" already. Will that get overwritten with "internal_value1;internal_value2"? 

Is the correct call to append to existing data? Adding a semi-colon to the start of the first data?

{
"property_name":";internal_value1;internal_value2"
}

 

0 Upvotes
Willson
Solution
HubSpot Employee
HubSpot Employee

How to assign multiple values to a multiple checkboxes property using contact's create or update api

SOLVE

Hey @pritamgb 

 

You can send the selected options as strings with each option separated by a semi-colon.

{
"property_name":"internal_value1;internal_value2"
}

This would then update to show multiple values per the multi-checkbox selection.

 

I hope this helps!

Product Manager @ HubSpot