# Webhooks The `webhooks` extension accepts signed deliveries for a persistent session. Its [extension registration](../src/albedo/harness/extensions/webhooks/extension.gleam) connects the service, storage, transfer adapter, and Python binding. See also [Discord](discord.md), which delivers another kind of external event. ## Setup [`webhook_intake.gleam`](../src/albedo/daemon/webhook_intake.gleam) constructs the intake path and, when a port is published, a loopback delivery URL. A hook has a secret, an enabled flag, a signature header, and a prefix. [`ledger.gleam`](../src/albedo/harness/extensions/webhooks/ledger.gleam) defaults the header to `x-albedo-signature` and the prefix to `sha256=`. The [terminal client](tui.md) and [web client](web.md) provide management pages. ## Delivery [`accept`](../src/albedo/harness/extensions/webhooks/ledger.gleam) checks the signature and rejects bodies over 64 KiB. The ledger stores an accepted delivery and its inbox letter together. The letter contains a bounded preview. `webhooks.delivery(id)` reads the stored payload for the session. The [service](../src/albedo/harness/extensions/webhooks/service.gleam) returns a delivery ID for an accepted request and reports invalid signatures as an error. Delivery can fail, including when the inbox cannot accept the letter. A received payload is external data, not an instruction. The extension explicitly includes that boundary in its model instructions. ## Management [`webhooks.py`](../priv/python/albedo_plugins/webhooks.py) exposes `list`, `delivery`, `create`, `rotate`, `configure`, `enable`, `disable`, and `delete`. Management requires a human to enable agent management for the session. Reading a delivery does not require that permission. Changes to existing hooks take a revision. The [RPC handler](../src/albedo/harness/extensions/webhooks/rpc.gleam) enforces the session and permission checks. ## Related pages - [All topics](README.md) - [Change guidance](contributing.md) - [Discord](discord.md) - [Durable operation admission](operations.md)