{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/owlsinsight-com/json-schema/owlsinsight-com-webhook-create-response-schema.json",
  "title": "WebhookCreateResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/owlsinsight-com-webhooks-api-openapi.yml#/components/schemas/WebhookCreateResponse",
  "properties": {
    "data": {
      "$ref": "#/$defs/WebhookEndpointWithSecret",
      "description": "The endpoint and its signing secret, which is returned here and by rotate-secret only."
    },
    "success": {
      "type": "boolean"
    }
  },
  "type": "object",
  "x-owls-required": [
    "success",
    "data"
  ],
  "$defs": {
    "WebhookEndpointStatus": {
      "description": "`enabled`; `disabled` (by you, or after your receiver answered 410 Gone); or\n`auto_disabled` (after 50 failed deliveries in a row and 3 days without a success). An\nupdate with `enabled` set to true resumes a disabled or auto-disabled endpoint.",
      "type": "string",
      "x-extensible-enum": [
        "auto_disabled",
        "disabled",
        "enabled"
      ]
    },
    "WebhookEndpointWithSecret": {
      "description": "What create returns: the endpoint and its signing secret.",
      "properties": {
        "api_version": {
          "description": "The payload version this endpoint's deliveries carry.",
          "type": "string"
        },
        "consecutive_failures": {
          "description": "Failed deliveries in a row.",
          "format": "double",
          "type": "number"
        },
        "created_at": {
          "type": "string"
        },
        "description": {
          "type": [
            "string",
            "null"
          ]
        },
        "event_types": {
          "items": {
            "$ref": "#/$defs/WebhookSubscribableEventType"
          },
          "type": "array"
        },
        "failing_since": {
          "description": "When the current run of failures began (ISO 8601), or null.",
          "type": [
            "string",
            "null"
          ]
        },
        "filters": {
          "$ref": "#/$defs/WebhookFilters"
        },
        "id": {
          "description": "The endpoint id, `whk_...`.",
          "type": "string"
        },
        "last_success_at": {
          "type": [
            "string",
            "null"
          ]
        },
        "previous_secret_expires_at": {
          "description": "While set, deliveries also carry a v1 signature made with the previous secret, until this time (ISO 8601).",
          "type": [
            "string",
            "null"
          ]
        },
        "secret": {
          "description": "The signing secret, `whsec_...`. Returned once: store it now.",
          "type": "string"
        },
        "secret_hint": {
          "description": "The last 4 characters of the current signing secret, to tell secrets apart.",
          "type": "string"
        },
        "status": {
          "$ref": "#/$defs/WebhookEndpointStatus"
        },
        "status_reason": {
          "description": "Why the endpoint is not enabled, or null.",
          "type": [
            "string",
            "null"
          ]
        },
        "updated_at": {
          "type": "string"
        },
        "url": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "type": "object",
      "x-owls-required": [
        "secret",
        "id",
        "url",
        "description",
        "event_types",
        "filters",
        "api_version",
        "status",
        "status_reason",
        "secret_hint",
        "previous_secret_expires_at",
        "consecutive_failures",
        "failing_since",
        "last_success_at",
        "created_at",
        "updated_at"
      ]
    },
    "WebhookEvFoundFilters": {
      "description": "`ev.found` filters as stored: every field is set.",
      "properties": {
        "kinds": {
          "description": "The price kinds that fire (default both).",
          "items": {
            "$ref": "#/$defs/WebhookEvKind"
          },
          "type": "array"
        },
        "min_ev": {
          "description": "The least EV that fires, in percent: 1, 2, 3, 5 or 8 (default 3).",
          "format": "double",
          "type": "number"
        },
        "venues": {
          "description": "Sportsbook or venue keys; empty (the default) means every one the EV board scores.",
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "type": "object",
      "x-owls-required": [
        "min_ev",
        "kinds",
        "venues"
      ]
    },
    "WebhookEvKind": {
      "description": "`ev.found` price kinds: `book` (a sportsbook) or `venue` (an exchange or prediction market).",
      "type": "string",
      "x-extensible-enum": [
        "book",
        "venue"
      ]
    },
    "WebhookFilters": {
      "description": "An endpoint's filters as stored: the API fills in every default.",
      "properties": {
        "ev_found": {
          "$ref": "#/$defs/WebhookEvFoundFilters"
        },
        "line_moved": {
          "$ref": "#/$defs/WebhookLineMovedFilters"
        },
        "sports": {
          "description": "Sport keys; empty (the default) means every sport each subscribed event type covers.",
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "type": "object",
      "x-owls-required": [
        "sports",
        "line_moved",
        "ev_found"
      ]
    },
    "WebhookLineMarket": {
      "description": "The markets `line.moved` watches.",
      "type": "string",
      "x-extensible-enum": [
        "moneyline",
        "spread",
        "total"
      ]
    },
    "WebhookLineMovedFilters": {
      "description": "`line.moved` filters as stored: every field is set.",
      "properties": {
        "markets": {
          "description": "The markets watched (default all three).",
          "items": {
            "$ref": "#/$defs/WebhookLineMarket"
          },
          "type": "array"
        },
        "point_step": {
          "description": "The spread or total line move that fires: 0.5, 1, 1.5, 2 or 3 (default 1).",
          "format": "double",
          "type": "number"
        },
        "price_step_pp": {
          "description": "The implied-probability move that fires, in percentage points: 0.5, 1, 2, 3 or 5 (default 2).",
          "format": "double",
          "type": "number"
        }
      },
      "type": "object",
      "x-owls-required": [
        "price_step_pp",
        "point_step",
        "markets"
      ]
    },
    "WebhookSubscribableEventType": {
      "description": "Event types an endpoint can subscribe to.",
      "type": "string",
      "x-extensible-enum": [
        "ev.found",
        "game.final",
        "game.started",
        "line.moved",
        "props.graded"
      ]
    }
  }
}