> ## Documentation Index
> Fetch the complete documentation index at: https://docs.quickreel.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Webhook Handling

> A webhook is a 'reverse HTTP request' that enables server-to-server communication. Quickreel sends HTTP POST requests to your application's server when events occur, allowing you to trigger actions in real-time.

### How Webhooks Work

Instead of waiting for API responses that might take several seconds, webhooks allow you to:

* Receive responses asynchronously
* Process large files efficiently
* Build event-driven architectures
* Scale your application without timeout concerns

### Common Use Cases

* Store responses in your database like projectId
* Chain multiple API processes

### Retry Policy

* Maximum 5 retry attempts
* 30-second delay between retries
* Fails after 5 unsuccessful attempts (non 2xx responses)
* Failed webhook data still accessible via `/projects/{projectId}`
* Email notification sent on final failure

### Implementation Example

```javascript theme={null}
const express = require("express");
const app = express();
app.use(express.json());

app.post("/hook", (req, res) => {
  try {
    const webhookData = req.body;

    // Process webhook data
    console.log("Received webhook:", webhookData);

    // Return success response
    res.status(200).json({ received: true });
  } catch (error) {
    console.error("Webhook processing failed:", error);
    res.status(500).json({ error: "Processing failed" });
  }
});

app.listen(3000);
```

<Note>
  If webhook delivery fails after 5 attempts, you can still retrieve your
  results by projectId. The projectId is returned in the initial API response.
  For more information on getting your projects by projectId, please refer to
  the [Get Projects](/getProject).
</Note>
