# I got error while creating ENUM type property for contact object.

**URL:** <https://community.hubspot.com/t/i-got-error-while-creating-enum-type-property-for-contact-object/124700>\
**Category:** APIs & Integrations\
**Tags:** contacts\
**Created:** [January 24, 2025, 9:25am UTC](https://community.hubspot.com/t/i-got-error-while-creating-enum-type-property-for-contact-object/124700 "2025-01-24T09:25:04Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![KPadhiyar](https://avatars.discourse-cdn.com/v4/letter/k/7993a0/32.png) [@KPadhiyar](https://community.hubspot.com/u/KPadhiyar)\
**Post date:** [January 24, 2025, 9:25am UTC](https://community.hubspot.com/t/i-got-error-while-creating-enum-type-property-for-contact-object/124700/1 "2025-01-24T09:25:04Z")

</div>

Can anyone tell me if HubSpot has made any changes related to creating properties of type ENUM? From yesterday, I’ve been getting an error while creating a property in HubSpot for the contact object.

I’m creating the property with empty options, and the error I got:  
{“status”:“error”,“message”:"Property ‘test\_property’ of object type ’ 0- 1’ has no options but options are re (truncated…)

 ![KPadhiyar_0-1737710625056.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/3X/a/c/aca28be6c1e411e9d0e9d46df3ed64e3222d9ace.jpeg)

---

<div class="post-metadata">

**Author:** ![AliFawadHassan](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/alifawadhassan/32/51437_2.png) [@AliFawadHassan](https://community.hubspot.com/u/AliFawadHassan)\
**Post date:** [January 24, 2025, 9:53am UTC](https://community.hubspot.com/t/i-got-error-while-creating-enum-type-property-for-contact-object/124700/2 "2025-01-24T09:53:27Z")

</div>

Could you please share the complete cURL request?  
Additionally, please ensure that there are no spaces in the object type, such as ‘0-1’.

---

<div class="post-metadata">

**Author:** ![KPadhiyar](https://avatars.discourse-cdn.com/v4/letter/k/7993a0/32.png) [@KPadhiyar](https://community.hubspot.com/u/KPadhiyar)\
**Post date:** [January 24, 2025, 10:05am UTC](https://community.hubspot.com/t/i-got-error-while-creating-enum-type-property-for-contact-object/124700/3 "2025-01-24T10:05:56Z")

</div>

@AliFawadHassan Thanks for the reply.  
I’m using PHP package for create property.([GitHub - HubSpot/hubspot-api-php: HubSpot API PHP Client Libraries for V3 version of the API · GitHub](https://github.com/HubSpot/hubspot-api-php))

```lia-code-sample
$request = new HubSpot\Client\Crm\Properties\Model\PropertyCreate\PropertyCreate([
"name" => "test"
 "label" => "Test"
 "description" => "Test"
 "group_name" => "test"
 "type" => "enumeration"
 "field_type" => "checkbox"
 "form_field" => true
 "options" => [],
]);

$service = $hubspot->crm()->properties()->coreApi()->create('contact', $request);

```

---

<div class="post-metadata">

**Author:** ![zach\_threadint](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/zach_threadint/32/46318_2.png) [@zach\_threadint](https://community.hubspot.com/u/zach_threadint)\
**Post date:** [January 24, 2025, 7:18pm UTC](https://community.hubspot.com/t/i-got-error-while-creating-enum-type-property-for-contact-object/124700/4 "2025-01-24T19:18:24Z")

</div>

Hi @KPadhiyar 👋

For most integration use cases, I generally recommend avoiding HubSpot’s API Client Libraries in favour of interacting with HubSpot APIs via a dedicated HTTP request package. Regardless, based on your example request, I’d recommend [1] making sure the Contact property group name “test” exists in the given HubSpot Portal and [2] defining at least 1 option when creating properties of “enumeration” type.

I hope that proves helpful. Please let me know if you have any follow-up questions.

---

<div class="post-metadata">

**Author:** ![KPadhiyar](https://avatars.discourse-cdn.com/v4/letter/k/7993a0/32.png) [@KPadhiyar](https://community.hubspot.com/u/KPadhiyar)\
**Post date:** [January 24, 2025, 10:09am UTC](https://community.hubspot.com/t/i-got-error-while-creating-enum-type-property-for-contact-object/124700/5 "2025-01-24T10:09:11Z")

</div>

This is the error that I got from HubSpot package.

 ![KPadhiyar_0-1737713294620.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/f/0/f0952e42868cdaab1244fc457dfe7cb4b4532b76.png)

---

<div class="post-metadata">

**Author:** ![KJames77](https://avatars.discourse-cdn.com/v4/letter/k/7ab992/32.png) [@KJames77](https://community.hubspot.com/u/KJames77)\
**Post date:** [January 25, 2025, 3:57am UTC](https://community.hubspot.com/t/i-got-error-while-creating-enum-type-property-for-contact-object/124700/6 "2025-01-25T03:57:48Z")

</div>

> * * *
> 
> @KPadhiyar wrote:
> 
> Can anyone tell me if HubSpot has made any changes related to creating properties of type ENUM? From yesterday, I’ve been getting an error while creating a property in HubSpot for the contact object.
> 
> I’m creating the property with empty options, and the error I got:  
> {“status”:“error”,“message”:"Property ‘test\_property’ of object type ’ 0- 1’ has no options but options are re (truncated…)

 ![KPadhiyar_0-1737710625056.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/3X/a/c/aca28be6c1e411e9d0e9d46df3ed64e3222d9ace.jpeg)

> * * *

It looks like the issue is due to the options array being empty. HubSpot requires at least one option for ENUM-type properties. Try adding options like this[:](https://lihomenu.sg/)

“options” =\> [

[“label” =\> “Option 1”, “value” =\> “option\_1”, “displayOrder” =\> 0]

],

---

<div class="post-metadata">

**Author:** ![EJames4](https://avatars.discourse-cdn.com/v4/letter/e/dec6dc/32.png) [@EJames4](https://community.hubspot.com/u/EJames4)\
**Post date:** [February 16, 2025, 10:06am UTC](https://community.hubspot.com/t/i-got-error-while-creating-enum-type-property-for-contact-object/124700/7 "2025-02-16T10:06:29Z")

</div>

It looks like the issue is that, HubSpot requires at least one option for ENUM-type properties. Try modifying your request like this[:](https://singaporemalls.sg/plaza-singapore/)  
“name” =\> “test”  
“label” =\> “Test”,  
“description” =\> “Test”,  
“group\_name” =\> “test”,  
“type” =\> “enumeration”,  
“field\_type” =\> “checkbox”,  
“form\_field” =\> true,  
“options” =\> [  
[  
“label” =\> “Option 1”,  
“value” =\> “option\_1”,  
“displayOrder” =\> 0  
]  
]  
]);  
Adding at least one option should help resolve the error
