HubSpot doesn’t adequately explain how to pass in boolean values through its Forms API. I recently had to work with this API and wrote down some hints.
Hubspot Checkbox Field API

> curl –request POST -H “Content-Type: application/x-www-form-urlencoded” –data “” “”

The important bit here is that fields of type “Single On/Off Checkbox” require the text “true” or “false” despite being rendered as “Yes” or “No” in Hubspot. In C#, it’s important, when formatting text, to pass in string values instead of relying on string format processing within .NET to convert your boolean correctly. ┬áIt’s also important you’re passing in data with the Content Type set to “application/x-www-form-urlencoded” or it may misinterpret the values being passed in (or reject the request).

Pin It on Pinterest

Share This