# Create a custom object

**URL:** <https://community.hubspot.com/t/create-a-custom-object/64142>\
**Category:** APIs & Integrations\
**Tags:** developer-tools\
**Created:** [August 31, 2022, 7:38am UTC](https://community.hubspot.com/t/create-a-custom-object/64142 "2022-08-31T07:38:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rugregme](https://avatars.discourse-cdn.com/v4/letter/r/7ab992/32.png) [@rugregme](https://community.hubspot.com/u/rugregme)\
**Post date:** [August 31, 2022, 7:38am UTC](https://community.hubspot.com/t/create-a-custom-object/64142/1 "2022-08-31T07:38:45Z")

</div>

I have a POST request to [https://api.hubapi.com/crm/v3/schemas](https://api.hubapi.com/crm/v3/schemas) in order to create a custom object. I`m using a private app access token to authenticate. I also enabled the following scopes on the private app

- crm.objects.custom.write
- crm.objects.custom.read
- crm.schemas.custom.write
- crm.schemas.custom.read

The object passed is exactly the same from this example [How to Build a Custom Object Using Private Apps](https://developers.hubspot.com/blog/how-to-build-a-custom-object-using-private-apps)

```lia-code-sample
{
 "associatedObjects": [
 "CONTACT"
 ],
 "labelPlural": "Boats",
 "labelSingular": "Boat",
 "name": "boat",
 "primaryDisplayProperty": "model",
 "properties": [
 {
 "name": "condition",
 "label": "Condition",
 "type": "enumeration",
 "fieldType": "select",
 "options": [
 {
 "label": "New",
 "value": "new"
 },
 {
 "label": "Used",
 "value": "used"
 }
 ]
 },
 {
 "name": "date_received",
 "label": "Date received",
 "type": "date",
 "fieldType": "date"
 },
 {
 "name": "year",
 "label": "Year",
 "type": "number",
 "fieldType": "number"
 },
 {
 "name": "make",
 "label": "Make",
 "type": "string",
 "fieldType": "text"
 },
 {
 "name": "model",
 "label": "Model",
 "type": "string",
 "fieldType": "text"
 },
 {
 "name": "hin",
 "label": "HIN",
 "type": "string",
 "hasUniqueValue": true,
 "fieldType": "text"
 },
 {
 "name": "color",
 "label": "Color",
 "type": "string",
 "fieldType": "text"
 },
 {
 "name": "mileage",
 "label": "Mileage",
 "type": "number",
 "fieldType": "number"
 },
 {
 "name": "price",
 "label": "Price",
 "type": "number",
 "fieldType": "number"
 },
 {
 "name": "notes",
 "label": "Notes",
 "type": "string",
 "fieldType": "text"
 }
 ],
 "requiredProperties": [
 "year",
 "make",
 "hin",
 "model"
 ],
 "searchableProperties": [
 "year",
 "make",
 "hin",
 "model"
 ],
 "secondaryDisplayProperties": [
 "make"
 ]
}

```

I`m getting a 401 error, though:

```auto
 "message": "401 Unauthorized",
 "exceptionName": "org.springframework.web.client.HttpClientErrorException",
 "exceptionString": "org.springframework.web.client.HttpClientErrorException: 401 Unauthorized"

```

Other calls work ok. Anyone knows if is it possible to access POST [https://api.hubapi.com/crm/v3/schemas](https://api.hubapi.com/crm/v3/schemas) via AccessToken?

Thanks.

---

<div class="post-metadata">

**Author:** ![coldrickjack](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/coldrickjack/32/6684_2.png) [@coldrickjack](https://community.hubspot.com/u/coldrickjack)\
**Post date:** [August 31, 2022, 12:24pm UTC](https://community.hubspot.com/t/create-a-custom-object/64142/2 "2022-08-31T12:24:42Z")

</div>

Hey @rugregme,

[Custom Objects](https://knowledge.hubspot.com/crm-setup/use-custom-objects) is an enterprise feature so the first thing I’d do is check your subscription. You’ll need an enterprise edition of any of the following - Marketing, Sales, Service, CMS or Operations.

Let me know if that isn’t the case and we can go back to the drawing board. It seems like the most likely reason given that you’re getting a 401 error and all other requests are working.
