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:



758
759
760
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 758

def initialize(client:)
  @client = client
end

Instance Method Details

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



14
15
16
17
18
19
20
21
22
23
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 14

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

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



33
34
35
36
37
38
39
40
41
42
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 33

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(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::WebhookCreateSubscriptionParams for more details.

Create new event subscription for the specified app.

Parameters:

  • app_id (Integer)
  • active (Boolean)

    Determines if the subscription is active or paused. Defaults to false.

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

    Type of event to listen for. Can be one of ‘create`, `delete`, `deletedForPrivac

  • event_type_name (String)

    The name of the event to listen for. This is used with custom objects to specify

  • object_type_id (String)

    The ID of the object type for the subscription. This can be a standard CRM objec

  • property_name (String)

    The internal name of the property to monitor for changes. Only applies when ‘eve

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

Returns:

See Also:



69
70
71
72
73
74
75
76
77
78
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 69

def create_subscription(app_id, params)
  parsed, options = HubSpotSDK::Webhooks::WebhookCreateSubscriptionParams.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_subscription_filter(filter:, subscription_id:, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::FilterCreateResponse

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

Parameters:

Returns:

See Also:



95
96
97
98
99
100
101
102
103
104
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 95

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

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

Batch create event subscriptions for the specified app.



117
118
119
120
121
122
123
124
125
126
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 117

def create_subscriptions_batch(app_id, params)
  parsed, options = HubSpotSDK::Webhooks::WebhookCreateSubscriptionsBatchParams.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

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

Parameters:

Returns:

  • (nil)

See Also:



136
137
138
139
140
141
142
143
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 136

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_portal_subscriptions(portal_id, request_options: {}) ⇒ nil

Parameters:

Returns:

  • (nil)

See Also:



153
154
155
156
157
158
159
160
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 153

def delete_portal_subscriptions(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:



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

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(subscription_id, app_id:, request_options: {}) ⇒ nil

Delete an existing event subscription by ID.

Parameters:

Returns:

  • (nil)

See Also:



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

def delete_subscription(subscription_id, params)
  parsed, options = HubSpotSDK::Webhooks::WebhookDeleteSubscriptionParams.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_subscription_filter(filter_id, request_options: {}) ⇒ nil

Parameters:

Returns:

  • (nil)

See Also:



215
216
217
218
219
220
221
222
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 215

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(install_portal_id: nil, request_options: {}) ⇒ StringIO

Parameters:

Returns:

  • (StringIO)

See Also:



232
233
234
235
236
237
238
239
240
241
242
243
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 232

def get_earliest_journal(params = {})
  parsed, options = HubSpotSDK::Webhooks::WebhookGetEarliestJournalParams.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_journal_batch(count, install_portal_id: nil, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::BatchResponseJournalFetchResponse

Parameters:

Returns:

See Also:



254
255
256
257
258
259
260
261
262
263
264
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 254

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_local_journal(install_portal_id: nil, request_options: {}) ⇒ StringIO

Parameters:

Returns:

  • (StringIO)

See Also:



274
275
276
277
278
279
280
281
282
283
284
285
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 274

def get_earliest_local_journal(params = {})
  parsed, options = HubSpotSDK::Webhooks::WebhookGetEarliestLocalJournalParams.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_earliest_local_journal_batch(count, install_portal_id: nil, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::BatchResponseJournalFetchResponse

Parameters:

Returns:

See Also:



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

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_journal_batch(inputs:, install_portal_id: nil, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::BatchResponseJournalFetchResponse

Parameters:

  • inputs (Array<String>)

    Body param: Strings to input.

  • install_portal_id (Integer)

    Query param

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

Returns:

See Also:



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

def get_journal_batch(params)
  query_params = [:install_portal_id]
  parsed, options = HubSpotSDK::Webhooks::WebhookGetJournalBatchParams.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_after_offset(count, offset:, install_portal_id: nil, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::BatchResponseJournalFetchResponse

Parameters:

  • count (Integer)

    Path param

  • offset (String)

    Path param

  • install_portal_id (Integer)

    Query param

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

Returns:

See Also:



346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 346

def get_journal_batch_after_offset(count, params)
  parsed, options = HubSpotSDK::Webhooks::WebhookGetJournalBatchAfterOffsetParams.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

Parameters:

Returns:

See Also:



370
371
372
373
374
375
376
377
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 370

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_latest_journal(install_portal_id: nil, request_options: {}) ⇒ StringIO

Parameters:

Returns:

  • (StringIO)

See Also:



387
388
389
390
391
392
393
394
395
396
397
398
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 387

def get_latest_journal(params = {})
  parsed, options = HubSpotSDK::Webhooks::WebhookGetLatestJournalParams.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_journal_batch(count, install_portal_id: nil, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::BatchResponseJournalFetchResponse

Parameters:

Returns:

See Also:



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

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_local_journal(install_portal_id: nil, request_options: {}) ⇒ StringIO

Parameters:

Returns:

  • (StringIO)

See Also:



429
430
431
432
433
434
435
436
437
438
439
440
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 429

def get_latest_local_journal(params = {})
  parsed, options = HubSpotSDK::Webhooks::WebhookGetLatestLocalJournalParams.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_latest_local_journal_batch(count, install_portal_id: nil, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::BatchResponseJournalFetchResponse

Parameters:

Returns:

See Also:



451
452
453
454
455
456
457
458
459
460
461
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 451

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_local_journal_batch(inputs:, install_portal_id: nil, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::BatchResponseJournalFetchResponse

Parameters:

  • inputs (Array<String>)

    Body param: Strings to input.

  • install_portal_id (Integer)

    Query param

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

Returns:

See Also:



474
475
476
477
478
479
480
481
482
483
484
485
486
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 474

def get_local_journal_batch(params)
  query_params = [:install_portal_id]
  parsed, options = HubSpotSDK::Webhooks::WebhookGetLocalJournalBatchParams.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_after_offset(count, offset:, install_portal_id: nil, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::BatchResponseJournalFetchResponse

Parameters:

  • count (Integer)

    Path param

  • offset (String)

    Path param

  • install_portal_id (Integer)

    Query param

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

Returns:

See Also:



501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 501

def get_local_journal_batch_after_offset(count, params)
  parsed, options = HubSpotSDK::Webhooks::WebhookGetLocalJournalBatchAfterOffsetParams.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

Parameters:

Returns:

See Also:



525
526
527
528
529
530
531
532
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 525

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_after_offset(offset, install_portal_id: nil, request_options: {}) ⇒ StringIO

Parameters:

Returns:

  • (StringIO)

See Also:



543
544
545
546
547
548
549
550
551
552
553
554
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 543

def get_next_journal_after_offset(offset, params = {})
  parsed, options = HubSpotSDK::Webhooks::WebhookGetNextJournalAfterOffsetParams.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_after_offset(offset, install_portal_id: nil, request_options: {}) ⇒ StringIO

Parameters:

Returns:

  • (StringIO)

See Also:



565
566
567
568
569
570
571
572
573
574
575
576
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 565

def get_next_local_journal_after_offset(offset, params = {})
  parsed, options = HubSpotSDK::Webhooks::WebhookGetNextLocalJournalAfterOffsetParams.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:



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

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(subscription_id, app_id:, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::SubscriptionResponse

Retrieve a specific event subscription by ID.

Parameters:

Returns:

See Also:



609
610
611
612
613
614
615
616
617
618
619
620
621
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 609

def get_subscription(subscription_id, params)
  parsed, options = HubSpotSDK::Webhooks::WebhookGetSubscriptionParams.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_subscription_filter(filter_id, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::FilterResponse

Parameters:

Returns:

See Also:



631
632
633
634
635
636
637
638
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 631

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

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

Parameters:

Returns:

See Also:



648
649
650
651
652
653
654
655
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 648

def get_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

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



664
665
666
667
668
669
670
671
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 664

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_subscriptions(app_id, request_options: {}) ⇒ HubSpotSDK::Models::Webhooks::SubscriptionListResponse

Retrieve event subscriptions for the specified app.

Parameters:

Returns:

See Also:



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

def list_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

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



710
711
712
713
714
715
716
717
718
719
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 710

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

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

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

Update an existing event subscription by ID.

Parameters:

  • subscription_id (Integer)

    Path param

  • app_id (Integer)

    Path param

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



740
741
742
743
744
745
746
747
748
749
750
751
752
753
# File 'lib/hubspot_sdk/resources/webhooks.rb', line 740

def update_subscription(subscription_id, params)
  parsed, options = HubSpotSDK::Webhooks::WebhookUpdateSubscriptionParams.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