Prerequisites
- A running Flipt v2 server with an active Pro or trial license and webhook support.
- An environment configured with Git sync and SCM integration.
- Permission to manage webhooks or service hooks for your Git repository.
- An HTTPS URL for Flipt that your Git provider can reach.
1. Create a webhook secret
Generate a random secret with OpenSSL:FLIPT_WEBHOOK_SECRET to this value in the environment of the Flipt server process. You also need this value when you configure your Git provider.
Use a separate value from the access token that Flipt uses to read and write your repository.
2. Configure Flipt
Add thewebhook block to your existing environment’s scm configuration. This example uses the production environment and GitHub:
FLIPT_WEBHOOK_SECRET is available to the server process. Flipt refuses to start if the webhook secret resolves to an empty value.
The webhook endpoint for this example is https://flipt.example.com/api/v2/webhooks/production. Replace flipt.example.com with your Flipt host. The final path segment must match the environment’s configured name, which defaults to its YAML key. If your existing environment sets name: Production, use /api/v2/webhooks/Production, with the same capitalization.
3. Configure your Git provider
Use the endpoint URL from the previous step and the same secret that you configured in Flipt. Keep TLS certificate verification enabled.- GitHub
- GitLab
- Gitea
- Bitbucket
- Azure DevOps
- Open your repository’s Settings > Webhooks and select Add webhook.
- Set Payload URL to your Flipt webhook endpoint.
- Set Content type to
application/json. - Set Secret to your webhook secret.
- Select Just the push event and keep Active selected.
- Select Add webhook.
ping event after creation. Flipt returns 200 OK for an authenticated ping without fetching the repository.See GitHub’s webhook documentation for details.4. Test synchronization
Make a flag change in your Git repository and push it to the branch that Flipt tracks. You can also merge a pull request or merge request that changes a flag on that branch. Open your provider’s webhook delivery history and inspect the push delivery. A matching push returns202 Accepted. Make sure that the changed flag state appears in Flipt.
A 200 OK response means that Flipt authenticated the delivery but did not schedule a fetch. Provider test buttons can send pings, unrelated events, or a branch that Flipt does not track. Use a real push to test synchronization.
Keep
poll_interval configured as a fallback. In a deployment with multiple
replicas, a webhook updates the instance that receives it. Deliver to each
replica for prompt updates across the deployment. A load balancer that sends
each request to one replica does not broadcast the update to the others.Troubleshooting
For payload limits, authentication headers, and all response codes, see the webhook reference.