# How to delete a custom object

**URL:** <https://community.hubspot.com/t/how-to-delete-a-custom-object/27847>\
**Category:** APIs & Integrations\
**Tags:** contacts\
**Created:** [November 10, 2020, 8:37pm UTC](https://community.hubspot.com/t/how-to-delete-a-custom-object/27847 "2020-11-10T20:37:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![APIANT](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/apiant/32/227387_2.png) [@APIANT](https://community.hubspot.com/u/APIANT)\
**Post date:** [November 10, 2020, 8:37pm UTC](https://community.hubspot.com/t/how-to-delete-a-custom-object/27847/1 "2020-11-10T20:37:49Z")

</div>

Hi,

Using curl we are able to create a custom “cars” object via POST [https://api.hubapi.com/crm-object-schemas/v3/schemas](https://api.hubapi.com/crm-object-schemas/v3/schemas) as documented on this page: [Accounts Dashboard | HubSpot](https://developers.hubspot.com/docs/api/crm/crm-custom-objects)  
Now we wish to delete that test object. Have tried **DELETE** /crm/v3/objects/{objectType}/{objectId} as documented on this page: [Accounts Dashboard | HubSpot](https://developers.hubspot.com/docs/api/crm/crm-custom-objects)  
But the cars object remains available in the contact screens.  
What are the API calls needed to entirely remove a custom object from the system?

---

<div class="post-metadata">

**Author:** ![APIANT](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/apiant/32/227387_2.png) [@APIANT](https://community.hubspot.com/u/APIANT)\
**Post date:** [November 11, 2020, 4:49pm UTC](https://community.hubspot.com/t/how-to-delete-a-custom-object/27847/2 "2020-11-11T16:49:22Z")

</div>

Have figured out that this is the call needed to delete the cars test object:

curl --request DELETE --url '[https://api.hubapi.com/crm/v3/schemas/2-1143746?hapikey=XXXXXXX](https://api.hubapi.com/crm/v3/schemas/2-1143746?hapikey=XXXXXXX)

Where 2-1143746 is the object id. Is confusing that the documentation calls these parameters “objectType”, when they seem to really be identifers, not names. Would seemingly be better to call them “objectId”.

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [November 12, 2020, 4:17pm UTC](https://community.hubspot.com/t/how-to-delete-a-custom-object/27847/3 "2020-11-12T16:17:07Z")

</div>

Hey @APIANT ,

According to the documentation, you should be able to pass the Fully qualified name _or_ object type ID for the target schema.

If you look at parameters definition, you will see that, but I appreciate the confusion and will mention this.

Also, please note that to permanently delete the schema, there is a purge endpoint that you need to hit as well 🙂

---

<div class="post-metadata">

**Author:** ![APIANT](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/apiant/32/227387_2.png) [@APIANT](https://community.hubspot.com/u/APIANT)\
**Post date:** [November 12, 2020, 4:40pm UTC](https://community.hubspot.com/t/how-to-delete-a-custom-object/27847/4 "2020-11-12T16:40:01Z")

</div>

Great, thanks for the info!
