# Issues creating a new custom object schema

**URL:** <https://community.hubspot.com/t/issues-creating-a-new-custom-object-schema/64494>\
**Category:** APIs & Integrations\
**Created:** [September 6, 2022, 8:19am UTC](https://community.hubspot.com/t/issues-creating-a-new-custom-object-schema/64494 "2022-09-06T08:19:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![JohanL](https://avatars.discourse-cdn.com/v4/letter/j/c67d28/32.png) [@JohanL](https://community.hubspot.com/u/JohanL)\
**Post date:** [September 6, 2022, 8:19am UTC](https://community.hubspot.com/t/issues-creating-a-new-custom-object-schema/64494/1 "2022-09-06T08:19:56Z")

</div>

Hello,

I’m trying to create a new custom object type using an API call, doing POST to [https://api.hubapi.com/crm/v3/schemas](https://api.hubapi.com/crm/v3/schemas) via Postman. I’m using a private app token, and am adding that auth as Bearer-type (and I have made other calls using this method just fine).

I am trying this in a Sandbox. Not sure if that makes a difference?

I get…

“The scope needed for this API call isn’t available for public use.”

..and also…

“MISSING\_SCOPES”

I do have both crm.custom.read and crm.custom.write granted to my token.

The body of my request is currently this (I’ve scaled it down to keep it simple since I kept getting errors but naturally the plan is to expand the definition once I get this sorted):

{

“name”: “retailer”,

“labels”: {

“singular”: “Retailer”,

“plural”: “Retailers”

},

“primaryDisplayProperty”: “name”,

“secondaryDisplayProperties”: [

“website”

],

“searchableProperties”: [

“name”

],

“requiredProperties”: [

“name”

],

“properties”: [

{

“name”: “name”,

“label”: “Name”,

“type”: “string”,

“fieldType”: “text”

},

{

“name”: “website”,

“label”: “Website URL”,

“type”: “string”,

“fieldType”: “text”

}

],

“associatedObjects”: [

“COMPANY”

]

}

Any ideas what might be the issue?

---

<div class="post-metadata">

**Author:** ![LeeBartelme](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/leebartelme/32/95647_2.png) [@LeeBartelme](https://community.hubspot.com/u/LeeBartelme)\
**Post date:** [September 6, 2022, 5:50pm UTC](https://community.hubspot.com/t/issues-creating-a-new-custom-object-schema/64494/2 "2022-09-06T17:50:10Z")

</div>

Are you doing this in a tool like Postman or in some code. Can you post your full code or cURL reuqest from Postman to help diagnose.

---

<div class="post-metadata">

**Author:** ![JohanL](https://avatars.discourse-cdn.com/v4/letter/j/c67d28/32.png) [@JohanL](https://community.hubspot.com/u/JohanL)\
**Post date:** [September 7, 2022, 7:24am UTC](https://community.hubspot.com/t/issues-creating-a-new-custom-object-schema/64494/3 "2022-09-07T07:24:39Z")

</div>

Yes, using Postman. Here is the cURL req:

curl --location --request POST ‘[https://api.hubapi.com/crm/v3/schemas](https://api.hubapi.com/crm/v3/schemas)’ \  
--header ‘Authorization: Bearer XXXXXXXXXXXXXXX’ \  
--header ‘Content-Type: application/json’ \  
--data-raw ‘{  
“name”: “retailer”,  
“labels”: {  
“singular”: “Retailer”,  
“plural”: “Retailer”  
},  
“primaryDisplayProperty”: “name”,  
“secondaryDisplayProperties”: [  
“website”  
],  
“searchableProperties”: [  
“name”  
],  
“requiredProperties”: [  
“name”  
],  
“properties”: [  
{  
“name”: “name”,  
“label”: “Name”,  
“type”: “string”,  
“fieldType”: “text”  
},  
{  
“name”: “website”,  
“label”: “Website URL”,  
“type”: “string”,  
“fieldType”: “text”  
}  
],  
“associatedObjects”: [  
“COMPANY”  
]  
}’

---

<div class="post-metadata">

**Author:** ![LeeBartelme](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/leebartelme/32/95647_2.png) [@LeeBartelme](https://community.hubspot.com/u/LeeBartelme)\
**Post date:** [September 7, 2022, 3:15pm UTC](https://community.hubspot.com/t/issues-creating-a-new-custom-object-schema/64494/4 "2022-09-07T15:15:43Z")

</div>

Are you using a private app or trying to use public app? Did you ensure you added the scopes to your private app. I don’t think you can add the scope to a public app.
