Overview
Outbound webhooks allow you to trigger external services when deployment events occur. Use webhooks to:- Send notifications (Slack, Discord, email)
- Trigger CI/CD pipelines
- Invalidate external caches
- Update project management tools
- Run custom workflows
Setting Up Webhooks
1
Navigate to Settings
Go to App > Settings
2
Find Outbound Webhooks
Scroll down to the Outbound webhooks section
3
Add Webhook
Click Add new webhook to open the configuration modal
4
Configure Webhook
Fill out the webhook configuration form:
- Request URL
- HTTP method (GET/POST)
- Headers (optional)
- Payload (for POST)
- Trigger event
5
Save Webhook
Click Create outbound webhook to save
Webhook Events
Choose when your webhook should be triggered:After Each Successful Deployment
Triggered after every successful deployment. A successful deployment means your code has been built and deployed without errors. Timing: Occurs before status checks are run. Use cases:- Send success notifications
- Trigger cache purges
- Update deployment dashboards
After Each Failed Deployment
Triggered after every failed deployment. Timing: Occurs before status checks are run. Use cases:- Send error alerts
- Create incident tickets
- Notify on-call engineers
After a Deployment is Published
Triggered when a deployment is published to an environment. Timing: Occurs after status checks are run. Use cases:- Notify production releases
- Update release notes
- Trigger smoke tests
After a Cache Purge
Triggered when cache is purged. Cache purge occurs after:- A deployment is published
- Snippet operations
- Environment configuration updates
- Invalidate external CDN caches
- Update cache-dependent services
Webhook Variables
When using POST requests, you can include dynamic variables in your payload. Variables are replaced with actual values when the webhook is triggered.Webhook Examples
Send Email on Deployment Failure
Send an email notification when a deployment fails using Stormkit’s mailer API.Prerequisites
- Create an environment-level API key (Environment > Config > API Keys)
- Configure mailer for your environment
Configuration
Payload
Slack Notification
Send a Slack message when deployment succeeds.Configuration
Payload
Discord Notification
Send a Discord embed when deployment is published.Configuration
Payload
Cloudflare Cache Purge
Invalidate Cloudflare cache when deployment is published.Configuration
Payload
GitHub Deployment Status
Create a GitHub deployment status (requires GitHub App or token).Configuration
Payload
Custom API Endpoint
Trigger your own API endpoint with deployment data.Configuration
Payload
Best Practices
Security
- Use HTTPS endpoints only
- Store sensitive tokens in environment variables
- Rotate webhook secrets regularly
- Validate webhook signatures when possible
Reliability
- Handle webhook failures gracefully
- Implement retry logic on the receiving end
- Use idempotent operations
- Log webhook deliveries for debugging
Performance
- Keep webhook endpoints fast (< 5 seconds)
- Process webhooks asynchronously
- Avoid heavy processing in webhook handlers
- Use queues for long-running tasks
Debugging Webhooks
To test webhooks, use services like:- webhook.site - Inspect webhook payloads
- requestbin.com - Debug HTTP requests
- ngrok - Test local endpoints
Testing Example
1
Create Test Endpoint
Visit webhook.site and copy your unique URL
2
Configure Webhook
Create an outbound webhook with the webhook.site URL
3
Trigger Deployment
Deploy your application or trigger a test event
4
Inspect Payload
View the received webhook data on webhook.site
Webhook Delivery
Stormkit attempts to deliver webhooks with the following behavior:- Timeout: 30 seconds
- Retry: No automatic retries
- Status codes: 2xx considered successful
- Failures: Logged but do not block deployment
Related Documentation
Auto Deployments
Configure automatic deployments
Status Checks
Run automated tests after deployment
Mailer
Configure email sending
System Variables
Available environment variables