Add option if it doesn't exist on CRM create/update APIs

When you add or update a record (contact/company/etc.), it gets denied if an option within a property doesn’t exist. I propose adding an option to the API to allow adding the option if it doesnt exist.

E.g.

Favorite Color (Checkbox)

Red, Blue, Green

Add/Update Contact

Name: Roger

Email: test@test.com

Favorite Color: Orange

---

Currently, this will error. I want an option to make it so it adds the option to the property and succeeds.

Hi @CDean ,

I agree, however, you should probably post this to the ideas forum.

That way, people can upvote your idea and it has a higher chance of getting implemented.

It is not safe, however, to just add any option value that is past as a new option, so there probably has to be a way to flag the API call to force a new option to be added. That way, you can prevent data pollution.
The only way you can achieve this with the current API options is by using the properties API to add a new option whenever you get an error response that indicates that the option is not available.

Oop. I thought I was in the idea forum.

I added it here:

https://community.hubspot.com/t5/HubSpot-Ideas/Add-option-if-it-doesn-t-exist-on-CRM-create-update-APIs/idi-p/1044811#M194087

Your point is well taken. I would definitely default to error. However, when I have full control of the program and know the data is good, It would be great to have it automatically add the option.

Thanks for the reply.