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

# Webhooks

> Listen to real-time events for calls, recordings, and agent execution

# Webhooks Overview

Sayvy AI delivers event notifications directly to your server via HTTPS POST requests.

## Verifying Signatures

Every webhook payload includes an `X-Sayvy-Signature` header computed using HMAC SHA-256 with your webhook signing secret:

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

def verify_signature(payload_bytes, signature_header, secret):
    expected = hmac.new(
        secret.encode('utf-8'),
        payload_bytes,
        hashlib.sha256
    ).hexdigest()
    return hmac.compare_digest(f"sha256={expected}", signature_header)
```

## Common Event Types

| Event Name           | Trigger                                                           |
| :------------------- | :---------------------------------------------------------------- |
| `call.started`       | Call picked up by user. Audio streaming began.                    |
| `call.ended`         | Call ended. Includes total duration, cost, and disposition.       |
| `transcript.ready`   | Full conversation transcript and speech sentiment analysis ready. |
| `campaign.completed` | All contacts in a batch campaign have reached terminal state.     |
