Browserbase Webhooks API
The Webhooks API from Browserbase — 3 operation(s) for webhooks.
The Webhooks API from Browserbase — 3 operation(s) for webhooks.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/browserbase:browserbase-webhooks-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Browserbase Webhooks API
description: Browserbase API for 3rd party developers
version: v1
servers:
- url: https://api.browserbase.com
description: Public endpoint
variables: {}
security:
- BrowserbaseAuth: []
tags:
- name: Webhooks
paths:
/v1/webhooks:
post:
operationId: Webhooks_create
summary: Create a Webhook
description: Register an HTTPS endpoint to receive events for this project. The response includes the signing secret, which is shown only here and when the secret is rotated. Store it before discarding the response. An endpoint may only be registered once per project.
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
endpoint:
description: HTTPS URL that event deliveries are POSTed to. Must be publicly reachable.
type: string
format: uri
maxLength: 2048
pattern: ^https://[^/?#]+
eventTypes:
description: Event types this webhook subscribes to. Unknown types are rejected.
type: array
items:
type: string
enum:
- functions.builds.running
- functions.builds.completed
- functions.builds.failed
- functions.invocations.pending
- functions.invocations.running
- functions.invocations.completed
- functions.invocations.failed
minItems: 1
uniqueItems: true
additionalProperties: false
required:
- endpoint
- eventTypes
responses:
'201':
description: The webhook has been created.
content:
application/json:
schema:
description: The created webhook, including its signing secret.
allOf:
- $ref: '#/components/schemas/Webhook'
- type: object
properties:
secret:
description: HMAC-SHA256 signing secret, prefixed `whsec_`. Shown once here; store it now. Use it to verify the signature on every delivery.
type: string
required:
- secret
x-codeSamples:
- lang: javascript
label: Node.js
source: "import Browserbase from \"@browserbasehq/sdk\";\n\nconst bb = new Browserbase({\n apiKey: process.env.BROWSERBASE_API_KEY,\n});\n\nconst webhook = await bb.webhooks.create({\n endpoint: \"https://example.com/browserbase/events\",\n eventTypes: [\"functions.invocations.completed\"],\n});\n\nconsole.log(webhook.secret);"
- lang: python
label: Python
source: "import os\n\nfrom browserbase import Browserbase\n\nbb = Browserbase(api_key=os.environ[\"BROWSERBASE_API_KEY\"])\n\nwebhook = bb.webhooks.create(\n endpoint=\"https://example.com/browserbase/events\",\n event_types=[\"functions.invocations.completed\"],\n)\n\nprint(webhook.secret)"
- lang: bash
label: cURL
source: "curl --request POST \\\n --url https://api.browserbase.com/v1/webhooks \\\n --header 'Content-Type: application/json' \\\n --header \"X-BB-API-Key: $BROWSERBASE_API_KEY\" \\\n --data '{\n \"endpoint\": \"https://example.com/browserbase/events\",\n \"eventTypes\": [\"functions.invocations.completed\"]\n }'"
tags:
- Webhooks
get:
operationId: Webhooks_list
summary: List Webhooks
description: List the project's webhooks, newest first. Signing secrets are not included. Page by passing the previous response's `nextCursor` as `cursor`; a null `nextCursor` means there are no further pages.
parameters:
- name: limit
in: query
description: Maximum number of results to return.
required: false
schema:
type: integer
default: 20
maximum: 100
minimum: 1
- name: cursor
in: query
description: Cursor from a previous response's `nextCursor`. Omit for the first page.
required: false
schema:
type: string
responses:
'200':
description: A page of webhooks.
content:
application/json:
schema:
description: A page of webhooks. Signing secrets are not included.
type: object
properties:
data:
description: The page of webhooks, newest first.
type: array
items:
$ref: '#/components/schemas/Webhook'
limit:
description: The maximum number of results returned in this page.
type: integer
nextCursor:
description: Cursor for the next page. Pass it back as `cursor` to continue paging. null when there are no more results.
anyOf:
- type: string
required:
- data
- limit
- nextCursor
x-codeSamples:
- lang: javascript
label: Node.js
source: "import Browserbase from \"@browserbasehq/sdk\";\n\nconst bb = new Browserbase({\n apiKey: process.env.BROWSERBASE_API_KEY,\n});\n\nconst { data } = await bb.webhooks.list();\n\nconsole.log(data);"
- lang: python
label: Python
source: 'import os
from browserbase import Browserbase
bb = Browserbase(api_key=os.environ["BROWSERBASE_API_KEY"])
page = bb.webhooks.list()
print(page.data)'
- lang: bash
label: cURL
source: "curl --request GET \\\n --url https://api.browserbase.com/v1/webhooks \\\n --header \"X-BB-API-Key: $BROWSERBASE_API_KEY\""
tags:
- Webhooks
/v1/webhooks/{id}:
get:
operationId: Webhooks_get
summary: Get a Webhook
description: Retrieve a single webhook by ID. The signing secret is not included; it is only ever returned on create and rotate.
parameters:
- name: id
in: path
description: The webhook ID.
required: true
schema:
type: string
format: uuid
responses:
'200':
description: The webhook.
content:
application/json:
schema:
$ref: '#/components/schemas/Webhook'
x-codeSamples:
- lang: javascript
label: Node.js
source: "import Browserbase from \"@browserbasehq/sdk\";\n\nconst bb = new Browserbase({\n apiKey: process.env.BROWSERBASE_API_KEY,\n});\n\nconst webhook = await bb.webhooks.retrieve(\"<webhook-id>\");\n\nconsole.log(webhook);"
- lang: python
label: Python
source: 'import os
from browserbase import Browserbase
bb = Browserbase(api_key=os.environ["BROWSERBASE_API_KEY"])
webhook = bb.webhooks.retrieve("<webhook-id>")
print(webhook)'
- lang: bash
label: cURL
source: "curl --request GET \\\n --url https://api.browserbase.com/v1/webhooks/<webhook-id> \\\n --header \"X-BB-API-Key: $BROWSERBASE_API_KEY\""
tags:
- Webhooks
patch:
operationId: Webhooks_update
summary: Update a Webhook
description: Update a webhook's endpoint URL, its subscribed event types, or both. Omitted fields are left unchanged. `eventTypes` replaces the existing subscription rather than adding to it. The signing secret is unaffected.
parameters:
- name: id
in: path
description: The webhook ID.
required: true
schema:
type: string
format: uuid
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
endpoint:
description: HTTPS URL that event deliveries are POSTed to. Must be publicly reachable.
type: string
format: uri
maxLength: 2048
pattern: ^https://[^/?#]+
eventTypes:
description: Event types this webhook subscribes to. Unknown types are rejected.
type: array
items:
type: string
enum:
- functions.builds.running
- functions.builds.completed
- functions.builds.failed
- functions.invocations.pending
- functions.invocations.running
- functions.invocations.completed
- functions.invocations.failed
minItems: 1
uniqueItems: true
additionalProperties: false
minProperties: 1
responses:
'200':
description: The webhook after the update.
content:
application/json:
schema:
$ref: '#/components/schemas/Webhook'
x-codeSamples:
- lang: javascript
label: Node.js
source: "import Browserbase from \"@browserbasehq/sdk\";\n\nconst bb = new Browserbase({\n apiKey: process.env.BROWSERBASE_API_KEY,\n});\n\nconst webhook = await bb.webhooks.update(\"<webhook-id>\", {\n eventTypes: [\n \"functions.invocations.completed\",\n \"functions.invocations.failed\",\n ],\n});\n\nconsole.log(webhook);"
- lang: python
label: Python
source: "import os\n\nfrom browserbase import Browserbase\n\nbb = Browserbase(api_key=os.environ[\"BROWSERBASE_API_KEY\"])\n\nwebhook = bb.webhooks.update(\n \"<webhook-id>\",\n event_types=[\n \"functions.invocations.completed\",\n \"functions.invocations.failed\",\n ],\n)\n\nprint(webhook)"
- lang: bash
label: cURL
source: "curl --request PATCH \\\n --url https://api.browserbase.com/v1/webhooks/<webhook-id> \\\n --header 'Content-Type: application/json' \\\n --header \"X-BB-API-Key: $BROWSERBASE_API_KEY\" \\\n --data '{\n \"eventTypes\": [\n \"functions.invocations.completed\",\n \"functions.invocations.failed\"\n ]\n }'"
tags:
- Webhooks
delete:
operationId: Webhooks_delete
summary: Delete a Webhook
description: Delete a webhook. Deliveries stop immediately and the signing secret is retired. Events that occurred before the delete are not replayed if the endpoint is registered again.
parameters:
- name: id
in: path
description: The webhook ID.
required: true
schema:
type: string
format: uuid
responses:
'204':
description: The webhook has been deleted.
x-codeSamples:
- lang: javascript
label: Node.js
source: "import Browserbase from \"@browserbasehq/sdk\";\n\nconst bb = new Browserbase({\n apiKey: process.env.BROWSERBASE_API_KEY,\n});\n\nawait bb.webhooks.delete(\"<webhook-id>\");"
- lang: python
label: Python
source: 'import os
from browserbase import Browserbase
bb = Browserbase(api_key=os.environ["BROWSERBASE_API_KEY"])
bb.webhooks.delete("<webhook-id>")'
- lang: bash
label: cURL
source: "curl --request DELETE \\\n --url https://api.browserbase.com/v1/webhooks/<webhook-id> \\\n --header \"X-BB-API-Key: $BROWSERBASE_API_KEY\""
tags:
- Webhooks
/v1/webhooks/{id}/secret:
post:
operationId: Webhooks_rotateSecret
summary: Rotate a Webhook signing secret
description: Issue a new signing secret for a webhook. By default the previous secret keeps verifying for 24 hours so a receiver can be updated without dropping deliveries; pass `revokeImmediately` to end that window at once. The new secret is returned only here.
parameters:
- name: id
in: path
description: The webhook ID.
required: true
schema:
type: string
format: uuid
requestBody:
content:
application/json:
schema:
type: object
properties:
revokeImmediately:
description: Expire the old secret at once instead of honouring it for 24 hours. Use when responding to a leak; deliveries signed with the old secret stop verifying immediately.
type: boolean
default: false
additionalProperties: false
responses:
'200':
description: The new signing secret.
content:
application/json:
schema:
description: The new signing secret. Shown once; store it now.
type: object
properties:
secret:
description: The new signing secret, prefixed `whsec_`.
type: string
required:
- secret
'429':
description: Too many previous secrets are still inside their grace window. Wait for one to expire, or retry with `revokeImmediately`.
content:
application/json:
schema:
description: Too many previous secrets are still inside their grace window. Wait for one to expire, or retry with `revokeImmediately`.
x-codeSamples:
- lang: javascript
label: Node.js
source: "import Browserbase from \"@browserbasehq/sdk\";\n\nconst bb = new Browserbase({\n apiKey: process.env.BROWSERBASE_API_KEY,\n});\n\nconst { secret } = await bb.webhooks.rotateSecret(\"<webhook-id>\");\n\nconsole.log(secret);"
- lang: python
label: Python
source: 'import os
from browserbase import Browserbase
bb = Browserbase(api_key=os.environ["BROWSERBASE_API_KEY"])
rotated = bb.webhooks.rotate_secret("<webhook-id>")
print(rotated.secret)'
- lang: bash
label: cURL
source: 'curl --request POST https://api.browserbase.com/v1/webhooks/<webhook-id>/secret --header "X-BB-API-Key: $BROWSERBASE_API_KEY"'
tags:
- Webhooks
components:
schemas:
Webhook:
description: A delivery endpoint for a project. Browserbase POSTs a signed event to it whenever one of its subscribed event types occurs. The signing secret is returned only when it is created or rotated.
type: object
properties:
id:
description: Unique identifier for the webhook.
type: string
projectId:
description: The project the webhook belongs to.
type: string
endpoint:
description: HTTPS URL that event deliveries are POSTed to. Must be publicly reachable.
type: string
format: uri
maxLength: 2048
pattern: ^https://[^/?#]+
eventTypes:
description: Event types this webhook subscribes to. Unknown types are rejected.
type: array
items:
type: string
enum:
- functions.builds.running
- functions.builds.completed
- functions.builds.failed
- functions.invocations.pending
- functions.invocations.running
- functions.invocations.completed
- functions.invocations.failed
minItems: 1
uniqueItems: true
createdAt:
type: string
format: date-time
updatedAt:
type: string
format: date-time
required:
- id
- projectId
- endpoint
- eventTypes
- createdAt
- updatedAt
securitySchemes:
BrowserbaseAuth:
type: apiKey
in: header
name: X-BB-API-Key
description: Your [Browserbase API Key](https://www.browserbase.com/settings).
x-provenance:
method: harvested
publisher: Browserbase
source: https://docs.browserbase.com/reference/api/openapi.v1.yaml
note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
stamped by stamp-openapi-provenance.py (roadmap#793)