Send a webhook
const url = 'https://send.hookbridge.io/v1/webhooks/send';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"endpoint_id":"ep_550e8400e29b41d4a716446655440000","payload":{"event":"order.created","order_id":"ord_12345","amount":99.99}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://send.hookbridge.io/v1/webhooks/send \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "endpoint_id": "ep_550e8400e29b41d4a716446655440000", "payload": { "event": "order.created", "order_id": "ord_12345", "amount": 99.99 } }'Enqueue a webhook for delivery. The webhook will be stored durably and delivered with automatic retries on failure. Returns immediately with a message ID for tracking.
Retry Behavior:
- Fast retries (for 429 responses): 30s, 60s, 120s, 240s, 300s
- Slow retries (for other errors): 30m, 2h, 6h, 12h, 24h, 48h, 72h, 96h
- Maximum 8 total attempts before moving to DLQ
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
ID of the endpoint to deliver to. Endpoints must be created first via POST /v1/endpoints.
JSON payload to send (max 1 MB)
object
Optional custom headers to include in the webhook request. Maximum 50 headers, 8KB total size. Some headers are forbidden (Host, Authorization, etc).
object
Optional idempotency key to prevent duplicate sends. If the same key is used with the same payload, the original message ID is returned. If the same key is used with a different payload, a 409 error is returned.
Optional override for payload retention period in hours. 0 means immediate delete after delivery. If not specified, the default retention for your plan is used. Maximum value depends on your subscription plan.
Examples
Basic webhook
{ "endpoint_id": "ep_550e8400e29b41d4a716446655440000", "payload": { "event": "order.created", "order_id": "ord_12345", "amount": 99.99 }}Webhook with custom headers
{ "endpoint_id": "ep_550e8400e29b41d4a716446655440000", "payload": { "event": "order.created", "order_id": "ord_12345" }, "headers": { "X-Tenant-Id": "tenant_abc", "X-Event-Type": "order.created" }}Webhook with idempotency key
{ "endpoint_id": "ep_550e8400e29b41d4a716446655440000", "payload": { "event": "order.created", "order_id": "ord_12345" }, "idempotency_key": "order-12345-created-v1"}Responses
Section titled “Responses”Webhook successfully enqueued
object
object
Unique identifier for the queued message (UUIDv7)
Initial message status
object
Unique identifier for this request (useful for support)
Example
{ "data": { "message_id": "01935abc-def0-7123-4567-890abcdef012", "status": "queued" }, "meta": { "request_id": "req_xyz123" }}Invalid request
object
object
Machine-readable error code
Human-readable error message
object
Unique identifier for this request (useful for support)
Examples
Endpoint not found
{ "error": { "code": "ENDPOINT_NOT_FOUND", "message": "endpoint not found" }, "meta": { "request_id": "req_xyz123" }}Invalid endpoint ID format
{ "error": { "code": "INVALID_REQUEST", "message": "endpoint_id must be in format ep_xxx" }, "meta": { "request_id": "req_xyz123" }}Invalid payload
{ "error": { "code": "INVALID_REQUEST", "message": "payload must be valid JSON" }, "meta": { "request_id": "req_xyz123" }}Invalid headers
{ "error": { "code": "INVALID_HEADERS", "message": "header 'Host' is forbidden and cannot be overridden" }, "meta": { "request_id": "req_xyz123" }}Unauthorized - Invalid or missing API key
object
object
Machine-readable error code
Human-readable error message
object
Unique identifier for this request (useful for support)
Example
{ "error": { "code": "UNAUTHORIZED", "message": "Invalid or missing API key" }, "meta": { "request_id": "req_xyz123" }}Idempotency key conflict
object
object
Machine-readable error code
Human-readable error message
object
Unique identifier for this request (useful for support)
Example
{ "error": { "code": "IDEMPOTENCY_MISMATCH", "message": "Idempotency key already used with different payload" }, "meta": { "request_id": "req_xyz123" }}Payload too large
object
object
Machine-readable error code
Human-readable error message
object
Unique identifier for this request (useful for support)
Example
{ "error": { "code": "PAYLOAD_TOO_LARGE", "message": "Payload exceeds maximum size of 1 MB" }, "meta": { "request_id": "req_xyz123" }}Rate limit exceeded
object
object
Machine-readable error code
Human-readable error message
object
Unique identifier for this request (useful for support)
Example
{ "error": { "code": "RATE_LIMIT_EXCEEDED", "message": "Rate limit exceeded. Please try again later." }, "meta": { "request_id": "req_xyz123" }}Headers
Section titled “Headers”Number of seconds to wait before retrying
Example
60Enter your credentials to populate code examples throughout the docs.