{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "WebhookEstimate",
"description": "How often a would-be subscription would have fired over the requested window. Nothing is stored and no delivery is sent.",
"type": "object",
"required": [
"basis",
"days",
"event_type",
"ladder",
"per_day",
"per_day_max",
"per_day_p50",
"sample",
"total",
"window"
],
"properties": {
"basis": {
"description": "How the estimate was produced, so the numbers can be read for what they are.",
"type": "object",
"required": [
"mode"
],
"properties": {
"mode": {
"description": "`exact` counted every occurrence in the window. `sampled` scaled the counts from a capped scan, and the note says by how much. `replayed` re-ran a windowed rule over history at your own parameters.",
"type": "string",
"enum": [
"exact",
"sampled",
"replayed"
],
"example": "exact"
},
"note": {
"description": "What qualifies the numbers, when anything does.",
"type": "string",
"nullable": true
}
}
},
"days": {
"description": "Days the answer covers. Shorter than requested when the event type carries a shorter cap.",
"type": "integer",
"format": "int64",
"example": 7
},
"distribution": {
"description": "Quantiles of the primary metric. Null when the type has no primary metric or nothing matched.",
"nullable": true,
"allOf": [
{
"description": "Quantiles of the primary metric over the matched occurrences, for choosing a threshold against real history.",
"type": "object",
"required": [
"max",
"n",
"p50",
"p90",
"p99"
],
"properties": {
"max": {
"description": "Largest value seen.",
"type": "number",
"example": 4210000
},
"n": {
"description": "Occurrences the quantiles are computed over.",
"type": "integer",
"format": "int64",
"example": 842
},
"p50": {
"description": "Median.",
"type": "number",
"example": 18400
},
"p90": {
"description": "90th percentile.",
"type": "number",
"example": 132000
},
"p99": {
"description": "99th percentile.",
"type": "number",
"example": 910000
}
}
}
]
},
"event_type": {
"description": "Event type that was evaluated.",
"type": "string",
"example": "market.liquidation"
},
"ladder": {
"description": "Ascending. Empty when there is no primary metric.",
"type": "array",
"items": {
"description": "One rung of the threshold ladder: the daily rate the same configuration would have had at a different threshold.",
"type": "object",
"required": [
"per_day",
"value"
],
"properties": {
"per_day": {
"description": "Deliveries a day at that threshold, everything else unchanged.",
"type": "number",
"example": 3.4
},
"value": {
"description": "Threshold on the primary metric.",
"type": "number",
"example": 250000
}
}
}
},
"per_day": {
"description": "One entry per day, oldest first, zero filled. The last entry ends at the moment of the request.",
"type": "array",
"items": {
"description": "One 24 hour bin of the estimate window.",
"type": "object",
"required": [
"count",
"date"
],
"properties": {
"count": {
"description": "Occurrences that would have been delivered in the bin.",
"type": "integer",
"format": "int64",
"example": 12
},
"date": {
"description": "UTC date the bin ends on.",
"type": "string",
"format": "date",
"example": "2026-09-19"
}
}
}
},
"per_day_max": {
"description": "Busiest day in the window.",
"type": "integer",
"format": "int64",
"example": 26
},
"per_day_p50": {
"description": "Median deliveries a day across the window.",
"type": "number",
"example": 11
},
"primary_metric": {
"description": "The metric the ladder and the distribution are about. Null when the type has none.",
"type": "string",
"nullable": true,
"example": "notional_usd"
},
"sample": {
"description": "Newest matches first, in the same shape the dry-run returns.",
"type": "array",
"items": {
"description": "One occurrence that would have been delivered, in the shape the delivered payload carries.",
"type": "object",
"required": [
"data",
"observed_at_estimate"
],
"properties": {
"data": {
"description": "The occurrence body, the same `data` a delivery would carry.",
"type": "object",
"additionalProperties": true
},
"observed_at_estimate": {
"description": "The occurrence's own timestamp. A real delivery's `observed_at` is this plus the time it takes to see the occurrence.",
"type": "string",
"format": "date-time"
}
}
}
},
"total": {
"description": "Occurrences that would have been delivered across the window.",
"type": "integer",
"format": "int64",
"example": 84
},
"window": {
"description": "The window a preview vouches for. It can start later than the one that was asked for when a scan reached its row cap.",
"type": "object",
"required": [
"from",
"to"
],
"properties": {
"from": {
"description": "Start of the window the answer covers.",
"type": "string",
"format": "date-time"
},
"to": {
"description": "End of the window, which is the moment of the request.",
"type": "string",
"format": "date-time"
}
}
}
}
}