> For the complete documentation index, see [llms.txt](https://docs.layerlens.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.layerlens.ai/more-in-this-section-9/webhooks-1.md).

# Webhooks

Stratix webhooks — receive events at your endpoint.

Stratix posts JSON events to your endpoint when subscribed.

## Subscribe via SDK

```python
client.notifications.add_webhook(
 url="https://hooks.example.com/stratix",
 events=["evaluation.completed", "trace_evaluation.threshold_crossed"],
 secret="your-shared-secret"
)
```

## Verify signatures

Each event includes an `X-Stratix-Signature` header (HMAC-SHA256 of body using your secret).

```python
import hmac, hashlib
expected = hmac.new(secret.encode(), body, hashlib.sha256).hexdigest()
assert expected == request.headers["X-Stratix-Signature"]
```

## See also

* [Notifications](/more-in-this-section-9/notifications-1.md)
* [REST API](/13.1-sdk-and-apis/api.md)
