Webhooks API
Thewebhooks module gives you programmatic control over Webhook Apps, Endpoints, and Event Deliveries.
While normally configured via your application dashboard, this module is incredibly powerful for applications that provision webhooks dynamically on behalf of their users.
Webhook Apps
Apps represent a logical grouping of events.createWebhookApp(request)
Define a new broadcast channel.
client.webhooks.listWebhookApps(options)client.webhooks.getWebhookApp(appSlug)client.webhooks.updateWebhookApp(appSlug, request)client.webhooks.deleteWebhookApp(appSlug)client.webhooks.rotateWebhookSecret(appSlug)
Endpoint Management
Endpoints define where Wacht sends the events triggered by an App.createWebhookEndpoint(appSlug, request)
Bind a listener to an App.
The unique slug indentifier of the target Webhook App.
client.webhooks.listWebhookEndpoints(appSlug, options)client.webhooks.updateWebhookEndpoint(appSlug, endpointId, request)client.webhooks.deleteWebhookEndpoint(appSlug, endpointId)client.webhooks.testWebhookEndpoint(appSlug, endpointId, request)client.webhooks.reactivateWebhookEndpoint(endpointId)
Event Deliveries
Wacht meticulously tracks the success and failure states of every webhook delivery. You can query this data programmatically.listWebhookDeliveries(appSlug, options)
Retrieve a historical log of events sent to an app.
The app identifier.
replayWebhookDelivery(appSlug, deliveryId)
Manually force a failed payload to be re-transmitted to its endpoint.
The target app identifier.
The specific delivery ID tracking token to manually resend.
client.webhooks.getWebhookDelivery(appSlug, deliveryId)client.webhooks.replayWebhookDeliveries(appSlug, request)
Triggering Custom Events
You can use Wacht as a generic event bus to emit custom events to registered endpoints.The app broadcasting the new custom event.
Analytics
Fetch delivery performance statistics.client.webhooks.getWebhookStats(appSlug)client.webhooks.getWebhookAnalytics(appSlug, options)client.webhooks.getWebhookTimeseries(appSlug, options)
