Skip to main content
OwnStak Docs Logo

Webhooks

Webhooks allow you to build integrations that receive real-time updates from Ownstak when certain events occur in your account.

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

  1. You configure a webhook in Ownstak Console to listen for specific events
  2. When that event occurs in your Ownstak account, we generate a webhook event
  3. Ownstak sends an HTTP request to your specified origin with event data
  4. Your server processes the webhook data and responds with a status code
  5. Ownstak records the delivery status and retries if necessary on non-2xx status codes

Common use cases

  1. Deployment notifications: Send alerts to your team's chat channels when deployments succeed or fail
  2. Automated testing: Trigger automated tests when a new deployment is created
  3. Update configuration: Update your CDN configuration when a new deployment has finished
  4. 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:

  1. Check the webhook events log to see delivery status and error details.
    1. Ownstak keeps the request logs for up to 7 days.
  2. Check that authentication headers are properly configured.

Troubleshooting webhook

For additional support, contact our support team.

Documentation sections

For detailed information about working with webhooks, refer to these guides: