# Not returning deleted company

**URL:** <https://community.hubspot.com/t/not-returning-deleted-company/11241>\
**Category:** APIs & Integrations\
**Tags:** companies\
**Created:** [August 13, 2018, 8:51am UTC](https://community.hubspot.com/t/not-returning-deleted-company/11241 "2018-08-13T08:51:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [August 13, 2018, 8:51am UTC](https://community.hubspot.com/t/not-returning-deleted-company/11241/1 "2018-08-13T08:51:37Z")

</div>

Hi Team,

I create a company and retrieve it in the GetAllCompanies call fine and store it in my SQL database.

I then delete that company in HubSpot.

I call GetRecentlyModifiedCompanies which works fine for the most part, however, I expect to get the deleted company here with the IsDeleted value being true so that I can delete this in my SQL database. Unfortunately, I am not returning anything for the company I deleted.

How should I go about removing a deleted company, am I missing something?

I hope this makes sense and is clear, if not let me know (I have one more question I will ask in a separate Topic).

Thank you,  
Toby

---

<div class="post-metadata">

**Author:** ![Derek\_Gervais](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/derek_gervais/32/17429_2.png) [@Derek\_Gervais](https://community.hubspot.com/u/Derek_Gervais)\
**Post date:** [August 17, 2018, 7:15pm UTC](https://community.hubspot.com/t/not-returning-deleted-company/11241/2 "2018-08-17T19:15:12Z")

</div>

Hi [@rainsfordt](https://community.hubspot.com/u/rainsfordt),

Deleted companies are not returned by the Companies API. Your best bet would be to use the Webhooks API to subscribe to company deletion events:

![]() [developers.hubspot.com](https://developers.hubspot.com/docs/methods/webhooks/webhooks-overview)

### [Webhooks API Overview](https://developers.hubspot.com/docs/methods/webhooks/webhooks-overview)

Overview for the Webhooks API
