### Install and start the service Source: https://webhookrelay.com/docs/installation/autostart-windows Run this command to install and start the Webhook Relay service using the configuration file. ```powershell relay service install -c 'C:\ProgramData\WebhookRelay\config.txt' ``` -------------------------------- ### Install ws library Source: https://webhookrelay.com/docs/tutorials/edge/javascript-app Installs the ws WebSocket library via npm, which is required for the client example. ```bash npm i ws ``` -------------------------------- ### Set up Webhook Relay with relay CLI Source: https://webhookrelay.com/docs/webhooks/internal/localhost Explicit setup for servers and config-as-code: create a bucket, a public input, a named output, and start forwarding. Each output must be named; a second unnamed output in the same bucket fails to create. ```bash relay bucket create my-app relay input create --bucket my-app "public endpoint" relay output create local-app --bucket my-app --destination http://localhost:3000/webhooks relay forward -b my-app ``` -------------------------------- ### Install and start Webhook Relay agent service Source: https://webhookrelay.com/docs/tutorials/cicd/jenkins-github Install and start the Webhook Relay agent as a background service using the configuration file. ```bash relay service install -c /opt/config/webhookrelay/relay.yaml relay service start ``` -------------------------------- ### Install relay service with credentials Source: https://webhookrelay.com/docs/installation/autostart-linux Installs the Webhook Relay service while specifying the key and secret during installation. ```bash sudo relay service \ install -c /etc/webhookrelay/config.yaml \ --key [YOUR KEY] \ --secret [YOUR SECRET] ``` -------------------------------- ### Run the example application Source: https://webhookrelay.com/docs/webhooks/websocket-server Execute the example app with Node.js. After running, webhooks sent to the public endpoint will be received by the application. ```bash node app.js ``` -------------------------------- ### Install relay client Source: https://webhookrelay.com/docs/installation/autostart-macos Downloads and installs the Webhook Relay CLI using the provided script. ```bash curl https://my.webhookrelay.com/webhookrelay/downloads/install-cli.sh | bash ``` -------------------------------- ### Install service with log output Source: https://webhookrelay.com/docs/installation/autostart-windows Use this command to install the service with log output redirected to a file, useful for troubleshooting. ```powershell relay service install -c C:\ProgramData\WebhookRelay\config.txt --logs-output C:\ProgramData\WebhookRelay\relay.log ``` -------------------------------- ### Start the NextJS dev server Source: https://webhookrelay.com/docs/tunnels/demoing-your-website Navigate into the project directory and start the development server. The server runs on http://localhost:3000. ```bash cd nextjs-blog npm run dev ``` -------------------------------- ### Install relay service Source: https://webhookrelay.com/docs/installation/autostart-macos Installs the Webhook Relay service with the specified configuration file and user. ```bash relay service install -c /etc/webhookrelay/config.yaml -u your-user ``` -------------------------------- ### Download and install relay client Source: https://webhookrelay.com/docs/installation/autostart-windows Run this PowerShell command to download and install the Webhook Relay CLI. ```powershell iwr https://my.webhookrelay.com/webhookrelay/downloads/install-cli.ps1 -useb | iex ``` -------------------------------- ### Install relay service Source: https://webhookrelay.com/docs/installation/autostart-linux Installs the Webhook Relay service using sudo and providing the full path to the configuration file. ```bash sudo relay service install -c /etc/webhookrelay/config.yaml ``` -------------------------------- ### Install all Webhook Relay skills Source: https://webhookrelay.com/docs/skills-cli Installs all Webhook Relay skills from the webhookrelay/skills repository into the current project's skills directory. ```bash npx skills add webhookrelay/skills ``` -------------------------------- ### Install Webhook Relay skills globally Source: https://webhookrelay.com/docs/skills-cli Installs all Webhook Relay skills globally so every agent on the machine can use them. ```bash npx skills add webhookrelay/skills -g ``` -------------------------------- ### Install Webhook Relay skill with openclaw Source: https://webhookrelay.com/docs/clawhub Use this command to install the Webhook Relay skill from ClawHub. After installation, the agent automatically picks up the skill and can drive the relay CLI and bin API. ```bash openclaw skills install webhook-relay ``` -------------------------------- ### Install Webhook Relay CLI Source: https://webhookrelay.com/docs/webhooks/internal/localhost Install the Webhook Relay CLI on macOS/Linux with curl and on Windows PowerShell with iwr. The commands download and execute the official installation scripts. ```bash curl https://my.webhookrelay.com/webhookrelay/downloads/install-cli.sh | bash ``` ```powershell iwr https://my.webhookrelay.com/webhookrelay/downloads/install-cli.ps1 -useb | iex ``` -------------------------------- ### Install webhookrelay-ws-client via npm Source: https://webhookrelay.com/docs/webhooks/websocket-server Install the Webhook Relay JavaScript SDK from npm. The library can only subscribe to buckets; it cannot create, update, or delete them. ```bash npm i webhookrelay-ws-client ``` -------------------------------- ### Example application using WebhookRelayClient Source: https://webhookrelay.com/docs/webhooks/websocket-server Complete example app that reads RELAY_KEY and RELAY_SECRET from environment, subscribes to the 'nodered' bucket, connects, and disconnects after 10 seconds. The handler logs incoming webhook data. ```javascript // app.js var ws = require(`webhookrelay-ws-client`); var apiKey = process.env.RELAY_KEY; var apiSecret = process.env.RELAY_SECRET; var handler = function (data) { console.log(data) } var run = function () { var client = new ws.WebhookRelayClient(apiKey, apiSecret, ['nodered'], handler) client.connect(); // do some work // disconnect whenever connection is no longer needed setTimeout(function(){ console.log('disconnecting') client.disconnect(); }, 10000); } run(); ``` -------------------------------- ### Run the JavaScript client Source: https://webhookrelay.com/docs/tutorials/edge/javascript-app Starts the client application with node directly. ```bash node client.js ``` -------------------------------- ### Start Docker Compose Source: https://webhookrelay.com/docs/installation/docker-compose Command to start the Docker Compose services in detached mode. ```bash docker-compose up -d ``` -------------------------------- ### Set environment variables for example app Source: https://webhookrelay.com/docs/webhooks/websocket-server Export the token key and secret as environment variables RELAY_KEY and RELAY_SECRET. These are used by the example application to authenticate. ```bash export RELAY_KEY=[YOUR TOKEN KEY] export RELAY_SECRET=[YOUR TOKEN SECRET] ``` -------------------------------- ### Install a single Webhook Relay skill with --skill Source: https://webhookrelay.com/docs/skills-cli Installs only the webhook-debug skill from the Webhook Relay skills repository. This skill requires nothing but curl. ```bash npx skills add webhookrelay/skills --skill webhook-debug ``` -------------------------------- ### Bucket scopes examples Source: https://webhookrelay.com/docs/account/access-tokens Shows example bucket scopes: a specific bucket name, a wildcard pattern, and a bucket ID. These are used to restrict which buckets a token can subscribe to. ```text payments-prod payments-* f71b350b-92de-4c66-a249-b4c543fc50cb ``` -------------------------------- ### Example input and output for the enrichment function Source: https://webhookrelay.com/docs/tutorials/transform/enrich-webhooks Example input webhook and the corresponding output after the function runs. The input specifies a pet and quantity; the output shows the enriched message with the total price calculated from the API data. ```json { "pet": "cat", "quantity": 3 } ``` ```json { "action": "purchased", "message": "Purchased pet: cat | quantity: 3 | total:150" } ``` -------------------------------- ### Try it with Docker: Clone and run the plugin demo Source: https://webhookrelay.com/docs/tutorials/cicd/jenkins-plugin Commands to clone the plugin repository, build it, and start the demo Jenkins instance with Docker Compose. The demo runs on http://localhost:8095. ```text git clone https://github.com/jenkinsci/webhook-relay-plugin cd webhook-relay-plugin mvn -q clean package docker compose -f demo/docker-compose.yml up --build # Jenkins on http://localhost:8095 ``` -------------------------------- ### Create a NextJS app with npx create-next-app Source: https://webhookrelay.com/docs/tunnels/demoing-your-website Run this command to create a new NextJS app using the learn-starter template. It uses npm and the specified example repository. ```bash npx create-next-app@latest \ nextjs-blog \ --use-npm \ --example "https://github.com/vercel/next-learn/tree/main/basics/learn-starter" ``` -------------------------------- ### Install Atlantis Helm chart with configuration Source: https://webhookrelay.com/docs/tutorials/cicd/terraform-atlantis Installs the Atlantis Helm chart version 3.12.2 with required settings for GitHub user, token, secret, service type, ingress, and organization whitelist. Replace the placeholder values with your own. ```bash helm upgrade --install atlantis stable/atlantis --version 3.12.2 \ --set=github.user=rusenask \ --set=github.token=XXX \ --set=github.secret=very-secret \ --set=service.type=ClusterIP \ --set=ingress.enabled=false \ --set=orgWhitelist="github.com/webhookrelay/*" ``` -------------------------------- ### Example output from running client.js Source: https://webhookrelay.com/docs/tutorials/edge/javascript-app Shows the expected console output after sending a webhook to the public input endpoint, including authentication, subscription, and webhook message details. ```bash $ node client.js {"type":"status","status":"authenticated","message":"connected successfully, subscribe to buckets"} {"type":"status","status":"subscribed","message":"subscribed to buckets: 123"} {"type":"webhook","meta":{"bucked_id":"89e44c32-27ff-4832-8655-8a42d3851b6f","bucket_name":"123","input_id":"ee4ac550-12a4-41a7-837d-dd3356ed1771","input_name":"Default public endpoint"},"headers":{"Content-Length":["15"],"User-Agent":["insomnia/6.0.2"],"Cookie":["__cfduid=dc244a014f0b1e2965544ddb483c3fe1b1525866866"],"Content-Type":["application/json"],"Accept":["*/*"]},"query":"","body":"{\"hi\": \"there\"}","method":"PUT"} ``` -------------------------------- ### Function deciding based on bucket name (JavaScript) Source: https://webhookrelay.com/docs/webhooks/functions/accessing-metadata Example JavaScipt function that checks the bucket name metadata and makes an HTTP GET request to different endpoints depending on the bucket. ```javascript const bucketName = r.metadata["bucket_name"] if (bucketName === "first-bucket") { // do something const response = http.request("GET", "https://company-a.com") // exit from function return } if (bucketName === "second-bucket") { // do something const response = http.request("GET", "https://company-b.com") // exit from function return } ``` -------------------------------- ### Forwarding configuration output Source: https://webhookrelay.com/docs/tutorials/cicd/jenkins-github Example output showing the public endpoint created by the relay forward command. ```text ... Forwarding configuration created: https://vlndyzsibcil98gdte7yp1.hooks.webhookrelay.com -> http://localhost:8080/github-webhook/ ``` -------------------------------- ### Install Webhook Relay operator with Helm Source: https://webhookrelay.com/docs/installation/kubernetes Installs or upgrades the Webhook Relay operator in the default namespace, passing the credentials from the environment variables. ```bash helm upgrade --install webhookrelay-operator --namespace=default webhookrelay/webhookrelay-operator \ --set credentials.key=$RELAY_KEY --set credentials.secret=$RELAY_SECRET ``` -------------------------------- ### Install Webhook Relay Operator with Helm Source: https://webhookrelay.com/docs/tutorials/cicd/kubernetes-operator Add the Webhook Relay Helm repository and install the operator in the jenkins namespace using the credentials set as environment variables. ```bash helm repo add webhookrelay https://charts.webhookrelay.com helm repo update helm upgrade --install webhookrelay-operator --namespace=jenkins webhookrelay/webhookrelay-operator \ --set credentials.key=$RELAY_KEY --set credentials.secret=$RELAY_SECRET ``` -------------------------------- ### Tunnel scopes examples Source: https://webhookrelay.com/docs/account/access-tokens Shows example tunnel scopes: a tunnel name, a wildcard pattern, and a hostname. These restrict which tunnels a token can subscribe to. ```text customer-demo production-* demo.example.com ``` -------------------------------- ### Download binaries directly Source: https://webhookrelay.com/docs/installation/cli Direct URLs for downloading the WebhookRelay CLI binaries for various platforms and architectures, bypassing the installation script. ```bash # Linux x86-64 (64-bit) https://storage.googleapis.com/webhookrelay/downloads/relay-linux-amd64 # Linux x86 (32-bit) https://storage.googleapis.com/webhookrelay/downloads/relay-linux-386 # Linux aarch (64-bit) https://storage.googleapis.com/webhookrelay/downloads/relay-linux-aarch64 # Linux arm (32-bit) https://storage.googleapis.com/webhookrelay/downloads/relay-linux-arm # Windows (64-bit) https://storage.googleapis.com/webhookrelay/downloads/relay-windows-amd64.exe # Windows (32-bit) https://storage.googleapis.com/webhookrelay/downloads/relay-windows-386.exe ``` -------------------------------- ### Create forwarding configuration Source: https://webhookrelay.com/docs/tutorials/cicd/jenkins-github Creates a forwarding configuration for the github-jenkins bucket to localhost:8080/github-webhook/ without starting the agent. ```bash relay forward --bucket github-jenkins http://localhost:8080/github-webhook/ --no-agent ``` -------------------------------- ### View agent logs Source: https://webhookrelay.com/docs/tutorials/cicd/jenkins-github Shows the command to view Docker logs for the webhookrelayd container and example output indicating readiness. ```bash docker logs webhookrelayd 2020-06-25 21:36:24.354 INFO using standard transport... 2020-06-25 21:36:24.474 INFO webhook relay ready... {"host": "my.webhookrelay.com:8080", "buckets": ["github-jenkins"]} ``` -------------------------------- ### Start Webhook Relay Agent for Bitbucket-Jenkins Forwarding Source: https://webhookrelay.com/docs/tutorials/cicd/jenkins-bitbucket Use these commands to log in to Webhook Relay and start forwarding webhooks from your bucket to your local Jenkins instance. Replace the token key, token secret, and bucket name with your own credentials. The forwarding target is the Jenkins Bitbucket hook endpoint at localhost:8080. ```bash relay login -k your-token-key -s your-token-secret relay forward -b your-bucket-name http://localhost:8080/bitbucket-hook/ ``` -------------------------------- ### Example response from /v1/events Source: https://webhookrelay.com/docs/webhooks/polling-webhooks This is the example response from the /v1/events endpoint. It shows a single webhook log entry with fields like id, created_at, status, and body. The has_more field indicates whether more webhooks are waiting. When the queue is empty, the response is { "logs": [], "has_more": false }. ```json { "logs": [ { "id": "9b31d6dc-6d14-4f83-90cb-0b402c02e3cc", "created_at": 1717243200, "updated_at": 1717243200, "bucket_id": "2cf96f7f-7a83-47f7-84d2-f5692e6f68c0", "input_id": "09a0a807-3f3f-4b66-af3b-f6f79e4f4d36", "output_id": "7df32a66-6465-4677-bf5c-f2cf9b8ffdb5", "status": "received", "method": "POST", "headers": { "Content-Type": ["application/json"] }, "raw_query": "source=stripe", "extra_path": "/checkout", "body": "{\"type\":\"checkout.session.completed\"}", "ip_address": "203.0.113.10" } ], "has_more": false } ``` -------------------------------- ### relay email create Source: https://webhookrelay.com/docs/email/cli Documentation for the `relay email create` CLI command, including its flags, usage examples, and JSON output format. ```APIDOC ## relay email create ### Description Creates a new inbound email address. Without arguments, it provisions a throwaway bucket and prints a ready-to-use address. With `--bucket`, it attaches the address to an existing bucket. Supports sender allowlisting, attachment dropping, naming, and JSON output. ### Method CLI command ### Command `relay email create` ### Parameters #### Flags - `-b, --bucket ` (string) - Optional - Bucket to attach the address to. A throwaway bucket is created if omitted. - `--name ` (string) - Optional - Friendly name for the email input. - `--filter-from ` (string) - Optional - Only accept mail from this sender (repeatable; exact, case-insensitive match). - `--no-attachments` (boolean) - Optional - Drop attachments instead of storing them. - `--json` (boolean) - Optional - Output the created address as JSON. ### Request Example ``` relay email create --bucket signups --name stripe-receipts --filter-from noreply@stripe.com --json ``` ### Response #### Success Response - `email_address` (string) - The created email address. - `input_id` (string) - The input ID. - `bucket_id` (string) - The bucket ID. - `bucket_name` (string) - The bucket name. - `allowed_senders` (array of strings) - List of allowed senders. #### Response Example ```json { "email_address": "15a51b42-7de4-42ff-8628-4645565fa8b1@in.webhookrelay-mail.com", "input_id": "15a51b42-7de4-42ff-8628-4645565fa8b1", "bucket_id": "9bf342ce-9582-42ea-8662-ac73d60e2db6", "bucket_name": "signups", "allowed_senders": ["noreply@stripe.com"] } ``` ``` -------------------------------- ### Install and enable Webhook Relay plugin for Hermes Agent Source: https://webhookrelay.com/docs/clawhub These commands install and enable the open-source Webhook Relay plugin for Hermes Agent from GitHub. The plugin provides a stable public webhook URL for a self-hosted Hermes gateway while keeping it private, and adds durable retries, signature verification, deduplication, and backpressure. ```bash hermes plugins install webhookrelay/hermes-webhookrelay hermes plugins enable webhookrelay ``` -------------------------------- ### Forward webhooks: .env file Source: https://webhookrelay.com/docs/installation/docker-compose Environment file for the forwarding setup. It defines the access token key and secret, and the bucket name (my-bucket) to subscribe to. ```dotenv RELAY_KEY="your-access-token-key" RELAY_SECRET="your-access-token-secret" BUCKETS=my-bucket ``` -------------------------------- ### Script with relay events --json, --body, and -q Source: https://webhookrelay.com/docs/email/cli Scripting examples using --json, --body, and -q. --json emits full event objects; --body emits parsed-email JSON one per line; -q outputs only event IDs. ```shell # Extract sender + subject of each email relay events --bucket signups --json | jq '.[].body | fromjson | {from, subject}' # Stream raw parsed emails relay events --bucket signups --body # Only the event IDs (e.g. to feed into `relay inspect`) relay events --bucket signups -q ``` -------------------------------- ### Open a tunnel: .env file Source: https://webhookrelay.com/docs/installation/docker-compose Environment file for the tunnel setup. It defines the access token key and secret, and the tunnel name (your-tunnel). ```dotenv RELAY_KEY="your-access-token-key" RELAY_SECRET="your-access-token-secret" TUNNELS=your-tunnel ``` -------------------------------- ### Test webhook forwarding with relay forward and curl Source: https://webhookrelay.com/docs/webhooks/internal/localhost Run three commands in separate terminals to test webhook forwarding: start a local HTTP server, forward the bucket to it, and simulate a provider POST. The request appears in the agent's log and on the local server. ```bash # terminal 1: a throwaway server that prints what it receives python3 -m http.server 3000 # terminal 2: forward to it relay forward -b my-app http://localhost:3000 # terminal 3: simulate the provider hitting the public URL curl -X POST https://my.webhookrelay.com/v1/webhooks/ -d '{"hello":"world"}' ``` -------------------------------- ### Verify Atlantis pods are running Source: https://webhookrelay.com/docs/tutorials/cicd/terraform-atlantis Checks the status of the Atlantis pod to confirm the installation is running. The expected output shows the pod 'atlantis-0' in Running state. ```bash kubectl get pods NAME READY STATUS RESTARTS AGE atlantis-0 1/1 Running 0 95s ``` -------------------------------- ### Specify query, headers, and timeout (Lua) Source: https://webhookrelay.com/docs/webhooks/functions/make-http-request Makes a GET request with query, timeout, and headers options. Parses the JSON response body. ```lua -- importing HTTP package local http = require("http") -- specifying headers local headers = {} headers["Authorization"] = "Basic " .. "123456" -- making HTTP call response, err = http.request("GET", "https://example.com", { query="page=1", timeout="5s", headers={ Accept="*/*" } }) if err then error(err) end -- parsing response body from the API local api_response, err = json.decode(response.body) if err then error(err) end ``` -------------------------------- ### Run Webhook Relay agent container Source: https://webhookrelay.com/docs/tutorials/cicd/jenkins-github Starts the Webhook Relay agent as a Docker container with restart always and host network, using the exported environment variables. ```bash docker run -d --restart always \ --name webhookrelayd \ --network host \ --env RELAY_KEY=$RELAY_KEY \ --env BUCKETS=$BUCKETS \ --env RELAY_SECRET=$RELAY_SECRET webhookrelay/webhookrelayd ``` -------------------------------- ### Create Kubernetes namespace for Atlantis Source: https://webhookrelay.com/docs/tutorials/cicd/terraform-atlantis Creates a new Kubernetes namespace named 'atlantis' to isolate the Atlantis installation. ```bash kubectl create ns atlantis ``` -------------------------------- ### Add repository as Claude Code plugin marketplace Source: https://webhookrelay.com/docs/skills Adds the repository as a Claude Code plugin marketplace and installs the webhookrelay-skills plugin. ```text /plugin marketplace add webhookrelay/skills /plugin install webhookrelay-skills ``` -------------------------------- ### Port forward to Jenkins Source: https://webhookrelay.com/docs/tutorials/cicd/kubernetes-operator Start port forwarding to access the Jenkins dashboard locally. After running this, open http://localhost:8080 in your browser. ```bash kubectl port-forward jenkins-jenkins 8080:8080 ``` -------------------------------- ### Durability configuration JSON Source: https://webhookrelay.com/docs/webhooks/durable-webhooks Example of the durability configuration block as stored on the output and visible through the API. Shows the enabled flag, schedule, and handoff_after fields. ```json { "name": "my-destination", "destination": "https://api.example.com/webhooks", "durability": { "enabled": true, "schedule": "medium", "handoff_after": 900000000000 } } ``` -------------------------------- ### http.get(url, options) Source: https://webhookrelay.com/docs/webhooks/functions/make-http-request Sends an HTTP GET request to the specified URL. Returns an http.response object or an error. ```APIDOC ## http.get(url, options) ### Description Sends an HTTP GET request to the specified URL. ### Method GET ### Endpoint (url) ### Parameters #### Path Parameters - **url** (String) - Required - URL of the resource to load #### Query Parameters - **query** (String) - Optional - URL encoded query params #### Request Headers - **cookies** (Table) - Optional - Additional cookies to send with the request - **headers** (Table) - Optional - Additional headers to send with the request ### Returns [http.response](#http-response) or (nil, error message) ``` -------------------------------- ### Function deciding based on bucket name (Lua) Source: https://webhookrelay.com/docs/webhooks/functions/accessing-metadata Example Lua function that checks the bucket name metadata and makes an HTTP GET request to different endpoints depending on the bucket. ```lua local http = require("http") local bucket_name = r.Metadata["bucket_name"] if bucket_name == "first-bucket" then -- do something response, err = http.request("GET", "https://company-a.com") if err then error(err) end -- exit from function return end if bucket_name == "second-bucket" then -- do something response, err = http.request("GET", "https://company-b.com") if err then error(err) end -- exit from function return end ``` -------------------------------- ### Specify query, headers, and timeout (JavaScript) Source: https://webhookrelay.com/docs/webhooks/functions/make-http-request Makes a GET request with query, timeout, and headers options. Parses the JSON response body. ```javascript // making HTTP call with options const response = http.request("GET", "https://example.com", { query: "page=1", timeout: "5s", headers: { Accept: "*/*", Authorization: "Basic 123456" } }) // parsing response body from the API const apiResponse = JSON.parse(response.body) ``` -------------------------------- ### Sample DockerHub webhook payload Source: https://webhookrelay.com/docs/tutorials/transform/docker-to-slack Example JSON payload sent by DockerHub to the webhook endpoint. Contains push_data and repository details. ```json { "push_data": { "pushed_at": 1582839308, "images": [], "tag": "latest", "pusher": "karolisr" }, "callback_url": "https://registry.hub.docker.com/u/karolisr/demo-webhook/hook/242ii4ddc2jji4a0cc44fbcdbcdecj1ab/", "repository": { "status": "Active", "description": "", "is_trusted": false, "full_description": "", "repo_url": "https://hub.docker.com/r/karolisr/demo-webhook", "owner": "karolisr", "is_official": false, "is_private": true, "name": "demo-webhook", "namespace": "karolisr", "star_count": 0, "comment_count": 0, "date_created": 1524557040, "repo_name": "karolisr/demo-webhook" } } ``` -------------------------------- ### Import BigQuery helper package Source: https://webhookrelay.com/docs/tutorials/warehouse/bigquery Imports the 'bigquery' helper package in a Webhook Relay Function. This is the first step to start ingesting data from webhooks into BigQuery. ```lua -- Import BigQuery helper package local bigquery = require('bigquery') ``` -------------------------------- ### Java SSLHandshakeException: protocol_version Source: https://webhookrelay.com/docs/webhooks/tls-ssl-errors Example JSSE error messages when no common TLS protocol version is available. Includes a related message about disabled protocols. ```text javax.net.ssl.SSLHandshakeException: Received fatal alert: protocol_version # A related JSSE message when the JVM has disabled the only protocol on offer: javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate) ``` -------------------------------- ### Send email with Mailgun in JavaScript Source: https://webhookrelay.com/docs/webhooks/functions/send-emails JavaScript example for sending an email using the Mailgun module. It retrieves domain and API key from config, initializes Mailgun with region 'us', and sends a test email. Errors are logged to console. ```javascript const domain = cfg.get("domain") const apiKey = cfg.get("api_key") // mailgun.initialize('domain', 'api-key', 'region (us/eu)') const initResult = mailgun.initialize(domain, apiKey, "us") if (initResult && initResult.error) { console.error("Mailgun init failed:", initResult.error) } // mailgun.send('sender@foo.com', 'subject', 'body-here', 'recipient@foo.com') const sendResult = mailgun.send("your-email@example.com", "test subject", "test body", "john@example.com") if (sendResult && sendResult.error) { console.error("Email send failed:", sendResult.error) } ``` -------------------------------- ### Basic usage of WebhookRelayClient Source: https://webhookrelay.com/docs/webhooks/websocket-server Create a WebhookRelayClient with token key, token secret, and bucket list. The handler function receives a JSON string and must parse it. Call connect() to start the WebSocket connection. ```javascript var ws = require(`webhookrelay-ws-client`); // handler function has to accept a JSON string and parse on its own var handler = function (data) { console.log(data) } // create a client with specified token key and secret from https://my.webhookrelay.com/tokens and any buckets that // can be created here https://my.webhookrelay.com/buckets. Handler function is called whenever there's a new message var client = new ws.WebhookRelayClient('your-token-key', 'your-token-secret', ['bucket-1', 'bucket-2'], handler) // connect starts a websocket connection to Webhook Relay client.connect(); ``` -------------------------------- ### Verify JWT and HMAC signature (Lua) Source: https://webhookrelay.com/docs/webhooks/functions/helper-libraries Lua equivalent of the JavaScript example. Verifies a JWT from the X-Auth-Token header and an HMAC signature from the X-Hub-Signature-256 header. Uses the jwt and secure modules. On failure, sets HTTP 401 and stops forwarding. ```lua local jwt = require("jwt") local secure = require("secure") -- verify a JWT from a header (HS256, HS384, HS512 supported) local claims = jwt.verify(r.RequestHeader["X-Auth-Token"], cfg:GetValue("jwt_secret"), { algorithm = "HS256", issuer = "my-app" }) -- or verify a provider HMAC signature, e.g. "sha256=" local ok = secure.verifyHMAC("sha256", cfg:GetValue("signing_secret"), r.RequestBody, r.RequestHeader["X-Hub-Signature-256"], { prefix = "sha256=" }) if not ok then r:SetResponseStatusCode(401) r:StopForwarding() end ``` -------------------------------- ### Query payload with jmespath.search (Lua) Source: https://webhookrelay.com/docs/webhooks/functions/helper-libraries Lua equivalent of the JavaScript JMESPath example. Decodes the request body, runs the same JMESPath query, and raises an error if decoding fails. ```lua local json = require("json") local jmespath = require("jmespath") local event, err = json.decode(r.RequestBody) if err then error(err) end -- names of all completed orders over $100 local big_orders = jmespath.search( "orders[?status == 'completed' && total > \`100\`].name", event ) ``` -------------------------------- ### Send email with Mailgun in Lua Source: https://webhookrelay.com/docs/webhooks/functions/send-emails Lua example for sending an email using the Mailgun module. It retrieves domain and API key from config, initializes Mailgun with region 'us', and sends a test email. Errors are raised with error(). ```lua -- Import Mailgun helper package local mailgun = require('mailgun') local domain = cfg:GetValue('domain') local api_key = cfg:GetValue('api_key') -- mailgun.initialize('domain', 'api-key', 'region (us/eu)') err = mailgun.initialize(domain, api_key, 'us') if err then error(err) end -- mailgun.send('sender@foo.com', 'subject', 'body-here', 'recipient@foo.com') err = mailgun.send('your-email@example.com', 'test subject', 'test body', 'john@example.com') if err then error(err) end ``` -------------------------------- ### Install Jenkins operator via Helm Source: https://webhookrelay.com/docs/tutorials/cicd/kubernetes-operator Installs the Jenkins operator using Helm with the release name 'jenkins-operator'. ```bash helm install jenkins-operator jenkins/jenkins-operator ``` -------------------------------- ### Stream data to GCP BigQuery Source: https://webhookrelay.com/docs/tutorials/warehouse/bigquery Complete Lua function that parses the webhook payload, initializes the BigQuery client with project, dataset, and table IDs, and inserts a row. The payload example is shown in comments. Errors are raised if any step fails. ```lua -- Import BigQuery helper package local bigquery = require('bigquery') local json = require("json") -- Parsing payload local rowData, err = json.decode(r.RequestBody) if err then error(err) end -- Initializing BigQuery client err = bigquery.initialize('your-project-id', 'dataset-id', 'table-id') if err then error(err) end -- Receiving payload: -- { -- "hub_user_id": "user-id-here", -- "category": "signup", -- "action": "click", -- "label": "github auth" -- } -- Insert row: err = bigquery.insert(rowData) if err then error(err) end ``` -------------------------------- ### Lua: classify webhook with ai:classifier Source: https://webhookrelay.com/docs/service-connections/ai-providers Lua equivalent of the JavaScript example. Uses ai:classifier to generate a risk label and sets the X-Risk header. For customer providers, add a model parameter. ```lua local ai = require("ai:classifier") local result = ai.generate("Classify this webhook as low, medium, or high risk", { system = "Return one lowercase label.", maxTokens = 16 }) r:SetRequestHeader("X-Risk", result.text) ``` -------------------------------- ### Run webhookrelayd agent for webhook forwarding Source: https://webhookrelay.com/docs/installation/docker Starts the webhookrelayd Docker container in detached mode with restart policy, passing the RELAY_KEY, RELAY_SECRET, and BUCKETS environment variables. The BUCKETS variable should be set to the bucket name created in the Webhook Relay dashboard. ```bash docker run -d \ --name whr-relayd \ --restart always \ -e RELAY_KEY=${RELAY_KEY} \ -e RELAY_SECRET=${RELAY_SECRET} \ -e BUCKETS= \ webhookrelay/webhookrelayd:latest ``` -------------------------------- ### Configure replay_missing via REST API Source: https://webhookrelay.com/docs/webhooks/replay-on-agent-connect Example REST API configuration for the replay on connect feature. The `replay_missing` object sets `enabled` to true and configures an 8-hour lookback using nanoseconds (28800000000000). The `limit` of 100 rows is within the default server maximum of 5,000. ```json { "replay_missing": { "enabled": true, "lookback": 28800000000000, "limit": 100 } } ``` -------------------------------- ### Apply Webhook Relay Custom Resource Source: https://webhookrelay.com/docs/tutorials/cicd/kubernetes-operator Create the Webhook Relay Custom Resource from the example repository. If you modified the Jenkins CR name, update the destination field in webhookrelay_cr.yaml to match your Jenkins service. ```bash kubectl apply -f webhookrelay_cr.yaml ``` -------------------------------- ### Make FreeBSD binary executable Source: https://webhookrelay.com/docs/installation/cli Give the downloaded FreeBSD binary permissions to execute and update itself. ```bash sudo chmod +wx /usr/local/bin/relay ``` -------------------------------- ### Add Webhook Relay Helm repository Source: https://webhookrelay.com/docs/installation/kubernetes Adds the Webhook Relay Helm chart repository and updates the local Helm repository cache. Required before installing the operator. ```bash helm repo add webhookrelay https://charts.webhookrelay.com helm repo update ``` -------------------------------- ### Lua Slack message builder with request setters Source: https://webhookrelay.com/docs/webhooks/functions/provider-helpers Use this Lua example to build a Slack message and send it as a webhook request body. It requires the 'slack' and 'json' modules, encodes the message body, and sets the request body and Content-Type header using colon syntax. ```lua local slack = require("slack") local json = require("json") local body = slack.message("Build passed") local encoded, err = json.encode(body) if err then error(err) end r:SetRequestBody(encoded) r:SetRequestHeader("Content-Type", "application/json") ``` -------------------------------- ### Download FreeBSD binary Source: https://webhookrelay.com/docs/installation/cli Download the WebhookRelay CLI binary for FreeBSD. The first command fetches the binary for amd64, the second for i386. Use the appropriate one for your architecture. ```bash # For amd64 sudo fetch -o /usr/local/bin/relay https://storage.cloud.google.com/webhookrelay/downloads/relay-freebsd-amd64 # For i386 sudo fetch -o /usr/local/bin/relay https://storage.cloud.google.com/webhookrelay/downloads/relay-freebsd-386 ``` -------------------------------- ### OpenSSL unsupported protocol error examples (curl, OpenSSL 1.1.x, Node.js) Source: https://webhookrelay.com/docs/webhooks/tls-ssl-errors Shows the exact error messages you may see when a client and server share no common TLS protocol version. The first is from curl, the second is the OpenSSL 1.1.x phrasing, and the third is how Node.js wraps the same error. Use these to identify the 'unsupported protocol' failure in your logs. ```text curl: (35) error:0A000102:SSL routines::unsupported protocol # OpenSSL 1.1.x phrased it as: error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol # Node.js: Error: write EPROTO ... error:0A000102:SSL routines::unsupported protocol ``` -------------------------------- ### List addresses in a bucket with relay email list Source: https://webhookrelay.com/docs/email/cli Lists inbound addresses in a bucket. The output shows the address, name, filter, and status. Add --json to get full objects including the email_input policy. ```shell $ relay email list --bucket signups ADDRESS NAME FILTER STATUS 15a51b42-7de4-42ff-8628-4645565fa8b1@in.webhookrelay-mail.com stripe-receipts noreply@stripe.com - eb9649a3-b781-4158-be69-bb210596e759@in.webhookrelay-mail.com - any sender - ``` -------------------------------- ### Authenticate and test CLI Source: https://webhookrelay.com/docs/installation/cli Authenticate the CLI with your token key and secret, then list your buckets. The 'relay bucket ls' command should return your buckets. If the token is restricted to 'Viewer', listing works but commands that change resources do not. ```bash relay login -k YOUR_TOKEN_KEY -s YOUR_TOKEN_SECRET relay bucket ls ``` -------------------------------- ### Run webhookrelayd agent for bidirectional tunnel Source: https://webhookrelay.com/docs/installation/docker Starts a bidirectional tunnel using the webhookrelayd Docker container with host networking and restart policy. The --mode tunnel flag enables tunnel mode, -t specifies the tunnel name, and -k/-s provide the access key and secret. ```bash docker run --name whr-relayd \ --net host \ --restart always \ -d webhookrelay/webhookrelayd:latest \ --mode tunnel -t mytunnelname -k [access key] -s [access secret] ``` -------------------------------- ### Example email webhook payload Source: https://webhookrelay.com/docs/email Example JSON payload delivered to your endpoint when an email is received, showing fields like from, subject, headers, and authentication results. ```json { "from": "karolis.rusenas@gmail.com", "from_name": "K", "recipient": "5519fb0d-997a-46cd-b102-ac990b4c38fa@in.webhookrelay-mail.com", "to": ["5519fb0d-997a-46cd-b102-ac990b4c38fa@in.webhookrelay-mail.com"], "subject": "prod test", "date": "Fri, 26 Jun 2026 11:27:41 +0400", "message_id": "C70BE3E7-4B20-4240-A1B8-2D19E0032FFD@gmail.com", "text": "helloooo\r\n", "headers": { "From": "K ", "To": "5519fb0d-997a-46cd-b102-ac990b4c38fa@in.webhookrelay-mail.com", "Subject": "prod test", "Content-Type": "text/plain; charset=us-ascii", "Return-Path": "" }, "spf": "none", "dkim": "pass", "dmarc": "pass" } ``` -------------------------------- ### Create bucket and add public outputs with Webhook Relay CLI Source: https://webhookrelay.com/docs/webhooks/public/multiple-destination-urls Use this CLI snippet to set up a bucket and add multiple public output destinations. It creates a bucket named 'payments' and adds two public outputs: 'primary-api' and 'audit-copy', each with a destination URL. After running, use 'relay bucket inspect payments' to view the bucket's public input endpoint to give to the sender. ```bash relay bucket create payments relay output create primary-api \ --bucket payments \ --type public \ --destination https://api.example.com/webhooks relay output create audit-copy \ --bucket payments \ --type public \ --destination https://audit.example.com/events ``` -------------------------------- ### Make HTTP GET request using http.request in Lua Source: https://webhookrelay.com/docs/webhooks/functions/make-http-request Use the http.request function to make a GET request to an external server. The response body is parsed with json.decode. ```lua -- importing HTTP package local http = require("http") -- making HTTP call response, err = http.request("GET", "https://example.com") if err then error(err) end -- parsing response body from the API local api_response, err = json.decode(response.body) if err then error(err) end ``` -------------------------------- ### Make HTTP GET request using http.request in JavaScript Source: https://webhookrelay.com/docs/webhooks/functions/make-http-request Use the http.request function to make a GET request to an external server. The response body is parsed with JSON.parse. ```javascript // making HTTP call const response = http.request("GET", "https://example.com") // parsing response body from the API const apiResponse = JSON.parse(response.body) ``` -------------------------------- ### Create an email address with JSON output and capture the address Source: https://webhookrelay.com/docs/email/cli Uses `--json` to print the created address as JSON, then shows how to capture just the address with `jq` in a shell variable. ```bash $ relay email create --bucket signups --name stripe-receipts --filter-from noreply@stripe.com --json { "email_address": "15a51b42-7de4-42ff-8628-4645565fa8b1@in.webhookrelay-mail.com", "input_id": "15a51b42-7de4-42ff-8628-4645565fa8b1", "bucket_id": "9bf342ce-9582-42ea-8662-ac73d60e2db6", "bucket_name": "signups", "allowed_senders": ["noreply@stripe.com"] } # Capture just the address $ ADDR=$(relay email create --json | jq -r .email_address) ``` -------------------------------- ### Get Webhook Relay public URL from CR status Source: https://webhookrelay.com/docs/tutorials/cicd/kubernetes-operator Get the public endpoint URL from the Webhook Relay CR status. The output is a URL like https://k0yv9ip5sxxp55ncsu936k.hooks.webhookrelay.com. ```bash kubectl get webhookrelayforwards.forward.webhookrelay.com forward-to-jenkins -o 'jsonpath={.status.publicEndpoints[0]}' ``` -------------------------------- ### get_logs_stats Source: https://webhookrelay.com/docs/mcp Gets delivery statistics for the account or a specific bucket. ```APIDOC ## get_logs_stats ### Description Get delivery statistics (received / success / failures). By default returns one per-day series for the account (or one bucket via `bucket_id`). Pass `group_by=bucket` for a per-bucket leaderboard ranked by failures — the fastest way to find _which_ buckets are failing in one call. Read-only. ### Parameters - **bucket_id** (optional) - Filter by bucket ID. - **group_by** (optional) - Group by `bucket`. - **from** (optional) - Start time. - **to** (optional) - End time. - **limit** (optional) - Maximum number of results (default 10, max 100). - **offset** (optional) - Offset for pagination. ``` -------------------------------- ### Create config directory Source: https://webhookrelay.com/docs/installation/autostart-macos Creates the directory for the Webhook Relay configuration file. ```bash sudo mkdir -p /etc/webhookrelay ``` -------------------------------- ### Create config file Source: https://webhookrelay.com/docs/installation/autostart-windows Create a file named 'config' in C:\ProgramData\WebhookRelay with this YAML content. Replace 'your-secret-key' and 'your-secret' with your actual key and secret from the WebhookRelay tokens page. ```yaml version: "v1" key: your-secret-key # will be encrypted on startup secret: your-secret # will be encrypted on startup buckets: - windows-bin ``` -------------------------------- ### get_service_connection Source: https://webhookrelay.com/docs/mcp Gets a service connection's details (secrets redacted). Read-only. ```APIDOC ## get_service_connection ### Description Get a service connection's details (secrets redacted). Read-only. ### Parameters - **id** (required) - The ID of the service connection. ``` -------------------------------- ### Stream data into BigQuery (Lua) Source: https://webhookrelay.com/docs/webhooks/functions/big-query Imports the BigQuery helper and JSON modules, parses the request body, initializes the BigQuery client, and inserts the row. Errors are raised if any step fails. ```lua -- Import BigQuery helper package local bigquery = require('bigquery') local json = require("json") -- Parsing payload local rowData, err = json.decode(r.RequestBody) if err then error(err) end -- Initializing BigQuery client err = bigquery.initialize('your-project-id', 'dataset-id', 'table-id') if err then error(err) end -- Receiving payload: -- { -- "hub_user_id": "user-id-here", -- "category": "signup", -- "action": "click", -- "label": "github auth" -- } -- Insert row: err = bigquery.insert(rowData) if err then error(err) end ``` -------------------------------- ### Apply WebhookRelayForward CR Source: https://webhookrelay.com/docs/tutorials/cicd/terraform-atlantis Create the WebhookRelayForward resource from the whr-atlantis-cr.yaml file. ```bash kubectl apply -f whr-atlantis-cr.yaml webhookrelayforward.forward.webhookrelay.com/forward-to-atlantis created ``` -------------------------------- ### Transformed JSON payload Source: https://webhookrelay.com/docs/webhooks/functions/url-encoded-data JSON output produced by the JavaScript or Lua examples after transforming the URL-encoded form data. ```json { "name": "john", "lastname": "wick" } ```