This topic explains how to create and use webhooks in LaunchDarkly.
LaunchDarkly’s webhooks allow you to build your own integrations that subscribe to changes in LaunchDarkly. When something changes, like when a feature flag is updated, or when an account member is invited to LaunchDarkly, LaunchDarkly sends an HTTP POST payload to the webhook’s configured URL.
Use webhooks to update external issue trackers, update support tickets, notify customers of new feature rollouts, and more.
You can also use the REST API: Webhooks
To create a webhook:
You can also use the REST API: Create a webhook
When creating a webhook, you can define an optional secret. If defined, the webhook POST request will include an X-LD-Signature header, whose value will contain an HMAC SHA256 hex digest of the webhook payload, using the secret as the key.
Compute the signature of the payload using the same shared secret in your code to verify that the webhook was triggered by LaunchDarkly. You can use the auto-generated secret, or supply your own when creating or editing a webhook.
LaunchDarkly sends all flag change events in the production environment to a webhook by default. To customize the events LaunchDarkly sends to a webhook, use the policy editor in the webhook creation panel.
For example, to receive events only when a change is made to one of your production feature flags, add one of the following policies to your webhook:
To learn more about creating a policy, read Example roles and policies.
You can also use the REST API: Update webhook
The webhook payload format is identical to the entry format for the change history. Read our REST API Documentation for an example payload.
Note that webhooks may not be delivered in chronological order. We recommend using the payload’s “date” field as a timestamp to reorder webhooks as they are received.
If LaunchDarkly receives a non-2xx response to a webhook POST, it attempts to retry the delivery once. Webhook delivery is not guaranteed, and integrations built on webhooks should be tolerant of delivery failures.
You can temporarily disable a webhook by hitting the On/Off switch on the Integrations page.
If you need to generate a test URL, we recommend using Pipedream or Insomnia.
You can delete a webhook when you no longer need it.
To delete a webhook:

You can also use the REST API: Delete webhook