Skip to content

webhook

diapason.channels.webhook

WebhookChannel — generic outbound webhook adapter (zero extra deps).

WebhookChannel

Bases: BaseChannel

Generic outbound webhook channel (send-only).

Parameters

url: Target webhook URL. secret: Optional shared secret sent in the X-Webhook-Secret header. method: HTTP method (default POST). bus: Optional event bus for publishing channel events.

connect()

Mark as connected (send-only — no persistent connection).

disconnect()

Mark as disconnected.

list_channels()

Return available channel identifiers.

on_message(handler)

Register a callback for incoming messages (no-op for webhook).

send(channel, content, *, conversation_id='', metadata=None)

POST a JSON payload to the configured webhook URL.

status()

Return the current connection status.