# enumeration field type as required field for custom object

**URL:** <https://community.hubspot.com/t/enumeration-field-type-as-required-field-for-custom-object/46212>\
**Category:** APIs & Integrations\
**Tags:** developer-tools\
**Created:** [October 29, 2021, 6:58pm UTC](https://community.hubspot.com/t/enumeration-field-type-as-required-field-for-custom-object/46212 "2021-10-29T18:58:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ecray](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/ecray/32/28031_2.png) [@ecray](https://community.hubspot.com/u/ecray)\
**Post date:** [October 29, 2021, 6:58pm UTC](https://community.hubspot.com/t/enumeration-field-type-as-required-field-for-custom-object/46212/1 "2021-10-29T18:58:02Z")

</div>

Hi everyone,

I am creating a custom object using HubSpot’s custom object API. I have created a few of these at this point but this object in particular needs the required field to be an enumartion property type.

I set the required field, and the enumation option, but received the following response after making my test call.

HTTP 400

{  
“status”: “error”,  
“message”: “Unexpected property type ‘enumeration’, expected one of: [string, object\_coordinates, json]”,  
“correlationId”: “17b6839b-48b6-419e-80a8-6738896c5479”,  
“category”: “VALIDATION\_ERROR”  
}

Here are a few screenshots:

 ![screenshot 1.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/3X/0/8/08aed6f475dc2496165dcf79061694193c73b09f.jpeg)

 ![screenshot 2.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/3X/5/a/5ac035b9aeb6e3526b02cd2b81d1a71f10946652.jpeg)

Previously I have only used ‘string’ property type for required fields and have not seen this response before. Does anyone know if you can use ‘enumeration’ as a property type for a required field when creating the object schema? I know this is something you can set up afterwards but this is our sole required field.

Thank you!

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [October 29, 2021, 7:08pm UTC](https://community.hubspot.com/t/enumeration-field-type-as-required-field-for-custom-object/46212/2 "2021-10-29T19:08:49Z")

</div>

@ecray

Would you be able to copy the json body sent and add it here?

Folks like@lynton may be able to help 🙂

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [November 1, 2021, 12:24pm UTC](https://community.hubspot.com/t/enumeration-field-type-as-required-field-for-custom-object/46212/3 "2021-11-01T12:24:31Z")

</div>

Hi @ecray ,  
You have to pass valid data in this then it will be work fine. you have defined enumeration data type, so please check property values.

Hope this helps!

If we were able to answer your query, kindly help the community by marking it as a solution.  
Thanks and Regards.

---

<div class="post-metadata">

**Author:** ![lynton](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/lynton/32/31184_2.png) [@lynton](https://community.hubspot.com/u/lynton)\
**Post date:** [November 1, 2021, 2:56pm UTC](https://community.hubspot.com/t/enumeration-field-type-as-required-field-for-custom-object/46212/4 "2021-11-01T14:56:02Z")

</div>

Make sure your create property api payload includes label, name, type, fieldType, and options. Share the json payload that’s giving you trouble if the issue persists.
