Upcoming: Property Validations Rules will be enforced for APIs and Integrations
Property Validations allow admins to prevent data quality issues before they start. By setting up property validation rules, admins can control what data can be entered into their system ensuring the entry of clean, reliable, and accurate data.
With this update, you can ensure that the data being entered into your system meets the specific criteria you have established, and avoid errors caused by manual and automated data entry. This will lead to improved data quality, streamlined workflows, and more accurate reporting.
What's changing?
Previously, these validation rules were only enforced in the HubSpot app and on mobile with manual entry, but not on integrations. Starting July 24th, 2023, when you set property validation rules in your system, these rules will also be enforced for changes made through APIs and integrations.
What does it mean for developers?
If your integration is updating property values on any of the CRM objects in a HubSpot account, it will need to adhere to the validation rules that have been established. If a property value does not meet the set requirement, you will receive a 400 status code with a response body similar to this example:
{
status: "error",
message: "Property values were not valid:
[{"isValid":false,"message":"Enter only letters","error":"INVALID_ALPHA","name":"firstname"},{"isValid":false,"message":"Enter only letters","error":"INVALID_ALPHA","name":"lastname"}]",
correlationId: "11061cd3-cf3b-45f7-98d4-27f10a99ece6",
category: "VALIDATION_ERROR"
}
You can learn more about Property Validations through our knowledge base documentation.
When is this happening?
This change will become effective July 24th, 2023.
Upcoming: Property Validations Rules will be enforced for APIs and Integrations
In order to ensure we comply with these validation rules we need to be able to retrieve the list of rules that are in place for each property. Has the CRM properties API been updated to facilitate this? I took a look here: https://developers.hubspot.com/docs/api/crm/properties
and could not see the validation rules presented through the API.
Aploligies if it is there and I missed it. Can you please confirm that this detail is/will be available through the API and update the documentation accordingly? Thanks!
Upcoming: Property Validations Rules will be enforced for APIs and Integrations
Yes, as Tim mentioned, we need to be able to retrieve the validation rules for each property. What Hubspot API endpoint can be called to retrieve the validation rules for a property?