# API get schema with validation rules

**URL:** <https://community.hubspot.com/t/api-get-schema-with-validation-rules/81314>\
**Category:** APIs & Integrations\
**Tags:** forms\
**Created:** [May 16, 2023, 4:50pm UTC](https://community.hubspot.com/t/api-get-schema-with-validation-rules/81314 "2023-05-16T16:50:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MCarriere](https://avatars.discourse-cdn.com/v4/letter/m/ac91a4/32.png) [@MCarriere](https://community.hubspot.com/u/MCarriere)\
**Post date:** [May 16, 2023, 4:50pm UTC](https://community.hubspot.com/t/api-get-schema-with-validation-rules/81314/1 "2023-05-16T16:50:57Z")

</div>

Hi,

I am exporting my custom object schema using a GET call (ex: [https://api.hubapi.com/crm/v3/schemas/2-123456](https://api.hubapi.com/crm/v3/schemas/2-123456))

and get everything back except all the validation rules that are set on the properties are missing even if I had a bunch defined in the UI.

 ![MCarriere_1-1684255784255.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/4/9/4945feeb9f70d0e53916dfecb2092cde9dc5a65b.png)

Any idea what i’m doing wrong?

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [May 18, 2023, 4:51pm UTC](https://community.hubspot.com/t/api-get-schema-with-validation-rules/81314/2 "2023-05-18T16:51:37Z")

</div>

Hey, @MCarriere 👋 Thanks for your question. Did you get this resolved? If not, I’m happy to run a few tests and try to replicate. And verify if this is a case of _works as designed but not like we’re expecting_.

One question, have you tried making a request to the [Properties API](https://developers.hubspot.com/docs/api/crm/properties) endpoint, **GET** `/crm/v3/properties/{objectType}/{propertyName}`, to verify these validation rules are returned there? I’ll set up a property for my custom object with validation rules in my test account.

I ask because I want to set up my test close to how you are doing it. Thanks for the additional details.

Best,

Jaycee

---

<div class="post-metadata">

**Author:** ![MCarriere](https://avatars.discourse-cdn.com/v4/letter/m/ac91a4/32.png) [@MCarriere](https://community.hubspot.com/u/MCarriere)\
**Post date:** [May 18, 2023, 4:59pm UTC](https://community.hubspot.com/t/api-get-schema-with-validation-rules/81314/3 "2023-05-18T16:59:21Z")

</div>

Thanks for the reply!

Here’s an example of the result from a GET in the properties API:

```lia-code-sample
{
 "updatedAt": "2023-05-10T20:25:19.945Z",
 "createdAt": "2023-05-10T20:25:19.945Z",
 "name": "percent_dry",
 "label": "Percent Dry",
 "type": "number",
 "fieldType": "number",
 "description": "% in Dry environment",
 "groupName": "engineering_services_information_forms_information",
 "options": [],
 "createdUserId": "10740601",
 "updatedUserId": "10740601",
 "displayOrder": -1,
 "calculated": false,
 "externalOptions": false,
 "archived": false,
 "hasUniqueValue": false,
 "hidden": false,
 "showCurrencySymbol": false,
 "modificationMetadata": {
 "archivable": true,
 "readOnlyDefinition": false,
 "readOnlyValue": false
 },
 "formField": true
}

```

and here’s the rules definition for the property in the UI

 ![MCarriere_0-1684429087535.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/d/2/d29a98ee6489bfc1b5aad316e6933846176d50d2.png)

---

<div class="post-metadata">

**Author:** ![CarlosGM](https://avatars.discourse-cdn.com/v4/letter/c/7ea924/32.png) [@CarlosGM](https://community.hubspot.com/u/CarlosGM)\
**Post date:** [October 18, 2023, 6:23pm UTC](https://community.hubspot.com/t/api-get-schema-with-validation-rules/81314/4 "2023-10-18T18:23:13Z")

</div>

Has anyone found a way to get the rules?

The app gets them from `hubspot.com/api/property-validation/v1/custom-property-validation/get` but I can’t find any API endpoint that returns the same data, the schema endpoints don’t include it.
