# Delete Custom Object Error

**URL:** <https://community.hubspot.com/t/delete-custom-object-error/34576>\
**Category:** APIs & Integrations\
**Tags:** developer-tools, sdk\
**Created:** [March 26, 2021, 12:48am UTC](https://community.hubspot.com/t/delete-custom-object-error/34576 "2021-03-26T00:48:36Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![rOsborn123](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/rosborn123/32/9140_2.png) [@rOsborn123](https://community.hubspot.com/u/rOsborn123)\
**Post date:** [March 26, 2021, 12:48am UTC](https://community.hubspot.com/t/delete-custom-object-error/34576/1 "2021-03-26T00:48:36Z")

</div>

I’ve deleted custom objects many times before hitting the endpoint

`DELETE https://api.hubapi.com/crm/v3/schemas/{objectType}`

then with archived=true appended to “purge” the database so that I could start over. I’m following the exact same protocol. I first deleted all records of the object and am attempting to delete the object but am receiving a 400 error with the following response:

```lia-code-sample
data: {
 status: 'error',
 message: 'Unable to access requested object type',
 correlationId: '26550887-373f-47ef-9916-36ebec96cc9c',
 category: 'VALIDATION_ERROR'
}

```

The api key matches and is working with the other schema requests, so I’m not entirely sure what could be the cause of this issue, but I need it resolved rather quickly.  
Any insight would be greatly appreciated.

---

<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:** [March 26, 2021, 6:17pm UTC](https://community.hubspot.com/t/delete-custom-object-error/34576/2 "2021-03-26T18:17:40Z")

</div>

@rOsborn123 , does this issue persist?

Might be worth getting in touch with support, if you have not already, to look under the hood

---

<div class="post-metadata">

**Author:** ![rOsborn123](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/rosborn123/32/9140_2.png) [@rOsborn123](https://community.hubspot.com/u/rOsborn123)\
**Post date:** [March 26, 2021, 6:21pm UTC](https://community.hubspot.com/t/delete-custom-object-error/34576/3 "2021-03-26T18:21:49Z")

</div>

Thanks @dennisedson  
I went ahead and did so - seems to be a bug of some sort. Waiting for a resolution

---

<div class="post-metadata">

**Author:** ![tominal](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/tominal/32/73018_2.png) [@tominal](https://community.hubspot.com/u/tominal)\
**Post date:** [March 26, 2021, 6:23pm UTC](https://community.hubspot.com/t/delete-custom-object-error/34576/4 "2021-03-26T18:23:26Z")

</div>

I’ll tell you I gave up trying to purge custom objects because of this exact error. Inserting myself here for any updates on this fix.  
Deleting these records from the UI is nightmarish.

---

<div class="post-metadata">

**Author:** ![rOsborn123](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/rosborn123/32/9140_2.png) [@rOsborn123](https://community.hubspot.com/u/rOsborn123)\
**Post date:** [March 26, 2021, 6:28pm UTC](https://community.hubspot.com/t/delete-custom-object-error/34576/5 "2021-03-26T18:28:06Z")

</div>

@tominal  
I’ve deleted custom objects many times before. If it helps you, make sure you’ve delete all records of a custom object then hit the

`https://api.hubapi.com/crm/v3/schemas/{objectType}`

endpoint, then hit the

`https://api.hubapi.com/crm/v3/schemas/{objectType}?archived=true`

endpoint to completely delete the object. You can then recreate a custom object with the same name if you want. Purge has been deprecated, I believe. The key is to make sure all instances of the object are deleted first. I’m not sure if this helps but just giving some background in case it might help. This seems to be a particular error. Let me know if you’ve tried that and are getting this same error on the initial delete endpoint. Might help to pinpoint what’s going on and where.

---

<div class="post-metadata">

**Author:** ![tominal](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/tominal/32/73018_2.png) [@tominal](https://community.hubspot.com/u/tominal)\
**Post date:** [March 26, 2021, 6:34pm UTC](https://community.hubspot.com/t/delete-custom-object-error/34576/6 "2021-03-26T18:34:51Z")

</div>

I’ll give it a shot to help!  
I misread the thread thinking this was about the purge endpoint. Why was it deprecated? 😭

---

<div class="post-metadata">

**Author:** ![tominal](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/tominal/32/73018_2.png) [@tominal](https://community.hubspot.com/u/tominal)\
**Post date:** [March 26, 2021, 6:41pm UTC](https://community.hubspot.com/t/delete-custom-object-error/34576/7 "2021-03-26T18:41:02Z")

</div>

It’s working for me. Then again I used the example custom object in the docs.  
I specified p9101656\_my\_object as the {objectType}.  
Hope that helps.

---

<div class="post-metadata">

**Author:** ![rOsborn123](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/rosborn123/32/9140_2.png) [@rOsborn123](https://community.hubspot.com/u/rOsborn123)\
**Post date:** [March 26, 2021, 6:44pm UTC](https://community.hubspot.com/t/delete-custom-object-error/34576/8 "2021-03-26T18:44:44Z")

</div>

Nice! My issue seems to be unique then.

---

<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:** [March 26, 2021, 6:46pm UTC](https://community.hubspot.com/t/delete-custom-object-error/34576/9 "2021-03-26T18:46:55Z")

</div>

I have not attempted recently, but this is the method I have successfully done in the past. @rOsborn123 saw your support ticket and it looks like it is in the right hands.

---

<div class="post-metadata">

**Author:** ![rOsborn123](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/rosborn123/32/9140_2.png) [@rOsborn123](https://community.hubspot.com/u/rOsborn123)\
**Post date:** [March 26, 2021, 6:48pm UTC](https://community.hubspot.com/t/delete-custom-object-error/34576/10 "2021-03-26T18:48:02Z")

</div>

@dennisedson I appreciate the support!

---

<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:** [April 5, 2021, 8:12pm UTC](https://community.hubspot.com/t/delete-custom-object-error/34576/11 "2021-04-05T20:12:48Z")

</div>

Hi @rOsborn123 , just getting back from my break and I was checking in on this. Looks like there wasn’t a good answer. Hopefully just a quirk that will not happen again.

Please let us know if it happens again 😀
