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

# Retries & Replies

> Acknowledging webhooks and what happens when delivery fails

## Responding to Webhooks

Your endpoint should return a **2xx** status code to acknowledge receipt. If Tidyhire does not receive a successful response, the delivery is considered failed.

```javascript Express example theme={null} theme={null}
app.post('/webhooks/tidyhire', (req, res) => {
  // Respond immediately, process asynchronously
  res.sendStatus(200);

  const { event, data } = req.body;
  if (event === 'call.ended') {
    // Process in a background job
    processCallEnded(data);
  }
});
```

## Retries

If a delivery fails (non-2xx response, timeout, or connection error), Tidyhire retries the event until it is acknowledged. Retries use backoff — the delay between attempts grows with each failure.

<Warning>
  Make sure your handler is idempotent. A retried event is identical to the original — do not double-process it. Use the event's candidate/job identifiers to upsert rather than insert when writing results back to your system.
</Warning>

## Ordering

Webhook deliveries are not guaranteed to arrive in order. If your workflow needs ordering (e.g. call started → call ended), use the timestamps and status transitions in the payload to sort events on your side.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.