{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/owlsinsight-com/json-schema/owlsinsight-com-webhook-deliveries-response-schema.json",
  "title": "WebhookDeliveriesResponse",
  "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/WebhookDeliveriesResponse",
  "properties": {
    "data": {
      "items": {
        "$ref": "#/$defs/WebhookDelivery"
      },
      "type": "array"
    },
    "has_more": {
      "description": "True when older deliveries remain: ask for the next page starting after the last `id`.",
      "type": "boolean"
    },
    "success": {
      "type": "boolean"
    }
  },
  "type": "object",
  "x-owls-required": [
    "success",
    "data",
    "has_more"
  ],
  "$defs": {
    "WebhookDelivery": {
      "description": "One delivery to an endpoint, as the deliveries listing returns it.",
      "properties": {
        "attempts": {
          "format": "double",
          "type": "number"
        },
        "created_at": {
          "type": [
            "string",
            "null"
          ]
        },
        "delivered_at": {
          "type": [
            "string",
            "null"
          ]
        },
        "expires_at": {
          "type": [
            "string",
            "null"
          ]
        },
        "id": {
          "description": "The event id (`Owls-Webhook-Id`).",
          "type": "string"
        },
        "last_error": {
          "type": [
            "string",
            "null"
          ]
        },
        "last_latency_ms": {
          "format": "double",
          "type": [
            "number",
            "null"
          ]
        },
        "last_status_code": {
          "description": "Your receiver's last HTTP status, or null.",
          "format": "double",
          "type": [
            "number",
            "null"
          ]
        },
        "next_attempt_at": {
          "description": "When the next attempt is due, while `pending`; otherwise null.",
          "type": [
            "string",
            "null"
          ]
        },
        "occurred_at": {
          "type": [
            "string",
            "null"
          ]
        },
        "payload": {
          "anyOf": [
            {
              "$ref": "#/$defs/WebhookDeliveryPayload"
            },
            {
              "type": "null"
            }
          ],
          "description": "The exact body sent, or null."
        },
        "response_excerpt": {
          "description": "Up to the first 512 bytes of your receiver's last answer.",
          "type": [
            "string",
            "null"
          ]
        },
        "status": {
          "$ref": "#/$defs/WebhookDeliveryStatus"
        },
        "type": {
          "type": "string",
          "x-extensible-enum": [
            "ev.found",
            "game.final",
            "game.started",
            "line.moved",
            "props.graded",
            "webhook.test"
          ]
        }
      },
      "type": "object",
      "x-owls-required": [
        "id",
        "type",
        "status",
        "attempts",
        "next_attempt_at",
        "expires_at",
        "last_status_code",
        "last_error",
        "last_latency_ms",
        "response_excerpt",
        "occurred_at",
        "created_at",
        "delivered_at",
        "payload"
      ]
    },
    "WebhookDeliveryPayload": {
      "description": "A delivery body as stored, with `data` untyped: its shape depends on `type`.",
      "properties": {
        "api_version": {
          "description": "The payload version.",
          "type": "string"
        },
        "created": {
          "description": "When the event was created (ISO 8601).",
          "type": "string"
        },
        "data": {},
        "endpoint_id": {
          "description": "The endpoint it was sent to, `whk_...`.",
          "type": "string"
        },
        "expires_at": {
          "description": "No delivery is attempted after this (ISO 8601).",
          "type": "string"
        },
        "id": {
          "description": "The event id, `evt_...`: identical on every retry and in the `Owls-Webhook-Id` header. Dedupe on it.",
          "type": "string"
        },
        "occurred_at": {
          "description": "When what it reports happened, as far as is known (ISO 8601).",
          "type": "string"
        },
        "type": {
          "description": "The event type; a type added later arrives as a string this version does not list.",
          "type": "string",
          "x-extensible-enum": [
            "ev.found",
            "game.final",
            "game.started",
            "line.moved",
            "props.graded",
            "webhook.test"
          ]
        }
      },
      "type": "object",
      "x-owls-required": [
        "data",
        "id",
        "type",
        "api_version",
        "created",
        "occurred_at",
        "expires_at",
        "endpoint_id"
      ]
    },
    "WebhookDeliveryStatus": {
      "description": "`pending` (queued or between retries), `delivered`, `failed` (retries exhausted),\n`expired` (past `expires_at`), `cancelled` (the endpoint was disabled or deleted) or\n`shadow` (recorded while the event type was held back, never sent).",
      "type": "string",
      "x-extensible-enum": [
        "cancelled",
        "delivered",
        "expired",
        "failed",
        "pending",
        "shadow"
      ]
    }
  }
}