What is a Webhook? - Definition & Meaning
A webhook is an HTTP callback that automatically sends data to a URL when an event occurs. Learn how webhooks work and when to use them.
Definition
A webhook is a mechanism where an application automatically sends an HTTP request to a pre-configured URL when a specific event occurs. Unlike an API where the client must actively poll, a webhook operates on a push-notification basis.
Technical Explanation
Webhooks typically send an HTTP POST request with a JSON payload to the registered endpoint URL. The payload contains details about the event, such as the type, a timestamp, and the relevant data. Security is implemented via HMAC signatures that allow the receiver to verify the request is authentic. Retry mechanisms ensure failed deliveries are retried with exponential backoff. Modern implementations support event filtering so only relevant events are sent. Idempotency keys prevent duplicate requests from causing unintended side effects.
How Refront Uses This
Refront uses webhooks to send real-time notifications to external systems. When a ticket is created, a payment is received, or an AI agent completes a task, Refront sends a webhook to configured endpoints. Clients use these webhooks to automatically update their own Slack channels, dashboards, or CRM systems.
Examples
- •When a ticket is resolved, Refront sends a webhook to Slack so the team receives a notification in their project channel.
- •A Stripe webhook notifies Refront that a payment succeeded, after which the invoice status is automatically updated.
- •GitHub sends a webhook on every push to the repository, causing Refront to automatically update related tickets.
Frequently Asked Questions
When should you use a webhook instead of an API?
Use a webhook when you need real-time notifications when events occur. Use an API when you want to decide when to retrieve data. Webhooks are more efficient than continuously polling an API.
How do you secure a webhook?
Webhooks are secured via HMAC signatures in the headers, allowing the receiver to verify the request originates from the expected source. Additionally, using HTTPS and applying IP whitelisting is recommended.
What happens when a webhook fails?
Reliable webhook systems implement retry mechanisms with exponential backoff. If the endpoint is unreachable, the request is resent after increasing intervals, typically up to a maximum number of attempts.
Ready to get started?
Try Refront for free and discover how AI automates your workflow.