Overview
Webhooks provide event-driven updates:Without Webhooks
- Polls every 3 minutes
- Up to 3 minute delay
- Unnecessary API calls
- Higher resource usage
With Webhooks
- Instant notifications
- Immediate updates
- Event-driven architecture
- Reduced resource usage
Webhooks are optional but recommended for production environments where fast feedback is important.
Supported Git Providers
Argo CD supports webhook notifications from:- GitHub (github.com and GitHub Enterprise)
- GitLab (gitlab.com and self-hosted)
- Bitbucket Cloud
- Bitbucket Server (Data Center)
- Azure DevOps
- Gogs
Configuration Steps
Step 1: Configure Webhook in Git Provider
- GitHub
- GitLab
- Bitbucket Cloud
- Azure DevOps
Configure webhook
- Payload URL:
https://argocd.example.com/api/webhook - Content type:
application/json(required) - Secret: Enter a secure random string (optional but recommended)
- Events: Select “Just the push event”
- Active: Checked

Step 2: Configure Argo CD Secret (Optional)
Configuring a webhook secret is optional but strongly recommended to prevent DDoS attacks and unauthorized webhook triggers.Webhook Secret Keys by Provider
| Git Provider | Secret Key | Notes |
|---|---|---|
| GitHub | webhook.github.secret | Token string |
| GitLab | webhook.gitlab.secret | Token string |
| Bitbucket Cloud | webhook.bitbucket.uuid | UUID from webhook |
| Bitbucket Server | webhook.bitbucketserver.secret | Token string |
| Gogs | webhook.gogs.secret | Token string |
| Azure DevOps | webhook.azuredevops.usernamewebhook.azuredevops.password | Basic auth credentials |
For security, you can store webhook secrets in a separate Kubernetes Secret with the label
app.kubernetes.io/part-of: argocd. Reference it using syntax: $<secret-name>:<key>Alternative Secret Storage
Store webhook secrets in a separate secret:Bitbucket Cloud Special Configuration
Bitbucket Cloud requires additional configuration because it doesn’t include changed files in webhook payloads.Why Special Handling?
- Bitbucket Cloud webhooks lack changed file lists
- Prevents Manifest Paths Annotation from working
- Argo CD uses Bitbucket’s
diffstatAPI as workaround
Requirements
How It Works
- Webhook received with
X-Hook-UUIDheader - UUID verified against
webhook.bitbucket.uuidsecret - Argo CD calls Bitbucket
diffstatAPI to get changed files - For public repos: uses unauthenticated API client
- For private repos: uses repository OAuth token
- If API call fails, changed files list remains empty (graceful degradation)
Testing Webhooks
Verify Webhook Delivery
- GitHub
- GitLab
- Bitbucket
- Go to repository → Settings → Webhooks
- Click on your webhook
- Scroll to Recent Deliveries
- Click on a delivery to see request/response
- Green checkmark = successful delivery
Check Argo CD Logs
Trigger Test Event
Webhook Security
Always Use Secrets
Configure webhook secrets to verify payload authenticity and prevent unauthorized triggers.
Limit Payload Size
Set
webhook.maxPayloadSizeMB in argocd-cm ConfigMap (default: 50MB) to prevent DDoS.Use HTTPS
Always use HTTPS for webhook endpoints to encrypt data in transit.
IP Allowlisting
Restrict webhook access to known Git provider IP ranges at firewall/ingress level.
Limiting Payload Size
ApplicationSet Webhooks
ApplicationSets use separate webhook configuration for the Git Generator.See ApplicationSet Git Generator Webhook Configuration for details.
Troubleshooting
Webhook returns 401 Unauthorized
Webhook returns 401 Unauthorized
Webhook received but application not refreshed
Webhook received but application not refreshed
Causes:
- Branch/tag mismatch in application
- Application using commit SHA instead of branch
- Manifest paths annotation doesn’t match changed files
Branch and tag name collision
Branch and tag name collision
Issue: Webhook handler doesn’t differentiate between branch
x and tag x.Impact: Push to branch x triggers refresh for apps pointing to refs/tags/x.Workaround: Use fully qualified references in applications:Payload too large error
Payload too large error
Solution: Increase payload size limit: