APIs & Integrations

enrico_bianchet
Miembro

Delete a company

When i use this endpoint https://developers.hubspot.com/docs/methods/companies/delete_company
the company is deleted form the DB or is just that the property field “isDeleted” is set to true?
If true, Can i delete a company also with this endpoint https://developers.hubspot.com/docs/methods/companies/batch-update-companies by setting isDeleted?
i asked because i need to perform a batch delete through api but it’s not available.
Thanks

0 Me gusta
3 Respuestas 3
5c0tt
Miembro

Delete a company

Hi Enrico, can you help? The API reference for delete a company shows the same URL as for return a company:

https://developers.hubspot.com/docs/methods/companies/delete_company  shows:

Example DELETE URL:
https://api.hubapi.com/companies/v2/companies/10444744?hapikey=demo

https://developers.hubspot.com/docs/methods/companies/get_company

Example GET URL:
https://api.hubapi.com/companies/v2/companies/10444744?hapikey=demo

What am I missing? how do I delete a company? How did you do it?

0 Me gusta
Derek_Gervais
Exmiembro de HubSpot
Exmiembro de HubSpot

Delete a company

Hi @enrico.bianchetti,

Using the delete company endpoint does set the isDeleted field to true, but that’s not the only function it serves. The records are also properly deleted from your portal, so it’s not possible to replicate a batch delete endpoint by trying to update the isDeleted field using the batch update endpoint. To properly delete company records, you should use the delete company endpoint.

0 Me gusta
enrico_bianchet
Miembro

Delete a company

Thanks @Derek_Gervais for your support.