HubSpot Ideas

mswanson8

Ability to view or set Property restriction Rules via API

There is no API access to property restrictions rules like "Date not in the past" or "Number must be positive". Portal admins can create these restrictions and our API calls will fail if we try to send invalid data.

 

We have to work around this because if we send invalid data as part of a bulk update, the whole update fails -- so we have to pull out the invalid data and retry.

 

Additionally we cannot do any kind of validations in our product on these properties when we are collecting the user-input. We've had customers use these restrictions and then failed to sync because of validation rules.

 

This is generally useful for HubSpot apps that write to user-defined properties.

HubSpot Updates
Delivered
March 21, 2025 07:22 AM

👋Hi, I'm Rachel from the HubSpot Product team. You’ll now be able to view property validation rules via public API.

To view all properties of an object that have validation rules, make a GET request to crm/v3/property-validations/{objectTypeId}. Properties with validation rules are returned with the following fields:

  • propertyName: the name of the property with validation rules.
  • propertyValidationRules: an array with the rules set for the property. Includes each rule’s ruleType (the category for the rule) and ruleArguments (specific requirements of the rule).
To learn more, refer to the Properties API and API Guide. Thanks for your feedback!

 

1 Reply
rwebb1
HubSpot Product Team

👋Hi, I'm Rachel from the HubSpot Product team. You’ll now be able to view property validation rules via public API.

To view all properties of an object that have validation rules, make a GET request to crm/v3/property-validations/{objectTypeId}. Properties with validation rules are returned with the following fields:

  • propertyName: the name of the property with validation rules.
  • propertyValidationRules: an array with the rules set for the property. Includes each rule’s ruleType (the category for the rule) and ruleArguments (specific requirements of the rule).
To learn more, refer to the Properties API and API Guide. Thanks for your feedback!