Skip to main content
Best answer

Deleting webhooks based on previously returned Webhook ID

  • September 6, 2024
  • 2 replies
  • 31 views

Hello,

I am creating an integration for my company to offer our functionality natively on Zapier. 

When configuring a webhook trigger I am given the option to configure an Unsubscribe API which I assume is for when a user stops using the trigger. This is great and can help us keep our webhooks clean.

Our Webhook deletion API requires the ID of the webhook to be deleted/removed/unsubscribed from. How do I make reference to the ID of the webhook that is returned from the ‘Subscribe’ request in the ‘Ubsubscribe’ request?

I see I have access to a `{{bundle.subscribeData}}` batch of variables, but I don’t see any explanation of them or their contents anywhere. I’m also curious about their state between requests. 

Best answer by Bryan S.Best answer by Bryan S.

Hey @swoogrb 👋🏼

 

You’re on the right track here - {{bundle.subscribeData}} contains the response from the subscribe call. For example, if upon subscription you get back:

{
  "webhook" : {
      "id" : 12345,
      "url" : "someURL",
      "name" : "Test Webhook",
      "events" : "events"
      }
}

^^ This is now the structure of {{bundle.subscribeData}}.

Hope that helps :)

View original
Did this topic help you find an answer to your question?

2 replies

  • Zapier Staff
  • 1 reply
  • Answer
  • September 6, 2024

Hey @swoogrb 👋🏼

 

You’re on the right track here - {{bundle.subscribeData}} contains the response from the subscribe call. For example, if upon subscription you get back:

{
  "webhook" : {
      "id" : 12345,
      "url" : "someURL",
      "name" : "Test Webhook",
      "events" : "events"
      }
}

^^ This is now the structure of {{bundle.subscribeData}}.

Hope that helps :)


  • Author
  • New
  • 2 replies
  • September 6, 2024

Ah that is perfect, thanks @Bryan S.