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

# Webhooks & HMAC Verification

> Receive real-time request updates and verify webhook signatures.

Instead of polling, configure a default HTTPS webhook URL in Project Settings or pass `webhook_uri` on an individual request.

## Event Types

| Event | When It Fires |
| - | - |
| `request.created` | A new request is created (via REST, Dashboard, or MCP). |
| `request.needs_input` | Aurora needs answers to a clarification form (`pending_form`). |
| `request.in_progress` | Business discovery and calling have started. |
| `request.call.created` | A call record is created for a target. |
| `request.call.updated` | A call changes status (`queued`, `scheduled`, `ringing`, `connected`, `completed`, `failed`). |
| `request.result.created` | A structured result is created for a contacted business. |
| `request.result.updated` | An existing business result is updated with new details or ranking. |
| `request.completed` | All calls finished and final results are ready. |
| `request.failed` | The request could not be completed. |
| `request.cancelled` | The request was cancelled. |

See the **Webhooks** section in the [API Reference](https://docs.live.sdk.aurorax.co/api-reference/introduction.md) for full payload schemas.

## Delivery Headers

Every webhook `POST` includes:

* `X-Aurora-Event` — Event name (for example, `request.call.created`).
* `X-Aurora-Delivery-Id` — Unique UUID per delivery (use this to deduplicate retries).
* `X-Aurora-Signature` — Signature formatted as `t=<unix_seconds>,v1=<hex_digest>`.

## Verifying Signatures

Compute `HMAC-SHA256(signing_secret, "{t}.{raw_body}")` over the exact raw request bytes and compare in constant time. Reject timestamps older than 5 minutes.

```python Python theme={null}
import hashlib
import hmac
import time


def verify_aurora_signature(
    secret: str,
    raw_body: bytes,
    signature_header: str,
    tolerance_seconds: int = 300,
) -> bool:
    parts = dict(item.split("=", 1) for item in signature_header.split(",") if "=" in item)
    ts = parts.get("t")
    sig = parts.get("v1")
    if not ts or not sig:
        return False
    if abs(int(time.time()) - int(ts)) > tolerance_seconds:
        return False
    signed_payload = f"{ts}.".encode("utf-8") + raw_body
    expected = hmac.new(secret.encode("utf-8"), signed_payload, hashlib.sha256).hexdigest()
    return hmac.compare_digest(expected, sig)
```

```typescript TypeScript theme={null}
import crypto from "node:crypto";

export function verifyAuroraSignature(
  secret: string,
  rawBody: Buffer,
  signatureHeader: string,
  toleranceSeconds = 300,
): boolean {
  const parts = Object.fromEntries(
    signatureHeader.split(",").map((kv) => kv.split("=", 2)),
  );
  const ts = Number(parts.t);
  const sig = parts.v1;
  if (!ts || !sig) return false;
  if (Math.abs(Math.floor(Date.now() / 1000) - ts) > toleranceSeconds) return false;

  const expected = crypto
    .createHmac("sha256", secret)
    .update(Buffer.concat([Buffer.from(`${ts}.`, "utf8"), rawBody]))
    .digest("hex");

  const a = Buffer.from(expected, "hex");
  const b = Buffer.from(sig, "hex");
  return a.length === b.length && crypto.timingSafeEqual(a, b);
}
```

> [!NOTE]
>
> Respond with any `2xx` status within 10 seconds. Failed deliveries retry automatically with exponential backoff. You can view delivery logs and rotate your signing secret in Project Settings.


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