APIs & Integrations

fonji
Contributor

Webhooks and relations changes

Hello everyone, and thanks to the hubspot’s dev team for providing us with webhooks!

Is there any way to get notified about relation changes between entities? E.g. when a contact is linked to a company?
I tried different to create different subscriptions, such as a companyId or company property change on contact, but the event never occured.

0 Upvotes
3 Replies 3
fonji
Contributor

Webhooks and relations changes

Hi @dadams, thank you very much for you answer!

It seems to work beautifully :slight_smile:

0 Upvotes
Dadams
HubSpot Employee
HubSpot Employee

Webhooks and relations changes

HI @fonji

The property you’d need to look for on contact records would be associatedcompanyid, since that would store the companyId from the associated company record.

On the company side, you can watch the num_associated_contacts property, since that would update whenever a contact was added or removed from a company.

0 Upvotes
ronemrick1
Member

Webhooks and relations changes

Hello,

I’d like to know when a Contact has been added to or removed from a Deal record. Would I want to listen for changes to a Contact’s num_associated_deals value? Then, if that value is different from the previous number we saved, make an API call to get the associated Deals using /deals/v1/deal/associated/:objectType/:objectId/paged (/deals/v1/deal/associated/contact/:objectId/paged).

Thanks for the help!
-Ron

0 Upvotes