Skip to main content
The webhook system builds on top of the EventBus to send HTTP POST requests with JSON payloads to external endpoints when pipeline events occur. Webhook deliveries happen in background threads and never block the approval pipeline. Zero external dependencies — uses urllib.request from stdlib.

WebhookConfig

Configuration for a single webhook endpoint.

Import

Constructor

Parameters

Signature Verification

When secret is set, every webhook request includes an X-Attesta-Signature header containing an HMAC-SHA256 signature of the request body:
To verify on the receiving end:

WebhookDispatcher

Subscribes to an EventBus and dispatches HTTP webhooks in background threads. Deliveries are fire-and-forget — they never block the approval pipeline.

Import

Constructor

The dispatcher automatically subscribes to the relevant event types based on the configs. No additional setup is needed after construction.

Webhook Payload

Every webhook POST request sends a JSON body with this structure:

Full Example

Webhook deliveries run in daemon threads. If the main process exits before a delivery completes, the webhook may not be sent. For critical notifications, consider increasing the timeout and retry_count values.

Events

The EventBus system that powers webhooks

Production Deployment

Recommended webhook configuration for production