# Error when posting to multiple checkbox contact field via Contacts API

**URL:** <https://community.hubspot.com/t/error-when-posting-to-multiple-checkbox-contact-field-via-contacts-api/37397>\
**Category:** APIs & Integrations\
**Tags:** contacts\
**Created:** [May 15, 2021, 12:09pm UTC](https://community.hubspot.com/t/error-when-posting-to-multiple-checkbox-contact-field-via-contacts-api/37397 "2021-05-15T12:09:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![IParsons](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/iparsons/32/35608_2.png) [@IParsons](https://community.hubspot.com/u/IParsons)\
**Post date:** [May 15, 2021, 12:09pm UTC](https://community.hubspot.com/t/error-when-posting-to-multiple-checkbox-contact-field-via-contacts-api/37397/1 "2021-05-15T12:09:53Z")

</div>

I’m getting a validation error when posting values to a multiple checkbox field using the Contacts API.

This is the code I’m using to post:

```lia-code-sample
array(
 'property' => 'allteamguids',
 'value' => str_replace(',', ';', $allTeamGUID)
 )

```

Here is the response I get from the API:

`{"validationResults":[{"isValid":false,"message":"28287d04-9ca8-4aa2-ad82-853248fd58e6 was not one of the allowed options: [label: \"0035139a-bc65-4fc0-bca4-371631034395\"\nvalue: \"0035139a-bc65-4fc0-bca4-371631034395\"\n, label: \"02084cca-b689-42d6-85c4-47fd83d2dca2\"\nvalue: \"02084cca-b689-42d6-85c4-47fd83d2dca2\"\n, label: \"02a1843a-5b85-4ee1-ac27-7a956d8c3980\"\nvalue: \"02a1843a-5b85-4ee1-ac27-7a956d8c3980\"\n, label: \"05078554-f6dc-443e-8921-000dc95e7b58\"\nvalue: \"05078554-f6dc-443e`

---

<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:** [May 17, 2021, 2:57pm UTC](https://community.hubspot.com/t/error-when-posting-to-multiple-checkbox-contact-field-via-contacts-api/37397/2 "2021-05-17T14:57:08Z")

</div>

Hi @IParsons

Can you confirm that that value exists in the possible property values?

---

<div class="post-metadata">

**Author:** ![IParsons](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/iparsons/32/35608_2.png) [@IParsons](https://community.hubspot.com/u/IParsons)\
**Post date:** [May 17, 2021, 3:05pm UTC](https://community.hubspot.com/t/error-when-posting-to-multiple-checkbox-contact-field-via-contacts-api/37397/3 "2021-05-17T15:05:03Z")

</div>

Hi @dennisedson - thanks for your reply.

These values don’t exist as property values - I assumed the API would create them as options if they don’t exist, but I realise now that’s quite a big assumption 🙂

I’ll go do some research, but please let me know if it’s possible to create additional values through the API?

---

<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:** [May 17, 2021, 4:31pm UTC](https://community.hubspot.com/t/error-when-posting-to-multiple-checkbox-contact-field-via-contacts-api/37397/4 "2021-05-17T16:31:03Z")

</div>

You can patch the property with aptly named [Properties API 😀](https://developers.hubspot.com/docs/api/crm/properties)

Test it out. I believe you need to have all of the available values in your call when updating. So if you sent a request with just the new value, it would remove all of the others and only have the one new value. (I could be wrong, it has been a bit since I tested it)
