How to delete a custom object

Hi,

Using curl we are able to create a custom “cars” object via POST https://api.hubapi.com/crm-object-schemas/v3/schemas as documented on this page: Accounts Dashboard | HubSpot
Now we wish to delete that test object. Have tried DELETE/crm/v3/objects/{objectType}/{objectId} as documented on this page: Accounts Dashboard | HubSpot
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?

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

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”.

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 :slightly_smiling_face:

Great, thanks for the info!