HubSpot Developer Changelog

New Functionality: PATCH Method for updating CRM Object Properties

Written by AJ LaPorte | Oct 7, 2019 2:22:38 PM

What’s happening?

We are adding the availability of a PATCH Method for use when updating the CRM Object Properties. This will allow for updating ONLY the fields that are included with the PATCH request. Any omitted fields will not be updated and will retain their current value.

For example, the following request would only update the description of the property, without affecting the other property settings, such as the property group, or the options for enumerated properties:


  $ curl https://api.hubapi.com/properties/v2/tickets/properties/named/example_property?hapikey=$YOUR_HAPIKEY \
  --request PATCH \
  --header "Content-Type: application/json" \
  --data '{ "description": "My updated description" }'

Why is this happening?

Previously when updating a CRM Object Property, the only method available was the PUT method. While this worked, if all of the properties were not sent in the request and some fields were omitted, such as the label and description properties, these would then be reset to a null (blank) value or a value of ‘false’ for boolean values (even if the value was true prior to the PUT).

When is this happening?

This method is currently available and can be viewed here: https://developers.hubspot.com/docs/methods/crm-properties/update-property

To view the PUT method for updating, please visit: https://developers.hubspot.com/docs/methods/crm-properties/update-property-put

If you have any questions or concerns, please join the discussion in the community.