CLI Commands
Complete reference for all WebhookRelay CLI commands.
Global Options
These options are available for all commands:
| Option | Description |
|---|---|
--api-key <key> | API key for authentication |
--org <id> | Organization ID |
--output <format> | Output format: table, json, yaml |
--quiet | Suppress non-essential output |
--verbose | Enable verbose logging |
--help | Show help |
--version | Show version |
Authentication
login
Authenticate with your WebhookRelay account.
webhookrelay loginOpens a browser for OAuth authentication. After successful login, credentials are stored in ~/.webhookrelay/config.json.
logout
Log out and clear stored credentials.
webhookrelay logoutwhoami
Display current user and organization.
webhookrelay whoamiOutput:
User: john@example.com
Organization: My Company (org_abc123)
Plan: ProOrganizations
orgs list
List organizations you have access to.
webhookrelay orgs listorgs switch
Switch to a different organization.
webhookrelay orgs switch org_xyz789Sources
sources list
List all sources.
webhookrelay sources list
webhookrelay sources list --output jsonsources create
Create a new source.
webhookrelay sources create \
--name "GitHub Production" \
--slug "github-prod" \
--verification github \
--secret "your-webhook-secret"Options:
| Option | Description |
|---|---|
--name | Display name (required) |
--slug | URL slug (required) |
--description | Optional description |
--verification | Type: github, stripe, slack, hmac, none |
--secret | Verification secret |
--disabled | Create in disabled state |
sources show
Show source details.
webhookrelay sources show src_abc123
webhookrelay sources show --slug github-prodsources update
Update a source.
webhookrelay sources update src_abc123 --name "New Name"
webhookrelay sources update src_abc123 --disabledsources delete
Delete a source.
webhookrelay sources delete src_abc123
webhookrelay sources delete --slug github-prod --forceDestinations
destinations list
List all destinations.
webhookrelay destinations listdestinations create
Create a new destination.
webhookrelay destinations create \
--name "Production API" \
--url "https://api.myapp.com/webhooks" \
--header "Authorization: Bearer token123"Options:
| Option | Description |
|---|---|
--name | Display name (required) |
--url | Destination URL (required) |
--description | Optional description |
--header | Custom header (can be repeated) |
--max-retries | Max retry attempts |
--initial-delay | Initial retry delay (ms) |
--disabled | Create in disabled state |
destinations show
Show destination details.
webhookrelay destinations show dst_xyz789destinations update
Update a destination.
webhookrelay destinations update dst_xyz789 \
--url "https://api.myapp.com/webhooks/v2"destinations delete
Delete a destination.
webhookrelay destinations delete dst_xyz789Routes
routes list
List all routes.
webhookrelay routes list
webhookrelay routes list --source src_abc123routes create
Create a new route.
webhookrelay routes create \
--name "GitHub to Slack" \
--source src_abc123 \
--destination dst_xyz789Options:
| Option | Description |
|---|---|
--name | Display name (required) |
--source | Source ID or slug (required) |
--destination | Destination ID (can be repeated) |
--transform | Transform ID |
--filter | Filter ID |
--disabled | Create in disabled state |
routes show
Show route details.
webhookrelay routes show rte_abc123routes update
Update a route.
webhookrelay routes update rte_abc123 --disabledroutes delete
Delete a route.
webhookrelay routes delete rte_abc123Events
events list
List recent events.
webhookrelay events list
webhookrelay events list --source src_abc123 --limit 50
webhookrelay events list --status failedOptions:
| Option | Description |
|---|---|
--source | Filter by source ID |
--status | Filter by status: pending, delivered, failed |
--limit | Number of events (default: 20) |
--from | Start date (ISO 8601) |
--to | End date (ISO 8601) |
events show
Show event details.
webhookrelay events show evt_abc123
webhookrelay events show evt_abc123 --include-payloadevents replay
Replay an event.
webhookrelay events replay evt_abc123
webhookrelay events replay evt_abc123 --destination dst_xyz789Tunnels
tunnel
Start a tunnel to forward webhooks to your local machine.
webhookrelay tunnel --port 3000Options:
| Option | Description |
|---|---|
--port | Local port to forward to (required) |
--host | Local host (default: localhost) |
--subdomain | Custom subdomain (paid plans) |
--local-https | Use HTTPS for local connection |
--inspect | Enable request inspection UI |
Examples:
# Basic tunnel
webhookrelay tunnel --port 3000
# Custom subdomain
webhookrelay tunnel --port 3000 --subdomain myapp
# HTTPS locally
webhookrelay tunnel --port 443 --local-https
# With inspection
webhookrelay tunnel --port 3000 --inspecttunnels list
List active tunnels.
webhookrelay tunnels listtunnels stop
Stop a tunnel.
webhookrelay tunnels stop abc123
webhookrelay tunnels stop --allConfiguration
config show
Show current configuration.
webhookrelay config showconfig set
Set a configuration value.
webhookrelay config set organization org_xyz789
webhookrelay config set apiUrl https://api.webhookrelay.comconfig export
Export all resources as JSON.
webhookrelay config export > webhookrelay.json
webhookrelay config export --only sources,destinationsconfig import
Import resources from JSON.
webhookrelay config import webhookrelay.json
webhookrelay config import webhookrelay.json --dry-runExamples
Complete Setup
# Login
webhookrelay login
# Create source
webhookrelay sources create \
--name "GitHub" \
--slug "github" \
--verification github \
--secret "$GITHUB_SECRET"
# Create destination
webhookrelay destinations create \
--name "My App" \
--url "https://myapp.com/webhook"
# Create route
webhookrelay routes create \
--name "GitHub to App" \
--source github \
--destination dst_xyz789
# Start tunnel for local development
webhookrelay tunnel --port 3000 --subdomain devCI/CD Pipeline
#!/bin/bash
set -e
# Configure
export WEBHOOKRELAY_API_KEY="${WEBHOOKRELAY_API_KEY}"
export WEBHOOKRELAY_ORG_ID="${WEBHOOKRELAY_ORG_ID}"
# Ensure source exists
webhookrelay sources create \
--name "CI/CD" \
--slug "cicd" \
--verification none \
2>/dev/null || true
# Update destination URL
webhookrelay destinations update dst_build \
--url "${BUILD_SERVER_URL}/webhook"Debug Failed Webhooks
# List failed events
webhookrelay events list --status failed --limit 10
# Show details
webhookrelay events show evt_abc123 --include-payload
# Replay after fix
webhookrelay events replay evt_abc123