# How does Webhook Subscription work?

**URL:** <https://community.hubspot.com/t/how-does-webhook-subscription-work/115362>\
**Category:** APIs & Integrations\
**Tags:** webhooks\
**Created:** [August 28, 2024, 10:07am UTC](https://community.hubspot.com/t/how-does-webhook-subscription-work/115362 "2024-08-28T10:07:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashutosh-oodles](https://avatars.discourse-cdn.com/v4/letter/a/ec9cab/32.png) [@ashutosh-oodles](https://community.hubspot.com/u/ashutosh-oodles)\
**Post date:** [August 28, 2024, 10:07am UTC](https://community.hubspot.com/t/how-does-webhook-subscription-work/115362/1 "2024-08-28T10:07:51Z")

</div>

Facts:

- Developer account & Production/Sandbox/Testing account is different
- Only Production/Sandbox/Testing account can contain CRM data
- Webhooks are created via Developer account. It asks for objectType and event but not for Production/Sandbox/Testing account id or something.

Query:

- For custom objects I understand that the ObjectTypeId will be unique. And we can subscribe to such unique Id. But what about for hubspot defined objects?
- Example - Companies have “0-2” ObjectTypeId set for all users. How will Developer account’s webhook know whose company object should it subscribe to?

---

<div class="post-metadata">

**Author:** ![GRajput](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/grajput/32/102020_2.png) [@GRajput](https://community.hubspot.com/u/GRajput)\
**Post date:** [August 28, 2024, 2:17pm UTC](https://community.hubspot.com/t/how-does-webhook-subscription-work/115362/2 "2024-08-28T14:17:25Z")

</div>

Hi @ashutosh-oodles

"When setting up a webhook subscription in the HubSpot Developer account, you define the objectType (e.g., companies, contacts) and the event (e.g., creation, deletion, propertyChange) that you want to subscribe to.

You do not need to specify any specific HubSpot account ID (portal ID) when setting up the webhook in the developer account.

The webhook subscription is tied to an app created in the developer account.  
When this app is installed in a Production/Sandbox/Testing account, the webhook subscriptions are activated for that specific account.

Each HubSpot account that installs the app will generate webhooks based on the events defined in the subscription, for their respective CRM data.  
The webhook is not subscribed to an objectTypeId in a specific HubSpot account but is instead tied to the app. When the app is installed in a HubSpot account, it triggers webhooks for those standard HubSpot-defined objects in that account."

I hope this will help you out. Please mark it as **Solution Accepted and upvote** to help another Community member.  
Thanks!

---

<div class="post-metadata">

**Author:** ![ashutosh-oodles](https://avatars.discourse-cdn.com/v4/letter/a/ec9cab/32.png) [@ashutosh-oodles](https://community.hubspot.com/u/ashutosh-oodles)\
**Post date:** [August 28, 2024, 2:43pm UTC](https://community.hubspot.com/t/how-does-webhook-subscription-work/115362/3 "2024-08-28T14:43:21Z")

</div>

1. What do you mean by “user installs the app”? Do you mean when the user  
logs into the my app via the oauth url generated via the app in developer  
console?  
2. Does all of that explanation still mean that the webhook will look for  
change in that object (present inside all of app users) and sends a payload  
for that at my target url?  
3. You mentioned “hubspot-defined objects” at the end, can we not add a  
webhook for a custom object?
