What are webhooks?
Webhooks are automated messages sent from Ownstak to your application when specific events happen in your Ownstak account. Instead of your application continuously polling our API for changes, webhooks push data to your application as soon as events occur, enabling you to:
- Keep external systems in sync with your Ownstak data
- Trigger automated workflows based on Ownstak events
- Build custom integrations with your internal tools and third-party services
Requirements
- Your origin must be publicly accessible
- Your origin must be idempotent, meaning it should be able to handle repeated requests without causing unintended side effects.
- Your origin must be able to process requests within the timeout period (5 seconds)
- Your origin must respond with a 2xx status code on successful delivery
Webhook flow
- You configure a webhook in Ownstak Console to listen for specific events
- When that event occurs in your Ownstak account, we generate a webhook event
- Ownstak sends an HTTP request to your specified origin with event data
- Your server processes the webhook data and responds with a status code
- Ownstak records the delivery status and retries if necessary on non-2xx status codes
Common use cases
- Deployment notifications: Send alerts to your team's chat channels when deployments succeed or fail
- Automated testing: Trigger automated tests when a new deployment is created
- Update configuration: Update your CDN configuration when a new deployment has finished
- Purge cache: Purge your CDN cache when a new deployment has finished
Best practices
- Implement proper error handling for your webhook endpoint
- Process webhook events asynchronously
- Return a 2xx status code quickly to acknowledge receipt
Troubleshooting
If you're experiencing issues with webhooks:
- Check the webhook events log to see delivery status and error details.
- Ownstak keeps the request logs for up to 7 days.
- Check that authentication headers are properly configured.
For additional support, contact our support team.
Documentation sections
For detailed information about working with webhooks, refer to these guides:
- Configuration - Set up and manage your webhooks
- Request Headers - Learn about custom headers and security
- Events - Available event types and payload structures