{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/savanto-ai/json-schema/savanto-ai-create-webhook-input-schema.json",
  "title": "CreateWebhookInput",
  "x-generated": "2026-11-23",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/savanto-ai-api-openapi.json#/components/schemas/CreateWebhookInput",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 255
    },
    "url": {
      "type": "string",
      "minLength": 1,
      "format": "uri"
    },
    "events": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "minItems": 1
    },
    "description": {
      "type": "string",
      "maxLength": 1000
    },
    "method": {
      "type": "string",
      "enum": [
        "POST",
        "PUT",
        "PATCH"
      ]
    },
    "secret": {
      "type": "string"
    },
    "timeoutMs": {
      "type": "integer",
      "minimum": 1000,
      "maximum": 60000
    },
    "eventFilters": {
      "type": "object",
      "additionalProperties": {}
    },
    "payloadTemplate": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "active",
        "inactive"
      ]
    },
    "retryPolicy": {
      "type": "object",
      "properties": {
        "maxAttempts": {
          "type": "integer",
          "minimum": 1,
          "maximum": 10
        },
        "backoffStrategy": {
          "type": "string",
          "enum": [
            "linear",
            "exponential"
          ]
        },
        "initialDelayMs": {
          "type": "integer",
          "minimum": 100
        },
        "maxDelayMs": {
          "type": "integer",
          "minimum": 1000
        }
      }
    },
    "headers": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "authType": {
      "type": "string",
      "enum": [
        "none",
        "bearer",
        "basic",
        "custom",
        "apiKey"
      ]
    },
    "authConfig": {
      "type": "object",
      "properties": {
        "bearerToken": {
          "type": "string"
        },
        "username": {
          "type": "string"
        },
        "password": {
          "type": "string"
        },
        "headerName": {
          "type": "string"
        },
        "headerValue": {
          "type": "string"
        },
        "apiKey": {
          "type": "string"
        },
        "apiKeyHeader": {
          "type": "string"
        }
      }
    },
    "schedule": {
      "type": "object",
      "properties": {
        "enabled": {
          "type": "boolean"
        },
        "cronExpression": {
          "type": "string"
        },
        "timezone": {
          "type": "string"
        }
      },
      "required": [
        "enabled",
        "cronExpression",
        "timezone"
      ]
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {}
    }
  },
  "required": [
    "name",
    "url",
    "events"
  ]
}