Class: HubSpotSDK::Resources::Webhooks

Inherits:
Object
  • Object
show all
Defined in:
lib/hubspot_sdk/resources/webhooks.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Webhooks

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Webhooks.

Parameters:



1004
1005
1006
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 1004

def initialize(client:)
  @client = client
end

Instance Method Details

#create_batch_event_subscriptions(app_id, inputs:, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::BatchResponseSubscriptionResponse

Some parameter documentations has been truncated, see Models::Webhooks::WebhookCreateBatchEventSubscriptionsParams for more details.

Batch create event subscriptions for the specified app.

Parameters:

Returns:

See Also:



23
24
25
26
27
28
29
30
31
32
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 23

def create_batch_event_subscriptions(app_id, params)
  parsed, options = HubSpotSDK::Webhooks::WebhookCreateBatchEventSubscriptionsParams.dump_request(params)
  @client.request(
    method: :post,
    path: ["webhooks/2026-03/%1$s/subscriptions/batch/update", app_id],
    body: parsed,
    model: HubSpotSDK::Webhooks::BatchResponseSubscriptionResponse,
    options: options
  )
end

#create_crm_snapshots(snapshot_requests:, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::CrmObjectSnapshotBatchResponse

Some parameter documentations has been truncated, see Models::Webhooks::WebhookCreateCrmSnapshotsParams for more details.

Create a batch of CRM object snapshots for a specified portal. This endpoint allows you to capture the current state of CRM objects by submitting a batch request with the necessary object details. It is useful for tracking changes or maintaining historical records of CRM data.

Parameters:

Returns:

See Also:



52
53
54
55
56
57
58
59
60
61
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 52

def create_crm_snapshots(params)
  parsed, options = HubSpotSDK::Webhooks::WebhookCreateCrmSnapshotsParams.dump_request(params)
  @client.request(
    method: :post,
    path: "webhooks-journal/snapshots/2026-03/crm",
    body: parsed,
    model: HubSpotSDK::Webhooks::CrmObjectSnapshotBatchResponse,
    options: options
  )
end

#create_event_subscription(app_id, active:, event_type:, event_type_name: nil, object_type_id: nil, property_name: nil, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::SubscriptionResponse

Some parameter documentations has been truncated, see Models::Webhooks::WebhookCreateEventSubscriptionParams for more details.

Create new event subscription for the specified app.

Parameters:

  • app_id (Integer)

    The identifier for the app.

  • active (Boolean)

    A boolean indicating whether the subscription is active. This field is required.

  • event_type (Symbol, HubSpotSDK::Models::Webhooks::SubscriptionCreateRequest::EventType)

    A string representing the type of event to subscribe to. Valid values include va

  • event_type_name (String)

    A string that provides a human-readable name for the event type. This is optiona

  • object_type_id (String)

    A string representing the identifier of the object type for which the subscripti

  • property_name (String)

    A string indicating the name of the property that triggers the event. This is op

  • request_options (HubSpotSDK::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



88
89
90
91
92
93
94
95
96
97
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 88

def create_event_subscription(app_id, params)
  parsed, options = HubSpotSDK::Webhooks::WebhookCreateEventSubscriptionParams.dump_request(params)
  @client.request(
    method: :post,
    path: ["webhooks/2026-03/%1$s/subscriptions", app_id],
    body: parsed,
    model: HubSpotSDK::Webhooks::SubscriptionResponse,
    options: options
  )
end

#create_journal_subscription(subscription_upsert_request:, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::SubscriptionResponse1

Create a new subscription in the webhooks journal for the specified version. This endpoint allows you to define the subscription details, including actions and object types, to manage webhook events effectively. It requires a valid request body with the subscription details.



112
113
114
115
116
117
118
119
120
121
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 112

def create_journal_subscription(params)
  parsed, options = HubSpotSDK::Webhooks::WebhookCreateJournalSubscriptionParams.dump_request(params)
  @client.request(
    method: :post,
    path: "webhooks-journal/subscriptions/2026-03",
    body: parsed[:subscription_upsert_request],
    model: HubSpotSDK::Webhooks::SubscriptionResponse1,
    options: options
  )
end

#create_subscription_filter(filter:, subscription_id:, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::FilterCreateResponse

Some parameter documentations has been truncated, see Models::Webhooks::WebhookCreateSubscriptionFilterParams for more details.

Create a new filter for a webhook subscription in the HubSpot account. This endpoint allows you to define conditions that determine when a webhook event should be triggered for a specific subscription. The request body must include the subscription ID and the filter details.

Parameters:

  • filter (HubSpotSDK::Models::Webhooks::Filter)

    Defines a single condition for searching CRM objects, specifying the property to

  • subscription_id (Integer)

    The unique identifier of the subscription to which the filter will be applied. I

  • request_options (HubSpotSDK::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



143
144
145
146
147
148
149
150
151
152
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 143

def create_subscription_filter(params)
  parsed, options = HubSpotSDK::Webhooks::WebhookCreateSubscriptionFilterParams.dump_request(params)
  @client.request(
    method: :post,
    path: "webhooks-journal/subscriptions/2026-03/filters",
    body: parsed,
    model: HubSpotSDK::Webhooks::FilterCreateResponse,
    options: options
  )
end

#delete_event_subscription(subscription_id, app_id:, request_options: {}) ⇒ nil

Delete an existing event subscription by ID.

Parameters:

  • subscription_id (Integer)

    The identifier for the subscription.

  • app_id (Integer)

    The identifier for the app.

  • request_options (HubSpotSDK::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

  • (nil)

See Also:



167
168
169
170
171
172
173
174
175
176
177
178
179
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 167

def delete_event_subscription(subscription_id, params)
  parsed, options = HubSpotSDK::Webhooks::WebhookDeleteEventSubscriptionParams.dump_request(params)
  app_id =
    parsed.delete(:app_id) do
      raise ArgumentError.new("missing required path argument #{_1}")
    end
  @client.request(
    method: :delete,
    path: ["webhooks/2026-03/%1$s/subscriptions/%2$s", app_id, subscription_id],
    model: NilClass,
    options: options
  )
end

#delete_journal_subscription(subscription_id, request_options: {}) ⇒ nil

Delete a specific webhook journal subscription using its unique identifier. This operation is useful for managing and cleaning up subscriptions that are no longer needed.

Parameters:

  • subscription_id (Integer)

    The unique identifier of the subscription to delete.

  • request_options (HubSpotSDK::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

  • (nil)

See Also:



194
195
196
197
198
199
200
201
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 194

def delete_journal_subscription(subscription_id, params = {})
  @client.request(
    method: :delete,
    path: ["webhooks-journal/subscriptions/2026-03/%1$s", subscription_id],
    model: NilClass,
    options: params[:request_options]
  )
end

#delete_journal_subscription_for_portal(portal_id, request_options: {}) ⇒ nil

Some parameter documentations has been truncated, see Models::Webhooks::WebhookDeleteJournalSubscriptionForPortalParams for more details.

Delete a webhook journal subscription for a specific portal. This operation removes the subscription associated with the given portalId, effectively stopping any webhook events from being sent to the portal.

Parameters:

  • portal_id (Integer)

    The unique identifier of the portal for which the webhook journal subscription i

  • request_options (HubSpotSDK::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

  • (nil)

See Also:



220
221
222
223
224
225
226
227
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 220

def delete_journal_subscription_for_portal(portal_id, params = {})
  @client.request(
    method: :delete,
    path: ["webhooks-journal/subscriptions/2026-03/portals/%1$s", portal_id],
    model: NilClass,
    options: params[:request_options]
  )
end

#delete_settings(app_id, request_options: {}) ⇒ nil

Delete the webhook settings for the specified app. Event subscriptions will not be deleted, but will be paused until another webhook is created.

Parameters:

Returns:

  • (nil)

See Also:



241
242
243
244
245
246
247
248
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 241

def delete_settings(app_id, params = {})
  @client.request(
    method: :delete,
    path: ["webhooks/2026-03/%1$s/settings", app_id],
    model: NilClass,
    options: params[:request_options]
  )
end

#delete_subscription_filter(filter_id, request_options: {}) ⇒ nil

Remove a specific filter from your webhook journal subscriptions. This operation is useful when you need to clean up or modify the filters applied to your webhook subscriptions. The filter identified by the filterId will be permanently deleted.

Parameters:

  • filter_id (Integer)

    The unique identifier of the filter to delete.

  • request_options (HubSpotSDK::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

  • (nil)

See Also:



264
265
266
267
268
269
270
271
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 264

def delete_subscription_filter(filter_id, params = {})
  @client.request(
    method: :delete,
    path: ["webhooks-journal/subscriptions/2026-03/filters/%1$s", filter_id],
    model: NilClass,
    options: params[:request_options]
  )
end

#get_earliest_journal_batch(count, install_portal_id: nil, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::BatchResponseJournalFetchResponse

Some parameter documentations has been truncated, see Models::Webhooks::WebhookGetEarliestJournalBatchParams for more details.

Retrieve the earliest batch of webhook journal entries up to the specified count. This endpoint is useful for fetching historical webhook data in batches, allowing you to process or analyze them as needed.

Parameters:

  • count (Integer)

    The number of journal entries to retrieve. This must be an integer with a minimu

  • install_portal_id (Integer)

    The ID of the portal installation for which to fetch the journal entries. This i

  • request_options (HubSpotSDK::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



292
293
294
295
296
297
298
299
300
301
302
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 292

def get_earliest_journal_batch(count, params = {})
  parsed, options = HubSpotSDK::Webhooks::WebhookGetEarliestJournalBatchParams.dump_request(params)
  query = HubSpotSDK::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: ["webhooks-journal/journal/2026-03/batch/earliest/%1$s", count],
    query: query.transform_keys(install_portal_id: "installPortalId"),
    model: HubSpotSDK::Webhooks::BatchResponseJournalFetchResponse,
    options: options
  )
end

#get_earliest_journal_entry(install_portal_id: nil, request_options: {}) ⇒ StringIO

Some parameter documentations has been truncated, see Models::Webhooks::WebhookGetEarliestJournalEntryParams for more details.

Retrieve the earliest entry from the webhooks journal for the specified portal. This endpoint is useful for accessing the initial entries in the journal, which can be helpful for debugging or auditing purposes.

Parameters:

  • install_portal_id (Integer)

    The ID of the portal installation to filter the journal entries. This is an inte

  • request_options (HubSpotSDK::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

  • (StringIO)

See Also:



321
322
323
324
325
326
327
328
329
330
331
332
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 321

def get_earliest_journal_entry(params = {})
  parsed, options = HubSpotSDK::Webhooks::WebhookGetEarliestJournalEntryParams.dump_request(params)
  query = HubSpotSDK::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: "webhooks-journal/journal/2026-03/earliest",
    query: query.transform_keys(install_portal_id: "installPortalId"),
    headers: {"accept" => "*/*"},
    model: StringIO,
    options: options
  )
end

#get_earliest_local_journal_batch(count, install_portal_id: nil, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::BatchResponseJournalFetchResponse

Some parameter documentations has been truncated, see Models::Webhooks::WebhookGetEarliestLocalJournalBatchParams for more details.

Retrieve the earliest batch of webhook journal entries up to a specified count. This endpoint is useful for accessing the oldest records available in the webhook journal, allowing you to process or analyze historical webhook data.

Parameters:

  • count (Integer)

    The number of webhook journal entries to retrieve. It must be an integer with a

  • install_portal_id (Integer)

    The ID of the portal installation to filter the webhook journal entries. It is a

  • request_options (HubSpotSDK::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



353
354
355
356
357
358
359
360
361
362
363
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 353

def get_earliest_local_journal_batch(count, params = {})
  parsed, options = HubSpotSDK::Webhooks::WebhookGetEarliestLocalJournalBatchParams.dump_request(params)
  query = HubSpotSDK::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: ["webhooks-journal/journal-local/2026-03/batch/earliest/%1$s", count],
    query: query.transform_keys(install_portal_id: "installPortalId"),
    model: HubSpotSDK::Webhooks::BatchResponseJournalFetchResponse,
    options: options
  )
end

#get_earliest_local_journal_entry(install_portal_id: nil, request_options: {}) ⇒ StringIO

Some parameter documentations has been truncated, see Models::Webhooks::WebhookGetEarliestLocalJournalEntryParams for more details.

Retrieve the earliest entry from the webhooks journal for the specified portal. This endpoint is useful for accessing the oldest available data in the journal, which can be used for historical analysis or troubleshooting.

Parameters:

  • install_portal_id (Integer)

    The ID of the portal for which to retrieve the earliest journal entry. This para

  • request_options (HubSpotSDK::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

  • (StringIO)

See Also:



382
383
384
385
386
387
388
389
390
391
392
393
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 382

def get_earliest_local_journal_entry(params = {})
  parsed, options = HubSpotSDK::Webhooks::WebhookGetEarliestLocalJournalEntryParams.dump_request(params)
  query = HubSpotSDK::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: "webhooks-journal/journal-local/2026-03/earliest",
    query: query.transform_keys(install_portal_id: "installPortalId"),
    headers: {"accept" => "*/*"},
    model: StringIO,
    options: options
  )
end

#get_event_subscription(subscription_id, app_id:, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::SubscriptionResponse

Retrieve a specific event subscription by ID.

Parameters:

  • subscription_id (Integer)

    The identifier for the subscription.

  • app_id (Integer)

    The identifier for the app.

  • request_options (HubSpotSDK::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



408
409
410
411
412
413
414
415
416
417
418
419
420
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 408

def get_event_subscription(subscription_id, params)
  parsed, options = HubSpotSDK::Webhooks::WebhookGetEventSubscriptionParams.dump_request(params)
  app_id =
    parsed.delete(:app_id) do
      raise ArgumentError.new("missing required path argument #{_1}")
    end
  @client.request(
    method: :get,
    path: ["webhooks/2026-03/%1$s/subscriptions/%2$s", app_id, subscription_id],
    model: HubSpotSDK::Webhooks::SubscriptionResponse,
    options: options
  )
end

#get_journal_batch_by_request(inputs:, install_portal_id: nil, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::BatchResponseJournalFetchResponse

Some parameter documentations has been truncated, see Models::Webhooks::WebhookGetJournalBatchByRequestParams for more details.

Read a batch of webhook journal entries for the specified portal. This endpoint allows you to retrieve detailed information about webhook events processed by your HubSpot account. It is useful for auditing and tracking webhook activity.

Parameters:

  • inputs (Array<String>)

    Body param: Strings to input.

  • install_portal_id (Integer)

    Query param: The ID of the portal from which to retrieve webhook journal entries

  • request_options (HubSpotSDK::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



441
442
443
444
445
446
447
448
449
450
451
452
453
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 441

def get_journal_batch_by_request(params)
  query_params = [:install_portal_id]
  parsed, options = HubSpotSDK::Webhooks::WebhookGetJournalBatchByRequestParams.dump_request(params)
  query = HubSpotSDK::Internal::Util.encode_query_params(parsed.slice(*query_params))
  @client.request(
    method: :post,
    path: "webhooks-journal/journal/2026-03/batch/read",
    query: query.transform_keys(install_portal_id: "installPortalId"),
    body: parsed.except(*query_params),
    model: HubSpotSDK::Webhooks::BatchResponseJournalFetchResponse,
    options: options
  )
end

#get_journal_batch_from_offset(count, offset:, install_portal_id: nil, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::BatchResponseJournalFetchResponse

Some parameter documentations has been truncated, see Models::Webhooks::WebhookGetJournalBatchFromOffsetParams for more details.

Retrieve a batch of webhook journal entries starting from a specified offset. This endpoint allows you to specify the number of entries to retrieve, helping you manage and paginate through large sets of webhook data efficiently.

Parameters:

  • count (Integer)

    Path param: The number of webhook journal entries to retrieve in the batch. This

  • offset (String)

    Path param: The starting point for retrieving the batch of webhook journal entri

  • install_portal_id (Integer)

    Query param: The ID of the portal installation to filter the webhook journal ent

  • request_options (HubSpotSDK::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 476

def get_journal_batch_from_offset(count, params)
  parsed, options = HubSpotSDK::Webhooks::WebhookGetJournalBatchFromOffsetParams.dump_request(params)
  query = HubSpotSDK::Internal::Util.encode_query_params(parsed)
  offset =
    parsed.delete(:offset) do
      raise ArgumentError.new("missing required path argument #{_1}")
    end
  @client.request(
    method: :get,
    path: ["webhooks-journal/journal/2026-03/batch/%1$s/next/%2$s", offset, count],
    query: query.transform_keys(install_portal_id: "installPortalId"),
    model: HubSpotSDK::Webhooks::BatchResponseJournalFetchResponse,
    options: options
  )
end

#get_journal_status(status_id, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::SnapshotStatusResponse

Some parameter documentations has been truncated, see Models::Webhooks::WebhookGetJournalStatusParams for more details.

Retrieve the status of a specific webhook journal entry using its unique status ID. This endpoint is useful for monitoring the progress or outcome of a webhook operation, providing insights into whether it is pending, in progress, completed, failed, or expired.

Parameters:

  • status_id (String)

    The unique identifier (UUID) of the webhook journal entry whose status is to be

  • request_options (HubSpotSDK::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



509
510
511
512
513
514
515
516
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 509

def get_journal_status(status_id, params = {})
  @client.request(
    method: :get,
    path: ["webhooks-journal/journal/2026-03/status/%1$s", status_id],
    model: HubSpotSDK::Webhooks::SnapshotStatusResponse,
    options: params[:request_options]
  )
end

#get_journal_subscription(subscription_id, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::SubscriptionResponse1

Retrieve details of a specific webhook journal subscription using its unique identifier. This endpoint is useful for obtaining information about a particular subscription, such as its actions, object types, and associated properties.

Parameters:

  • subscription_id (Integer)

    The unique identifier of the subscription to retrieve. It is an integer value.

  • request_options (HubSpotSDK::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



531
532
533
534
535
536
537
538
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 531

def get_journal_subscription(subscription_id, params = {})
  @client.request(
    method: :get,
    path: ["webhooks-journal/subscriptions/2026-03/%1$s", subscription_id],
    model: HubSpotSDK::Webhooks::SubscriptionResponse1,
    options: params[:request_options]
  )
end

#get_latest_journal_batch(count, install_portal_id: nil, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::BatchResponseJournalFetchResponse

Some parameter documentations has been truncated, see Models::Webhooks::WebhookGetLatestJournalBatchParams for more details.

Retrieve the latest batch of webhook journal entries up to a specified count. This endpoint is useful for fetching the most recent webhook events processed by your HubSpot account. The response includes details about each event, and you can specify the number of entries to retrieve.

Parameters:

  • count (Integer)

    The number of journal entries to retrieve. Must be an integer with a minimum val

  • install_portal_id (Integer)

    The ID of the portal installation. This parameter is optional and can be used to

  • request_options (HubSpotSDK::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



560
561
562
563
564
565
566
567
568
569
570
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 560

def get_latest_journal_batch(count, params = {})
  parsed, options = HubSpotSDK::Webhooks::WebhookGetLatestJournalBatchParams.dump_request(params)
  query = HubSpotSDK::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: ["webhooks-journal/journal/2026-03/batch/latest/%1$s", count],
    query: query.transform_keys(install_portal_id: "installPortalId"),
    model: HubSpotSDK::Webhooks::BatchResponseJournalFetchResponse,
    options: options
  )
end

#get_latest_journal_entry(install_portal_id: nil, request_options: {}) ⇒ StringIO

Some parameter documentations has been truncated, see Models::Webhooks::WebhookGetLatestJournalEntryParams for more details.

Retrieve the latest entry from the webhooks journal for the specified portal. This endpoint is useful for accessing the most recent webhook data available in the journal.

Parameters:

  • install_portal_id (Integer)

    The ID of the portal for which to retrieve the latest journal entry. It is an in

  • request_options (HubSpotSDK::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

  • (StringIO)

See Also:



589
590
591
592
593
594
595
596
597
598
599
600
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 589

def get_latest_journal_entry(params = {})
  parsed, options = HubSpotSDK::Webhooks::WebhookGetLatestJournalEntryParams.dump_request(params)
  query = HubSpotSDK::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: "webhooks-journal/journal/2026-03/latest",
    query: query.transform_keys(install_portal_id: "installPortalId"),
    headers: {"accept" => "*/*"},
    model: StringIO,
    options: options
  )
end

#get_latest_local_journal_batch(count, install_portal_id: nil, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::BatchResponseJournalFetchResponse

Some parameter documentations has been truncated, see Models::Webhooks::WebhookGetLatestLocalJournalBatchParams for more details.

Retrieve the latest batch of webhook journal entries up to a specified count. This endpoint is useful for fetching the most recent webhook events processed by the system. It requires authentication and supports various security schemes.

Parameters:

  • count (Integer)

    The number of webhook journal entries to retrieve. It must be an integer with a

  • install_portal_id (Integer)

    The ID of the portal installation to filter the webhook journal entries. It is a

  • request_options (HubSpotSDK::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



621
622
623
624
625
626
627
628
629
630
631
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 621

def get_latest_local_journal_batch(count, params = {})
  parsed, options = HubSpotSDK::Webhooks::WebhookGetLatestLocalJournalBatchParams.dump_request(params)
  query = HubSpotSDK::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: ["webhooks-journal/journal-local/2026-03/batch/latest/%1$s", count],
    query: query.transform_keys(install_portal_id: "installPortalId"),
    model: HubSpotSDK::Webhooks::BatchResponseJournalFetchResponse,
    options: options
  )
end

#get_latest_local_journal_entry(install_portal_id: nil, request_options: {}) ⇒ StringIO

Some parameter documentations has been truncated, see Models::Webhooks::WebhookGetLatestLocalJournalEntryParams for more details.

Retrieve the latest entries from the webhooks journal. This endpoint is useful for accessing the most recent webhook data for analysis or troubleshooting. It supports filtering by the installPortalId to narrow down results to a specific portal.

Parameters:

  • install_portal_id (Integer)

    An integer representing the ID of the portal to filter the webhook journal entri

  • request_options (HubSpotSDK::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

  • (StringIO)

See Also:



651
652
653
654
655
656
657
658
659
660
661
662
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 651

def get_latest_local_journal_entry(params = {})
  parsed, options = HubSpotSDK::Webhooks::WebhookGetLatestLocalJournalEntryParams.dump_request(params)
  query = HubSpotSDK::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: "webhooks-journal/journal-local/2026-03/latest",
    query: query.transform_keys(install_portal_id: "installPortalId"),
    headers: {"accept" => "*/*"},
    model: StringIO,
    options: options
  )
end

#get_local_journal_batch_by_request(inputs:, install_portal_id: nil, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::BatchResponseJournalFetchResponse

Some parameter documentations has been truncated, see Models::Webhooks::WebhookGetLocalJournalBatchByRequestParams for more details.

Perform a batch read operation on the webhooks journal. This endpoint allows you to retrieve a batch of journal entries by providing the necessary input data. It is useful for processing large volumes of webhook data efficiently.

Parameters:

  • inputs (Array<String>)

    Body param: Strings to input.

  • install_portal_id (Integer)

    Query param: The ID of the portal where the webhook is installed. This parameter

  • request_options (HubSpotSDK::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



683
684
685
686
687
688
689
690
691
692
693
694
695
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 683

def get_local_journal_batch_by_request(params)
  query_params = [:install_portal_id]
  parsed, options = HubSpotSDK::Webhooks::WebhookGetLocalJournalBatchByRequestParams.dump_request(params)
  query = HubSpotSDK::Internal::Util.encode_query_params(parsed.slice(*query_params))
  @client.request(
    method: :post,
    path: "webhooks-journal/journal-local/2026-03/batch/read",
    query: query.transform_keys(install_portal_id: "installPortalId"),
    body: parsed.except(*query_params),
    model: HubSpotSDK::Webhooks::BatchResponseJournalFetchResponse,
    options: options
  )
end

#get_local_journal_batch_from_offset(count, offset:, install_portal_id: nil, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::BatchResponseJournalFetchResponse

Some parameter documentations has been truncated, see Models::Webhooks::WebhookGetLocalJournalBatchFromOffsetParams for more details.

Retrieve a batch of webhook journal entries starting from a specified offset. This endpoint is useful for fetching sequential batches of data, allowing you to paginate through large sets of webhook journal entries efficiently.

Parameters:

  • count (Integer)

    Path param: The number of entries to retrieve in the batch. This must be an inte

  • offset (String)

    Path param: The starting point for the batch retrieval. This is a string value r

  • install_portal_id (Integer)

    Query param: The ID of the portal where the webhooks are installed. This is an i

  • request_options (HubSpotSDK::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 718

def get_local_journal_batch_from_offset(count, params)
  parsed, options = HubSpotSDK::Webhooks::WebhookGetLocalJournalBatchFromOffsetParams.dump_request(params)
  query = HubSpotSDK::Internal::Util.encode_query_params(parsed)
  offset =
    parsed.delete(:offset) do
      raise ArgumentError.new("missing required path argument #{_1}")
    end
  @client.request(
    method: :get,
    path: ["webhooks-journal/journal-local/2026-03/batch/%1$s/next/%2$s", offset, count],
    query: query.transform_keys(install_portal_id: "installPortalId"),
    model: HubSpotSDK::Webhooks::BatchResponseJournalFetchResponse,
    options: options
  )
end

#get_local_journal_status(status_id, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::SnapshotStatusResponse

Some parameter documentations has been truncated, see Models::Webhooks::WebhookGetLocalJournalStatusParams for more details.

Retrieve the status of a specific webhook journal entry using its unique status ID. This endpoint is useful for checking the progress or result of a webhook operation, such as whether it is pending, in progress, completed, failed, or expired.

Parameters:

  • status_id (String)

    The unique identifier (UUID) of the webhook journal entry whose status is to be

  • request_options (HubSpotSDK::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



752
753
754
755
756
757
758
759
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 752

def get_local_journal_status(status_id, params = {})
  @client.request(
    method: :get,
    path: ["webhooks-journal/journal-local/2026-03/status/%1$s", status_id],
    model: HubSpotSDK::Webhooks::SnapshotStatusResponse,
    options: params[:request_options]
  )
end

#get_next_journal_entries(offset, install_portal_id: nil, request_options: {}) ⇒ StringIO

Some parameter documentations has been truncated, see Models::Webhooks::WebhookGetNextJournalEntriesParams for more details.

Retrieve the next set of webhook journal entries starting from a specified offset. This endpoint is useful for paginating through webhook journal entries in a HubSpot account. It allows you to continue fetching entries from where the last request left off, using the offset parameter.

Parameters:

  • offset (String)

    The offset from which to start retrieving the next set of journal entries. This

  • install_portal_id (Integer)

    The ID of the portal where the webhooks are installed. This is an integer value.

  • request_options (HubSpotSDK::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

  • (StringIO)

See Also:



781
782
783
784
785
786
787
788
789
790
791
792
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 781

def get_next_journal_entries(offset, params = {})
  parsed, options = HubSpotSDK::Webhooks::WebhookGetNextJournalEntriesParams.dump_request(params)
  query = HubSpotSDK::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: ["webhooks-journal/journal/2026-03/offset/%1$s/next", offset],
    query: query.transform_keys(install_portal_id: "installPortalId"),
    headers: {"accept" => "*/*"},
    model: StringIO,
    options: options
  )
end

#get_next_local_journal_entries(offset, install_portal_id: nil, request_options: {}) ⇒ StringIO

Some parameter documentations has been truncated, see Models::Webhooks::WebhookGetNextLocalJournalEntriesParams for more details.

Retrieve the next set of journal entries starting from a specified offset. This endpoint is useful for paginating through webhook journal entries in a sequential manner. It requires specifying the offset from which the next entries should be fetched.

Parameters:

  • offset (String)

    The offset from which the next set of journal entries should be retrieved. This

  • install_portal_id (Integer)

    The ID of the portal installation to filter the journal entries by. This is an o

  • request_options (HubSpotSDK::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

  • (StringIO)

See Also:



814
815
816
817
818
819
820
821
822
823
824
825
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 814

def get_next_local_journal_entries(offset, params = {})
  parsed, options = HubSpotSDK::Webhooks::WebhookGetNextLocalJournalEntriesParams.dump_request(params)
  query = HubSpotSDK::Internal::Util.encode_query_params(parsed)
  @client.request(
    method: :get,
    path: ["webhooks-journal/journal-local/2026-03/offset/%1$s/next", offset],
    query: query.transform_keys(install_portal_id: "installPortalId"),
    headers: {"accept" => "*/*"},
    model: StringIO,
    options: options
  )
end

#get_settings(app_id, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::SettingsResponse

Retrieve the webhook settings for the specified app, including the webhook’s target URL, throttle configuration, and create/update date.

Parameters:

Returns:

See Also:



839
840
841
842
843
844
845
846
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 839

def get_settings(app_id, params = {})
  @client.request(
    method: :get,
    path: ["webhooks/2026-03/%1$s/settings", app_id],
    model: HubSpotSDK::Webhooks::SettingsResponse,
    options: params[:request_options]
  )
end

#get_subscription_filter(filter_id, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::FilterResponse

Retrieve a specific filter associated with a webhook journal subscription. This endpoint allows you to access detailed information about the filter identified by the filterId path parameter. It is useful for managing and reviewing filter configurations within your webhook subscriptions.

Parameters:

  • filter_id (Integer)

    The unique identifier of the filter to retrieve.

  • request_options (HubSpotSDK::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



862
863
864
865
866
867
868
869
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 862

def get_subscription_filter(filter_id, params = {})
  @client.request(
    method: :get,
    path: ["webhooks-journal/subscriptions/2026-03/filters/%1$s", filter_id],
    model: HubSpotSDK::Webhooks::FilterResponse,
    options: params[:request_options]
  )
end

#list_event_subscriptions(app_id, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::SubscriptionListResponse

Retrieve event subscriptions for the specified app.

Parameters:

Returns:

See Also:



882
883
884
885
886
887
888
889
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 882

def list_event_subscriptions(app_id, params = {})
  @client.request(
    method: :get,
    path: ["webhooks/2026-03/%1$s/subscriptions", app_id],
    model: HubSpotSDK::Webhooks::SubscriptionListResponse,
    options: params[:request_options]
  )
end

#list_journal_subscriptions(request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::CollectionResponseSubscriptionResponseNoPaging

Retrieve a list of webhook journal subscriptions for the specified version. This endpoint allows you to view all active subscriptions without pagination. It is useful for managing and auditing webhook subscriptions in your HubSpot account.



902
903
904
905
906
907
908
909
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 902

def list_journal_subscriptions(params = {})
  @client.request(
    method: :get,
    path: "webhooks-journal/subscriptions/2026-03",
    model: HubSpotSDK::Webhooks::CollectionResponseSubscriptionResponseNoPaging,
    options: params[:request_options]
  )
end

#list_subscription_filters(subscription_id, request_options: {}) ⇒ Array<HubSpotSDK::Models::Webhooks::FilterResponse>

Some parameter documentations has been truncated, see Models::Webhooks::WebhookListSubscriptionFiltersParams for more details.

Retrieve the filters associated with a specific webhook subscription. This endpoint is useful for obtaining detailed information about the filters applied to a subscription, which can help in managing and understanding the data flow through your webhook integrations.

Parameters:

  • subscription_id (Integer)

    The unique identifier of the subscription for which filters are being retrieved.

  • request_options (HubSpotSDK::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



929
930
931
932
933
934
935
936
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 929

def list_subscription_filters(subscription_id, params = {})
  @client.request(
    method: :get,
    path: ["webhooks-journal/subscriptions/2026-03/filters/subscription/%1$s", subscription_id],
    model: HubSpotSDK::Internal::Type::ArrayOf[HubSpotSDK::Webhooks::FilterResponse],
    options: params[:request_options]
  )
end

#update_event_subscription(subscription_id, app_id:, active: nil, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::SubscriptionResponse

Some parameter documentations has been truncated, see Models::Webhooks::WebhookUpdateEventSubscriptionParams for more details.

Update an existing event subscription by ID.

Parameters:

  • subscription_id (Integer)

    Path param: The identifier for the subscription.

  • app_id (Integer)

    Path param: The identifier for the app.

  • active (Boolean)

    Body param: Whether to activate or pause the webhook subscription. If true, the

  • request_options (HubSpotSDK::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



957
958
959
960
961
962
963
964
965
966
967
968
969
970
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 957

def update_event_subscription(subscription_id, params)
  parsed, options = HubSpotSDK::Webhooks::WebhookUpdateEventSubscriptionParams.dump_request(params)
  app_id =
    parsed.delete(:app_id) do
      raise ArgumentError.new("missing required path argument #{_1}")
    end
  @client.request(
    method: :patch,
    path: ["webhooks/2026-03/%1$s/subscriptions/%2$s", app_id, subscription_id],
    body: parsed,
    model: HubSpotSDK::Webhooks::SubscriptionResponse,
    options: options
  )
end

#update_settings(app_id, target_url:, throttling:, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::SettingsResponse

Some parameter documentations has been truncated, see Models::Webhooks::WebhookUpdateSettingsParams for more details.

Update webhook settings for the specified app.

Parameters:

Returns:

See Also:



990
991
992
993
994
995
996
997
998
999
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 990

def update_settings(app_id, params)
  parsed, options = HubSpotSDK::Webhooks::WebhookUpdateSettingsParams.dump_request(params)
  @client.request(
    method: :put,
    path: ["webhooks/2026-03/%1$s/settings", app_id],
    body: parsed,
    model: HubSpotSDK::Webhooks::SettingsResponse,
    options: options
  )
end