Current section
Files
Jump to
Current section
Files
README.md
<!--
SPDX-FileCopyrightText: © 2026 BaseLabs Holdings LLC
SPDX-License-Identifier: MIT
-->
[](https://github.com/baselabs/ash_hooks/actions/workflows/ci.yml)
[](https://hex.pm/packages/ash_hooks)
[](https://hexdocs.pm/ash_hooks)
[](https://api.reuse.software/info/github.com/baselabs/ash_hooks)
[](https://opensource.org/license/mit)
# AshHooks
AshHooks adds inbound and outbound webhooks to [Ash Framework](https://hexdocs.pm/ash) 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](https://www.standardwebhooks.com/) 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:
<!-- not-run: The installer changes the dependencies, formatter, and endpoint of the adopter's project. -->
```sh
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](documentation/tutorials/get-started.md#verify-and-handle-an-incoming-event),
pass the original body, request headers, and the ledger's required scope.
<!-- not-run: This call needs the registered ledger, provider, and a real signed request. -->
```elixir
AshHooks.Ingress.ingest(MyApp.WebhookLedger, :orders, raw_body, %{
headers: request_headers,
scope: %{account_id: account_id}
})
```
## Documentation
Tutorials ([Get started](documentation/tutorials/get-started.md) · [Livebook](documentation/livebooks/get-started.livemd)) · [Topics](documentation/topics/delivery/delivery-lifecycle.md) · [How-to](documentation/how-to/index.md) · [Reference](documentation/dsls/DSL-AshHooks.md)
See [Compatibility](documentation/topics/support/compatibility.md) for supported runtimes and dependencies.
## License
[MIT](https://opensource.org/license/mit).