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

  1. Make a POST request to /webhooks to create your endpoint in the disabled state.
  2. Implement your application's logic for Webhook Event Signature Verification.
  3. 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
  4. 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 to active using PUT /webhooks. Webhooks must be disabled in order to change their URL
  • active - Bridge will automatically deliver events to your webhook. Automatic delivery of events can be paused by updating the webhook to disabled using PUT /webhooks
  • deleted- 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.