I'd like to ask if there's a workaround on adding/updating option values of read-only definition properties (e.g., Lead Status, Lifecylce Stage). It can be done on hubspot UI, but using the API calls from the docs gives errors on read-only definition. Could it be done? We're trying to intergrate using the API after the client connects to the app.
I did a search on the Community here for that error message and I found this thread: https://community.hubspot.com/t5/APIs-Integrations/Can-t-update-options-for-field-with-quot-optionsA..., where the poster was able to update the enumeration options by making a PATCH request instead of a PUT request. I'll see if I can get an update to our documentation for that, since I'm not actually seeing it documented. But in the meantime, you can try doing your updates that way. I believe you need to send all options in the request, as opposed to just the new option.
So for example you'd make a PATCH request to /properties/v1/contacts/properties/named/hs_lead_status, and then you could pass in a body of something like:
I did a search on the Community here for that error message and I found this thread: https://community.hubspot.com/t5/APIs-Integrations/Can-t-update-options-for-field-with-quot-optionsA..., where the poster was able to update the enumeration options by making a PATCH request instead of a PUT request. I'll see if I can get an update to our documentation for that, since I'm not actually seeing it documented. But in the meantime, you can try doing your updates that way. I believe you need to send all options in the request, as opposed to just the new option.
So for example you'd make a PATCH request to /properties/v1/contacts/properties/named/hs_lead_status, and then you could pass in a body of something like:
I was actually going to bring up the method because the update in the UI actually uses the PATCH request but I wasn't sure if its a viable method to be used for the API intergration. This works well, thank you for the reply.