{"openapi":"3.0.3","info":{"title":"Webhook Notification API","description":"API for registering and managing webhook notification subscriptions","version":"1.0.0"},"components":{"schemas":{}},"paths":{"/webhooks":{"post":{"tags":["webhooks"],"description":"Registers a webhook URL to receive notifications for all DAOs. On first registration, returns a one-time HMAC secret used to verify delivery signatures — it is never shown again, so store it immediately. Re-registering an already-active webhook returns success without a secret.\n\nDeliveries are signed with HMAC-SHA256: HMAC-SHA256(`${timestamp}.${rawBody}`, secret), sent as the `X-Webhook-Timestamp` header (unix seconds) and the `X-Webhook-Signature-V2` header (raw hex digest). Receivers should recompute the signature and compare it using a timing-safe comparison (`crypto.timingSafeEqual`), and reject requests where the timestamp is more than 5 minutes old to prevent replay attacks.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"],"additionalProperties":false}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"secret":{"type":"string"},"note":{"type":"string"}},"required":["success","secret","note"],"additionalProperties":false},{"type":"object","properties":{"success":{"type":"boolean","enum":[true]}},"required":["success"],"additionalProperties":false}]}}}}}},"delete":{"tags":["webhooks"],"description":"Deactivates a previously registered webhook URL, stopping further deliveries.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]}},"required":["success"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false}}}}}}}}}