APIs & Integrations

rOsborn123
Contributor | Elite Partner
Contributor | Elite Partner

Delete Custom Object Error

SOLVE

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:

 

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.

 

0 Upvotes
1 Accepted solution
dennisedson
Solution
HubSpot Product Team
HubSpot Product Team

Delete Custom Object Error

SOLVE

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 😀

View solution in original post

10 Replies 10
rOsborn123
Contributor | Elite Partner
Contributor | Elite Partner

Delete Custom Object Error

SOLVE

@dennisedson I appreciate the support!

dennisedson
Solution
HubSpot Product Team
HubSpot Product Team

Delete Custom Object Error

SOLVE

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 😀

rOsborn123
Contributor | Elite Partner
Contributor | Elite Partner

Delete Custom Object Error

SOLVE

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

tominal
Guide | Partner
Guide | Partner

Delete Custom Object Error

SOLVE

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.


Thomas Johnson
Community Champion


Kahu Software LLC
A Texan HubSpot consulting firm
https://kahusoftware.com
dennisedson
HubSpot Product Team
HubSpot Product Team

Delete Custom Object Error

SOLVE

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.

rOsborn123
Contributor | Elite Partner
Contributor | Elite Partner

Delete Custom Object Error

SOLVE

Nice! My issue seems to be unique then. 

tominal
Guide | Partner
Guide | Partner

Delete Custom Object Error

SOLVE

I'll give it a shot to help!

I misread the thread thinking this was about the purge endpoint. Why was it deprecated? 😭


Thomas Johnson
Community Champion


Kahu Software LLC
A Texan HubSpot consulting firm
https://kahusoftware.com
0 Upvotes
dennisedson
HubSpot Product Team
HubSpot Product Team

Delete Custom Object Error

SOLVE

@rOsborn123 , does this issue persist?

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

rOsborn123
Contributor | Elite Partner
Contributor | Elite Partner

Delete Custom Object Error

SOLVE

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

tominal
Guide | Partner
Guide | Partner

Delete Custom Object Error

SOLVE

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.


Thomas Johnson
Community Champion


Kahu Software LLC
A Texan HubSpot consulting firm
https://kahusoftware.com