Skip to main content
This page is a stub. Full API reference will be auto-generated from the OpenAPI spec. Coming soon.

Webhooks API

JJHub can deliver HTTP POST requests to your URL when events happen in a repository.

Webhook Events

EventDescription
pushCommits pushed to a bookmark
landing_request.openedLanding request created
landing_request.closedLanding request closed
landing_request.landedChanges landed to target bookmark
issue.openedIssue created
issue.closedIssue closed
workflow.startedWorkflow run started
workflow.completedWorkflow run completed

Create Webhook

POST /api/repos/{owner}/{repo}/hooks
Request:
{
  "url": "https://your-server.example.com/webhook",
  "content_type": "json",
  "secret": "your-webhook-secret",
  "events": ["push", "landing_request"],
  "active": true
}

HMAC-SHA256 Signature

Every webhook delivery includes an X-JJHub-Signature-256 header:
X-JJHub-Signature-256: sha256=abc123...
Verify with:
import { createHmac } from "crypto";

function verifySignature(payload: string, secret: string, signature: string): boolean {
  const expected = "sha256=" + createHmac("sha256", secret).update(payload).digest("hex");
  return expected === signature;
}

Delivery Retries

Failed deliveries are retried with exponential backoff (5s, 25s, 125s, 625s, 3125s).