Hi. I created a custom object and I would like to delete this type.
What I do:
1. I delete all objects from this type, from"archive" too.
2. I use:
DELETE /crm/v3/schemas/pXYZ_name_of_type
DELETE /crm/v3/schemas/2-5555555
DELETE /crm/v3/schemas/pXYZ_name_of_type + { archived: true }
DELETE /crm/v3/schemas/2-5555555 + { archived: true }
response:
Hubspot::Api::Error: {"status":"error","message":"Object type 2-5555555 is currently used in 3 places and cannot be deleted","correlationId":"XYZ","context":{"objectTypeId":["2-5555555"],"usageCount":["3"]},"category":"VALIDATION_ERROR","subCategory":"InboundDbObjectTypeError.CANNOT_DELETE_OBJECT_TYPE_IN_USE"}
DELETE /crm/v3/schemas/pXYZ_name_of_type/purge
DELETE /crm/v3/schemas/2-5555555/purge
response:
Hubspot::Api::Error: {"status":"error","message":"Couldn't find soft deleted object type(s) for: ObjectTypeId{metaTypeId=2, innerId=5555555}","correlationId":"XYZ","category":"VALIDATION_ERROR"}
After this Accounts Dashboard | HubSpot
response:
Hubspot::Api::Error: {"status":"error","message":"This hapikey (XXXXXXX) does not have proper permissions! (requires all of [developers-write])","correlationId":"XYZ"}
GET /crm/v3/schemas/pXYZ_name_of_type
GET /crm/v3/schemas/2-5555555
response
{"results":[]}
GET /crm/v3/schemas/pXYZ_name_of_type + { archived: true }
GET /crm/v3/schemas/2-5555555 + { archived: true }
response
{\"status\":\"error\",\"message\":\"Paging through deleted objects is not yet supported for object type 2-555555 (property_search)\",\"correlationId\":\"XXXXXXX\",\"category\":\"VALIDATION_ERROR\"}
How to delete custom type? How to find places where object type is still used?