Learn how to define a webhook subscription on the latest version of the developer platform.
webhooks
directory in the project, along with a *-hsmeta.json
configuration file.
*-hsmeta.json
file.
Fields marked with * are required.
Field | Type | Description |
---|---|---|
uid * | String | An internal unique identifier for the webhook component. |
type * | String | The type of component, which should be webhooks in this case. |
settings * | Object | An object that specifies two fields: targetUrl , which is the publicly available URL for HubSpot to call where event payloads will be delivered, and maxConcurrentRequests , which is the upper threshold of HTTP requests that HubSpot will make in a given time frame. |
subscriptions * | Object | An object that specifies the subscription types your app will subscribe to. |
crmObjects | Array | An array containing event subscription definitions. This is the standard array to include, and should be used for all events in the new format ( Classic webhook subscription types should instead be included in |
legacyCrmObjects | Array | An array containing classic subscription types, such as contact.creation and deal.deletion . |
hubEvents | Array | An array containing the classic subscription types contact.privacyDeletion and conversation.* |
subscription
object, the following fields can be specified, based on the subscription definition type you’re subscribed to (i.e., crmObjects
, legacyCrmObjects
, or hubEvents
) or whether you’re subscribing to a specific property change (e.g., contact.propertyChange
).
Field | Type | Description |
---|---|---|
subscriptionType | String | The type of event being subscribed to. |
objectType | String | For subscriptions specified within the crmObjects array, this specifies the CRM object your app is subscribing to. |
propertyName | String | For property change subscriptions, this specifies which property will trigger the webhook event. |
active | Boolean | Whether webhook events will be triggered for this subscription. |