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

# Webhooks

> Receive signed call lifecycle events.

In **Workers & Lines → Integration**, enter the webhook URL and select **Update**. For a changed URL, configure your receiver with the one-time signing secret, acknowledge setup, then select **Update** again to assign it to this line. Other lines and existing calls keep their original webhook. A saved URL does not verify delivery.

<h2 id="event-types">
  Event types
</h2>

| Event           | Fires when                                | Notes                                                                         |
| --------------- | ----------------------------------------- | ----------------------------------------------------------------------------- |
| `call.incoming` | An inbound call is detected               | Your response accepts or declines customer\_decides calls within five seconds |
| `call.started`  | The call is answered and media is bridged |                                                                               |
| `call.ended`    | A call ends                               | Includes duration and terminal\_reason                                        |
| `call.failed`   | A call cannot be completed                | Includes a named failure reason                                               |

<h2 id="signature">
  Signature verification
</h2>

Every delivery includes `X-Chert-Signature: sha256=<hex>`, the HMAC-SHA256 of the raw request body.

```javascript theme={null}
const expected = "sha256=" + crypto
  .createHmac("sha256", WEBHOOK_SECRET)
  .update(rawBody)
  .digest("hex");

if (!timingSafeEqual(expected, header)) reject();
```

<h2 id="delivery">
  Delivery semantics
</h2>

* Delivery is at least once; deduplicate on `event_id`.
* Timestamps are ISO-8601 UTC.
* Non-2xx responses retry with backoff.
* `call.incoming` does not retry past its decision deadline and fails closed.
