Skip to main content
The example below is a complete starting point: the call that registers the endpoint, a receiver that verifies and handles deliveries, and the way to trigger an event so you can watch it arrive. Swap the event types and the handler body to cover a different surface.
Browserbase returns the signing secret only when you create the webhook and when you rotate it. Store it before you discard the response; no endpoint reads it back.

React to Function invocations

A Function invocation runs on its own schedule, so the alternative is polling GET /v1/functions/invocations/{id} until it leaves RUNNING. Subscribing instead means Browserbase calls you once the invocation reaches a terminal state, and the receiver below handles both the success and the failure case.
1

Expose an endpoint

Browserbase delivers over the public internet, so a receiver on localhost needs a tunnel while you develop. Use the https:// forwarding URL it prints.
2

Register the endpoint

Node.js
Put the returned secret in your environment as BROWSERBASE_WEBHOOK_SECRET.
3

Receive and verify

A complete server. It verifies the signature, acknowledges inside the 15 second budget, then does the work.
Node.js
seen is an in-memory set, so it empties on restart and does not work across replicas. Key the deduplication on a database or a cache in production.
4

Trigger an invocation

Invoke a Function and let it finish. Your receiver logs the event once the invocation reaches a terminal state.

If nothing arrives

Work down this list, ordered by how often each one is the cause.
  • Your endpoint returned a non-2xx. Check the response code on the delivery in Settings. A redirect counts as a failure.
  • Verification rejected it. Almost always a parsed body. Confirm the raw bytes reach verify.
  • You did not subscribe to that type. An endpoint receives only the types it subscribes to.
  • Browserbase disabled the endpoint. An endpoint that fails continuously for five days stops receiving deliveries.
Open a delivery to see the payload that was sent and every attempt against it, with the status each one returned.
A single webhook delivery showing its raw payload and two failed attempts against the endpoint

Next steps

Verifying deliveries

Signature checking, retries, and idempotency in more detail.

Registering endpoints

Create, list, update, rotate, and delete endpoints.

Functions

The invocations these events report on.

Webhooks API reference

Full request and response shapes.