APIs & Integrations

Not applicable

Setting Value of Multiple Checkbox Property

How do I set the value of a multiple checkbox type contacts property using the API? If I set a single value using a string value it works fine, but if I try to pass it an array of values nothing is set.

Working Example with a string value

{
    "properties": [
        {
            "property": "tags",
            "value": "Merchant"
        }
     ]
}

Non-Working Example with an array value

{
    "properties": [
        {
            "property": "tags",
            "value": ["Merchant","Agency"]
        }
    ]
}

I’ve also tried a comma separated string, but I can’t get that work either.

0 Upvotes
3 Replies 3
zwolfson
HubSpot Employee
HubSpot Employee

Setting Value of Multiple Checkbox Property

Hi @James_Bathgate

The value of the property should be a string with the options seperated by semi-colons. So it should look like:

{
    "properties": [
        {
            "property": "tags",
            "value": "Merchant;Agency"
        }
    ]
}

Thanks,
Zack

0 Upvotes
Not applicable

Setting Value of Multiple Checkbox Property

Zack,

Did I miss that somewhere in the documentation?

0 Upvotes
zwolfson
HubSpot Employee
HubSpot Employee

Setting Value of Multiple Checkbox Property

I don’t believe you did, I’m going to work on adding examples of multiple choice properties to our docs over the next few day.

0 Upvotes