How to disable webhook notifications at your command

Are you changing your content model and your services are overwhelmed by webhook notifications? Disabling your webhooks notification requests might help you with focusing on things that matter.

Martin Makarsky

Updated on Feb 20, 2024

Published on Jun 7, 2021

Developers do refactoring. In short, it’s a restructuring of existing code into a more meaningful structure often accompanied by massive code changes. I believe a similar approach is used when dealing with bulky content models as well. Sometimes it feels right to split some content types here and there—or to adjust them according to the new needs and opportunities of your organization. Kontent’s environments and migrations will definitely make your life easier with these tasks. But what to do with your webhook-powered integrations?

You don’t want to spam your services with all new notifications. But at the same time, you are pretty happy with your webhooks set up, and you just don’t want to delete them. Disabling the webhooks feature is exactly The Thing you need in this scenario.

Webhooks are a powerful integration tool. With them, you can automate many tasks that depend on your content—rebuilding your site, testing your project, sending push notifications, releasing the new version of your artifacts, updating search indices...countless possibilities, indeed.

How to disable webhooks?

If you want to disable webhooks, you need to go to the Environment settings in the Project settings section. Select Webhooks, open the detail of the webhook and click on Disable. When needed, you can enable the webhook in the same location in the Project Settings.

Disable and enable webhooks

The other way of using webhooks is via our Management API. With just one PUT request, you are able to enable or disable a specific webhook. This might come in handy, e.g., in automatic migrations or your internal tools.

Disable a webhook via API

curl --request PUT \
  --url https://manage.kontent.ai/v2/projects/<YOUR_PROJECT_ID>/webhooks/<YOUR_WEBHOOK_ID>/disable \
  --header 'Authorization: Bearer <YOUR_API_KEY>' \
  --header 'Content-type: application/json'

Enable a webhook via API

curl --request PUT \
  --url https://manage.kontent.ai/v2/projects/<YOUR_PROJECT_ID>/webhooks/<YOUR_WEBHOOK_ID>/enable \
  --header 'Authorization: Bearer <YOUR_API_KEY>' \
  --header 'Content-type: application/json'

The most important takeaway is understanding what a disabled webhook means for your project. Disabled webhooks ignore their triggers and don’t create any notifications. This means that no notification will be sent after you later enable the webhook again.

This behavior ensures your services won’t be overwhelmed by requests when you enable webhooks again. Moreover, after disabling the webhook, the not-sent webhook requests in the queue are deleted as well.

As usual, you can learn more about this feature in our documentation.

Bonus 😊: Struggling with the state of the webhooks and don’t know what’s wrong with your configuration? Take a look at the webhook debugging feature.

Popular articles

Creative team discussing evergreen content
  • For business
The ultimate guide to evergreen content

What if we told you there was a way to make your website a place that will always be relevant, no matter the season or the year? Two words—evergreen content. What does evergreen mean in marketing, and how do you make evergreen content? Let’s dive into it.

Lucie Simonova

Aug 29, 2022

A marketer writing a blog post structure
  • For business
7+1 Steps to structure a blog post

In today’s world of content, writing like Shakespeare is not enough. The truth is, there are tons of exceptional writers out there. So what will make you stand out from the sea of articles posted every day? A proper blog post structure.

Lucie Simonova

Jul 22, 2022

Subscribe to the Kontent.ai newsletter

Get the hottest updates while they’re fresh! For more industry insights, follow our LinkedIn profile.