Outbound Webhooks
Administrators can configure signed outbound webhooks in System Configuration → Notifications → Webhooks.
Formats & Event Subscriptions
Section titled “Formats & Event Subscriptions”- Formats:
Generic JSON (v1),Slack Incoming Webhook,Discord Webhook, andMattermost Webhook. - Events:
ticket.created,ticket.updated,ticket.moved,ticket.assigned,comment.created, andmention. - Scope filters: Restrict endpoints to specific teams, projects, or boards.
- Privacy: Webhook payloads never include secrets or user email addresses (mentions include display names only).
Generic JSON Schema (version: 1)
Section titled “Generic JSON Schema (version: 1)”{ "version": 1, "event": "ticket.created", "deliveryId": "uuid", "timestamp": "2026-11-19T18:00:00.000Z", "data": { "orgId": "uuid", "teamId": "uuid", "projectId": "uuid", "boardId": "uuid", "ticket": { "id": "uuid", "key": "PAY-12", "title": "Fix webhook retry", "priority": "high", "url": "https://patchwork.example.com/?ticket=uuid" }, "actor": { "id": "uuid", "name": "Alex" } }}Verifying Signatures
Section titled “Verifying Signatures”Every request includes X-Patchwork-Event, X-Patchwork-Delivery, X-Patchwork-Timestamp (Unix seconds), and X-Patchwork-Signature: v1=<hex>. Compute HMAC-SHA256 over "<timestamp>.<rawBody>" and reject timestamps older than 5 minutes to prevent replay attacks.
// Node.js verificationimport crypto from "node:crypto";export function verifyPatchworkWebhook(secret, timestamp, rawBody, signatureHeader) { if (Math.abs(Date.now() / 1000 - Number(timestamp)) > 300) return false; const expected = "v1=" + crypto.createHmac("sha256", secret).update(`${timestamp}.${rawBody}`).digest("hex"); return crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(signatureHeader));}# Python verificationimport hmac, hashlib, timedef verify_patchwork_webhook(secret: str, timestamp: str, raw_body: bytes, signature: str) -> bool: if abs(time.time() - int(timestamp)) > 300: return False expected = "v1=" + hmac.new(secret.encode(), f"{timestamp}.".encode() + raw_body, hashlib.sha256).hexdigest() return hmac.compare_digest(expected, signature)SSRF Protection, Retries & Circuit Breaker
Section titled “SSRF Protection, Retries & Circuit Breaker”- By default, only
https://URLs resolving to public IP addresses are allowed; loopback, private RFC1918, link-local, cloud metadata (169.254.169.254), and multicast ranges are blocked, DNS is pinned at connect time to prevent DNS rebinding, and redirects are never followed. - For self-hosted Mattermost/intranet targets, admins can enable Allow webhooks to private network addresses in Notifications → General & Privacy.
- Failed deliveries retry with exponential backoff up to 6 attempts (~1 hour) with a 5-second timeout; 10 consecutive failures auto-disable the endpoint (circuit breaker). Use Delivery log to inspect redacted errors and manually retry.