LaunchDarkly Developer Documentation

Get started in under 30 minutes.
LaunchDarkly provides feature flags as a service for Java · Python · Ruby · Go · Node.js · PHP · .NET. Control feature launches -- who sees what and when -- without multiple code deploys. Easy dashboard for phased rollouts, targeting and segmenting.
Need more help? write us at support@launchdarkly.com

Get Started    

LaunchDarkly's webhooks allow you to build your own integrations that subscribe to changes in LaunchDarkly. When something is changed (e.g., when a feature flag is updated, when a team member is invited to LaunchDarkly, and more) we'll send 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.

Creating a webhook

To create a webhook, click the New Webhook button on your Integrations page.

Provide an absolute URL, whether the webhook should be signed, and a optional policy.

Signing webhooks

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.

You should 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.

Adding a policy filter

By default, a webhook without a policy filter will receive a payload for any change in LaunchDarkly (across any project, environment, goal, feature flag, etc.). You can optionally specify a policy (using the same syntax as our custom roles feature to filter the events sent to your webhook.

For example, if you only want to receive an event when a change is made to one of your production feature flags, you can add the following policy to your webhook:

  {
    "effect": "allow",
    "resources": [
      "proj/*:env/production:flag/*"
    ],
    "actions": [
      "*"
    ]
  }

Payload format

The webhook payload format is identical to the entry format for the audit log. See our REST API Documentation for an example payload.

Webhook delivery order

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.

Retries

If LaunchDarkly receives a non-2xx response to a webhook POST, it will attempt to retry the delivery once. Webhook delivery is not guaranteed, and integrations built on webhooks should be tolerant of delivery failures.

Disabling webhooks

You can temporarily disable a webhook by hitting the On/Off switch on the Integrations page.

Webhooks