{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/coldrig-dev/json-schema/coldrig-dev-webhook-update-input-schema.json",
  "title": "WebhookUpdateInput",
  "description": "Every field optional; at least one of url, eventTypes, secret, or active must be present.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/coldrig-dev-webhooks-api-openapi.yml#/components/schemas/WebhookUpdateInput",
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "minLength": 1,
      "maxLength": 2048
    },
    "eventTypes": {
      "type": "array",
      "minItems": 1,
      "maxItems": 4,
      "items": {
        "$ref": "#/$defs/WebhookEventType"
      }
    },
    "secret": {
      "type": "string",
      "minLength": 16,
      "maxLength": 200,
      "description": "Rotates the signing secret; the new value is returned once in the response."
    },
    "active": {
      "type": "boolean",
      "description": "Set false to pause delivery without deleting; set true to resume (also re-enables an auto-disabled subscription).\n"
    }
  },
  "$defs": {
    "WebhookEventType": {
      "type": "string",
      "enum": [
        "reply",
        "bounce",
        "soft_bounce",
        "complaint",
        "unsubscribe"
      ],
      "description": "reply = genuine reply; bounce = HARD (permanent) bounce; soft_bounce = transient bounce; complaint = spam complaint; unsubscribe = typed unsubscribe-link click."
    }
  }
}