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:



990
991
992
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 990

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 the specified portal. This endpoint allows you to capture the state of CRM objects at a specific point in time, which can be useful for auditing or historical analysis. The request requires a list of CRM object snapshot requests, each specifying the portal ID, object ID, object type ID, and properties to include in the snapshot.

Parameters:

Returns:

See Also:



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

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.

  • 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 providing a human-readable name for the event type.

  • object_type_id (String)

    A string representing the ID of the object type associated with the subscription

  • property_name (String)

    A string indicating the specific property name related to the event type, if app

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

Returns:

See Also:



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

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 webhook subscription for the specified portal in the HubSpot account. This endpoint allows you to define the subscription details, including the types of events you want to subscribe to. The request body must include the necessary subscription information as defined by the SubscriptionUpsertRequest schema.



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

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 your HubSpot account. This endpoint allows you to define specific conditions that a webhook event must meet to trigger the subscription. It is useful for managing and customizing the behavior of webhook subscriptions based on specific criteria.

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:



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

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:



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

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 or relevant.

Parameters:

  • subscription_id (Integer)

    The unique identifier of the subscription to delete.

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

Returns:

  • (nil)

See Also:



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

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, and no content is returned upon successful deletion.

Parameters:

  • portal_id (Integer)

    The unique identifier of the portal whose webhook journal subscription is to be

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

Returns:

  • (nil)

See Also:



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

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:



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

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

Delete a specific filter associated with a webhook journal subscription. This operation is useful for managing and cleaning up filters that are no longer needed in your subscription setup. The endpoint requires the unique identifier of the filter to be 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:



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

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 the earliest entries first.

Parameters:

  • count (Integer)

    The maximum number of journal entries to retrieve in the batch. This must be an

  • install_portal_id (Integer)

    The ID of the portal installation to filter the webhook journal entries by. This

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

Returns:

See Also:



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

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 version. This endpoint is useful for accessing the oldest records available in the journal, which can be helpful for auditing or historical data analysis.

Parameters:

  • install_portal_id (Integer)

    The ID of the portal installation to filter the journal entries. It is an intege

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

Returns:

  • (StringIO)

See Also:



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

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 based on the specified count. This endpoint is useful for fetching a specific number of the earliest entries in the webhook journal for analysis or processing.

Parameters:

  • count (Integer)

    The number of earliest entries to retrieve from the webhook journal. Must be an

  • 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:

See Also:



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

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 records in the journal, which can be helpful for auditing or tracking purposes.

Parameters:

  • install_portal_id (Integer)

    The ID of the portal installation to filter the journal entries by. This paramet

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

Returns:

  • (StringIO)

See Also:



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

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:



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

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.

Perform a batch read operation on the webhooks journal for the specified date. This endpoint allows you to retrieve multiple entries from the webhooks journal in a single request, which can be useful for processing large amounts of data efficiently.

Parameters:

  • inputs (Array<String>)

    Body param: Strings to input.

  • 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:



444
445
446
447
448
449
450
451
452
453
454
455
456
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 444

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 fetch a specified number of entries, making it useful for paginating through large sets of webhook journal data.

Parameters:

  • count (Integer)

    Path param: The number of journal entries to fetch in the batch. This is an inte

  • offset (String)

    Path param: The starting point for fetching the next batch of journal entries. T

  • install_portal_id (Integer)

    Query param: The ID of the portal installation. This is an integer value used to

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

Returns:

See Also:



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

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

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

Parameters:

  • status_id (String)

    The unique identifier (UUID) of the status to retrieve.

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

Returns:

See Also:



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

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 subscription using its unique identifier. This endpoint is useful for obtaining information about a particular subscription’s configuration and status within the HubSpot account.

Parameters:

  • subscription_id (Integer)

    The unique identifier of the subscription to retrieve. It must be an integer.

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

Returns:

See Also:



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

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. This endpoint allows you to specify the number of entries to fetch, providing a way to access recent webhook activity within your HubSpot account.

Parameters:

  • count (Integer)

    The number of journal entries to retrieve. This is a required integer parameter

  • install_portal_id (Integer)

    The ID of the portal installation. This is an integer value used to identify the

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

Returns:

See Also:



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

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 entries from the webhooks journal for the specified portal. This endpoint is useful for accessing the most recent webhook events processed by your HubSpot account. It allows you to filter the results by the portal ID to ensure you are retrieving data relevant to a specific installation.

Parameters:

  • install_portal_id (Integer)

    The ID of the portal installation to filter the journal entries. It is an intege

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

Returns:

  • (StringIO)

See Also:



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

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. This endpoint is useful for accessing the most recent data entries processed by the webhook journal. It requires specifying 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 used to filter

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

Returns:

See Also:



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

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 for the specified portal. This endpoint is useful for accessing the most recent webhook events that have been logged, allowing you to process or analyze them as needed.

Parameters:

  • install_portal_id (Integer)

    The ID of the portal for which to retrieve the latest journal entries. This para

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

Returns:

  • (StringIO)

See Also:



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

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 read multiple entries from the journal in a single request. It requires a JSON request body specifying the inputs to be read. The response includes the results of the batch read operation, and may return multiple statuses if there are errors.

Parameters:

  • inputs (Array<String>)

    Body param: Strings to input.

  • install_portal_id (Integer)

    Query param: The ID of the portal where the webhooks are installed. This paramet

  • 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 allows you to fetch a defined number of entries, facilitating the processing of webhook data in manageable chunks.

Parameters:

  • count (Integer)

    Path param: The number of journal entries to retrieve. This is an integer value

  • offset (String)

    Path param: The starting point for fetching the batch of journal entries. This i

  • install_portal_id (Integer)

    Query param: The ID of the portal installation. This is an integer value used to

  • 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

Retrieve the status of a specific webhook journal entry using its unique status ID. This endpoint is useful for monitoring the progress or completion of webhook processing tasks.

Parameters:

  • status_id (String)

    The unique identifier (UUID) of the status to retrieve.

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

Returns:

See Also:



747
748
749
750
751
752
753
754
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 747

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 batch of webhook journal entries starting from a specified offset. This endpoint is useful for paginating through large sets of webhook data, allowing you to continue fetching entries from where you last left off.

Parameters:

  • offset (String)

    The offset from which to start retrieving the next batch of webhook journal entr

  • install_portal_id (Integer)

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

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

Returns:

  • (StringIO)

See Also:



775
776
777
778
779
780
781
782
783
784
785
786
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 775

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 webhook journal entries starting from a specified offset. This endpoint is useful for paginating through webhook journal data in a sequential manner, allowing you to fetch entries beyond a given point.

Parameters:

  • offset (String)

    The starting point for retrieving the next set of journal entries. This is a str

  • install_portal_id (Integer)

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

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

Returns:

  • (StringIO)

See Also:



807
808
809
810
811
812
813
814
815
816
817
818
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 807

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:



832
833
834
835
836
837
838
839
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 832

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 details of a specific filter associated with a webhook subscription in the HubSpot account. This endpoint is useful for accessing the configuration and conditions of a filter by its unique identifier.

Parameters:

  • filter_id (Integer)

    The unique identifier of the filter to retrieve.

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

Returns:

See Also:



854
855
856
857
858
859
860
861
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 854

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:



874
875
876
877
878
879
880
881
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 874

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 API version. This endpoint provides details about each subscription, including actions, object types, and associated properties. It is useful for managing and reviewing current webhook subscriptions.



895
896
897
898
899
900
901
902
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 895

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>

Retrieve the filters associated with a specific webhook subscription in the HubSpot account. This endpoint is useful for obtaining detailed information about the filters applied to a given subscription, identified by its subscription ID.

Parameters:

  • subscription_id (Integer)

    The unique identifier of the subscription for which to retrieve filters.

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

Returns:

See Also:



918
919
920
921
922
923
924
925
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 918

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: A boolean indicating whether the subscription is active. If true, th

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

Returns:

See Also:



946
947
948
949
950
951
952
953
954
955
956
957
958
959
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 946

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

Update webhook settings for the specified app.

Parameters:

Returns:

See Also:



976
977
978
979
980
981
982
983
984
985
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 976

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