AshHooks
AshHooks adds inbound and outbound webhooks to Ash Framework resources.
- Verify incoming signatures over the original request bytes before calling a handler.
- Deduplicate receipts with a database ledger that records handler outcomes and supports retry.
- Sign outgoing deliveries with Standard Webhooks and persist per-endpoint retry state.
- Read delivery and attempt history under your Ash domain's authorization policy.
Install
In an Ash application with Igniter, run:
mix igniter.install ash_hooks
Follow the tutorial setup for the Ash configuration required before compiling resources.
Receive a webhook
Use the ledger, provider, and migration from Get started.
The signed-order example
binds the original body as raw_body and the verification context as ctx.
Use those bindings to run the first ingest.
{:ok, :created, %{status: :processed}} =
AshHooks.Ingress.ingest(MyApp.WebhookLedger, :orders, raw_body, ctx)
Documentation
- Tutorials Get started and the guided Livebook.
- Topics Delivery lifecycle, Security guarantees, and Upgrading.
- How-to Integration guides.
- Reference DSL, modules, and tasks.
See Compatibility for supported runtimes and dependencies.
License
MIT.