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

# Webhooks

> Listen for real-time conversation and ticket events dispatched by Leadblanc.

Webhooks push real-time notifications to your servers whenever key events happen (e.g. a customer starts a chat, an agent needs human help, or a lead is captured).

## Event Types

| Event | Trigger |
| :- | :- |
| `conversation.started` | Customer opened a new chat thread. |
| `message.received` | Inbound customer message arrived. |
| `agent.escalated` | Agent requested human staff handover. |
| `lead.captured` | Customer provided verified contact details (email/phone). |
| `ticket.created` | New Helpdesk ticket logged. |
| `ticket.resolved` | Support ticket closed or marked solved. |

***

## Verifying Signatures

Every webhook POST includes a cryptographic signature in the `X-Leadblanc-Signature` header:

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

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


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