# Custom Object Unique Identifier

**URL:** <https://community.hubspot.com/t/custom-object-unique-identifier/51300>\
**Category:** CRM\
**Tags:** crm, object, enterprise\
**Created:** [February 10, 2022, 2:11pm UTC](https://community.hubspot.com/t/custom-object-unique-identifier/51300 "2022-02-10T14:11:31Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dmattauch](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dmattauch/32/102498_2.png) [@dmattauch](https://community.hubspot.com/u/dmattauch)\
**Post date:** [February 10, 2022, 2:11pm UTC](https://community.hubspot.com/t/custom-object-unique-identifier/51300/1 "2022-02-10T14:11:31Z")

</div>

Hi,

I created a custom object called shop, with a mandatory property called shop\_name

The issue i have is that i can create as many shops i want with the same shop\_name.

is there a way to do like in contact object, where you can’t create a second contact with the same email address?

Many thanks

David

---

<div class="post-metadata">

**Author:** ![Bryantworks](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/bryantworks/32/94963_2.png) [@Bryantworks](https://community.hubspot.com/u/Bryantworks)\
**Post date:** [February 10, 2022, 2:24pm UTC](https://community.hubspot.com/t/custom-object-unique-identifier/51300/2 "2022-02-10T14:24:14Z")

</div>

Hey @dmattauch,

This is not currently possible, as the only deduplication on any object outside of Contacts is their “ID”.

---

<div class="post-metadata">

**Author:** ![CP-BWG](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/cp-bwg/32/87988_2.png) [@CP-BWG](https://community.hubspot.com/u/CP-BWG)\
**Post date:** [April 20, 2022, 7:14pm UTC](https://community.hubspot.com/t/custom-object-unique-identifier/51300/3 "2022-04-20T19:14:44Z")

</div>

@Bryantworks How does one set the key? I am struggling with this as well. Setting up a “users” custom object. Was trying to use email as the sole required property and the primary display property, but it seems to let me put in new instances with a change in the case in an email address. I verified contatacts don’t allow that, so how does one set a primary key that increments, if email address doesnt work?

---

<div class="post-metadata">

**Author:** ![DigitalImpact](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/digitalimpact/32/43617_2.png) [@DigitalImpact](https://community.hubspot.com/u/DigitalImpact)\
**Post date:** [October 6, 2022, 2:30am UTC](https://community.hubspot.com/t/custom-object-unique-identifier/51300/4 "2022-10-06T02:30:49Z")

</div>

David,

Did you set shop\_name to require a unique value when you created it? That would stop you from being able to create multiple records where shop\_name is the same.

If you’re still using the API to create, **hasUniqueValue** would need to be set to **true** :

# DEPRECATION WARNING: HubSpot API (HAPI) keys are being deprecated, and will be removed from use on 30 November 2022.  
curl --request POST \  
--url ‘[https://api.hubapi.com/crm/v3/schemas?hapikey=[API](https://api.hubapi.com/crm/v3/schemas?hapikey=%5BAPI) KEY HERE]’ \  
--header ‘content-type: application/json’ \  
--data ‘{  
“labels”: {  
“singular”: “Sample Object”,  
“plural”: “Sample Objects”  
},  
“requiredProperties”: [  
“required\_object\_property”  
],  
“properties”: [  
{  
“name”: “required\_object\_property”,  
“label”: “Required object property”,  
“isPrimaryDisplayLabel”: true,  
**“hasUniqueValue”: true**  
}  
],  
“associatedObjects”: [  
“CONTACT”  
],  
“name”: “my\_object”,  
“primaryDisplayProperty”: “my\_object\_property”,  
“metaType”: “PORTAL\_SPECIFIC”  
}’

 ![702569_1_Screen Shot 2022-10-05 at 7.29.51 PM.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/9/4/945b70f46b85d018cb27dc72df09dc9130a2113f.png)

---

<div class="post-metadata">

**Author:** ![kvlschaefer](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/kvlschaefer/32/71076_2.png) [@kvlschaefer](https://community.hubspot.com/u/kvlschaefer)\
**Post date:** [October 6, 2022, 1:04pm UTC](https://community.hubspot.com/t/custom-object-unique-identifier/51300/5 "2022-10-06T13:04:27Z")

</div>

Thank you for sharing, @DigitalImpact!
