# Custom object API Error

**URL:** <https://community.hubspot.com/t/custom-object-api-error/49259>\
**Category:** APIs & Integrations\
**Tags:** enterprise\
**Created:** [January 5, 2022, 4:03pm UTC](https://community.hubspot.com/t/custom-object-api-error/49259 "2022-01-05T16:03:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mathildehyp](https://avatars.discourse-cdn.com/v4/letter/m/c2a13f/32.png) [@Mathildehyp](https://community.hubspot.com/u/Mathildehyp)\
**Post date:** [January 5, 2022, 4:03pm UTC](https://community.hubspot.com/t/custom-object-api-error/49259/1 "2022-01-05T16:03:20Z")

</div>

Hello community.

I`m trying to create a custom object “Enfant” with API

Example of properties :

nom\_enfant (internal value / the kids name) - Nom de l’enfant (the human-readable property label)

prenom\_enfant (internal value)- Prénom de l’enfant (the human-readable property label)

But I get an error and I don’t know how to solve it … What should I write in “primary Display property” ?

Please advise.

 ![Capture d’écran 2022-01-05 à 16.58.16.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/3X/1/9/1965afa29d8c935e3912323240c1d8c73b0afc8b.jpeg)

Thank you and best regards.

---

<div class="post-metadata">

**Author:** ![TitiCuisset](https://avatars.discourse-cdn.com/v4/letter/t/8baadc/32.png) [@TitiCuisset](https://community.hubspot.com/u/TitiCuisset)\
**Post date:** [January 6, 2022, 10:49am UTC](https://community.hubspot.com/t/custom-object-api-error/49259/2 "2022-01-06T10:49:36Z")

</div>

Hi @Mathildehyp

Thank you for reaching out!

I noticed you’re probably using your HubSpot in French, I wanted to let you know that we have a FR Community you can access by changing your language in your settings via the language selector at the top left.

Regarding your API response, I want to tag some of our experts here - @Teun @himanshurauthan @miljkovicmisa do you know what could be happening here?

Thank you!

Best

Tiphaine

---

<div class="post-metadata">

**Author:** ![Teun](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/teun/32/28739_2.png) [@Teun](https://community.hubspot.com/u/Teun)\
**Post date:** [January 6, 2022, 10:54am UTC](https://community.hubspot.com/t/custom-object-api-error/49259/3 "2022-01-06T10:54:55Z")

</div>

Hi [@TitiCuisset](https://community.hubspot.com/t5/user/viewprofilepage/user-id/89150) ,  
Your body of your request probably needs to look something like this:

```lia-code-sample
{
 "labels": {
 "singular": "Enfant",
 "plural": "Enfants"
 },
 "requiredProperties": [
 "nom_enfant"
 ],
 "searchableProperties": [
 "nom_enfant",
 "prenom_enfant"
 ],
 "name": "enfant",
 "primaryDisplayProperty": "nom_enfant",
 "secondaryDisplayProperties": [
 "prenom_enfant"
 ],
 "properties": [
 {
 "name": "nom_enfant",
 "label": "Nom de l'enfant",
 "isPrimaryDisplayLabel": true
 },
 {
 "name": "prenom_enfant",
 "label": "Prénom de l'enfant",
 "type": "string",
 "fieldType": "text"
 }
 ],
 "associatedObjects": [],
 "metaType": "PORTAL_SPECIFIC"
}

```

---

<div class="post-metadata">

**Author:** ![Mathildehyp](https://avatars.discourse-cdn.com/v4/letter/m/c2a13f/32.png) [@Mathildehyp](https://community.hubspot.com/u/Mathildehyp)\
**Post date:** [January 6, 2022, 1:13pm UTC](https://community.hubspot.com/t/custom-object-api-error/49259/4 "2022-01-06T13:13:39Z")

</div>

Thanks a lot !
