Webhooks
Bridge's Webhooks API lets developers manage webhook endpoints that are subscribed to webhook events for real-time updates instead of relying on API polling for a faster, more efficient, and better overall experience. Webhook endpoints require you to provide a url
with the https scheme and a valid X.509 certificate. When your endpoint is created, a PKI public key
in PEM
format will be assigned to it and shared with you. Refer to Webhook Event Signature Verification for details on how to verify the authenticity of incoming events.
When your endpoint is active, Bridge will deliver events with POST
with the application/json
content type. The endpoint should return a 200 status to Bridge as quickly as possible to avoid timeouts and retries on the Bridge side.
Implementation Flow
A typical flow to implement Bridge webhooks within your application may like the following
- Make a POST request to /webhooks to create your endpoint in the
disabled
state. - Implement your application's logic for Webhook Event Signature Verification.
- Get upcoming webhook events and send events to test the logic for receiving events from bridge. You can view event delivery logs to debug any issues
- After verifying your webhook functionality, enable it using PUT /webhooks
Webhook States
The webhook status refers to the current state of a webhook. There are several possible states that a webhook can be in, including:
disabled
- This is the initial state of all newly created webhooks. Events will not automatically be delivered to the endpoint in this state. We recommend testing the webhook from this state using (see POST /send documentation). You can update the webhook toactive
using PUT /webhooks. Webhooks must be disabled in order to change their URLactive
- Bridge will automatically deliver events to your webhook. Automatic delivery of events can be paused by updating the webhook todisabled
using PUT /webhooksdeleted
- This state is only visible as the result of a DELETE /webhooks request. This state is not considered a valid status input of PUT /webhooks. Webhooks in this state will no longer be accessible from subsequent API requests.
Updated 2 days ago