# `Chime.Channels.Webhook`
[🔗](https://github.com/hattoriai/chime/blob/v0.1.0-dev/lib/chime/channels/webhook.ex#L1)

A webhook: the notification as JSON, signed, posted to an address of
the app's or the person's.

    channels: [webhook: {Chime.Channels.Webhook, to: "https://hooks.myapp.com/chime", secret: System.fetch_env!("CHIME_WEBHOOK_SECRET")}]

The address is one for everyone (`to:`), or each person's in their data
(`data.webhook`). The body:

    {
      "id": "<the delivery's notification>",
      "kind": "new_comment", "category": "comments", "workspace": null,
      "recipient": "user:42",
      "title": "...", "body": "...", "url": "<the link that reads it>",
      "data": {...}, "count": 1, "actors": [...],
      "at": "2026-10-25T14:02:11Z"
    }

With `:secret`, the `x-chime-signature` header is `t=<unix time>,v1=<the
HMAC-SHA256, in hex, of "<t>.<body>">`: the receiver checks it, and that
the time is recent. A 4xx is skipped; a 5xx or no answer is tried again.
Options: `:to`, `:secret`, `:req_options`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
