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
Before compiling resources, set config :ash, default_string_length_count: :codepoints
in your application's config/config.exs.
Receive a webhook
With the ledger and provider from Get started, pass the original body, request headers, and the ledger's required scope.
AshHooks.Ingress.ingest(MyApp.WebhookLedger, :orders, raw_body, %{
headers: request_headers,
scope: %{account_id: account_id}
})
Documentation
Tutorials (Get started · Livebook) · Topics · How-to · Reference
See Compatibility for supported runtimes and dependencies.
License
MIT.