{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/arkrel-com/json-schema/arkrel-com-webhook-input-schema.json",
  "title": "WebhookInput",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/arkrel-com-webhooks-api-openapi.yml#/components/schemas/WebhookInput",
  "type": "object",
  "required": [
    "url",
    "events"
  ],
  "properties": {
    "url": {
      "type": "string",
      "format": "uri",
      "pattern": "^https://[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*\\.[a-zA-Z]{2,}(/[a-zA-Z0-9._~!$&'()*+,;=:@/?-]*)?$",
      "description": "Must be https, with a real (dotted) hostname (api/src/lib/\nwebhookSecurity.ts's validateWebhookUrl; local/dev also accepts\nhttp so a developer can point a webhook at a local test\nreceiver, but the public contract documented here is the\nproduction rule). Rejected at registration time, and\nre-checked on every delivery attempt, if it resolves to a\nprivate, loopback, link-local, or cloud metadata address (e.g.\na bare numeric host like `https://0`, which a URL parser\nnormalizes to `0.0.0.0`).\n"
    },
    "events": {
      "type": "array",
      "minItems": 1,
      "description": "Must be non-empty (api/src/routes/v1/webhooks.ts rejects `[]` as MISSING_EVENTS).",
      "items": {
        "type": "string",
        "enum": [
          "document.succeeded",
          "document.partial",
          "document.failed",
          "document.needs_review"
        ]
      }
    }
  }
}