Skip to main content

Overview

Webhooks allow you to receive HTTP notifications whenever significant events occur in your organization. Instead of polling the API, you register a URL and Jinba Toolbox pushes event payloads to it in real time. Webhooks are configured per organization (by Owners and Admins) and can subscribe to one or more event types.

Event Types

Run events are dispatched for executions through the organization run endpoint (POST /v1/orgs/:orgId/toolsets/:slug/tools/:toolSlug/run, which the SDK’s run() uses). Test runs, public-endpoint runs and MCP calls do not trigger webhooks.

Setting Up Webhooks

1

Create a webhook endpoint

Set up an HTTP endpoint on your server that can receive POST requests. The endpoint must return a 2xx status code to acknowledge receipt.
2

Register the webhook

Use the API or the web console (Webhooks in the organization sidebar, Create Webhook) to register your endpoint URL and select the events you want to subscribe to. Registering and testing need an Owner or Admin session token; an API key (Member level) gets 403.
3

Store the signing secret

When you create a webhook, a signing secret is generated and returned once in the creation response (the console shows it in the Webhook Created dialog). Store it securely — you will use it to verify incoming payloads. Later reads only return a secretPreview.
4

Send a test event

Verify your endpoint is working by sending a test event (the console has a play button per webhook). The test payload is a tool.run.completed event with data: { "test": true, "message": "This is a test webhook delivery" }:

Webhook Configuration

Each webhook has the following properties:

Payload Format

Every webhook delivery is an HTTP POST with Content-Type: application/json, an X-Webhook-Event header carrying the event name, an X-Webhook-Signature header (see below) and a JSON payload with the following structure:

Event-Specific Payloads

tool.run.completed
tool.run.failed
error is the error message string. toolset.published

Signature Verification

Every webhook request includes an X-Webhook-Signature header containing an HMAC-SHA256 signature of the request body, computed with your webhook’s signing secret.
Verify the signature on your server to ensure payloads have not been tampered with:

Webhook Management API

Creating, updating, deleting and testing webhooks requires the Owner or Admin role; API keys (Member level) can only list them.

Delivery and Retry Behavior

Each delivery waits up to 10 seconds for a response. A 2xx status code counts as success. If your endpoint does not return 2xx, the delivery is recorded as failed with a retry time (1 minute, then 5 minutes, at most 3 attempts), but no background job currently processes those retries, so in practice each event is delivered once. Treat a failed delivery as lost and reconcile from the Runs page or API if you need it. The webhook itself is never disabled automatically; you can enable or disable it with the Active / Disabled toggle in the console or via PATCH with enabled.

Best Practices

  • Always verify the signature before processing a payload to prevent tampering.
  • Return a 200 status quickly — perform any heavy processing asynchronously after acknowledging the webhook.
  • Use idempotent processing — webhook deliveries may arrive more than once due to retries. Use the runId or event timestamp to deduplicate.
  • Monitor webhook health — use the test button to verify endpoints and investigate delivery failures.
  • Subscribe only to needed events — reduce noise by selecting only the events your integration requires.