Getting Started: Send Webhooks
This guide is for implementers who want to send webhooks through HookBridge quickly, then monitor and recover deliveries when needed.
Prerequisites
Section titled “Prerequisites”- HookBridge account at app.hookbridge.io
- Access to the HookBridge Console
- A destination URL for the system that should receive your webhooks (must be
https://)
Step 1: Create an API Key
Section titled “Step 1: Create an API Key”Console
Section titled “Console”- Open API Keys.
- Click Create API Key.
- Optionally add a label.
- Copy and store the key securely. It is shown only once.
If you already have an API key, you can create additional keys via API:
curl -X POST https://api.hookbridge.io/v1/api-keys \ -H "Authorization: Bearer YOUR_EXISTING_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "label": "backend-service" }'Use the returned key as:
Authorization: Bearer wrc_xxxxxxxxxxxxxxxxxxxxStep 2: Create an Outbound Endpoint
Section titled “Step 2: Create an Outbound Endpoint”Console
Section titled “Console”- Open Endpoints.
- Stay on the Outbound tab.
- Click Create Endpoint.
- Enter your destination URL and optional description.
- Save the endpoint.
- Copy the endpoint ID (
ep_...) for sending. - Store the signing secret shown on creation.
curl -X POST https://api.hookbridge.io/v1/endpoints \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "url": "https://your-app.com/webhooks", "description": "Production destination" }'import { HookBridge } from '@hookbridge/sdk';
const client = new HookBridge({ apiKey: process.env.HOOKBRIDGE_API_KEY });
const endpoint = await client.createEndpoint({ url: 'https://your-app.com/webhooks', description: 'Production destination',});
console.log(endpoint.id);from hookbridge import HookBridge
client = HookBridge(api_key="YOUR_API_KEY")endpoint = client.create_endpoint( url="https://your-app.com/webhooks", description="Production destination")
print(endpoint.id)package main
import ( "context" "fmt" "log"
hookbridge "github.com/hookbridge/hookbridge-go")
func main() { client, err := hookbridge.NewClient("YOUR_API_KEY") if err != nil { log.Fatal(err) } desc := "Production destination" endpoint, err := client.CreateEndpoint(context.Background(), hookbridge.CreateEndpointRequest{ URL: "https://your-app.com/webhooks", Description: &desc, }) if err != nil { log.Fatal(err) }
fmt.Println(endpoint.ID)}require "hookbridge"
client = HookBridge.new(api_key: "YOUR_API_KEY")
endpoint = client.create_endpoint( url: "https://your-app.com/webhooks", description: "Production destination")
puts endpoint.id<?php
use HookBridge\HookBridge;
$client = new HookBridge('YOUR_API_KEY');
$endpoint = $client->createEndpoint( url: 'https://your-app.com/webhooks', description: 'Production destination',);
echo $endpoint->id . PHP_EOL;Step 3: Send a Test Webhook
Section titled “Step 3: Send a Test Webhook”Console
Section titled “Console”- Open Endpoints and choose your outbound endpoint.
- Copy the endpoint ID (
ep_...). - Use that endpoint ID in the API request below.
- Open Messages to confirm delivery attempts and capture the created message ID.
curl -X POST https://send.hookbridge.io/v1/webhooks/send \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "endpoint_id": "YOUR_ENDPOINT_ID", "payload": { "event": "order.created", "data": { "order_id": "order_789", "amount": 9999, "currency": "usd" } }, "idempotency_key": "order-789-created-v1" }'const result = await client.send({ endpointId: 'YOUR_ENDPOINT_ID', payload: { event: 'order.created', data: { orderId: 'order_789', amount: 9999, currency: 'usd' } }, idempotencyKey: 'order-789-created-v1'});
console.log(result.messageId);result = client.send( endpoint_id="YOUR_ENDPOINT_ID", payload={ "event": "order.created", "data": {"order_id": "order_789", "amount": 9999, "currency": "usd"} }, idempotency_key="order-789-created-v1")
print(result.message_id)result, _ := client.Send(context.Background(), hookbridge.SendRequest{ EndpointID: "YOUR_ENDPOINT_ID", Payload: map[string]any{ "event": "order.created", "data": map[string]any{ "order_id": "order_789", "amount": 9999, "currency": "usd", }, }, IdempotencyKey: "order-789-created-v1",})
fmt.Println(result.MessageID)result = client.send( endpoint_id: "YOUR_ENDPOINT_ID", payload: { event: "order.created", data: { order_id: "order_789", amount: 9999, currency: "usd" } }, idempotency_key: "order-789-created-v1")
puts result.message_id$result = $client->send( endpointId: 'YOUR_ENDPOINT_ID', payload: [ 'event' => 'order.created', 'data' => [ 'order_id' => 'order_789', 'amount' => 9999, 'currency' => 'usd', ], ], idempotencyKey: 'order-789-created-v1',);
echo $result->messageId . PHP_EOL;Step 4: Verify Delivery and Recover Failures
Section titled “Step 4: Verify Delivery and Recover Failures”Console
Section titled “Console”- Open Messages to review recent deliveries.
- Filter by endpoint or status (
succeeded,pending_retry,failed_permanent). - Open message details for attempt history and response information.
- For failures, use replay/retry actions from the message workflow.
Use the message_id returned by the send response (for example data.message_id):
# Fetch one messagecurl https://api.hookbridge.io/v1/messages/YOUR_MESSAGE_ID \ -H "Authorization: Bearer YOUR_API_KEY"
# Retry immediatelycurl -X POST https://api.hookbridge.io/v1/messages/YOUR_MESSAGE_ID/retry-now \ -H "Authorization: Bearer YOUR_API_KEY"
# Replay a messagecurl -X POST https://api.hookbridge.io/v1/messages/YOUR_MESSAGE_ID/replay \ -H "Authorization: Bearer YOUR_API_KEY"Next Steps
Section titled “Next Steps” Personalize Examples
Enter your credentials to populate code examples throughout the docs.