> ## Documentation Index
> Fetch the complete documentation index at: https://docs.loongclaw.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Webhook

> Configure the Webhook channel surface in Loong.

# Webhook

This is a shipped standalone native-serve surface: outbound POST delivery is implemented, the signed inbound webhook service is implemented, and the runtime stays on `channels serve webhook` instead of gateway supervision today.

## At A Glance

| Field                    | Value             |
| ------------------------ | ----------------- |
| Catalog id               | `webhook`         |
| Config key               | `webhook`         |
| Implementation status    | `runtime_backed`  |
| Transport                | `generic_webhook` |
| Aliases                  | `http-webhook`    |
| Default send target kind | `endpoint`        |

## Minimal Config

```toml theme={null}
[webhook]
enabled = true
payload_format = "json_text"
payload_text_field = "text"
endpoint_url_env = "WEBHOOK_ENDPOINT_URL"
signing_secret_env = "WEBHOOK_SIGNING_SECRET"
```

## Smoke Test

```bash theme={null}
loong channels send webhook --text "hello from loong"
loong channels serve webhook --bind 127.0.0.1:7401
```

## Command Surface

| Operation               | Command                  | Usage or status                                                           |
| ----------------------- | ------------------------ | ------------------------------------------------------------------------- |
| http post send          | `channels send webhook`  | Usage: loong channels send webhook \[OPTIONS] --text \<TEXT>              |
| inbound webhook service | `channels serve webhook` | Usage: loong channels serve webhook --bind \<HOST:PORT> \[--path \<PATH>] |

## Required Fields For Send

| Requirement     | Config paths                                                          | Env pointer paths                                                             | Default env            |
| --------------- | --------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ---------------------- |
| channel enabled | `webhook.enabled`<br />`webhook.accounts.<account>.enabled`           | none                                                                          | none                   |
| endpoint url    | `webhook.endpoint_url`<br />`webhook.accounts.<account>.endpoint_url` | `webhook.endpoint_url_env`<br />`webhook.accounts.<account>.endpoint_url_env` | `WEBHOOK_ENDPOINT_URL` |

## Required Fields For Serve

| Requirement     | Config paths                                                              | Env pointer paths                                                                 | Default env              |
| --------------- | ------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | ------------------------ |
| channel enabled | `webhook.enabled`<br />`webhook.accounts.<account>.enabled`               | none                                                                              | none                     |
| signing secret  | `webhook.signing_secret`<br />`webhook.accounts.<account>.signing_secret` | `webhook.signing_secret_env`<br />`webhook.accounts.<account>.signing_secret_env` | `WEBHOOK_SIGNING_SECRET` |

## Gateway And Ownership

This surface ships a real built-in inbound service, but it remains a standalone native-serve lane today. Use `channels serve webhook` directly; it does not join `gateway run` or the gateway-owned reply-loop contract yet.

## Operator Notes

* `channels serve webhook` requires `--bind` because the local listener address stays operator-owned instead of coming from static config.
* Use `[outbound_http] allow_private_hosts = true` when you intentionally post to a loopback or private bridge endpoint.
* Treat this as a native serve lane, not as an outbound-only sink.

## Related Docs

* Continue to [Channel Guides](/use-loong/channel-guides/index) for the full shipped channel matrix.
* Continue to [Channels](/use-loong/channels) for the conceptual surface model.
* Continue to [Channel Setup](/use-loong/channel-setup) for the shared public setup contract.
