Skip webhook events

Use headers to skip webhook events

Suppose you created a webhook that is triggered each time a user deletes an asset. This webhook triggers a deletion process in an external service. You might want to skip or “mute” this webhook if the deletion process has already been managed in the external service.

How it works

You can skip a webhook event based on the subscriber or the topic by adding either or both of these parameters to the API call header:

  • X-Mute-WebHook-Subscriptions: Enter the subscription IDs for the webhooks that should be skipped.
  • X-Mute-WebHook-Topics: Enter the topic names for the webhooks that should be skipped.

To skip API calls, you must:

  • Be logged in to Orange Logic.
  • Have the Mute webhooks per API call Security Function to access the webhook APIs. (This Security Function is activated for the *Admin and *SuperAdmin Groups by default.)

    ℹ️

    Note

    The ability to skip webhooks is available beginning in Orange Logic Juneau.

Mute webhooks with headers

  • Multiple values: You can add multiple subscriptions or topics to each header. Separate each value with a comma. Do not add a space between comma-separated values because headers are space sensitive.
  • Character limitation: Each header has a limit of 512 characters.

For example, to skip webhooks for specific subscriptions:

KeyValueDescription
X-Mute-WebHook-SubscriptionsMango1The webhook is skipped for a single subscription.
X-Mute-WebHook-SubscriptionsMango1,Mango2,Mango3The webhook is skipped for multiple subscriptions. Each subscription name is separated by a comma (and no space).

Wildcards

You can add an asterisk (*) as a wildcard. For example, to skip webhooks for a variety of subscriptions:

KeyValueDescription
X-Mute-WebHook-SubscriptionsMango*The webhook is skipped for all subscriptions that begin with “Mango,” such as “Mango1, “MangoA,” etc.
X-Mute-WebHook-Topics*The webhook is skipped for all topics.

Mute webhooks with parameters

If you do not want to add the mute parameters to the header, you can add the following parameters to the call:

  • MuteWebHookSubscriptions
  • MuteWebHookTopics

For example, to skip webhook events for the subscriptions Mango1 and Mango2, add the following parameter to your API call: "MuteWebHookSubscriptions"= "Mango1,Mango2".