Browse this section
API reference

Webhooks

Receive events when runs complete, approvals are requested, or sources sync.

Endpoints

MethodPathPurpose
GET/webhooksList endpoints
POST/webhooksCreate (url, events[], optional description)
PATCH/webhooks/{id}Update
DELETE/webhooks/{id}Delete
POST/webhooks/{id}/testSend a test event

Events

EventWhen
run.startedA run starts
run.approval_requestedA policy paused a run
run.completedStatus became succeeded, handed_off, failed or cancelled
query.flaggedA user down-rated an answer
source.syncedA source finished syncing
source.failedA source sync failed
agent.promotedA version was promoted
workspace.emergency_stopEmergency stop engaged or released

Payload

{
  "id": "evt_01j9x7g7h8",
  "type": "run.completed",
  "created_at": "2026-09-19T08:24:40Z",
  "data": { "run": { "id": "run_01j9x6e5f6", "status": "succeeded", "…": "…" } }
}

Signatures

Each delivery includes X-BMC-Signature: t=<unix>,v1=<hmac_sha256>. Compute HMAC_SHA256(secret, t + "." + raw_body) and compare with v1; reject if t is older than 5 minutes.

import hmac, hashlib, time

def verify(secret: str, header: str, body: bytes) -> bool:
    parts = dict(p.split("=") for p in header.split(","))
    if time.time() - int(parts["t"]) > 300:
        return False
    expected = hmac.new(secret.encode(), f"{parts['t']}.".encode() + body, hashlib.sha256).hexdigest()
    return hmac.compare_digest(expected, parts["v1"])

Delivery

Deliveries time out after 10 seconds and are retried with exponential backoff for 24 hours (up to 12 attempts). Respond 2xx quickly and process asynchronously. Failed deliveries are visible under Settings → Webhooks → (endpoint) → Deliveries.