{"openapi":"3.1.0","info":{"title":"MarcAI API","version":"0.1.0","description":"Cifre, nu promisiuni. Errors are RFC 9457 application/problem+json."},"components":{"schemas":{"ProblemDetails":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}},"parameters":{}},"paths":{"/health":{"get":{"tags":["ops"],"summary":"Liveness probe","responses":{"200":{"description":"Process is alive","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]}},"required":["status"]}}}}}}},"/ready":{"get":{"tags":["ops"],"summary":"Readiness probe","responses":{"200":{"description":"Dependencies are reachable","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ready"]}},"required":["status"]}}}},"503":{"description":"A dependency is not ready","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/sports":{"get":{"tags":["catalog"],"summary":"Supported sports","responses":{"200":{"description":"Supported sports","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"string","enum":["football","tennis","basketball","hockey","handball","esports"]}}},"required":["items"]}}}}}}},"/v1/matches":{"get":{"tags":["matches"],"summary":"List matches","description":"Scheduled/live matches soonest first; `status=finished` newest first. Without `status`, `from`, `to` the list starts 3 h before now (upcoming + live). `value` is enabled only when the model beat the close. Premium/Pro sessions get the full prediction and `value`; anonymous/Free get the favourite outcome only (`prediction.limited`), no `value` (D23).","parameters":[{"schema":{"type":"string","enum":["football","tennis","basketball","hockey","handball","esports"]},"required":false,"name":"sport","in":"query"},{"schema":{"type":"string","enum":["scheduled","live","finished"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":64},"required":false,"name":"league","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"to","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Matches ordered by kickoff","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"sport":{"type":"string","enum":["football","tennis","basketball","hockey","handball","esports"]},"league":{"type":"string","minLength":1},"home":{"type":"string","minLength":1},"away":{"type":"string","minLength":1},"kickoff":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["scheduled","live","finished"]},"resultPending":{"type":"boolean"},"score":{"type":"object","properties":{"home":{"type":"integer","minimum":0},"away":{"type":"integer","minimum":0}},"required":["home","away"]},"prediction":{"type":"object","properties":{"model":{"type":"string","minLength":1},"probabilities":{"type":"object","properties":{"home":{"type":["number","null"],"exclusiveMinimum":0},"draw":{"type":["number","null"],"exclusiveMinimum":0},"away":{"type":["number","null"],"exclusiveMinimum":0}},"required":["home","draw","away"]},"fairOdds":{"type":"object","properties":{"home":{"type":["number","null"],"exclusiveMinimum":0},"draw":{"type":["number","null"],"exclusiveMinimum":0},"away":{"type":["number","null"],"exclusiveMinimum":0}},"required":["home","draw","away"]},"createdAt":{"type":"string","format":"date-time"},"limited":{"type":"boolean"}},"required":["model","probabilities","fairOdds","createdAt"]},"odds":{"type":"object","properties":{"prices":{"type":"object","properties":{"home":{"type":"number","exclusiveMinimum":0},"draw":{"type":"number","exclusiveMinimum":0},"away":{"type":"number","exclusiveMinimum":0}},"required":["home","draw","away"]},"opening":{"type":"object","properties":{"home":{"type":"number","exclusiveMinimum":0},"draw":{"type":"number","exclusiveMinimum":0},"away":{"type":"number","exclusiveMinimum":0}},"required":["home","draw","away"]},"source":{"type":"string","minLength":1},"observedAt":{"type":"string","format":"date-time"}},"required":["prices","source","observedAt"]},"value":{"type":"object","properties":{"enabled":{"type":"boolean"},"reason":{"type":"string","enum":["validated","model_worse_than_close","no_backtest","no_odds","disabled_by_admin"]}},"required":["enabled","reason"]},"verdict":{"type":"object","properties":{"outcome":{"type":"string","enum":["home","draw","away"]},"modelProbability":{"type":"number","minimum":0,"maximum":1},"marketProbability":{"type":["number","null"],"minimum":0,"maximum":1},"favourite":{"type":"string","enum":["home","draw","away"]},"favouriteHit":{"type":"boolean"},"closer":{"type":["string","null"],"enum":["model","market","level",null]}},"required":["outcome","modelProbability","marketProbability","favourite","favouriteHit","closer"]},"live":{"type":"object","properties":{"minute":{"type":["integer","null"],"minimum":0},"period":{"type":"string","enum":["1H","HT","2H","ET1","ET2","PEN"]},"red":{"type":"object","properties":{"home":{"type":"integer","minimum":0},"away":{"type":"integer","minimum":0}},"required":["home","away"]},"yellow":{"type":"object","properties":{"home":{"type":"integer","minimum":0},"away":{"type":"integer","minimum":0}},"required":["home","away"]},"corners":{"type":"object","properties":{"home":{"type":"integer","minimum":0},"away":{"type":"integer","minimum":0}},"required":["home","away"]},"at":{"type":"string","format":"date-time"}},"required":["minute"]},"source":{"type":"string","minLength":1}},"required":["id","sport","league","home","away","kickoff","status"]}}},"required":["items"]}}}},"400":{"description":"Invalid query","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/matches/{id}":{"get":{"tags":["matches"],"summary":"One match with prediction, consensus odds and value gate","parameters":[{"schema":{"type":"string","pattern":"^\\d{1,18}$"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The match","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","minLength":1},"sport":{"type":"string","enum":["football","tennis","basketball","hockey","handball","esports"]},"league":{"type":"string","minLength":1},"home":{"type":"string","minLength":1},"away":{"type":"string","minLength":1},"kickoff":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["scheduled","live","finished"]},"resultPending":{"type":"boolean"},"score":{"type":"object","properties":{"home":{"type":"integer","minimum":0},"away":{"type":"integer","minimum":0}},"required":["home","away"]},"prediction":{"type":"object","properties":{"model":{"type":"string","minLength":1},"probabilities":{"type":"object","properties":{"home":{"type":["number","null"],"exclusiveMinimum":0},"draw":{"type":["number","null"],"exclusiveMinimum":0},"away":{"type":["number","null"],"exclusiveMinimum":0}},"required":["home","draw","away"]},"fairOdds":{"type":"object","properties":{"home":{"type":["number","null"],"exclusiveMinimum":0},"draw":{"type":["number","null"],"exclusiveMinimum":0},"away":{"type":["number","null"],"exclusiveMinimum":0}},"required":["home","draw","away"]},"createdAt":{"type":"string","format":"date-time"},"limited":{"type":"boolean"}},"required":["model","probabilities","fairOdds","createdAt"]},"odds":{"type":"object","properties":{"prices":{"type":"object","properties":{"home":{"type":"number","exclusiveMinimum":0},"draw":{"type":"number","exclusiveMinimum":0},"away":{"type":"number","exclusiveMinimum":0}},"required":["home","draw","away"]},"opening":{"type":"object","properties":{"home":{"type":"number","exclusiveMinimum":0},"draw":{"type":"number","exclusiveMinimum":0},"away":{"type":"number","exclusiveMinimum":0}},"required":["home","draw","away"]},"source":{"type":"string","minLength":1},"observedAt":{"type":"string","format":"date-time"}},"required":["prices","source","observedAt"]},"value":{"type":"object","properties":{"enabled":{"type":"boolean"},"reason":{"type":"string","enum":["validated","model_worse_than_close","no_backtest","no_odds","disabled_by_admin"]}},"required":["enabled","reason"]},"verdict":{"type":"object","properties":{"outcome":{"type":"string","enum":["home","draw","away"]},"modelProbability":{"type":"number","minimum":0,"maximum":1},"marketProbability":{"type":["number","null"],"minimum":0,"maximum":1},"favourite":{"type":"string","enum":["home","draw","away"]},"favouriteHit":{"type":"boolean"},"closer":{"type":["string","null"],"enum":["model","market","level",null]}},"required":["outcome","modelProbability","marketProbability","favourite","favouriteHit","closer"]},"live":{"type":"object","properties":{"minute":{"type":["integer","null"],"minimum":0},"period":{"type":"string","enum":["1H","HT","2H","ET1","ET2","PEN"]},"red":{"type":"object","properties":{"home":{"type":"integer","minimum":0},"away":{"type":"integer","minimum":0}},"required":["home","away"]},"yellow":{"type":"object","properties":{"home":{"type":"integer","minimum":0},"away":{"type":"integer","minimum":0}},"required":["home","away"]},"corners":{"type":"object","properties":{"home":{"type":"integer","minimum":0},"away":{"type":"integer","minimum":0}},"required":["home","away"]},"at":{"type":"string","format":"date-time"}},"required":["minute"]},"source":{"type":"string","minLength":1}},"required":["id","sport","league","home","away","kickoff","status"]}}}},"400":{"description":"Invalid id","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"404":{"description":"Match not found","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/models":{"get":{"tags":["matches"],"summary":"Walk-forward backtest of the active models vs the closing market","responses":{"200":{"description":"Active model reports","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"sport":{"type":"string","enum":["football","tennis","basketball","hockey","handball","esports"]},"model":{"type":"string","minLength":1},"trainedAt":{"type":"string","format":"date-time"},"leagues":{"type":"array","items":{"type":"string"}},"matches":{"type":"integer","minimum":0},"logLoss":{"type":"object","properties":{"model":{"type":"number"},"market":{"type":"number"},"blend":{"type":"number"}},"required":["model","market"]},"rps":{"type":"object","properties":{"model":{"type":"number"},"market":{"type":"number"}},"required":["model","market"]},"betting":{"type":"object","properties":{"bets":{"type":"integer","minimum":0},"roi":{"type":"number"},"clvBeatRate":{"type":"number"},"meanClv":{"type":"number"}},"required":["bets","roi","clvBeatRate","meanClv"]},"valueEnabled":{"type":"boolean"}},"required":["sport","model","trainedAt","leagues","matches","logLoss","valueEnabled"]}}},"required":["items"]}}}}}}},"/v1/tickets/xray":{"post":{"tags":["tickets"],"summary":"Ticket x-ray: margin, fair probability and EV of an accumulator","description":"Pure maths over the supplied odds. Informational only — not betting advice.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"legs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128},"odds":{"type":"number","exclusiveMinimum":1,"exclusiveMaximum":10000},"marketOdds":{"type":"array","items":{"type":"number","exclusiveMinimum":1,"exclusiveMaximum":10000},"minItems":2,"maxItems":64},"selection":{"type":"integer","minimum":0},"modelProbability":{"type":"number","exclusiveMinimum":0,"exclusiveMaximum":1}},"required":["id","odds","marketOdds","selection"]},"minItems":1,"maxItems":30}},"required":["legs"]}}}},"responses":{"200":{"description":"Ticket analysis","content":{"application/json":{"schema":{"type":"object","properties":{"legs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"odds":{"type":"number"},"impliedProbability":{"type":"number"},"fairProbability":{"type":"number"},"legMargin":{"type":"number"},"probability":{"type":"number"},"ev":{"type":"number"}},"required":["id","odds","impliedProbability","fairProbability","legMargin","probability","ev"]}},"combinedOdds":{"type":"number"},"winProbability":{"type":"number"},"ev":{"type":"number"},"compoundedMargin":{"type":"number"},"verdict":{"type":"string","enum":["positive","neutral","negative"]}},"required":["legs","combinedOdds","winProbability","ev","compoundedMargin","verdict"]}}}},"400":{"description":"Invalid ticket","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"422":{"description":"Ticket cannot be analysed","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"429":{"description":"Too many analyses from this address (60 per 10 minutes); see Retry-After","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/me":{"get":{"tags":["auth"],"summary":"The signed-in user and effective plan (session cookie from /api/auth)","responses":{"200":{"description":"Signed-in user","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string","format":"email"},"name":{"type":"string"},"plan":{"type":"string","enum":["free","premium","pro"]},"comp":{"type":"string","enum":["beta"]},"subscription":{"type":["object","null"],"properties":{"plan":{"type":"string","enum":["premium","pro"]},"status":{"type":"string","enum":["trialing","active","past_due","canceled","expired"]},"currentPeriodEnd":{"type":"string","format":"date-time"},"cancelAtPeriodEnd":{"type":"boolean"}},"required":["plan","status","currentPeriodEnd","cancelAtPeriodEnd"]}},"required":["id","email","name","plan","subscription"]}}}},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}},"delete":{"tags":["account"],"summary":"Delete my account and its data (irreversible)","description":"Body `confirm` must be \"STERGE CONTUL\" or \"DELETE MY ACCOUNT\". Cancel any paid subscription in the billing portal first.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirm":{"type":"string","minLength":1,"maxLength":64}},"required":["confirm"]}}}},"responses":{"204":{"description":"Deleted; the session cookie is no longer valid"},"400":{"description":"Missing or wrong confirmation phrase","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"409":{"description":"An active paid subscription must be cancelled first","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/billing/checkout":{"post":{"tags":["billing"],"summary":"Start a Stripe Checkout subscription (7-day trial)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"price":{"type":"string","enum":["premium_monthly_ron","premium_yearly_ron","pro_monthly_ron"]}},"required":["price"]}}}},"responses":{"200":{"description":"Redirect to Stripe Checkout","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"]}}}},"400":{"description":"Invalid price","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Billing not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/billing/portal":{"post":{"tags":["billing"],"summary":"Open the Stripe Customer Portal","responses":{"200":{"description":"Redirect to the portal","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"}},"required":["url"]}}}},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Billing not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/ledger":{"get":{"tags":["ledger"],"summary":"Public MarcAI system picks, newest first","description":"Append-only, hash-chained pick ledger with closing odds and CLV. Backfilled picks are flagged. Numbers, not promises.","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":10000,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25},"required":false,"name":"pageSize","in":"query"},{"schema":{"type":"string","enum":["pending","won","lost","void","half_won","half_lost"]},"required":false,"name":"result","in":"query"}],"responses":{"200":{"description":"One page of picks","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"eventId":{"type":"string","pattern":"^\\d{1,18}$"},"home":{"type":"string","minLength":1},"away":{"type":"string","minLength":1},"league":{"type":["string","null"],"minLength":1},"kickoff":{"type":"string","format":"date-time"},"market":{"type":"string","minLength":1},"outcome":{"type":"string","minLength":1},"model":{"type":"string","minLength":1},"backfill":{"type":"boolean"},"odds":{"type":"number","exclusiveMinimum":1},"modelProbability":{"type":["number","null"],"minimum":0,"maximum":1},"closingOdds":{"type":["number","null"],"exclusiveMinimum":1},"closingFairProbability":{"type":["number","null"],"minimum":0,"maximum":1},"clv":{"type":["number","null"]},"result":{"type":"string","enum":["pending","won","lost","void","half_won","half_lost"]},"placedAt":{"type":"string","format":"date-time"},"settledAt":{"type":["string","null"],"format":"date-time"},"counted":{"type":"boolean","default":true},"prevHash":{"type":["string","null"],"pattern":"^[0-9a-f]{64}$"},"hash":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"required":["id","eventId","home","away","league","kickoff","market","outcome","model","backfill","odds","modelProbability","closingOdds","closingFairProbability","clv","result","placedAt","settledAt","prevHash","hash"]}},"page":{"type":"integer","minimum":1},"pageSize":{"type":"integer","minimum":1},"total":{"type":"integer","minimum":0}},"required":["items","page","pageSize","total"]}}}},"400":{"description":"Invalid query","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/ledger/summary":{"get":{"tags":["ledger"],"summary":"Flat-stake performance, CLV and 10-bin calibration of the public ledger","responses":{"200":{"description":"Ledger summary","content":{"application/json":{"schema":{"type":"object","properties":{"overall":{"type":"object","properties":{"picks":{"type":"integer","minimum":0},"settled":{"type":"integer","minimum":0},"pending":{"type":"integer","minimum":0},"voided":{"type":"integer","minimum":0},"wins":{"type":"number","minimum":0},"hitRate":{"type":["number","null"],"minimum":0,"maximum":1},"staked":{"type":"number","minimum":0},"profit":{"type":"number"},"roi":{"type":["number","null"]},"withClosing":{"type":"integer","minimum":0},"avgClv":{"type":["number","null"]},"beatCloseRate":{"type":["number","null"],"minimum":0,"maximum":1},"brier":{"type":["number","null"],"minimum":0,"maximum":1,"default":null},"brierClose":{"type":["number","null"],"minimum":0,"maximum":1,"default":null},"brierCount":{"type":"integer","minimum":0,"default":0},"hitRateCi":{"type":["object","null"],"properties":{"lo":{"type":"number","minimum":0,"maximum":1},"hi":{"type":"number","minimum":0,"maximum":1}},"required":["lo","hi"]}},"required":["picks","settled","pending","voided","wins","hitRate","staked","profit","roi","withClosing","avgClv","beatCloseRate"]},"origins":{"type":"object","properties":{"live":{"type":"object","properties":{"picks":{"type":"integer","minimum":0},"settled":{"type":"integer","minimum":0},"pending":{"type":"integer","minimum":0},"voided":{"type":"integer","minimum":0},"wins":{"type":"number","minimum":0},"hitRate":{"type":["number","null"],"minimum":0,"maximum":1},"staked":{"type":"number","minimum":0},"profit":{"type":"number"},"roi":{"type":["number","null"]},"withClosing":{"type":"integer","minimum":0},"avgClv":{"type":["number","null"]},"beatCloseRate":{"type":["number","null"],"minimum":0,"maximum":1},"brier":{"type":["number","null"],"minimum":0,"maximum":1,"default":null},"brierClose":{"type":["number","null"],"minimum":0,"maximum":1,"default":null},"brierCount":{"type":"integer","minimum":0,"default":0},"hitRateCi":{"type":["object","null"],"properties":{"lo":{"type":"number","minimum":0,"maximum":1},"hi":{"type":"number","minimum":0,"maximum":1}},"required":["lo","hi"]}},"required":["picks","settled","pending","voided","wins","hitRate","staked","profit","roi","withClosing","avgClv","beatCloseRate"]},"backfill":{"type":"object","properties":{"picks":{"type":"integer","minimum":0},"settled":{"type":"integer","minimum":0},"pending":{"type":"integer","minimum":0},"voided":{"type":"integer","minimum":0},"wins":{"type":"number","minimum":0},"hitRate":{"type":["number","null"],"minimum":0,"maximum":1},"staked":{"type":"number","minimum":0},"profit":{"type":"number"},"roi":{"type":["number","null"]},"withClosing":{"type":"integer","minimum":0},"avgClv":{"type":["number","null"]},"beatCloseRate":{"type":["number","null"],"minimum":0,"maximum":1},"brier":{"type":["number","null"],"minimum":0,"maximum":1,"default":null},"brierClose":{"type":["number","null"],"minimum":0,"maximum":1,"default":null},"brierCount":{"type":"integer","minimum":0,"default":0},"hitRateCi":{"type":["object","null"],"properties":{"lo":{"type":"number","minimum":0,"maximum":1},"hi":{"type":"number","minimum":0,"maximum":1}},"required":["lo","hi"]}},"required":["picks","settled","pending","voided","wins","hitRate","staked","profit","roi","withClosing","avgClv","beatCloseRate"]}},"required":["live","backfill"]},"calibration":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0,"maximum":9},"lower":{"type":"number","minimum":0,"maximum":1},"upper":{"type":"number","minimum":0,"maximum":1},"count":{"type":"integer","minimum":0},"predicted":{"type":["number","null"],"minimum":0,"maximum":1},"observed":{"type":["number","null"],"minimum":0,"maximum":1}},"required":["index","lower","upper","count","predicted","observed"]}},"byModel":{"type":"array","items":{"type":"object","properties":{"model":{"type":"string","minLength":1},"stats":{"type":"object","properties":{"picks":{"type":"integer","minimum":0},"settled":{"type":"integer","minimum":0},"pending":{"type":"integer","minimum":0},"voided":{"type":"integer","minimum":0},"wins":{"type":"number","minimum":0},"hitRate":{"type":["number","null"],"minimum":0,"maximum":1},"staked":{"type":"number","minimum":0},"profit":{"type":"number"},"roi":{"type":["number","null"]},"withClosing":{"type":"integer","minimum":0},"avgClv":{"type":["number","null"]},"beatCloseRate":{"type":["number","null"],"minimum":0,"maximum":1},"brier":{"type":["number","null"],"minimum":0,"maximum":1,"default":null},"brierClose":{"type":["number","null"],"minimum":0,"maximum":1,"default":null},"brierCount":{"type":"integer","minimum":0,"default":0},"hitRateCi":{"type":["object","null"],"properties":{"lo":{"type":"number","minimum":0,"maximum":1},"hi":{"type":"number","minimum":0,"maximum":1}},"required":["lo","hi"]}},"required":["picks","settled","pending","voided","wins","hitRate","staked","profit","roi","withClosing","avgClv","beatCloseRate"]}},"required":["model","stats"]}},"duplicatesExcluded":{"type":"integer","minimum":0,"default":0},"generatedAt":{"type":"string","format":"date-time"}},"required":["overall","origins","calibration","byModel","generatedAt"]}}}}}}},"/v1/ledger/verify":{"get":{"tags":["ledger"],"summary":"Recompute the hash chain of the public ledger","responses":{"200":{"description":"Chain verification","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"checked":{"type":"integer","minimum":0},"firstBrokenIndex":{"type":["integer","null"],"minimum":0},"firstBrokenId":{"type":["string","null"],"pattern":"^\\d{1,18}$"},"head":{"type":["string","null"],"pattern":"^[0-9a-f]{64}$"},"checkedAt":{"type":"string","format":"date-time"}},"required":["ok","checked","firstBrokenIndex","firstBrokenId","head","checkedAt"]}}}}}}},"/v1/ledger/export.csv":{"get":{"tags":["ledger"],"summary":"The public ledger as CSV (CC BY 4.0), oldest first, for re-verifying the hash chain","description":"Streams every public MarcAI system pick in insertion order with prev_hash and hash, so the chain can be recomputed top-down (see /v1/ledger/verify). Licence: CC BY 4.0 (Link rel=\"license\"). ETag changes when a pick is added or settled; send If-None-Match for a 304. `from`/`to` are inclusive UTC days on placed_at.","parameters":[{"schema":{"type":"string","format":"date"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","format":"date"},"required":false,"name":"to","in":"query"},{"schema":{"type":"string","enum":["pending","won","lost","void","half_won","half_lost"]},"required":false,"name":"result","in":"query"}],"responses":{"200":{"description":"CSV, header row first","content":{"text/csv":{"schema":{"type":"string"}}}},"304":{"description":"Not modified (If-None-Match matched the ETag)"},"400":{"description":"Invalid query","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/bankroll/tickets":{"get":{"tags":["bankroll"],"summary":"My wallet: every recorded ticket (newest first) with live leg states","description":"Legs linked to a MarcAI event carry the event status, minute, score and the provisional result; `state` is open / winning / losing / settled. Pending tickets whose legs are all decided are settled on read.","responses":{"200":{"description":"Tickets","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0},"stake":{"type":"number"},"totalOdds":{"type":"number"},"potentialWin":{"type":"number"},"status":{"type":"string","enum":["pending","won","lost","void","half_won","half_lost"]},"legs":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":120},"odds":{"type":"number","exclusiveMinimum":1,"maximum":1000},"marketKey":{"type":"string","minLength":1,"maxLength":40,"default":"manual"},"outcome":{"type":"integer","minimum":0,"maximum":50,"default":0},"eventId":{"type":["string","null"],"pattern":"^\\d{1,18}$","default":null},"live":{"type":["object","null"],"properties":{"home":{"type":"string"},"away":{"type":"string"},"league":{"type":["string","null"]},"kickoff":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["scheduled","live","finished","void"]},"minute":{"type":["integer","null"]},"score":{"type":["object","null"],"properties":{"home":{"type":"integer","minimum":0},"away":{"type":"integer","minimum":0}},"required":["home","away"]},"result":{"type":"string","enum":["pending","won","lost","void"]}},"default":null,"required":["home","away","league","kickoff","status","minute","score","result"],"description":"Live state of a leg linked to a MarcAI event."}},"required":["label","odds"]}},"placedAt":{"type":"string","format":"date-time"},"settledAt":{"type":["string","null"],"format":"date-time"},"bookmakerCode":{"type":["string","null"],"enum":["superbet","betano","fortuna","casapariurilor","unibet","mozzart","netbet","maxbet","winbet","getsbet","stanleybet","other",null],"default":null},"code":{"type":["string","null"],"default":null},"source":{"type":"string","enum":["manual","scan","ocr","builder"],"default":"manual"},"shareId":{"type":["string","null"],"default":null},"note":{"type":["string","null"],"default":null},"state":{"type":"string","enum":["open","winning","losing","settled"],"default":"open"}},"required":["id","stake","totalOdds","potentialWin","status","legs","placedAt","settledAt"]}}},"required":["items"]}}}},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}},"post":{"tags":["bankroll"],"summary":"Record a ticket placed elsewhere","description":"Refused with 403 during a cool-off or before age confirmation, and with 409 when the stake would exceed a weekly/monthly limit.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"stake":{"type":"number","exclusiveMinimum":0,"maximum":1000000},"legs":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":120},"odds":{"type":"number","exclusiveMinimum":1,"maximum":1000},"marketKey":{"type":"string","minLength":1,"maxLength":40,"default":"manual"},"outcome":{"type":"integer","minimum":0,"maximum":50,"default":0},"eventId":{"type":["string","null"],"pattern":"^\\d{1,18}$","default":null}},"required":["label","odds"],"description":"One selection of a recorded ticket."},"minItems":1,"maxItems":20},"placedAt":{"type":"string","format":"date-time"},"bookmakerCode":{"type":"string","enum":["superbet","betano","fortuna","casapariurilor","unibet","mozzart","netbet","maxbet","winbet","getsbet","stanleybet","other"]},"code":{"type":"string","minLength":1,"maxLength":64},"source":{"type":"string","enum":["manual","scan","ocr"],"default":"manual"},"note":{"type":"string","maxLength":500}},"required":["stake","legs"],"description":"Record a ticket placed elsewhere. MarcAI never places bets."}}}},"responses":{"201":{"description":"Recorded ticket","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0},"stake":{"type":"number"},"totalOdds":{"type":"number"},"potentialWin":{"type":"number"},"status":{"type":"string","enum":["pending","won","lost","void","half_won","half_lost"]},"legs":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":120},"odds":{"type":"number","exclusiveMinimum":1,"maximum":1000},"marketKey":{"type":"string","minLength":1,"maxLength":40,"default":"manual"},"outcome":{"type":"integer","minimum":0,"maximum":50,"default":0},"eventId":{"type":["string","null"],"pattern":"^\\d{1,18}$","default":null},"live":{"type":["object","null"],"properties":{"home":{"type":"string"},"away":{"type":"string"},"league":{"type":["string","null"]},"kickoff":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["scheduled","live","finished","void"]},"minute":{"type":["integer","null"]},"score":{"type":["object","null"],"properties":{"home":{"type":"integer","minimum":0},"away":{"type":"integer","minimum":0}},"required":["home","away"]},"result":{"type":"string","enum":["pending","won","lost","void"]}},"default":null,"required":["home","away","league","kickoff","status","minute","score","result"],"description":"Live state of a leg linked to a MarcAI event."}},"required":["label","odds"]}},"placedAt":{"type":"string","format":"date-time"},"settledAt":{"type":["string","null"],"format":"date-time"},"bookmakerCode":{"type":["string","null"],"enum":["superbet","betano","fortuna","casapariurilor","unibet","mozzart","netbet","maxbet","winbet","getsbet","stanleybet","other",null],"default":null},"code":{"type":["string","null"],"default":null},"source":{"type":"string","enum":["manual","scan","ocr","builder"],"default":"manual"},"shareId":{"type":["string","null"],"default":null},"note":{"type":["string","null"],"default":null},"state":{"type":"string","enum":["open","winning","losing","settled"],"default":"open"}},"required":["id","stake","totalOdds","potentialWin","status","legs","placedAt","settledAt"]}}}},"400":{"description":"Invalid ticket","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"403":{"description":"Cool-off active or age not confirmed","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"409":{"description":"Stake limit would be exceeded","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/tickets/build":{"post":{"tags":["wallet"],"summary":"Propose a ticket from model predictions + consensus odds (deterministic, no LLM)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"risk":{"type":"string","enum":["low","medium","high"],"default":"medium"},"minOdds":{"type":"number","exclusiveMinimum":1,"maximum":1000,"default":2},"maxOdds":{"type":"number","exclusiveMinimum":1,"maximum":10000,"default":6},"maxLegs":{"type":"integer","minimum":1,"maximum":10,"default":4},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"competitions":{"type":"array","items":{"type":"string","minLength":1,"maxLength":64},"maxItems":20,"default":[]},"markets":{"type":"array","items":{"type":"string","enum":["1x2","dc"]},"minItems":1,"default":["1x2","dc"]},"excludeEventIds":{"type":"array","items":{"type":"string","pattern":"^\\d{1,18}$"},"maxItems":50,"default":[]},"keepEventIds":{"type":"array","items":{"type":"string","pattern":"^\\d{1,18}$"},"maxItems":10,"default":[]}},"description":"Deterministic ticket proposal from model predictions + consensus odds. No LLM. Refused (403) for users in stats-only mode."}}}},"responses":{"200":{"description":"Proposed ticket with x-ray","content":{"application/json":{"schema":{"type":"object","properties":{"legs":{"type":"array","items":{"type":"object","properties":{"eventId":{"type":"string","pattern":"^\\d{1,18}$"},"home":{"type":"string"},"away":{"type":"string"},"league":{"type":"string"},"kickoff":{"type":"string","format":"date-time"},"marketKey":{"type":"string","enum":["1x2","dc"]},"outcome":{"type":"integer","minimum":0,"maximum":2},"label":{"type":"string"},"odds":{"type":"number"},"modelProbability":{"type":"number"},"fairOdds":{"type":"number"},"edge":{"type":"number"}},"required":["eventId","home","away","league","kickoff","marketKey","outcome","label","odds","modelProbability","fairOdds","edge"]}},"totalOdds":{"type":"number"},"inRange":{"type":"boolean"},"xray":{"type":["object","null"],"properties":{"legs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"odds":{"type":"number"},"impliedProbability":{"type":"number"},"fairProbability":{"type":"number"},"legMargin":{"type":"number"},"probability":{"type":"number"},"ev":{"type":"number"}},"required":["id","odds","impliedProbability","fairProbability","legMargin","probability","ev"]}},"combinedOdds":{"type":"number"},"winProbability":{"type":"number"},"ev":{"type":"number"},"compoundedMargin":{"type":"number"},"verdict":{"type":"string","enum":["positive","neutral","negative"]}},"required":["legs","combinedOdds","winProbability","ev","compoundedMargin","verdict"]},"candidates":{"type":"integer","minimum":0},"valueEnabled":{"type":"boolean"},"notes":{"type":"array","items":{"type":"string"}}},"required":["legs","totalOdds","inRange","xray","candidates","valueEnabled","notes"]}}}},"400":{"description":"Invalid request","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"403":{"description":"Stats-only mode is on","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/tickets/build/save":{"post":{"tags":["wallet"],"summary":"Save a proposed ticket to my wallet (source builder)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"stake":{"type":"number","exclusiveMinimum":0,"maximum":1000000},"legs":{"type":"array","items":{"type":"object","properties":{"eventId":{"type":"string","pattern":"^\\d{1,18}$"},"home":{"type":"string"},"away":{"type":"string"},"league":{"type":"string"},"kickoff":{"type":"string","format":"date-time"},"marketKey":{"type":"string","enum":["1x2","dc"]},"outcome":{"type":"integer","minimum":0,"maximum":2},"label":{"type":"string"},"odds":{"type":"number"},"modelProbability":{"type":"number"},"fairOdds":{"type":"number"},"edge":{"type":"number"}},"required":["eventId","home","away","league","kickoff","marketKey","outcome","label","odds","modelProbability","fairOdds","edge"]},"minItems":1,"maxItems":20},"bookmakerCode":{"type":"string","enum":["superbet","betano","fortuna","casapariurilor","unibet","mozzart","netbet","maxbet","winbet","getsbet","stanleybet","other"]},"note":{"type":"string","maxLength":500}},"required":["stake","legs"]}}}},"responses":{"201":{"description":"Recorded ticket","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0},"stake":{"type":"number"},"totalOdds":{"type":"number"},"potentialWin":{"type":"number"},"status":{"type":"string","enum":["pending","won","lost","void","half_won","half_lost"]},"legs":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":120},"odds":{"type":"number","exclusiveMinimum":1,"maximum":1000},"marketKey":{"type":"string","minLength":1,"maxLength":40,"default":"manual"},"outcome":{"type":"integer","minimum":0,"maximum":50,"default":0},"eventId":{"type":["string","null"],"pattern":"^\\d{1,18}$","default":null},"live":{"type":["object","null"],"properties":{"home":{"type":"string"},"away":{"type":"string"},"league":{"type":["string","null"]},"kickoff":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["scheduled","live","finished","void"]},"minute":{"type":["integer","null"]},"score":{"type":["object","null"],"properties":{"home":{"type":"integer","minimum":0},"away":{"type":"integer","minimum":0}},"required":["home","away"]},"result":{"type":"string","enum":["pending","won","lost","void"]}},"default":null,"required":["home","away","league","kickoff","status","minute","score","result"],"description":"Live state of a leg linked to a MarcAI event."}},"required":["label","odds"]}},"placedAt":{"type":"string","format":"date-time"},"settledAt":{"type":["string","null"],"format":"date-time"},"bookmakerCode":{"type":["string","null"],"enum":["superbet","betano","fortuna","casapariurilor","unibet","mozzart","netbet","maxbet","winbet","getsbet","stanleybet","other",null],"default":null},"code":{"type":["string","null"],"default":null},"source":{"type":"string","enum":["manual","scan","ocr","builder"],"default":"manual"},"shareId":{"type":["string","null"],"default":null},"note":{"type":["string","null"],"default":null},"state":{"type":"string","enum":["open","winning","losing","settled"],"default":"open"}},"required":["id","stake","totalOdds","potentialWin","status","legs","placedAt","settledAt"]}}}},"400":{"description":"Invalid ticket","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"403":{"description":"Cool-off active or age not confirmed","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"409":{"description":"Stake limit would be exceeded","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/bankroll/tickets/import":{"post":{"tags":["wallet"],"summary":"Parse a scanned code or OCR text into a draft ticket (nothing is saved)","description":"Confirm the draft with POST /v1/bankroll/tickets (source scan|ocr). URLs from scanned codes are reduced to the ticket id and never returned.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"source":{"type":"string","enum":["scan","ocr"]},"bookmakerCode":{"type":"string","enum":["superbet","betano","fortuna","casapariurilor","unibet","mozzart","netbet","maxbet","winbet","getsbet","stanleybet","other"]},"code":{"type":"string","minLength":1,"maxLength":2048},"rawText":{"type":"string","maxLength":20000}},"required":["source"],"description":"Parse a scanned code / OCR text into a draft ticket. Nothing is saved."}}}},"responses":{"200":{"description":"Draft","content":{"application/json":{"schema":{"type":"object","properties":{"source":{"type":"string","enum":["scan","ocr"]},"bookmakerCode":{"type":["string","null"],"enum":["superbet","betano","fortuna","casapariurilor","unibet","mozzart","netbet","maxbet","winbet","getsbet","stanleybet","other",null]},"code":{"type":["string","null"]},"stake":{"type":["number","null"]},"totalOdds":{"type":["number","null"]},"potentialWin":{"type":["number","null"]},"legs":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":120},"odds":{"type":"number","exclusiveMinimum":1,"maximum":1000},"marketKey":{"type":"string","minLength":1,"maxLength":40,"default":"manual"},"outcome":{"type":"integer","minimum":0,"maximum":50,"default":0},"eventId":{"type":["string","null"],"pattern":"^\\d{1,18}$","default":null},"raw":{"type":"string"},"confidence":{"type":["number","null"],"minimum":0,"maximum":1}},"required":["label","odds","raw","confidence"]}},"parser":{"type":"string"},"warnings":{"type":"array","items":{"type":"string"}}},"required":["source","bookmakerCode","code","stake","totalOdds","potentialWin","legs","parser","warnings"]}}}},"400":{"description":"Invalid request","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/bankroll/tickets/{id}/share":{"post":{"tags":["wallet"],"summary":"Create (or return) the public share id of my ticket","description":"The QR code encodes `url` (APP_URL/b/<shareId>); it is generated client side.","parameters":[{"schema":{"type":"string","pattern":"^\\d{1,15}$"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Share link","content":{"application/json":{"schema":{"type":"object","properties":{"shareId":{"type":"string"},"url":{"type":"string","format":"uri"}},"required":["shareId","url"]}}}},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"404":{"description":"Ticket not found","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}},"delete":{"tags":["wallet"],"summary":"Revoke the public share link of my ticket","parameters":[{"schema":{"type":"string","pattern":"^\\d{1,15}$"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Revoked"},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"404":{"description":"Ticket not found","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/tickets/shared/{shareId}":{"get":{"tags":["wallet"],"summary":"Public view of a shared ticket (legs, odds, status; no user data)","parameters":[{"schema":{"type":"string","pattern":"^[A-Za-z0-9]{10}$"},"required":true,"name":"shareId","in":"path"}],"responses":{"200":{"description":"Shared ticket","content":{"application/json":{"schema":{"type":"object","properties":{"shareId":{"type":"string"},"totalOdds":{"type":"number"},"status":{"type":"string","enum":["pending","won","lost","void","half_won","half_lost"]},"state":{"type":"string","enum":["open","winning","losing","settled"]},"legs":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":120},"odds":{"type":"number","exclusiveMinimum":1,"maximum":1000},"marketKey":{"type":"string","minLength":1,"maxLength":40,"default":"manual"},"outcome":{"type":"integer","minimum":0,"maximum":50,"default":0},"eventId":{"type":["string","null"],"pattern":"^\\d{1,18}$","default":null},"live":{"type":["object","null"],"properties":{"home":{"type":"string"},"away":{"type":"string"},"league":{"type":["string","null"]},"kickoff":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["scheduled","live","finished","void"]},"minute":{"type":["integer","null"]},"score":{"type":["object","null"],"properties":{"home":{"type":"integer","minimum":0},"away":{"type":"integer","minimum":0}},"required":["home","away"]},"result":{"type":"string","enum":["pending","won","lost","void"]}},"default":null,"required":["home","away","league","kickoff","status","minute","score","result"],"description":"Live state of a leg linked to a MarcAI event."}},"required":["label","odds"]}},"placedAt":{"type":"string","format":"date-time"},"source":{"type":"string"}},"required":["shareId","totalOdds","status","state","legs","placedAt","source"]}}}},"404":{"description":"Not shared or revoked","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/bankroll/tickets/{id}":{"patch":{"tags":["bankroll"],"summary":"Settle (won / lost / void) or re-open one of my tickets","parameters":[{"schema":{"type":"string","pattern":"^\\d{1,15}$"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["pending","won","lost","void"]}},"required":["status"]}}}},"responses":{"200":{"description":"Updated ticket","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","exclusiveMinimum":0},"stake":{"type":"number"},"totalOdds":{"type":"number"},"potentialWin":{"type":"number"},"status":{"type":"string","enum":["pending","won","lost","void","half_won","half_lost"]},"legs":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":120},"odds":{"type":"number","exclusiveMinimum":1,"maximum":1000},"marketKey":{"type":"string","minLength":1,"maxLength":40,"default":"manual"},"outcome":{"type":"integer","minimum":0,"maximum":50,"default":0},"eventId":{"type":["string","null"],"pattern":"^\\d{1,18}$","default":null},"live":{"type":["object","null"],"properties":{"home":{"type":"string"},"away":{"type":"string"},"league":{"type":["string","null"]},"kickoff":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["scheduled","live","finished","void"]},"minute":{"type":["integer","null"]},"score":{"type":["object","null"],"properties":{"home":{"type":"integer","minimum":0},"away":{"type":"integer","minimum":0}},"required":["home","away"]},"result":{"type":"string","enum":["pending","won","lost","void"]}},"default":null,"required":["home","away","league","kickoff","status","minute","score","result"],"description":"Live state of a leg linked to a MarcAI event."}},"required":["label","odds"]}},"placedAt":{"type":"string","format":"date-time"},"settledAt":{"type":["string","null"],"format":"date-time"},"bookmakerCode":{"type":["string","null"],"enum":["superbet","betano","fortuna","casapariurilor","unibet","mozzart","netbet","maxbet","winbet","getsbet","stanleybet","other",null],"default":null},"code":{"type":["string","null"],"default":null},"source":{"type":"string","enum":["manual","scan","ocr","builder"],"default":"manual"},"shareId":{"type":["string","null"],"default":null},"note":{"type":["string","null"],"default":null},"state":{"type":"string","enum":["open","winning","losing","settled"],"default":"open"}},"required":["id","stake","totalOdds","potentialWin","status","legs","placedAt","settledAt"]}}}},"400":{"description":"Invalid request","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"404":{"description":"Ticket not found","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}},"delete":{"tags":["bankroll"],"summary":"Delete one of my tickets","description":"The stake keeps counting toward the limits of the period it was recorded in.","parameters":[{"schema":{"type":"string","pattern":"^\\d{1,15}$"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Deleted"},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"404":{"description":"Ticket not found","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/bankroll/summary":{"get":{"tags":["bankroll"],"summary":"Balance curve, P/L, ROI, by week/month and streaks","responses":{"200":{"description":"Summary","content":{"application/json":{"schema":{"type":"object","properties":{"tickets":{"type":"integer","minimum":0},"settled":{"type":"integer","minimum":0},"pending":{"type":"integer","minimum":0},"pendingStake":{"type":"number"},"staked":{"type":"number"},"returned":{"type":"number"},"profit":{"type":"number"},"roi":{"type":["number","null"]},"winRate":{"type":["number","null"]},"curve":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string","format":"date-time"},"balance":{"type":"number"},"ticketId":{"type":"integer","exclusiveMinimum":0}},"required":["at","balance","ticketId"]}},"byWeek":{"type":"array","items":{"type":"object","properties":{"period":{"type":"string"},"tickets":{"type":"integer","minimum":0},"staked":{"type":"number"},"profit":{"type":"number"},"roi":{"type":["number","null"]}},"required":["period","tickets","staked","profit","roi"]}},"byMonth":{"type":"array","items":{"type":"object","properties":{"period":{"type":"string"},"tickets":{"type":"integer","minimum":0},"staked":{"type":"number"},"profit":{"type":"number"},"roi":{"type":["number","null"]}},"required":["period","tickets","staked","profit","roi"]}},"longestWinStreak":{"type":"integer","minimum":0},"longestLossStreak":{"type":"integer","minimum":0}},"required":["tickets","settled","pending","pendingStake","staked","returned","profit","roi","winRate","curve","byWeek","byMonth","longestWinStreak","longestLossStreak"],"description":"Bankroll maths over settled tickets (P/L recognised at settlement)."}}}},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/bankroll/clv":{"get":{"tags":["bankroll"],"summary":"Closing-line value and margin paid on my tickets (placed in [from, to))","description":"Per leg: taken odds against the Shin-devigged last pre-kickoff consensus price (ClickHouse ticks, else odds_latest observed before kickoff). Ticket CLV = Π(odds·p) − 1 over non-void legs. Legs without a close carry a reason. Plans without `bankroll.advanced` get the summary only (`tickets: null`).","parameters":[{"schema":{"type":"string","format":"date-time"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"to","in":"query"}],"responses":{"200":{"description":"CLV","content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":["string","null"],"format":"date-time"},"to":{"type":["string","null"],"format":"date-time"},"summary":{"type":"object","properties":{"tickets":{"type":"integer","minimum":0},"ticketsWithClv":{"type":"integer","minimum":0},"legs":{"type":"integer","minimum":0},"legsWithClv":{"type":"integer","minimum":0},"avgLegClv":{"type":["number","null"]},"beatCloseRate":{"type":["number","null"]},"avgTicketClv":{"type":["number","null"]},"avgMarginPaid":{"type":["number","null"]},"marginPaidAmount":{"type":["number","null"]}},"required":["tickets","ticketsWithClv","legs","legsWithClv","avgLegClv","beatCloseRate","avgTicketClv","avgMarginPaid","marginPaidAmount"]},"tickets":{"type":["array","null"],"items":{"type":"object","properties":{"ticketId":{"type":"integer","exclusiveMinimum":0},"clv":{"type":["number","null"]},"marginPaid":{"type":["number","null"]},"legs":{"type":"array","items":{"type":"object","properties":{"clv":{"type":["number","null"]},"marginPaid":{"type":["number","null"]},"fairCloseOdds":{"type":["number","null"]},"reason":{"type":["string","null"],"enum":["unlinked","unsupported_market","not_started","no_close","void","placed_live",null]}},"required":["clv","marginPaid","fairCloseOdds","reason"],"description":"Closing-line value of one leg against the anonymous consensus close."}}},"required":["ticketId","clv","marginPaid","legs"]}}},"required":["from","to","summary","tickets"],"description":"Closing-line value and margin paid on my own tickets."}}}},"400":{"description":"Invalid period","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/rg/limits":{"get":{"tags":["responsible-gambling"],"summary":"My limits, any pending raise and cool-off","responses":{"200":{"description":"Limits","content":{"application/json":{"schema":{"type":"object","properties":{"weeklyStakeLimit":{"type":["number","null"],"exclusiveMinimum":0,"maximum":1000000},"monthlyStakeLimit":{"type":["number","null"],"exclusiveMinimum":0,"maximum":1000000},"sessionReminderMinutes":{"type":["integer","null"],"minimum":15,"maximum":240},"pending":{"type":["object","null"],"properties":{"changes":{"type":"object","properties":{"weeklyStakeLimit":{"type":["number","null"],"exclusiveMinimum":0,"maximum":1000000},"monthlyStakeLimit":{"type":["number","null"],"exclusiveMinimum":0,"maximum":1000000},"sessionReminderMinutes":{"type":["integer","null"],"minimum":15,"maximum":240}}},"effectiveAt":{"type":"string","format":"date-time"}},"required":["changes","effectiveAt"]},"coolOffUntil":{"type":["string","null"],"format":"date-time"}},"required":["weeklyStakeLimit","monthlyStakeLimit","sessionReminderMinutes","pending","coolOffUntil"]}}}},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}},"put":{"tags":["responsible-gambling"],"summary":"Set limits: lowering applies now, raising or removing after 24 h","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"weeklyStakeLimit":{"type":["number","null"],"exclusiveMinimum":0,"maximum":1000000},"monthlyStakeLimit":{"type":["number","null"],"exclusiveMinimum":0,"maximum":1000000},"sessionReminderMinutes":{"type":["integer","null"],"minimum":15,"maximum":240}},"required":["weeklyStakeLimit","monthlyStakeLimit","sessionReminderMinutes"],"description":"Full replacement. null removes a limit (counts as a raise: applies after 24 h)."}}}},"responses":{"200":{"description":"Limits","content":{"application/json":{"schema":{"type":"object","properties":{"weeklyStakeLimit":{"type":["number","null"],"exclusiveMinimum":0,"maximum":1000000},"monthlyStakeLimit":{"type":["number","null"],"exclusiveMinimum":0,"maximum":1000000},"sessionReminderMinutes":{"type":["integer","null"],"minimum":15,"maximum":240},"pending":{"type":["object","null"],"properties":{"changes":{"type":"object","properties":{"weeklyStakeLimit":{"type":["number","null"],"exclusiveMinimum":0,"maximum":1000000},"monthlyStakeLimit":{"type":["number","null"],"exclusiveMinimum":0,"maximum":1000000},"sessionReminderMinutes":{"type":["integer","null"],"minimum":15,"maximum":240}}},"effectiveAt":{"type":"string","format":"date-time"}},"required":["changes","effectiveAt"]},"coolOffUntil":{"type":["string","null"],"format":"date-time"}},"required":["weeklyStakeLimit","monthlyStakeLimit","sessionReminderMinutes","pending","coolOffUntil"]}}}},"400":{"description":"Invalid limits","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/rg/cool-off":{"post":{"tags":["responsible-gambling"],"summary":"Start a cool-off (1, 7, 30 or 180 days); it can be extended, never shortened","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"days":{"anyOf":[{"type":"number","enum":[1]},{"type":"number","enum":[7]},{"type":"number","enum":[30]},{"type":"number","enum":[180]}]}},"required":["days"]}}}},"responses":{"200":{"description":"Limits","content":{"application/json":{"schema":{"type":"object","properties":{"weeklyStakeLimit":{"type":["number","null"],"exclusiveMinimum":0,"maximum":1000000},"monthlyStakeLimit":{"type":["number","null"],"exclusiveMinimum":0,"maximum":1000000},"sessionReminderMinutes":{"type":["integer","null"],"minimum":15,"maximum":240},"pending":{"type":["object","null"],"properties":{"changes":{"type":"object","properties":{"weeklyStakeLimit":{"type":["number","null"],"exclusiveMinimum":0,"maximum":1000000},"monthlyStakeLimit":{"type":["number","null"],"exclusiveMinimum":0,"maximum":1000000},"sessionReminderMinutes":{"type":["integer","null"],"minimum":15,"maximum":240}}},"effectiveAt":{"type":"string","format":"date-time"}},"required":["changes","effectiveAt"]},"coolOffUntil":{"type":["string","null"],"format":"date-time"}},"required":["weeklyStakeLimit","monthlyStakeLimit","sessionReminderMinutes","pending","coolOffUntil"]}}}},"400":{"description":"Invalid duration","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"409":{"description":"A longer cool-off is already active","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/rg/status":{"get":{"tags":["responsible-gambling"],"summary":"Stake this week/month vs limits, cool-off and age confirmation","responses":{"200":{"description":"Status","content":{"application/json":{"schema":{"type":"object","properties":{"minAge":{"type":"integer","minimum":18,"maximum":21},"ageConfirmed":{"type":"boolean"},"week":{"type":"object","properties":{"from":{"type":"string","format":"date-time"},"staked":{"type":"number"},"limit":{"type":["number","null"]},"remaining":{"type":["number","null"]}},"required":["from","staked","limit","remaining"]},"month":{"type":"object","properties":{"from":{"type":"string","format":"date-time"},"staked":{"type":"number"},"limit":{"type":["number","null"]},"remaining":{"type":["number","null"]}},"required":["from","staked","limit","remaining"]},"coolOff":{"type":"object","properties":{"active":{"type":"boolean"},"until":{"type":["string","null"],"format":"date-time"}},"required":["active","until"]},"sessionReminderMinutes":{"type":["integer","null"]},"pending":{"type":["object","null"],"properties":{"changes":{"type":"object","properties":{"weeklyStakeLimit":{"type":["number","null"],"exclusiveMinimum":0,"maximum":1000000},"monthlyStakeLimit":{"type":["number","null"],"exclusiveMinimum":0,"maximum":1000000},"sessionReminderMinutes":{"type":["integer","null"],"minimum":15,"maximum":240}}},"effectiveAt":{"type":"string","format":"date-time"}},"required":["changes","effectiveAt"]}},"required":["minAge","ageConfirmed","week","month","coolOff","sessionReminderMinutes","pending"]}}}},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/rg/age":{"post":{"tags":["responsible-gambling"],"summary":"Confirm age with a birth year (once; cannot be changed)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"birthYear":{"type":"integer","minimum":1900,"maximum":2100}},"required":["birthYear"]}}}},"responses":{"200":{"description":"Age confirmed","content":{"application/json":{"schema":{"type":"object","properties":{"ageConfirmed":{"type":"boolean","enum":[true]},"minAge":{"type":"integer"}},"required":["ageConfirmed","minAge"]}}}},"400":{"description":"Invalid birth year","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"403":{"description":"Below the minimum age","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"409":{"description":"Age already confirmed","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/assistant/chat":{"post":{"tags":["assistant"],"summary":"Ask the analysis assistant; the answer streams as plain text","description":"Creates a thread when threadId is absent; the thread id is returned in the `x-thread-id` header. Max 20 messages per 10 minutes per user. Analysis only, never betting advice.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"threadId":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}$"},"message":{"type":"string","minLength":1,"maxLength":2000},"locale":{"type":"string","enum":["ro","en"]}},"required":["message"]}}}},"responses":{"200":{"description":"Streamed answer (UTF-8 text); thread id in the x-thread-id header","content":{"text/plain":{"schema":{"type":"string"}}}},"400":{"description":"Invalid request","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"402":{"description":"Daily assistant quota of the plan is spent (free 3, premium 50 per Bucharest day)","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"404":{"description":"Thread not found","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"429":{"description":"Too many messages","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/assistant/threads":{"get":{"tags":["assistant"],"summary":"My assistant threads (most recent first)","responses":{"200":{"description":"Threads","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}$"},"title":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","title","createdAt","updatedAt"]}}},"required":["items"]}}}},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/assistant/threads/{id}":{"get":{"tags":["assistant"],"summary":"One of my assistant threads with its messages","parameters":[{"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}$"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Thread","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}$"},"title":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"messages":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}},"required":["role","content","createdAt"]}}},"required":["id","title","createdAt","updatedAt","messages"]}}}},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"404":{"description":"Thread not found","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}},"delete":{"tags":["assistant"],"summary":"Delete one of my assistant threads","parameters":[{"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}$"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Deleted"},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"404":{"description":"Thread not found","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/matches/{id}/center":{"get":{"tags":["match-center"],"summary":"Match center: H2H, form, table, odds movement, stats, momentum, lineups","description":"Odds are the anonymous consensus, labelled only by the masked source code (D12); no operator names or links (D01).","parameters":[{"schema":{"type":"string","pattern":"^\\d{1,18}$"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Match center","content":{"application/json":{"schema":{"type":"object","properties":{"match":{"type":"object","properties":{"id":{"type":"string","minLength":1},"sport":{"type":"string","enum":["football","tennis","basketball","hockey","handball","esports"]},"league":{"type":"string","minLength":1},"home":{"type":"string","minLength":1},"away":{"type":"string","minLength":1},"kickoff":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["scheduled","live","finished"]},"resultPending":{"type":"boolean"},"score":{"type":"object","properties":{"home":{"type":"integer","minimum":0},"away":{"type":"integer","minimum":0}},"required":["home","away"]},"prediction":{"type":"object","properties":{"model":{"type":"string","minLength":1},"probabilities":{"type":"object","properties":{"home":{"type":["number","null"],"exclusiveMinimum":0},"draw":{"type":["number","null"],"exclusiveMinimum":0},"away":{"type":["number","null"],"exclusiveMinimum":0}},"required":["home","draw","away"]},"fairOdds":{"type":"object","properties":{"home":{"type":["number","null"],"exclusiveMinimum":0},"draw":{"type":["number","null"],"exclusiveMinimum":0},"away":{"type":["number","null"],"exclusiveMinimum":0}},"required":["home","draw","away"]},"createdAt":{"type":"string","format":"date-time"},"limited":{"type":"boolean"}},"required":["model","probabilities","fairOdds","createdAt"]},"odds":{"type":"object","properties":{"prices":{"type":"object","properties":{"home":{"type":"number","exclusiveMinimum":0},"draw":{"type":"number","exclusiveMinimum":0},"away":{"type":"number","exclusiveMinimum":0}},"required":["home","draw","away"]},"opening":{"type":"object","properties":{"home":{"type":"number","exclusiveMinimum":0},"draw":{"type":"number","exclusiveMinimum":0},"away":{"type":"number","exclusiveMinimum":0}},"required":["home","draw","away"]},"source":{"type":"string","minLength":1},"observedAt":{"type":"string","format":"date-time"}},"required":["prices","source","observedAt"]},"value":{"type":"object","properties":{"enabled":{"type":"boolean"},"reason":{"type":"string","enum":["validated","model_worse_than_close","no_backtest","no_odds","disabled_by_admin"]}},"required":["enabled","reason"]},"verdict":{"type":"object","properties":{"outcome":{"type":"string","enum":["home","draw","away"]},"modelProbability":{"type":"number","minimum":0,"maximum":1},"marketProbability":{"type":["number","null"],"minimum":0,"maximum":1},"favourite":{"type":"string","enum":["home","draw","away"]},"favouriteHit":{"type":"boolean"},"closer":{"type":["string","null"],"enum":["model","market","level",null]}},"required":["outcome","modelProbability","marketProbability","favourite","favouriteHit","closer"]},"live":{"type":"object","properties":{"minute":{"type":["integer","null"],"minimum":0},"period":{"type":"string","enum":["1H","HT","2H","ET1","ET2","PEN"]},"red":{"type":"object","properties":{"home":{"type":"integer","minimum":0},"away":{"type":"integer","minimum":0}},"required":["home","away"]},"yellow":{"type":"object","properties":{"home":{"type":"integer","minimum":0},"away":{"type":"integer","minimum":0}},"required":["home","away"]},"corners":{"type":"object","properties":{"home":{"type":"integer","minimum":0},"away":{"type":"integer","minimum":0}},"required":["home","away"]},"at":{"type":"string","format":"date-time"}},"required":["minute"]},"source":{"type":"string","minLength":1}},"required":["id","sport","league","home","away","kickoff","status"]},"home":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1}},"required":["id","name"]},"away":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1}},"required":["id","name"]},"competition":{"type":"object","properties":{"slug":{"type":"string","minLength":1},"name":{"type":"string","minLength":1}},"required":["slug","name"]},"season":{"type":"string","minLength":1},"minute":{"type":"integer","minimum":0},"venue":{"type":"string","minLength":1},"headToHead":{"type":"object","properties":{"matches":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kickoff":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["scheduled","live","finished"]},"competition":{"type":"string","minLength":1},"home":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1}},"required":["id","name"]},"away":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1}},"required":["id","name"]},"score":{"type":"object","properties":{"home":{"type":"integer","minimum":0},"away":{"type":"integer","minimum":0}},"required":["home","away"]}},"required":["id","kickoff","status","competition","home","away"]}},"summary":{"type":"object","properties":{"homeWins":{"type":"integer","minimum":0},"draws":{"type":"integer","minimum":0},"awayWins":{"type":"integer","minimum":0}},"required":["homeWins","draws","awayWins"]}},"required":["matches","summary"]},"form":{"type":"object","properties":{"home":{"type":"object","properties":{"team":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1}},"required":["id","name"]},"results":{"type":"array","items":{"type":"string","enum":["W","D","L"]}}},"required":["team","results"]},"away":{"type":"object","properties":{"team":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1}},"required":["id","name"]},"results":{"type":"array","items":{"type":"string","enum":["W","D","L"]}}},"required":["team","results"]}},"required":["home","away"]},"table":{"type":"array","items":{"type":"object","properties":{"position":{"type":"integer","exclusiveMinimum":0},"team":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1}},"required":["id","name"]},"played":{"type":"integer","minimum":0},"won":{"type":"integer","minimum":0},"drawn":{"type":"integer","minimum":0},"lost":{"type":"integer","minimum":0},"goalsFor":{"type":"integer","minimum":0},"goalsAgainst":{"type":"integer","minimum":0},"goalDifference":{"type":"integer"},"points":{"type":"integer","minimum":0},"form":{"type":"array","items":{"type":"string","enum":["W","D","L"]}}},"required":["position","team","played","won","drawn","lost","goalsFor","goalsAgainst","goalDifference","points","form"]}},"odds":{"type":"array","items":{"type":"object","properties":{"market":{"type":"string","minLength":1},"source":{"type":"string","minLength":1},"outcomes":{"type":"array","items":{"type":"string","minLength":1},"minItems":2},"opening":{"type":"array","items":{"type":"number","exclusiveMinimum":0}},"latest":{"type":"array","items":{"type":"number","exclusiveMinimum":0}},"observedAt":{"type":"string","format":"date-time"}},"required":["market","source","outcomes","latest","observedAt"]}},"stats":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"home":{"type":"number"},"away":{"type":"number"}},"required":["key","home","away"]}},"momentum":{"type":"array","items":{"type":"object","properties":{"minute":{"type":"integer","minimum":0},"value":{"type":"number","minimum":-1,"maximum":1}},"required":["minute","value"]}},"lineups":{"type":"object","properties":{"home":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"number":{"type":"integer","minimum":0},"position":{"type":"string","minLength":1}},"required":["name"]}},"away":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"number":{"type":"integer","minimum":0},"position":{"type":"string","minLength":1}},"required":["name"]}},"homeBench":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"number":{"type":"integer","minimum":0},"position":{"type":"string","minLength":1}},"required":["name"]}},"awayBench":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"number":{"type":"integer","minimum":0},"position":{"type":"string","minLength":1}},"required":["name"]}}},"required":["home","away"]},"incidents":{"type":"array","items":{"type":"object","properties":{"minute":{"type":"integer","minimum":0},"side":{"type":"string","enum":["home","away"]},"type":{"type":"string","enum":["goal","penaltyGoal","ownGoal","yellow","secondYellow","red","sub"]},"player":{"type":"string","minLength":1},"playerIn":{"type":"string","minLength":1}},"required":["minute","side","type"]},"default":[]},"lateGoals":{"type":"object","properties":{"fromMinute":{"type":"integer","exclusiveMinimum":0},"home":{"type":"object","properties":{"matches":{"type":"integer","minimum":0},"scored":{"type":"integer","minimum":0},"scoredLate":{"type":"integer","minimum":0},"conceded":{"type":"integer","minimum":0},"concededLate":{"type":"integer","minimum":0}},"required":["matches","scored","scoredLate","conceded","concededLate"]},"away":{"type":"object","properties":{"matches":{"type":"integer","minimum":0},"scored":{"type":"integer","minimum":0},"scoredLate":{"type":"integer","minimum":0},"conceded":{"type":"integer","minimum":0},"concededLate":{"type":"integer","minimum":0}},"required":["matches","scored","scoredLate","conceded","concededLate"]}},"required":["fromMinute","home","away"]},"oddsMoves":{"type":"array","items":{"type":"object","properties":{"minute":{"type":"integer","minimum":0},"outcome":{"type":"string","enum":["home","draw","away"]},"from":{"type":"number","minimum":0,"maximum":1},"to":{"type":"number","minimum":0,"maximum":1},"cause":{"type":"string","enum":["goal","red","none"]},"side":{"type":"string","enum":["home","away"]}},"required":["minute","outcome","from","to","cause"]}},"recap":{"type":"object","properties":{"ro":{"type":"string","minLength":1},"en":{"type":"string","minLength":1},"source":{"type":"string","enum":["agent","template"]},"at":{"type":"string","format":"date-time"}},"required":["ro","en","source","at"]},"scoreDetail":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1},"home":{"type":"number"},"away":{"type":"number"}},"required":["label","home","away"]}}},"required":["match","home","away","competition","headToHead","form","table","odds","stats","momentum","scoreDetail"]}}}},"400":{"description":"Invalid id","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"404":{"description":"Match not found","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/competitions":{"get":{"tags":["match-center"],"summary":"Competitions with listed matches","responses":{"200":{"description":"Competitions","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"sport":{"type":"string","enum":["football","tennis","basketball","hockey","handball","esports"]},"country":{"type":"string","minLength":1},"tier":{"type":"integer"},"season":{"type":"string","minLength":1},"matches":{"type":"integer","minimum":0}},"required":["slug","name","sport","matches"]}}},"required":["items"]}}}}}}},"/v1/competitions/{slug}":{"get":{"tags":["match-center"],"summary":"Competition table (latest season), upcoming and recent matches","parameters":[{"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,63}$"},"required":true,"name":"slug","in":"path"}],"responses":{"200":{"description":"Competition","content":{"application/json":{"schema":{"type":"object","properties":{"competition":{"type":"object","properties":{"slug":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"sport":{"type":"string","enum":["football","tennis","basketball","hockey","handball","esports"]},"country":{"type":"string","minLength":1},"tier":{"type":"integer"},"season":{"type":"string","minLength":1},"matches":{"type":"integer","minimum":0}},"required":["slug","name","sport","matches"]},"table":{"type":"array","items":{"type":"object","properties":{"position":{"type":"integer","exclusiveMinimum":0},"team":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1}},"required":["id","name"]},"played":{"type":"integer","minimum":0},"won":{"type":"integer","minimum":0},"drawn":{"type":"integer","minimum":0},"lost":{"type":"integer","minimum":0},"goalsFor":{"type":"integer","minimum":0},"goalsAgainst":{"type":"integer","minimum":0},"goalDifference":{"type":"integer"},"points":{"type":"integer","minimum":0},"form":{"type":"array","items":{"type":"string","enum":["W","D","L"]}}},"required":["position","team","played","won","drawn","lost","goalsFor","goalsAgainst","goalDifference","points","form"]}},"upcoming":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kickoff":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["scheduled","live","finished"]},"competition":{"type":"string","minLength":1},"home":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1}},"required":["id","name"]},"away":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1}},"required":["id","name"]},"score":{"type":"object","properties":{"home":{"type":"integer","minimum":0},"away":{"type":"integer","minimum":0}},"required":["home","away"]}},"required":["id","kickoff","status","competition","home","away"]}},"recent":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kickoff":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["scheduled","live","finished"]},"competition":{"type":"string","minLength":1},"home":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1}},"required":["id","name"]},"away":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1}},"required":["id","name"]},"score":{"type":"object","properties":{"home":{"type":"integer","minimum":0},"away":{"type":"integer","minimum":0}},"required":["home","away"]}},"required":["id","kickoff","status","competition","home","away"]}}},"required":["competition","table","upcoming","recent"]}}}},"400":{"description":"Invalid slug","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"404":{"description":"Competition not found","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/teams/{id}":{"get":{"tags":["match-center"],"summary":"Team profile: form, recent/upcoming matches, home/away splits","parameters":[{"schema":{"type":"string","pattern":"^\\d{1,18}$"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Team","content":{"application/json":{"schema":{"type":"object","properties":{"team":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1},"sport":{"type":"string","enum":["football","tennis","basketball","hockey","handball","esports"]},"country":{"type":"string","minLength":1},"shortName":{"type":"string","minLength":1}},"required":["id","name","sport"]},"competitions":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","minLength":1},"name":{"type":"string","minLength":1}},"required":["slug","name"]}},"form":{"type":"array","items":{"type":"string","enum":["W","D","L"]}},"recent":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kickoff":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["scheduled","live","finished"]},"competition":{"type":"string","minLength":1},"home":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1}},"required":["id","name"]},"away":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1}},"required":["id","name"]},"score":{"type":"object","properties":{"home":{"type":"integer","minimum":0},"away":{"type":"integer","minimum":0}},"required":["home","away"]}},"required":["id","kickoff","status","competition","home","away"]}},"upcoming":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kickoff":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["scheduled","live","finished"]},"competition":{"type":"string","minLength":1},"home":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1}},"required":["id","name"]},"away":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1}},"required":["id","name"]},"score":{"type":"object","properties":{"home":{"type":"integer","minimum":0},"away":{"type":"integer","minimum":0}},"required":["home","away"]}},"required":["id","kickoff","status","competition","home","away"]}},"splits":{"type":"object","properties":{"home":{"type":"object","properties":{"played":{"type":"integer","minimum":0},"won":{"type":"integer","minimum":0},"drawn":{"type":"integer","minimum":0},"lost":{"type":"integer","minimum":0},"goalsFor":{"type":"integer","minimum":0},"goalsAgainst":{"type":"integer","minimum":0}},"required":["played","won","drawn","lost","goalsFor","goalsAgainst"]},"away":{"type":"object","properties":{"played":{"type":"integer","minimum":0},"won":{"type":"integer","minimum":0},"drawn":{"type":"integer","minimum":0},"lost":{"type":"integer","minimum":0},"goalsFor":{"type":"integer","minimum":0},"goalsAgainst":{"type":"integer","minimum":0}},"required":["played","won","drawn","lost","goalsFor","goalsAgainst"]}},"required":["home","away"]}},"required":["team","competitions","form","recent","upcoming","splits"]}}}},"400":{"description":"Invalid id","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"404":{"description":"Team not found","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/community/events/{eventId}/comments":{"get":{"tags":["community"],"summary":"Visible comments of a match (newest first, one level of replies)","parameters":[{"schema":{"type":"string","pattern":"^\\d{1,15}$"},"required":true,"name":"eventId","in":"path"},{"schema":{"type":"string","pattern":"^\\d{1,15}$"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":50,"default":20},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Comments","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"eventId":{"type":"string"},"parentId":{"type":["string","null"]},"author":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]},"body":{"type":"string"},"live":{"type":"boolean"},"minute":{"type":["integer","null"]},"createdAt":{"type":"string","format":"date-time"},"reactions":{"type":"array","items":{"type":"object","properties":{"emoji":{"type":"string","enum":["👍","🔥","😂","😮"]},"count":{"type":"integer","minimum":0},"mine":{"type":"boolean"}},"required":["emoji","count","mine"]}},"mine":{"type":"boolean"},"status":{"type":"string","enum":["visible","hidden","removed","pending"]},"replies":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"eventId":{"type":"string"},"parentId":{"type":["string","null"]},"author":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]},"body":{"type":"string"},"live":{"type":"boolean"},"minute":{"type":["integer","null"]},"createdAt":{"type":"string","format":"date-time"},"reactions":{"type":"array","items":{"type":"object","properties":{"emoji":{"type":"string","enum":["👍","🔥","😂","😮"]},"count":{"type":"integer","minimum":0},"mine":{"type":"boolean"}},"required":["emoji","count","mine"]}},"mine":{"type":"boolean"},"status":{"type":"string","enum":["visible","hidden","removed","pending"]}},"required":["id","eventId","parentId","author","body","live","minute","createdAt","reactions","mine","status"]}}},"required":["id","eventId","parentId","author","body","live","minute","createdAt","reactions","mine","status","replies"]}},"nextCursor":{"type":["string","null"]}},"required":["items","nextCursor"]}}}},"404":{"description":"Match not found","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}},"post":{"tags":["community"],"summary":"Post a comment or a reply","description":"Comments with links, bookmaker domains, phone numbers, e-mail addresses or banned wording are held for review (status pending). 5 per minute per user.","parameters":[{"schema":{"type":"string","pattern":"^\\d{1,15}$"},"required":true,"name":"eventId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":1000},"parentId":{"type":"string","pattern":"^\\d{1,15}$"}},"required":["body"]}}}},"responses":{"201":{"description":"Created comment","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"eventId":{"type":"string"},"parentId":{"type":["string","null"]},"author":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]},"body":{"type":"string"},"live":{"type":"boolean"},"minute":{"type":["integer","null"]},"createdAt":{"type":"string","format":"date-time"},"reactions":{"type":"array","items":{"type":"object","properties":{"emoji":{"type":"string","enum":["👍","🔥","😂","😮"]},"count":{"type":"integer","minimum":0},"mine":{"type":"boolean"}},"required":["emoji","count","mine"]}},"mine":{"type":"boolean"},"status":{"type":"string","enum":["visible","hidden","removed","pending"]}},"required":["id","eventId","parentId","author","body","live","minute","createdAt","reactions","mine","status"]}}}},"400":{"description":"Invalid comment","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"403":{"description":"Account cannot post","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"404":{"description":"Match or parent comment not found","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"429":{"description":"Too many comments","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/community/comments/{id}":{"delete":{"tags":["community"],"summary":"Remove one of my comments","parameters":[{"schema":{"type":"string","pattern":"^\\d{1,15}$"},"required":true,"name":"id","in":"path"}],"responses":{"204":{"description":"Removed"},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"404":{"description":"Comment not found","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/community/comments/{id}/reactions":{"post":{"tags":["community"],"summary":"Toggle a reaction (👍 🔥 😂 😮)","parameters":[{"schema":{"type":"string","pattern":"^\\d{1,15}$"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"emoji":{"type":"string","enum":["👍","🔥","😂","😮"]}},"required":["emoji"]}}}},"responses":{"200":{"description":"Reactions","content":{"application/json":{"schema":{"type":"object","properties":{"commentId":{"type":"string"},"reactions":{"type":"array","items":{"type":"object","properties":{"emoji":{"type":"string","enum":["👍","🔥","😂","😮"]},"count":{"type":"integer","minimum":0},"mine":{"type":"boolean"}},"required":["emoji","count","mine"]}}},"required":["commentId","reactions"]}}}},"400":{"description":"Invalid reaction","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"403":{"description":"Account cannot react","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"404":{"description":"Comment not found","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/community/latest":{"get":{"tags":["community"],"summary":"Latest visible comments across matches","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":50,"default":30},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Latest comments","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"eventId":{"type":"string"},"eventLabel":{"type":"string"},"author":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]},"body":{"type":"string"},"live":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","eventId","eventLabel","author","body","live","createdAt"]}}},"required":["items"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/community/reports":{"post":{"tags":["community"],"summary":"Notice of illegal or abusive content (DSA art. 16)","description":"Signed-in or anonymous; anonymous notices need reporterEmail. Returns a reference.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","enum":["illegal_content","harassment","spam","integrity_accusation","other"]},"details":{"type":"string","minLength":10,"maxLength":2000},"commentId":{"type":"string","pattern":"^\\d{1,15}$"},"reporterEmail":{"type":"string","maxLength":254,"format":"email"},"goodFaith":{"type":"boolean","enum":[true]}},"required":["reason","details","goodFaith"]}}}},"responses":{"201":{"description":"Receipt","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"reference":{"type":"string"},"status":{"type":"string","enum":["open"]},"createdAt":{"type":"string","format":"date-time"}},"required":["id","reference","status","createdAt"]}}}},"400":{"description":"Invalid notice","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"404":{"description":"Comment not found","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"429":{"description":"Too many notices","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/community/moderation":{"get":{"tags":["community"],"summary":"Comments held for review and open notices","responses":{"200":{"description":"Queue","content":{"application/json":{"schema":{"type":"object","properties":{"pending":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"eventId":{"type":"string"},"eventLabel":{"type":"string"},"author":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"]},"body":{"type":"string"},"status":{"type":"string","enum":["visible","hidden","removed","pending"]},"flags":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string","format":"date-time"}},"required":["id","eventId","eventLabel","author","body","status","flags","createdAt"]}},"reports":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"reference":{"type":"string"},"reason":{"type":"string","enum":["illegal_content","harassment","spam","integrity_accusation","other"]},"details":{"type":["string","null"]},"anonymous":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"},"comment":{"type":["object","null"],"properties":{"id":{"type":"string"},"body":{"type":"string"},"status":{"type":"string","enum":["visible","hidden","removed","pending"]},"authorName":{"type":"string"}},"required":["id","body","status","authorName"]}},"required":["id","reference","reason","details","anonymous","createdAt","comment"]}}},"required":["pending","reports"]}}}},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"403":{"description":"Moderator role required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/community/moderation/{commentId}":{"post":{"tags":["community"],"summary":"Approve, hide or remove a comment","parameters":[{"schema":{"type":"string","pattern":"^\\d{1,15}$"},"required":true,"name":"commentId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["approve","hide","remove"]},"reason":{"type":"string","minLength":3,"maxLength":500}},"required":["action","reason"]}}}},"responses":{"200":{"description":"New status","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["visible","hidden","removed","pending"]}},"required":["id","status"]}}}},"400":{"description":"Invalid action","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"403":{"description":"Moderator role required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"404":{"description":"Comment not found","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/community/reports/{id}/decide":{"post":{"tags":["community"],"summary":"Decide a notice with a statement of reasons (DSA art. 17)","parameters":[{"schema":{"type":"string","pattern":"^\\d{1,15}$"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string","enum":["removed","hidden","no_action"]},"statementOfReasons":{"type":"string","minLength":10,"maxLength":2000}},"required":["decision","statementOfReasons"]}}}},"responses":{"200":{"description":"Decision","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"reference":{"type":"string"},"status":{"type":"string","enum":["decided"]},"decision":{"type":"string","enum":["removed","hidden","no_action"]},"decidedAt":{"type":"string","format":"date-time"}},"required":["id","reference","status","decision","decidedAt"]}}}},"400":{"description":"Invalid decision","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"403":{"description":"Moderator role required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"404":{"description":"Notice not found","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"409":{"description":"Notice already decided","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/strategies":{"get":{"tags":["strategies"],"summary":"Published strategy library","responses":{"200":{"description":"Strategies","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"sport":{"type":["string","null"],"enum":["football","tennis","basketball","hockey","handball","esports",null]},"nameRo":{"type":"string"},"nameEn":{"type":"string"},"summaryRo":{"type":"string"},"summaryEn":{"type":"string"},"riskLevel":{"type":"integer","minimum":1,"maximum":5},"minPlan":{"type":"string","enum":["free","premium","pro"]},"kind":{"type":"string"},"backtestable":{"type":"boolean"}},"required":["slug","sport","nameRo","nameEn","summaryRo","summaryEn","riskLevel","minPlan","kind","backtestable"]}}},"required":["items"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}},"post":{"tags":["strategies"],"summary":"Create a strategy (admin)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"type":"string","minLength":3,"maxLength":80,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"sport":{"type":["string","null"],"enum":["football","tennis","basketball","hockey","handball","esports",null],"default":null},"nameRo":{"type":"string","minLength":1,"maxLength":120},"nameEn":{"type":"string","minLength":1,"maxLength":120},"summaryRo":{"type":"string","minLength":1,"maxLength":600},"summaryEn":{"type":"string","minLength":1,"maxLength":600},"rules":{"type":"object","properties":{"kind":{"type":"string","minLength":1,"maxLength":60}},"required":["kind"],"additionalProperties":{}},"evidence":{"type":["string","null"],"maxLength":4000,"default":null},"riskLevel":{"type":"integer","minimum":1,"maximum":5,"default":3},"minPlan":{"type":"string","enum":["free","premium","pro"],"default":"free"},"published":{"type":"boolean","default":false}},"required":["slug","nameRo","nameEn","summaryRo","summaryEn","rules"],"additionalProperties":false}}}},"responses":{"201":{"description":"Strategy","content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"type":"string"},"sport":{"type":["string","null"],"enum":["football","tennis","basketball","hockey","handball","esports",null]},"nameRo":{"type":"string"},"nameEn":{"type":"string"},"summaryRo":{"type":"string"},"summaryEn":{"type":"string"},"riskLevel":{"type":"integer","minimum":1,"maximum":5},"minPlan":{"type":"string","enum":["free","premium","pro"]},"kind":{"type":"string"},"backtestable":{"type":"boolean"},"evidence":{"type":["string","null"]},"rules":{"type":"object","additionalProperties":{}},"backtest":{"type":["object","null"],"properties":{"id":{"type":"integer"},"finishedAt":{"type":"string"},"metrics":{"type":"object","properties":{"n":{"type":["integer","null"]},"roi":{"type":["number","null"]},"clv":{"type":["number","null"]},"hitRate":{"type":["number","null"]},"maxDrawdown":{"type":["number","null"]}},"required":["n","roi","clv","hitRate","maxDrawdown"]}},"required":["id","finishedAt","metrics"]},"id":{"type":"integer"},"published":{"type":"boolean"}},"required":["slug","sport","nameRo","nameEn","summaryRo","summaryEn","riskLevel","minPlan","kind","backtestable","evidence","rules","backtest","id","published"]}}}},"400":{"description":"Invalid strategy","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"403":{"description":"Admin role required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"409":{"description":"Slug already exists","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/strategies/{slug}":{"get":{"tags":["strategies"],"summary":"One published strategy with the latest finished backtest (or null)","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"required":true,"name":"slug","in":"path"}],"responses":{"200":{"description":"Strategy","content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"type":"string"},"sport":{"type":["string","null"],"enum":["football","tennis","basketball","hockey","handball","esports",null]},"nameRo":{"type":"string"},"nameEn":{"type":"string"},"summaryRo":{"type":"string"},"summaryEn":{"type":"string"},"riskLevel":{"type":"integer","minimum":1,"maximum":5},"minPlan":{"type":"string","enum":["free","premium","pro"]},"kind":{"type":"string"},"backtestable":{"type":"boolean"},"evidence":{"type":["string","null"]},"rules":{"type":"object","additionalProperties":{}},"backtest":{"type":["object","null"],"properties":{"id":{"type":"integer"},"finishedAt":{"type":"string"},"metrics":{"type":"object","properties":{"n":{"type":["integer","null"]},"roi":{"type":["number","null"]},"clv":{"type":["number","null"]},"hitRate":{"type":["number","null"]},"maxDrawdown":{"type":["number","null"]}},"required":["n","roi","clv","hitRate","maxDrawdown"]}},"required":["id","finishedAt","metrics"]}},"required":["slug","sport","nameRo","nameEn","summaryRo","summaryEn","riskLevel","minPlan","kind","backtestable","evidence","rules","backtest"]}}}},"404":{"description":"Strategy not found","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}},"patch":{"tags":["strategies"],"summary":"Edit or (un)publish a strategy (admin)","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"required":true,"name":"slug","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sport":{"type":["string","null"],"enum":["football","tennis","basketball","hockey","handball","esports",null]},"nameRo":{"type":"string","minLength":1,"maxLength":120},"nameEn":{"type":"string","minLength":1,"maxLength":120},"summaryRo":{"type":"string","minLength":1,"maxLength":600},"summaryEn":{"type":"string","minLength":1,"maxLength":600},"rules":{"type":"object","properties":{"kind":{"type":"string","minLength":1,"maxLength":60}},"required":["kind"],"additionalProperties":{}},"evidence":{"type":["string","null"],"maxLength":4000},"riskLevel":{"type":"integer","minimum":1,"maximum":5},"minPlan":{"type":"string","enum":["free","premium","pro"]},"published":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Strategy","content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"type":"string"},"sport":{"type":["string","null"],"enum":["football","tennis","basketball","hockey","handball","esports",null]},"nameRo":{"type":"string"},"nameEn":{"type":"string"},"summaryRo":{"type":"string"},"summaryEn":{"type":"string"},"riskLevel":{"type":"integer","minimum":1,"maximum":5},"minPlan":{"type":"string","enum":["free","premium","pro"]},"kind":{"type":"string"},"backtestable":{"type":"boolean"},"evidence":{"type":["string","null"]},"rules":{"type":"object","additionalProperties":{}},"backtest":{"type":["object","null"],"properties":{"id":{"type":"integer"},"finishedAt":{"type":"string"},"metrics":{"type":"object","properties":{"n":{"type":["integer","null"]},"roi":{"type":["number","null"]},"clv":{"type":["number","null"]},"hitRate":{"type":["number","null"]},"maxDrawdown":{"type":["number","null"]}},"required":["n","roi","clv","hitRate","maxDrawdown"]}},"required":["id","finishedAt","metrics"]},"id":{"type":"integer"},"published":{"type":"boolean"}},"required":["slug","sport","nameRo","nameEn","summaryRo","summaryEn","riskLevel","minPlan","kind","backtestable","evidence","rules","backtest","id","published"]}}}},"400":{"description":"Invalid request","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"403":{"description":"Admin role required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"404":{"description":"Strategy not found","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/strategies/{slug}/backtest":{"post":{"tags":["strategies"],"summary":"Run a backtest. Empty body = the precomputed default run (any plan that may open the strategy); custom parameters need Pro (backtest.custom).","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"required":true,"name":"slug","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"staking":{"type":"string","enum":["flat","proportional","kelly","martingale"]},"stakePct":{"type":"number","minimum":0.001,"maximum":0.1},"kellyFraction":{"type":"number","minimum":0.125,"maximum":0.25},"kellyCap":{"type":"number","minimum":0.001,"maximum":0.05},"multiplier":{"type":"number","minimum":1.5,"maximum":3},"minEdge":{"type":"number","minimum":0,"maximum":0.5},"shrinkage":{"type":"number","minimum":0,"maximum":1},"bankroll":{"type":"number","minimum":10,"maximum":10000000},"ruinLevel":{"type":"number","minimum":0,"maximum":0.9},"from":{"type":"string","format":"date"},"to":{"type":"string","format":"date"},"paths":{"type":"integer","minimum":100,"maximum":2000},"seed":{"type":"integer","minimum":0,"maximum":2147483647},"mode":{"type":"string","enum":["bootstrap","market"]}},"additionalProperties":false}}}},"responses":{"200":{"description":"Default run (existing or just computed)","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer"},"strategy":{"type":"string"},"status":{"type":"string","enum":["queued","running","finished","failed"]},"custom":{"type":"boolean"},"params":{"type":"object","additionalProperties":{}},"metrics":{"type":"object","properties":{"n":{"type":["integer","null"]},"roi":{"type":["number","null"]},"clv":{"type":["number","null"]},"hitRate":{"type":["number","null"]},"maxDrawdown":{"type":["number","null"]},"yield":{"type":["number","null"]},"profit":{"type":["number","null"]},"staked":{"type":["number","null"]},"initialBankroll":{"type":["number","null"]},"finalBankroll":{"type":["number","null"]},"ruinProbability":{"type":["number","null"]},"events":{"type":["integer","null"]}},"required":["n","roi","clv","hitRate","maxDrawdown","yield","profit","staked","initialBankroll","finalBankroll","ruinProbability","events"]},"curve":{"type":"array","items":{"type":"object","properties":{"step":{"type":"integer"},"at":{"type":["string","null"]},"bankroll":{"type":"number"},"drawdown":{"type":"number"}},"required":["step","at","bankroll","drawdown"]}},"monteCarlo":{"type":["object","null"],"properties":{"paths":{"type":"integer"},"seed":{"type":"integer"},"mode":{"type":"string","enum":["bootstrap","market"]},"ruinProbability":{"type":"number"},"final":{"type":"object","properties":{"p5":{"type":"number"},"p25":{"type":"number"},"p50":{"type":"number"},"p75":{"type":"number"},"p95":{"type":"number"}},"required":["p5","p25","p50","p75","p95"]},"fan":{"type":"array","items":{"type":"object","properties":{"p5":{"type":"number"},"p25":{"type":"number"},"p50":{"type":"number"},"p75":{"type":"number"},"p95":{"type":"number"},"step":{"type":"integer"}},"required":["p5","p25","p50","p75","p95","step"]}}},"required":["paths","seed","mode","ruinProbability","final","fan"]},"skipped":{"type":"object","additionalProperties":{"type":"number"}},"error":{"type":["string","null"]},"createdAt":{"type":"string"},"finishedAt":{"type":["string","null"]}},"required":["id","strategy","status","custom","params","metrics","curve","monteCarlo","skipped","error","createdAt","finishedAt"]}}}},"201":{"description":"Custom run","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer"},"strategy":{"type":"string"},"status":{"type":"string","enum":["queued","running","finished","failed"]},"custom":{"type":"boolean"},"params":{"type":"object","additionalProperties":{}},"metrics":{"type":"object","properties":{"n":{"type":["integer","null"]},"roi":{"type":["number","null"]},"clv":{"type":["number","null"]},"hitRate":{"type":["number","null"]},"maxDrawdown":{"type":["number","null"]},"yield":{"type":["number","null"]},"profit":{"type":["number","null"]},"staked":{"type":["number","null"]},"initialBankroll":{"type":["number","null"]},"finalBankroll":{"type":["number","null"]},"ruinProbability":{"type":["number","null"]},"events":{"type":["integer","null"]}},"required":["n","roi","clv","hitRate","maxDrawdown","yield","profit","staked","initialBankroll","finalBankroll","ruinProbability","events"]},"curve":{"type":"array","items":{"type":"object","properties":{"step":{"type":"integer"},"at":{"type":["string","null"]},"bankroll":{"type":"number"},"drawdown":{"type":"number"}},"required":["step","at","bankroll","drawdown"]}},"monteCarlo":{"type":["object","null"],"properties":{"paths":{"type":"integer"},"seed":{"type":"integer"},"mode":{"type":"string","enum":["bootstrap","market"]},"ruinProbability":{"type":"number"},"final":{"type":"object","properties":{"p5":{"type":"number"},"p25":{"type":"number"},"p50":{"type":"number"},"p75":{"type":"number"},"p95":{"type":"number"}},"required":["p5","p25","p50","p75","p95"]},"fan":{"type":"array","items":{"type":"object","properties":{"p5":{"type":"number"},"p25":{"type":"number"},"p50":{"type":"number"},"p75":{"type":"number"},"p95":{"type":"number"},"step":{"type":"integer"}},"required":["p5","p25","p50","p75","p95","step"]}}},"required":["paths","seed","mode","ruinProbability","final","fan"]},"skipped":{"type":"object","additionalProperties":{"type":"number"}},"error":{"type":["string","null"]},"createdAt":{"type":"string"},"finishedAt":{"type":["string","null"]}},"required":["id","strategy","status","custom","params","metrics","curve","monteCarlo","skipped","error","createdAt","finishedAt"]}}}},"400":{"description":"Invalid parameters","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"401":{"description":"Sign in required (custom runs, premium strategies)","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"402":{"description":"Plan does not include this strategy or custom backtests","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"404":{"description":"Strategy not found","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"422":{"description":"Strategy rules cannot be backtested","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/backtests/{id}":{"get":{"tags":["strategies"],"summary":"One backtest run: metrics, equity curve, Monte Carlo fan. Custom runs: owner (or admin) only.","parameters":[{"schema":{"type":"integer","exclusiveMinimum":0},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Run","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer"},"strategy":{"type":"string"},"status":{"type":"string","enum":["queued","running","finished","failed"]},"custom":{"type":"boolean"},"params":{"type":"object","additionalProperties":{}},"metrics":{"type":"object","properties":{"n":{"type":["integer","null"]},"roi":{"type":["number","null"]},"clv":{"type":["number","null"]},"hitRate":{"type":["number","null"]},"maxDrawdown":{"type":["number","null"]},"yield":{"type":["number","null"]},"profit":{"type":["number","null"]},"staked":{"type":["number","null"]},"initialBankroll":{"type":["number","null"]},"finalBankroll":{"type":["number","null"]},"ruinProbability":{"type":["number","null"]},"events":{"type":["integer","null"]}},"required":["n","roi","clv","hitRate","maxDrawdown","yield","profit","staked","initialBankroll","finalBankroll","ruinProbability","events"]},"curve":{"type":"array","items":{"type":"object","properties":{"step":{"type":"integer"},"at":{"type":["string","null"]},"bankroll":{"type":"number"},"drawdown":{"type":"number"}},"required":["step","at","bankroll","drawdown"]}},"monteCarlo":{"type":["object","null"],"properties":{"paths":{"type":"integer"},"seed":{"type":"integer"},"mode":{"type":"string","enum":["bootstrap","market"]},"ruinProbability":{"type":"number"},"final":{"type":"object","properties":{"p5":{"type":"number"},"p25":{"type":"number"},"p50":{"type":"number"},"p75":{"type":"number"},"p95":{"type":"number"}},"required":["p5","p25","p50","p75","p95"]},"fan":{"type":"array","items":{"type":"object","properties":{"p5":{"type":"number"},"p25":{"type":"number"},"p50":{"type":"number"},"p75":{"type":"number"},"p95":{"type":"number"},"step":{"type":"integer"}},"required":["p5","p25","p50","p75","p95","step"]}}},"required":["paths","seed","mode","ruinProbability","final","fan"]},"skipped":{"type":"object","additionalProperties":{"type":"number"}},"error":{"type":["string","null"]},"createdAt":{"type":"string"},"finishedAt":{"type":["string","null"]}},"required":["id","strategy","status","custom","params","metrics","curve","monteCarlo","skipped","error","createdAt","finishedAt"]}}}},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"402":{"description":"Plan does not include this strategy","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"404":{"description":"Run not found","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/strategies/{slug}/export.csv":{"get":{"tags":["strategies"],"summary":"Picks of the default backtest run as CSV (Pro: export)","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"required":true,"name":"slug","in":"path"}],"responses":{"200":{"description":"CSV","content":{"text/csv":{"schema":{"type":"string"}}}},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"402":{"description":"Export requires Pro","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"404":{"description":"Strategy not found","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"422":{"description":"Strategy rules cannot be backtested","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/backtests/{id}/export.csv":{"get":{"tags":["strategies"],"summary":"Picks of one backtest run as CSV (Pro: export)","parameters":[{"schema":{"type":"integer","exclusiveMinimum":0},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"CSV","content":{"text/csv":{"schema":{"type":"string"}}}},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"402":{"description":"Export requires Pro","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"404":{"description":"Run not found","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/site":{"get":{"tags":["site"],"summary":"Public site status: admin maintenance banner and the global value switch","responses":{"200":{"description":"Site status","content":{"application/json":{"schema":{"type":"object","properties":{"maintenanceBanner":{"type":["string","null"],"minLength":1,"maxLength":280},"valueEnabled":{"type":"boolean"},"billingEnabled":{"type":"boolean"},"honestyCounterEnabled":{"type":"boolean"},"noiseHelperEnabled":{"type":"boolean"}},"required":["maintenanceBanner","valueEnabled"]}}}}}}},"/v1/billing/status":{"get":{"tags":["billing"],"summary":"Whether paid checkout is open (D44); false = free public beta, signed-in users get Premium (D52)","responses":{"200":{"description":"Billing status","content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"]}}}}}}},"/v1/me/entitlements":{"get":{"tags":["account"],"summary":"My plan, the capabilities it grants and today’s assistant usage (D23)","description":"The server enforces every capability; clients only render this answer.","responses":{"200":{"description":"Entitlements","content":{"application/json":{"schema":{"type":"object","properties":{"plan":{"type":"string","enum":["free","premium","pro"]},"capabilities":{"type":"array","items":{"type":"string","enum":["predictions.full","strategies.premium","bankroll.advanced","alerts","integrity.signals","backtest.custom","export","cockpit","ai_tickets"]}},"assistant":{"type":"object","properties":{"limit":{"type":["integer","null"]},"used":{"type":"integer"},"resetsAt":{"type":"string","format":"date-time"}},"required":["limit","used","resetsAt"]}},"required":["plan","capabilities","assistant"]}}}},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/me/preferences":{"get":{"tags":["account"],"summary":"My preferences (theme, locale, odds format, stats-only mode, favourites, notification channels)","responses":{"200":{"description":"Preferences","content":{"application/json":{"schema":{"type":"object","properties":{"surface":{"type":"string","enum":["system","dark","light","oled","dim"]},"accent":{"type":"string","enum":["amber","mint","cobalt","coral","violet"]},"locale":{"type":"string","enum":["ro","en"]},"oddsFormat":{"type":"string","enum":["decimal","fractional","american"]},"statsOnly":{"type":"boolean"},"favouriteCompetitions":{"type":"array","items":{"type":"string","pattern":"^\\d{1,18}$"},"maxItems":50},"favouriteTeams":{"type":"array","items":{"type":"string","pattern":"^\\d{1,18}$"},"maxItems":100},"notifications":{"type":"object","properties":{"email":{"type":"object","properties":{"kickoff":{"type":"boolean"},"lineup":{"type":"boolean"},"goal":{"type":"boolean"},"final":{"type":"boolean"},"value":{"type":"boolean"},"opening":{"type":"boolean"},"steam":{"type":"boolean"},"swing":{"type":"boolean"},"reply":{"type":"boolean"}},"required":["kickoff","lineup","goal","final","value","opening","steam","swing","reply"]},"push":{"type":"object","properties":{"kickoff":{"type":"boolean"},"lineup":{"type":"boolean"},"goal":{"type":"boolean"},"final":{"type":"boolean"},"value":{"type":"boolean"},"opening":{"type":"boolean"},"steam":{"type":"boolean"},"swing":{"type":"boolean"},"reply":{"type":"boolean"}},"required":["kickoff","lineup","goal","final","value","opening","steam","swing","reply"]},"inApp":{"type":"object","properties":{"kickoff":{"type":"boolean"},"lineup":{"type":"boolean"},"goal":{"type":"boolean"},"final":{"type":"boolean"},"value":{"type":"boolean"},"opening":{"type":"boolean"},"steam":{"type":"boolean"},"swing":{"type":"boolean"},"reply":{"type":"boolean"}},"required":["kickoff","lineup","goal","final","value","opening","steam","swing","reply"]},"telegram":{"type":"object","properties":{"kickoff":{"type":"boolean"},"lineup":{"type":"boolean"},"goal":{"type":"boolean"},"final":{"type":"boolean"},"value":{"type":"boolean"},"opening":{"type":"boolean"},"steam":{"type":"boolean"},"swing":{"type":"boolean"},"reply":{"type":"boolean"}},"required":["kickoff","lineup","goal","final","value","opening","steam","swing","reply"]}},"required":["email","push","inApp","telegram"]},"quietHours":{"type":"object","properties":{"enabled":{"type":"boolean"},"start":{"type":"integer","minimum":0,"maximum":23},"end":{"type":"integer","minimum":0,"maximum":23}},"required":["enabled","start","end"]},"digest":{"type":"object","properties":{"email":{"type":"boolean"},"telegram":{"type":"boolean"}},"required":["email","telegram"]}},"required":["surface","accent","locale","oddsFormat","statsOnly","favouriteCompetitions","favouriteTeams","notifications","quietHours","digest"]}}}},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}},"put":{"tags":["account"],"summary":"Update my preferences (any subset; merged over the stored ones)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"surface":{"type":"string","enum":["system","dark","light","oled","dim"]},"accent":{"type":"string","enum":["amber","mint","cobalt","coral","violet"]},"locale":{"type":"string","enum":["ro","en"]},"oddsFormat":{"type":"string","enum":["decimal","fractional","american"]},"statsOnly":{"type":"boolean"},"favouriteCompetitions":{"type":"array","items":{"type":"string","pattern":"^\\d{1,18}$"},"maxItems":50},"favouriteTeams":{"type":"array","items":{"type":"string","pattern":"^\\d{1,18}$"},"maxItems":100},"notifications":{"type":"object","properties":{"email":{"type":"object","properties":{"kickoff":{"type":"boolean"},"lineup":{"type":"boolean"},"goal":{"type":"boolean"},"final":{"type":"boolean"},"value":{"type":"boolean"},"opening":{"type":"boolean"},"steam":{"type":"boolean"},"swing":{"type":"boolean"},"reply":{"type":"boolean"}}},"push":{"type":"object","properties":{"kickoff":{"type":"boolean"},"lineup":{"type":"boolean"},"goal":{"type":"boolean"},"final":{"type":"boolean"},"value":{"type":"boolean"},"opening":{"type":"boolean"},"steam":{"type":"boolean"},"swing":{"type":"boolean"},"reply":{"type":"boolean"}}},"inApp":{"type":"object","properties":{"kickoff":{"type":"boolean"},"lineup":{"type":"boolean"},"goal":{"type":"boolean"},"final":{"type":"boolean"},"value":{"type":"boolean"},"opening":{"type":"boolean"},"steam":{"type":"boolean"},"swing":{"type":"boolean"},"reply":{"type":"boolean"}}},"telegram":{"type":"object","properties":{"kickoff":{"type":"boolean"},"lineup":{"type":"boolean"},"goal":{"type":"boolean"},"final":{"type":"boolean"},"value":{"type":"boolean"},"opening":{"type":"boolean"},"steam":{"type":"boolean"},"swing":{"type":"boolean"},"reply":{"type":"boolean"}}}}},"quietHours":{"type":"object","properties":{"enabled":{"type":"boolean"},"start":{"type":"integer","minimum":0,"maximum":23},"end":{"type":"integer","minimum":0,"maximum":23}}},"digest":{"type":"object","properties":{"email":{"type":"boolean"},"telegram":{"type":"boolean"}}}}}}}},"responses":{"200":{"description":"Preferences","content":{"application/json":{"schema":{"type":"object","properties":{"surface":{"type":"string","enum":["system","dark","light","oled","dim"]},"accent":{"type":"string","enum":["amber","mint","cobalt","coral","violet"]},"locale":{"type":"string","enum":["ro","en"]},"oddsFormat":{"type":"string","enum":["decimal","fractional","american"]},"statsOnly":{"type":"boolean"},"favouriteCompetitions":{"type":"array","items":{"type":"string","pattern":"^\\d{1,18}$"},"maxItems":50},"favouriteTeams":{"type":"array","items":{"type":"string","pattern":"^\\d{1,18}$"},"maxItems":100},"notifications":{"type":"object","properties":{"email":{"type":"object","properties":{"kickoff":{"type":"boolean"},"lineup":{"type":"boolean"},"goal":{"type":"boolean"},"final":{"type":"boolean"},"value":{"type":"boolean"},"opening":{"type":"boolean"},"steam":{"type":"boolean"},"swing":{"type":"boolean"},"reply":{"type":"boolean"}},"required":["kickoff","lineup","goal","final","value","opening","steam","swing","reply"]},"push":{"type":"object","properties":{"kickoff":{"type":"boolean"},"lineup":{"type":"boolean"},"goal":{"type":"boolean"},"final":{"type":"boolean"},"value":{"type":"boolean"},"opening":{"type":"boolean"},"steam":{"type":"boolean"},"swing":{"type":"boolean"},"reply":{"type":"boolean"}},"required":["kickoff","lineup","goal","final","value","opening","steam","swing","reply"]},"inApp":{"type":"object","properties":{"kickoff":{"type":"boolean"},"lineup":{"type":"boolean"},"goal":{"type":"boolean"},"final":{"type":"boolean"},"value":{"type":"boolean"},"opening":{"type":"boolean"},"steam":{"type":"boolean"},"swing":{"type":"boolean"},"reply":{"type":"boolean"}},"required":["kickoff","lineup","goal","final","value","opening","steam","swing","reply"]},"telegram":{"type":"object","properties":{"kickoff":{"type":"boolean"},"lineup":{"type":"boolean"},"goal":{"type":"boolean"},"final":{"type":"boolean"},"value":{"type":"boolean"},"opening":{"type":"boolean"},"steam":{"type":"boolean"},"swing":{"type":"boolean"},"reply":{"type":"boolean"}},"required":["kickoff","lineup","goal","final","value","opening","steam","swing","reply"]}},"required":["email","push","inApp","telegram"]},"quietHours":{"type":"object","properties":{"enabled":{"type":"boolean"},"start":{"type":"integer","minimum":0,"maximum":23},"end":{"type":"integer","minimum":0,"maximum":23}},"required":["enabled","start","end"]},"digest":{"type":"object","properties":{"email":{"type":"boolean"},"telegram":{"type":"boolean"}},"required":["email","telegram"]}},"required":["surface","accent","locale","oddsFormat","statsOnly","favouriteCompetitions","favouriteTeams","notifications","quietHours","digest"]}}}},"400":{"description":"Invalid preferences","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/me/follows":{"get":{"tags":["account"],"summary":"Teams and competitions I follow","responses":{"200":{"description":"Follows","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"targetType":{"type":"string","enum":["participant","competition"]},"targetId":{"type":"string"},"name":{"type":["string","null"]},"slug":{"type":["string","null"]},"notify":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"}},"required":["targetType","targetId","name","slug","notify","createdAt"]}}},"required":["items"]}}}},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}},"post":{"tags":["account"],"summary":"Follow a team or competition (idempotent)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"targetType":{"type":"string","enum":["participant","competition"]},"targetId":{"type":"string","pattern":"^(\\d{1,18}|[a-z0-9][a-z0-9-]{0,63})$"}},"required":["targetType","targetId"]}}}},"responses":{"200":{"description":"Follows","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"targetType":{"type":"string","enum":["participant","competition"]},"targetId":{"type":"string"},"name":{"type":["string","null"]},"slug":{"type":["string","null"]},"notify":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"}},"required":["targetType","targetId","name","slug","notify","createdAt"]}}},"required":["items"]}}}},"400":{"description":"Invalid target","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"404":{"description":"Team or competition not found","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"409":{"description":"Too many follows","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}},"delete":{"tags":["account"],"summary":"Stop following a team or competition","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"targetType":{"type":"string","enum":["participant","competition"]},"targetId":{"type":"string","pattern":"^(\\d{1,18}|[a-z0-9][a-z0-9-]{0,63})$"}},"required":["targetType","targetId"]}}}},"responses":{"200":{"description":"Follows","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"targetType":{"type":"string","enum":["participant","competition"]},"targetId":{"type":"string"},"name":{"type":["string","null"]},"slug":{"type":["string","null"]},"notify":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"}},"required":["targetType","targetId","name","slug","notify","createdAt"]}}},"required":["items"]}}}},"400":{"description":"Invalid target","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/me/export":{"get":{"tags":["account"],"summary":"Download everything MarcAI stores about me (GDPR art. 15 / 20)","responses":{"200":{"description":"Account export","content":{"application/json":{"schema":{"type":"object","properties":{"exportedAt":{"type":"string","format":"date-time"},"user":{"type":"object","additionalProperties":{}},"preferences":{"type":"object","properties":{"surface":{"type":"string","enum":["system","dark","light","oled","dim"]},"accent":{"type":"string","enum":["amber","mint","cobalt","coral","violet"]},"locale":{"type":"string","enum":["ro","en"]},"oddsFormat":{"type":"string","enum":["decimal","fractional","american"]},"statsOnly":{"type":"boolean"},"favouriteCompetitions":{"type":"array","items":{"type":"string","pattern":"^\\d{1,18}$"},"maxItems":50},"favouriteTeams":{"type":"array","items":{"type":"string","pattern":"^\\d{1,18}$"},"maxItems":100},"notifications":{"type":"object","properties":{"email":{"type":"object","properties":{"kickoff":{"type":"boolean"},"lineup":{"type":"boolean"},"goal":{"type":"boolean"},"final":{"type":"boolean"},"value":{"type":"boolean"},"opening":{"type":"boolean"},"steam":{"type":"boolean"},"swing":{"type":"boolean"},"reply":{"type":"boolean"}},"required":["kickoff","lineup","goal","final","value","opening","steam","swing","reply"]},"push":{"type":"object","properties":{"kickoff":{"type":"boolean"},"lineup":{"type":"boolean"},"goal":{"type":"boolean"},"final":{"type":"boolean"},"value":{"type":"boolean"},"opening":{"type":"boolean"},"steam":{"type":"boolean"},"swing":{"type":"boolean"},"reply":{"type":"boolean"}},"required":["kickoff","lineup","goal","final","value","opening","steam","swing","reply"]},"inApp":{"type":"object","properties":{"kickoff":{"type":"boolean"},"lineup":{"type":"boolean"},"goal":{"type":"boolean"},"final":{"type":"boolean"},"value":{"type":"boolean"},"opening":{"type":"boolean"},"steam":{"type":"boolean"},"swing":{"type":"boolean"},"reply":{"type":"boolean"}},"required":["kickoff","lineup","goal","final","value","opening","steam","swing","reply"]},"telegram":{"type":"object","properties":{"kickoff":{"type":"boolean"},"lineup":{"type":"boolean"},"goal":{"type":"boolean"},"final":{"type":"boolean"},"value":{"type":"boolean"},"opening":{"type":"boolean"},"steam":{"type":"boolean"},"swing":{"type":"boolean"},"reply":{"type":"boolean"}},"required":["kickoff","lineup","goal","final","value","opening","steam","swing","reply"]}},"required":["email","push","inApp","telegram"]},"quietHours":{"type":"object","properties":{"enabled":{"type":"boolean"},"start":{"type":"integer","minimum":0,"maximum":23},"end":{"type":"integer","minimum":0,"maximum":23}},"required":["enabled","start","end"]},"digest":{"type":"object","properties":{"email":{"type":"boolean"},"telegram":{"type":"boolean"}},"required":["email","telegram"]}},"required":["surface","accent","locale","oddsFormat","statsOnly","favouriteCompetitions","favouriteTeams","notifications","quietHours","digest"]},"follows":{"type":"array","items":{"type":"object","properties":{"targetType":{"type":"string","enum":["participant","competition"]},"targetId":{"type":"string"},"name":{"type":["string","null"]},"slug":{"type":["string","null"]},"notify":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"}},"required":["targetType","targetId","name","slug","notify","createdAt"]}},"subscriptions":{"type":"array","items":{"type":"object","additionalProperties":{}}},"tickets":{"type":"array","items":{"type":"object","additionalProperties":{}}},"picks":{"type":"array","items":{"type":"object","additionalProperties":{}}},"comments":{"type":"array","items":{"type":"object","additionalProperties":{}}},"assistantThreads":{"type":"array","items":{"type":"object","additionalProperties":{}}},"notifications":{"type":"array","items":{"type":"object","additionalProperties":{}}},"pushDevices":{"type":"array","items":{"type":"object","additionalProperties":{}}},"telegram":{"type":["object","null"],"additionalProperties":{}},"funnelEvents":{"type":"array","items":{"type":"object","additionalProperties":{}}},"limits":{"type":["object","null"],"additionalProperties":{}}},"required":["exportedAt","user","preferences","follows","subscriptions","tickets","picks","comments","assistantThreads","notifications","pushDevices","limits"]}}}},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/notifications":{"get":{"tags":["notifications"],"summary":"My notification inbox (newest first, cursor pagination) with the unread count","parameters":[{"schema":{"type":"string","pattern":"^\\d{1,18}$"},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":50,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","enum":["1","true"]},"required":false,"name":"unread","in":"query"}],"responses":{"200":{"description":"Inbox page","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["kickoff","lineup","goal","final","value","opening","steam","swing","reply","system"]},"title":{"type":"string"},"body":{"type":"string"},"url":{"type":["string","null"]},"readAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time"}},"required":["id","kind","title","body","url","readAt","createdAt"]}},"nextCursor":{"type":["string","null"]},"unread":{"type":"integer","minimum":0}},"required":["items","nextCursor","unread"]}}}},"400":{"description":"Invalid query","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/notifications/read":{"post":{"tags":["notifications"],"summary":"Mark some (ids) or all of my notifications as read","requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string","pattern":"^\\d{1,18}$"},"minItems":1,"maxItems":100}},"required":["ids"]},{"type":"object","properties":{"all":{"type":"boolean","enum":[true]}},"required":["all"]}]}}}},"responses":{"200":{"description":"Updated","content":{"application/json":{"schema":{"type":"object","properties":{"updated":{"type":"integer"},"unread":{"type":"integer"}},"required":["updated","unread"]}}}},"400":{"description":"Invalid request","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/push/vapid-key":{"get":{"tags":["notifications"],"summary":"VAPID application server key for Web Push (null when push is not configured)","responses":{"200":{"description":"VAPID public key","content":{"application/json":{"schema":{"type":"object","properties":{"publicKey":{"type":["string","null"]}},"required":["publicKey"]}}}}}}},"/v1/push/subscriptions":{"post":{"tags":["notifications"],"summary":"Register this browser for Web Push (idempotent per endpoint)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"endpoint":{"type":"string","maxLength":2048,"format":"uri"},"keys":{"type":"object","properties":{"p256dh":{"type":"string","minLength":1,"maxLength":256},"auth":{"type":"string","minLength":1,"maxLength":64}},"required":["p256dh","auth"]}},"required":["endpoint","keys"]}}}},"responses":{"204":{"description":"Registered"},"400":{"description":"Invalid subscription","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"409":{"description":"Too many devices","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}},"delete":{"tags":["notifications"],"summary":"Remove this browser’s Web Push subscription","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"endpoint":{"type":"string","maxLength":2048,"format":"uri"}},"required":["endpoint"]}}}},"responses":{"204":{"description":"Removed"},"400":{"description":"Invalid request","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/push/devices":{"post":{"tags":["notifications"],"summary":"Register this phone’s FCM token for push (Android; idempotent per token)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"platform":{"type":"string","enum":["android"]},"token":{"type":"string","minLength":16,"maxLength":4096,"pattern":"^[\\w:.-]+$"}},"required":["platform","token"]}}}},"responses":{"204":{"description":"Registered"},"400":{"description":"Invalid token","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"409":{"description":"Too many devices","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}},"delete":{"tags":["notifications"],"summary":"Remove this phone’s FCM token (sign-out, push turned off)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","minLength":16,"maxLength":4096,"pattern":"^[\\w:.-]+$"}},"required":["token"]}}}},"responses":{"204":{"description":"Removed"},"400":{"description":"Invalid request","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/integrity/signals":{"get":{"tags":["integrity"],"summary":"Published market-anomaly signals past their publication delay (Pro)","parameters":[{"schema":{"type":"string","enum":["pre","live"]},"required":false,"name":"phase","in":"query"},{"schema":{"type":["number","null"],"minimum":0,"maximum":1},"required":false,"name":"minScore","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":50},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Signals","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"eventId":{"type":"string"},"phase":{"type":"string","enum":["pre","live"]},"score":{"type":"number","minimum":0,"maximum":1},"features":{"type":"object","additionalProperties":{"type":"number"}},"contributions":{"type":"array","items":{"type":"object","properties":{"feature":{"type":"string"},"value":{"type":"number"},"contribution":{"type":"number"}},"required":["feature","value","contribution"]}},"explanation":{"type":"object","properties":{"ro":{"type":"string"},"en":{"type":"string"}},"required":["ro","en"]},"visibleFrom":{"type":"string"},"createdAt":{"type":"string"},"match":{"type":"object","properties":{"kickoff":{"type":"string"},"status":{"type":"string"},"competition":{"type":["string","null"]},"home":{"type":"string"},"away":{"type":"string"}},"required":["kickoff","status","competition","home","away"]}},"required":["id","eventId","phase","score","features","contributions","explanation","visibleFrom","createdAt","match"]}}},"required":["items"]}}}},"400":{"description":"Invalid query","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"402":{"description":"Pro plan required (type ends with /paywall)","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/integrity/events/{eventId}":{"get":{"tags":["integrity"],"summary":"Published signals of one event (Pro)","parameters":[{"schema":{"type":"integer","exclusiveMinimum":0},"required":true,"name":"eventId","in":"path"}],"responses":{"200":{"description":"Signals","content":{"application/json":{"schema":{"type":"object","properties":{"eventId":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"eventId":{"type":"string"},"phase":{"type":"string","enum":["pre","live"]},"score":{"type":"number","minimum":0,"maximum":1},"features":{"type":"object","additionalProperties":{"type":"number"}},"contributions":{"type":"array","items":{"type":"object","properties":{"feature":{"type":"string"},"value":{"type":"number"},"contribution":{"type":"number"}},"required":["feature","value","contribution"]}},"explanation":{"type":"object","properties":{"ro":{"type":"string"},"en":{"type":"string"}},"required":["ro","en"]},"visibleFrom":{"type":"string"},"createdAt":{"type":"string"},"match":{"type":"object","properties":{"kickoff":{"type":"string"},"status":{"type":"string"},"competition":{"type":["string","null"]},"home":{"type":"string"},"away":{"type":"string"}},"required":["kickoff","status","competition","home","away"]}},"required":["id","eventId","phase","score","features","contributions","explanation","visibleFrom","createdAt","match"]}}},"required":["eventId","items"]}}}},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"402":{"description":"Pro plan required (type ends with /paywall)","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/integrity/events/{eventId}/odds-history":{"get":{"tags":["integrity"],"summary":"Devigged 1X2 consensus over time for the drift chart (Pro)","parameters":[{"schema":{"type":"integer","exclusiveMinimum":0},"required":true,"name":"eventId","in":"path"}],"responses":{"200":{"description":"Consensus series","content":{"application/json":{"schema":{"type":"object","properties":{"eventId":{"type":"string"},"market":{"type":"string"},"points":{"type":"array","items":{"type":"object","properties":{"t":{"type":"string"},"probs":{"type":"array","items":{"type":"number"}}},"required":["t","probs"]}}},"required":["eventId","market","points"]}}}},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"402":{"description":"Pro plan required (type ends with /paywall)","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"404":{"description":"Event not found","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/contests":{"get":{"tags":["contests"],"summary":"Weekly contests (current, next, recent). No stakes, no money prizes (D20).","responses":{"200":{"description":"Contests","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"title":{"type":"string"},"startsAt":{"type":"string","format":"date-time"},"endsAt":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["upcoming","open","closed"]},"entrants":{"type":"integer","minimum":0},"maxPicks":{"type":"integer","exclusiveMinimum":0}},"required":["slug","title","startsAt","endsAt","status","entrants","maxPicks"]}}},"required":["items"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/contests/{slug}":{"get":{"tags":["contests"],"summary":"One contest with its leaderboard (top 100 + your row) and rank changes","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"required":true,"name":"slug","in":"path"}],"responses":{"200":{"description":"Contest","content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"type":"string"},"title":{"type":"string"},"startsAt":{"type":"string","format":"date-time"},"endsAt":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["upcoming","open","closed"]},"entrants":{"type":"integer","minimum":0},"maxPicks":{"type":"integer","exclusiveMinimum":0},"leaderboard":{"type":"array","items":{"type":"object","properties":{"rank":{"type":"integer","exclusiveMinimum":0},"previousRank":{"type":["integer","null"],"exclusiveMinimum":0},"change":{"type":["integer","null"]},"name":{"type":"string"},"points":{"type":"number"},"picks":{"type":"integer","minimum":0},"settled":{"type":"integer","minimum":0},"badges":{"type":"array","items":{"type":"string"}},"me":{"type":"boolean"}},"required":["rank","previousRank","change","name","points","picks","settled","badges","me"]}},"joined":{"type":"boolean"}},"required":["slug","title","startsAt","endsAt","status","entrants","maxPicks","leaderboard","joined"]}}}},"404":{"description":"Contest not found","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/contests/{slug}/join":{"post":{"tags":["contests"],"summary":"Join a contest (idempotent)","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"required":true,"name":"slug","in":"path"}],"responses":{"200":{"description":"Entry","content":{"application/json":{"schema":{"type":"object","properties":{"contest":{"type":"object","properties":{"slug":{"type":"string"},"title":{"type":"string"},"startsAt":{"type":"string","format":"date-time"},"endsAt":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["upcoming","open","closed"]},"entrants":{"type":"integer","minimum":0},"maxPicks":{"type":"integer","exclusiveMinimum":0}},"required":["slug","title","startsAt","endsAt","status","entrants","maxPicks"]},"joined":{"type":"boolean"},"points":{"type":"number"},"rank":{"type":["integer","null"],"exclusiveMinimum":0},"picks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"eventId":{"type":"integer"},"home":{"type":"string"},"away":{"type":"string"},"kickoff":{"type":"string","format":"date-time"},"outcome":{"type":"integer","minimum":0,"maximum":2},"odds":{"type":"number"},"openFair":{"type":["number","null"]},"result":{"type":"string","enum":["pending","won","lost","void","half_won","half_lost"]},"points":{"type":["number","null"]},"hash":{"type":"string"},"prevHash":{"type":["string","null"]},"placedAt":{"type":"string","format":"date-time"}},"required":["id","eventId","home","away","kickoff","outcome","odds","openFair","result","points","hash","prevHash","placedAt"]}}},"required":["contest","joined","points","rank","picks"]}}}},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"404":{"description":"Contest not found","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"409":{"description":"Contest closed","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/contests/{slug}/me":{"get":{"tags":["contests"],"summary":"Your entry: points, rank and picks (with hash chain links)","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"required":true,"name":"slug","in":"path"}],"responses":{"200":{"description":"Entry","content":{"application/json":{"schema":{"type":"object","properties":{"contest":{"type":"object","properties":{"slug":{"type":"string"},"title":{"type":"string"},"startsAt":{"type":"string","format":"date-time"},"endsAt":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["upcoming","open","closed"]},"entrants":{"type":"integer","minimum":0},"maxPicks":{"type":"integer","exclusiveMinimum":0}},"required":["slug","title","startsAt","endsAt","status","entrants","maxPicks"]},"joined":{"type":"boolean"},"points":{"type":"number"},"rank":{"type":["integer","null"],"exclusiveMinimum":0},"picks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"eventId":{"type":"integer"},"home":{"type":"string"},"away":{"type":"string"},"kickoff":{"type":"string","format":"date-time"},"outcome":{"type":"integer","minimum":0,"maximum":2},"odds":{"type":"number"},"openFair":{"type":["number","null"]},"result":{"type":"string","enum":["pending","won","lost","void","half_won","half_lost"]},"points":{"type":["number","null"]},"hash":{"type":"string"},"prevHash":{"type":["string","null"]},"placedAt":{"type":"string","format":"date-time"}},"required":["id","eventId","home","away","kickoff","outcome","odds","openFair","result","points","hash","prevHash","placedAt"]}}},"required":["contest","joined","points","rank","picks"]}}}},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"404":{"description":"Contest not found","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/contests/{slug}/picks":{"post":{"tags":["contests"],"summary":"Submit a 1X2 pick at the current consensus price (joins the contest when needed)","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"required":true,"name":"slug","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"eventId":{"type":"integer","exclusiveMinimum":0},"outcome":{"type":"integer","minimum":0,"maximum":2}},"required":["eventId","outcome"],"additionalProperties":false}}}},"responses":{"201":{"description":"Pick","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer"},"eventId":{"type":"integer"},"home":{"type":"string"},"away":{"type":"string"},"kickoff":{"type":"string","format":"date-time"},"outcome":{"type":"integer","minimum":0,"maximum":2},"odds":{"type":"number"},"openFair":{"type":["number","null"]},"result":{"type":"string","enum":["pending","won","lost","void","half_won","half_lost"]},"points":{"type":["number","null"]},"hash":{"type":"string"},"prevHash":{"type":["string","null"]},"placedAt":{"type":"string","format":"date-time"}},"required":["id","eventId","home","away","kickoff","outcome","odds","openFair","result","points","hash","prevHash","placedAt"]}}}},"400":{"description":"Invalid pick","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"404":{"description":"Contest or match not found","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"409":{"description":"Contest closed, match started, duplicate or limit reached","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"422":{"description":"No consensus odds for this match","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/me/contest-badges":{"get":{"tags":["contests"],"summary":"Profile badges earned in contests","responses":{"200":{"description":"Badges","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["first-entry","podium","winner","clv-positive","ten-picks"]},"contest":{"type":"string"},"awardedAt":{"type":["string","null"],"format":"date-time"}},"required":["code","contest","awardedAt"]}}},"required":["items"]}}}},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/contests/{slug}/forecasts":{"get":{"tags":["contests"],"summary":"Probability contest board: points vs the market close, Brier vs market and model (D39)","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"required":true,"name":"slug","in":"path"}],"responses":{"200":{"description":"Forecast board","content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"type":"string"},"maxForecasts":{"type":"integer","exclusiveMinimum":0},"rows":{"type":"array","items":{"type":"object","properties":{"rank":{"type":"integer","exclusiveMinimum":0},"name":{"type":"string"},"points":{"type":"number"},"forecasts":{"type":"integer","minimum":0},"summary":{"type":"object","properties":{"n":{"type":"integer","minimum":0},"brier":{"type":["number","null"]},"marketBrier":{"type":["number","null"]},"modelBrier":{"type":["number","null"]},"vsModel":{"type":["number","null"]},"modelN":{"type":"integer","minimum":0}},"required":["n","brier","marketBrier","modelBrier","vsModel","modelN"]},"me":{"type":"boolean"}},"required":["rank","name","points","forecasts","summary","me"]}},"overall":{"type":"object","properties":{"n":{"type":"integer","minimum":0},"brier":{"type":["number","null"]},"marketBrier":{"type":["number","null"]},"modelBrier":{"type":["number","null"]},"vsModel":{"type":["number","null"]},"modelN":{"type":"integer","minimum":0}},"required":["n","brier","marketBrier","modelBrier","vsModel","modelN"]}},"required":["slug","maxForecasts","rows","overall"]}}}},"404":{"description":"Contest not found","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}},"post":{"tags":["contests"],"summary":"Submit a 1X2 probability triple in whole percent (separate board from the 1X2 picks)","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"required":true,"name":"slug","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"eventId":{"type":"integer","exclusiveMinimum":0},"probabilities":{"type":"array","prefixItems":[{"type":"integer","minimum":1,"maximum":98},{"type":"integer","minimum":1,"maximum":98},{"type":"integer","minimum":1,"maximum":98}]}},"required":["eventId","probabilities"],"additionalProperties":false}}}},"responses":{"201":{"description":"Forecast","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer"},"eventId":{"type":"integer"},"home":{"type":"string"},"away":{"type":"string"},"kickoff":{"type":"string","format":"date-time"},"probabilities":{"type":"array","prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"}]},"status":{"type":"string","enum":["pending","settled","void"]},"outcome":{"type":["integer","null"],"minimum":0,"maximum":2},"market":{"type":["array","null"],"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"}]},"model":{"type":["array","null"],"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"}]},"brier":{"type":["number","null"]},"marketBrier":{"type":["number","null"]},"modelBrier":{"type":["number","null"]},"points":{"type":["number","null"]},"hash":{"type":"string"},"prevHash":{"type":["string","null"]},"placedAt":{"type":"string","format":"date-time"}},"required":["id","eventId","home","away","kickoff","probabilities","status","outcome","market","model","brier","marketBrier","modelBrier","points","hash","prevHash","placedAt"]}}}},"400":{"description":"Invalid forecast","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"404":{"description":"Contest or match not found","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"409":{"description":"Contest closed, match started, duplicate or limit reached","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/contests/{slug}/forecasts/me":{"get":{"tags":["contests"],"summary":"Your probability forecasts with Brier scores and hash chain links","parameters":[{"schema":{"type":"string","minLength":3,"maxLength":80,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"required":true,"name":"slug","in":"path"}],"responses":{"200":{"description":"Forecasts","content":{"application/json":{"schema":{"type":"object","properties":{"contest":{"type":"object","properties":{"slug":{"type":"string"},"title":{"type":"string"},"startsAt":{"type":"string","format":"date-time"},"endsAt":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["upcoming","open","closed"]},"entrants":{"type":"integer","minimum":0},"maxPicks":{"type":"integer","exclusiveMinimum":0}},"required":["slug","title","startsAt","endsAt","status","entrants","maxPicks"]},"maxForecasts":{"type":"integer","exclusiveMinimum":0},"points":{"type":"number"},"rank":{"type":["integer","null"],"exclusiveMinimum":0},"summary":{"type":"object","properties":{"n":{"type":"integer","minimum":0},"brier":{"type":["number","null"]},"marketBrier":{"type":["number","null"]},"modelBrier":{"type":["number","null"]},"vsModel":{"type":["number","null"]},"modelN":{"type":"integer","minimum":0}},"required":["n","brier","marketBrier","modelBrier","vsModel","modelN"]},"forecasts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"eventId":{"type":"integer"},"home":{"type":"string"},"away":{"type":"string"},"kickoff":{"type":"string","format":"date-time"},"probabilities":{"type":"array","prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"}]},"status":{"type":"string","enum":["pending","settled","void"]},"outcome":{"type":["integer","null"],"minimum":0,"maximum":2},"market":{"type":["array","null"],"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"}]},"model":{"type":["array","null"],"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"}]},"brier":{"type":["number","null"]},"marketBrier":{"type":["number","null"]},"modelBrier":{"type":["number","null"]},"points":{"type":["number","null"]},"hash":{"type":"string"},"prevHash":{"type":["string","null"]},"placedAt":{"type":"string","format":"date-time"}},"required":["id","eventId","home","away","kickoff","probabilities","status","outcome","market","model","brier","marketBrier","modelBrier","points","hash","prevHash","placedAt"]}}},"required":["contest","maxForecasts","points","rank","summary","forecasts"]}}}},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"404":{"description":"Contest not found","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Database not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/competitions/{slug}/projection":{"get":{"tags":["match-center"],"summary":"Season projection: Monte Carlo of the remaining fixtures with the model strengths (D29)","description":"Expected points (p5/p50/p95), expected position and zone probabilities for everyone; the full position distribution (`positions`) only for Premium/Pro sessions — anonymous/Free get `limited: true` (D23). Liga 1 is projected for the regular season only.","parameters":[{"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,63}$"},"required":true,"name":"slug","in":"path"}],"responses":{"200":{"description":"Projection","content":{"application/json":{"schema":{"type":"object","properties":{"competition":{"type":"object","properties":{"slug":{"type":"string","minLength":1},"name":{"type":"string","minLength":1}},"required":["slug","name"]},"season":{"type":"string","minLength":1},"phase":{"type":"string","enum":["regular","full"]},"sims":{"type":"integer","exclusiveMinimum":0},"remainingFixtures":{"type":"integer","minimum":0},"playedFixtures":{"type":"integer","minimum":0},"model":{"type":"string","minLength":1},"computedAt":{"type":"string","format":"date-time"},"zones":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","enum":["title","ucl","europe","playoff","playout","relegation"]},"from":{"type":"integer","exclusiveMinimum":0},"to":{"type":"integer","exclusiveMinimum":0}},"required":["key","from","to"]}},"rows":{"type":"array","items":{"type":"object","properties":{"team":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1}},"required":["id","name"]},"points":{"type":"integer","minimum":0},"played":{"type":"integer","minimum":0},"expectedPoints":{"type":"number","minimum":0},"pointsRange":{"type":"object","properties":{"p5":{"type":"number"},"p50":{"type":"number"},"p95":{"type":"number"}},"required":["p5","p50","p95"]},"expectedPosition":{"type":"number","exclusiveMinimum":0},"zones":{"type":"object","additionalProperties":{"type":"number","minimum":0,"maximum":1}},"positions":{"type":"array","items":{"type":"number","minimum":0,"maximum":1}}},"required":["team","points","played","expectedPoints","pointsRange","expectedPosition","zones"]}},"limited":{"type":"boolean"}},"required":["competition","phase","sims","remainingFixtures","playedFixtures","model","computedAt","zones","rows"]}}}},"400":{"description":"Invalid slug","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"404":{"description":"No projection for this competition","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/competitions/{slug}/power":{"get":{"tags":["match-center"],"summary":"Power ratings: model attack/defence strengths of the current season teams (T052)","description":"Newest Dixon-Coles strength snapshot of the competition, restricted to the teams of the current season. Teams the model has not fitted use the promoted-team prior (`prior: true`).","parameters":[{"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,63}$"},"required":true,"name":"slug","in":"path"}],"responses":{"200":{"description":"Power ratings","content":{"application/json":{"schema":{"type":"object","properties":{"competition":{"type":"object","properties":{"slug":{"type":"string","minLength":1},"name":{"type":"string","minLength":1}},"required":["slug","name"]},"season":{"type":"string","minLength":1},"model":{"type":"string","minLength":1},"fittedAt":{"type":"string","format":"date-time"},"homeAdvantageGoals":{"type":"number"},"rows":{"type":"array","items":{"type":"object","properties":{"rank":{"type":"integer","exclusiveMinimum":0},"team":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1}},"required":["id","name"]},"rating":{"type":"number"},"attack":{"type":"number"},"defence":{"type":"number"},"goalsFor":{"type":"number","minimum":0},"goalsAgainst":{"type":"number","minimum":0},"prior":{"type":"boolean"}},"required":["rank","team","rating","attack","defence","goalsFor","goalsAgainst","prior"]}}},"required":["competition","model","fittedAt","homeAdvantageGoals","rows"]}}}},"400":{"description":"Invalid slug","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"404":{"description":"Unknown competition, no season or no strength snapshot","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/competitions/{slug}/rounds":{"get":{"tags":["match-center"],"summary":"Matchdays of the current season (T052)","description":"Rounds with their kickoff window, match count and finished count. `current` = round of the next unfinished match, else the last round; null when no round is known.","parameters":[{"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,63}$"},"required":true,"name":"slug","in":"path"}],"responses":{"200":{"description":"Rounds","content":{"application/json":{"schema":{"type":"object","properties":{"competition":{"type":"object","properties":{"slug":{"type":"string","minLength":1},"name":{"type":"string","minLength":1}},"required":["slug","name"]},"season":{"type":"string","minLength":1},"current":{"type":["integer","null"],"exclusiveMinimum":0},"items":{"type":"array","items":{"type":"object","properties":{"round":{"type":"integer","exclusiveMinimum":0},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"matches":{"type":"integer","minimum":0},"finished":{"type":"integer","minimum":0}},"required":["round","from","to","matches","finished"]}}},"required":["competition","current","items"]}}}},"400":{"description":"Invalid slug","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"404":{"description":"Unknown competition","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/competitions/{slug}/rounds/{round}":{"get":{"tags":["match-center"],"summary":"Matches of one matchday of the current season (T052)","description":"Public (D23) match shape, identical to anonymous /v1/matches: favourite-only prediction (`limited`), no value. Kickoff order.","parameters":[{"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,63}$"},"required":true,"name":"slug","in":"path"},{"schema":{"type":"integer","minimum":1,"maximum":99},"required":true,"name":"round","in":"path"}],"responses":{"200":{"description":"Round","content":{"application/json":{"schema":{"type":"object","properties":{"competition":{"type":"object","properties":{"slug":{"type":"string","minLength":1},"name":{"type":"string","minLength":1}},"required":["slug","name"]},"season":{"type":"string","minLength":1},"round":{"type":"integer","exclusiveMinimum":0},"lastRound":{"type":"integer","exclusiveMinimum":0},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"sport":{"type":"string","enum":["football","tennis","basketball","hockey","handball","esports"]},"league":{"type":"string","minLength":1},"home":{"type":"string","minLength":1},"away":{"type":"string","minLength":1},"kickoff":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["scheduled","live","finished"]},"resultPending":{"type":"boolean"},"score":{"type":"object","properties":{"home":{"type":"integer","minimum":0},"away":{"type":"integer","minimum":0}},"required":["home","away"]},"prediction":{"type":"object","properties":{"model":{"type":"string","minLength":1},"probabilities":{"type":"object","properties":{"home":{"type":["number","null"],"exclusiveMinimum":0},"draw":{"type":["number","null"],"exclusiveMinimum":0},"away":{"type":["number","null"],"exclusiveMinimum":0}},"required":["home","draw","away"]},"fairOdds":{"type":"object","properties":{"home":{"type":["number","null"],"exclusiveMinimum":0},"draw":{"type":["number","null"],"exclusiveMinimum":0},"away":{"type":["number","null"],"exclusiveMinimum":0}},"required":["home","draw","away"]},"createdAt":{"type":"string","format":"date-time"},"limited":{"type":"boolean"}},"required":["model","probabilities","fairOdds","createdAt"]},"odds":{"type":"object","properties":{"prices":{"type":"object","properties":{"home":{"type":"number","exclusiveMinimum":0},"draw":{"type":"number","exclusiveMinimum":0},"away":{"type":"number","exclusiveMinimum":0}},"required":["home","draw","away"]},"opening":{"type":"object","properties":{"home":{"type":"number","exclusiveMinimum":0},"draw":{"type":"number","exclusiveMinimum":0},"away":{"type":"number","exclusiveMinimum":0}},"required":["home","draw","away"]},"source":{"type":"string","minLength":1},"observedAt":{"type":"string","format":"date-time"}},"required":["prices","source","observedAt"]},"value":{"type":"object","properties":{"enabled":{"type":"boolean"},"reason":{"type":"string","enum":["validated","model_worse_than_close","no_backtest","no_odds","disabled_by_admin"]}},"required":["enabled","reason"]},"verdict":{"type":"object","properties":{"outcome":{"type":"string","enum":["home","draw","away"]},"modelProbability":{"type":"number","minimum":0,"maximum":1},"marketProbability":{"type":["number","null"],"minimum":0,"maximum":1},"favourite":{"type":"string","enum":["home","draw","away"]},"favouriteHit":{"type":"boolean"},"closer":{"type":["string","null"],"enum":["model","market","level",null]}},"required":["outcome","modelProbability","marketProbability","favourite","favouriteHit","closer"]},"live":{"type":"object","properties":{"minute":{"type":["integer","null"],"minimum":0},"period":{"type":"string","enum":["1H","HT","2H","ET1","ET2","PEN"]},"red":{"type":"object","properties":{"home":{"type":"integer","minimum":0},"away":{"type":"integer","minimum":0}},"required":["home","away"]},"yellow":{"type":"object","properties":{"home":{"type":"integer","minimum":0},"away":{"type":"integer","minimum":0}},"required":["home","away"]},"corners":{"type":"object","properties":{"home":{"type":"integer","minimum":0},"away":{"type":"integer","minimum":0}},"required":["home","away"]},"at":{"type":"string","format":"date-time"}},"required":["minute"]},"source":{"type":"string","minLength":1}},"required":["id","sport","league","home","away","kickoff","status"]}}},"required":["competition","round","lastRound","items"]}}}},"400":{"description":"Invalid slug or round","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"404":{"description":"Unknown competition or round","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/reports/weekly/{week}":{"get":{"tags":["reports"],"summary":"Weekly model report: proper scores vs the no-margin consensus close (T052)","description":"Finished football matches of the ISO week (Monday 00:00 -> Monday 00:00 Europe/Bucharest) that had a pre-match 1X2 prediction: hit rate, log loss, Brier, the same against the consensus close, per league, biggest surprises and the public ledger picks settled in the week.","parameters":[{"schema":{"type":"string","pattern":"^\\d{4}-W(0[1-9]|[1-4]\\d|5[0-3])$"},"required":true,"name":"week","in":"path"}],"responses":{"200":{"description":"Weekly report","content":{"application/json":{"schema":{"type":"object","properties":{"week":{"type":"string","pattern":"^\\d{4}-W(0[1-9]|[1-4]\\d|5[0-3])$"},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"model":{"type":["string","null"],"minLength":1},"scores":{"type":"object","properties":{"matches":{"type":"integer","minimum":0},"favouriteHitRate":{"type":["number","null"],"minimum":0,"maximum":1},"logLoss":{"type":["number","null"],"minimum":0},"brier":{"type":["number","null"],"minimum":0},"marketMatches":{"type":"integer","minimum":0},"marketLogLoss":{"type":["number","null"],"minimum":0},"modelLogLossOnMarketSubset":{"type":["number","null"],"minimum":0},"favouriteHitCi":{"type":["object","null"],"properties":{"lo":{"type":"number","minimum":0,"maximum":1},"hi":{"type":"number","minimum":0,"maximum":1}},"required":["lo","hi"]},"logLossDiff":{"type":["object","null"],"properties":{"mean":{"type":"number"},"lo":{"type":"number"},"hi":{"type":"number"},"n":{"type":"integer","minimum":0}},"required":["mean","lo","hi","n"]}},"required":["matches","favouriteHitRate","logLoss","brier","marketMatches","marketLogLoss","modelLogLossOnMarketSubset"]},"leagues":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"scores":{"type":"object","properties":{"matches":{"type":"integer","minimum":0},"favouriteHitRate":{"type":["number","null"],"minimum":0,"maximum":1},"logLoss":{"type":["number","null"],"minimum":0},"brier":{"type":["number","null"],"minimum":0},"marketMatches":{"type":"integer","minimum":0},"marketLogLoss":{"type":["number","null"],"minimum":0},"modelLogLossOnMarketSubset":{"type":["number","null"],"minimum":0},"favouriteHitCi":{"type":["object","null"],"properties":{"lo":{"type":"number","minimum":0,"maximum":1},"hi":{"type":"number","minimum":0,"maximum":1}},"required":["lo","hi"]},"logLossDiff":{"type":["object","null"],"properties":{"mean":{"type":"number"},"lo":{"type":"number"},"hi":{"type":"number"},"n":{"type":"integer","minimum":0}},"required":["mean","lo","hi","n"]}},"required":["matches","favouriteHitRate","logLoss","brier","marketMatches","marketLogLoss","modelLogLossOnMarketSubset"]}},"required":["slug","name","scores"]}},"surprises":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"league":{"type":"string","minLength":1},"home":{"type":"string","minLength":1},"away":{"type":"string","minLength":1},"kickoff":{"type":"string","format":"date-time"},"score":{"type":"object","properties":{"home":{"type":"integer","minimum":0},"away":{"type":"integer","minimum":0}},"required":["home","away"]},"outcome":{"type":"string","enum":["home","draw","away"]},"probability":{"type":"number","minimum":0,"maximum":1}},"required":["id","league","home","away","kickoff","score","outcome","probability"]}},"confident":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"league":{"type":"string","minLength":1},"home":{"type":"string","minLength":1},"away":{"type":"string","minLength":1},"kickoff":{"type":"string","format":"date-time"},"score":{"type":"object","properties":{"home":{"type":"integer","minimum":0},"away":{"type":"integer","minimum":0}},"required":["home","away"]},"outcome":{"type":"string","enum":["home","draw","away"]},"probability":{"type":"number","minimum":0,"maximum":1}},"required":["id","league","home","away","kickoff","score","outcome","probability"]}},"ledger":{"type":"object","properties":{"settled":{"type":"integer","minimum":0},"wins":{"type":"number","minimum":0},"profit":{"type":"number"},"roi":{"type":["number","null"]},"avgClv":{"type":["number","null"]}},"required":["settled","wins","profit","roi","avgClv"]},"generatedAt":{"type":"string","format":"date-time"}},"required":["week","from","to","model","scores","leagues","surprises","confident","ledger","generatedAt"]}}}},"400":{"description":"Invalid week","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"404":{"description":"No scored match in this week (or the week is in the future)","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/reports/last7":{"get":{"tags":["reports"],"summary":"Honesty counter of the last 7 days: favourite hits and misses, model vs close, noise verdict (T189)","description":"Finished football matches kicked off in the last 7 days that had a pre-kickoff 1X2 prediction. Misses are counted with the same weight as hits; the model-minus-market log-loss interval decides the verdict (noise when it contains 0, too_few under 10 matches with a close). 404 while the admin switch honesty_counter_enabled is off.","responses":{"200":{"description":"Honesty counter","content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"matches":{"type":"integer","minimum":0},"favouriteHits":{"type":"integer","minimum":0},"favouriteMisses":{"type":"integer","minimum":0},"marketMatches":{"type":"integer","minimum":0},"closer":{"type":"object","properties":{"model":{"type":"integer","minimum":0},"market":{"type":"integer","minimum":0},"level":{"type":"integer","minimum":0}},"required":["model","market","level"]},"logLossDiff":{"type":["object","null"],"properties":{"mean":{"type":"number"},"lo":{"type":"number"},"hi":{"type":"number"},"n":{"type":"integer","minimum":0}},"required":["mean","lo","hi","n"]},"verdict":{"type":"string","enum":["better","worse","noise","too_few"]}},"required":["from","to","matches","favouriteHits","favouriteMisses","marketMatches","closer","logLossDiff","verdict"]}}}},"404":{"description":"Counter switched off","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/reports/weekly":{"get":{"tags":["reports"],"summary":"Weeks with a weekly model report, newest first (max 26) (T052)","responses":{"200":{"description":"Report weeks","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"week":{"type":"string","pattern":"^\\d{4}-W(0[1-9]|[1-4]\\d|5[0-3])$"},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"matches":{"type":"integer","minimum":0}},"required":["week","from","to","matches"]}}},"required":["items"]}}}}}}},"/v1/competitions/{slug}/record":{"get":{"tags":["reports"],"summary":"Running model record of a competition vs the no-margin close (T092)","description":"Last `limit` (default 30) finished football matches of the competition in the last 180 days that had a pre-kickoff 1X2 prediction: hit rate, log loss, Brier, the same for the consensus close, and how often the model or the close gave the actual result more probability. Public, shared-cacheable.","parameters":[{"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,63}$"},"required":true,"name":"slug","in":"path"},{"schema":{"type":"integer","minimum":5,"maximum":100,"default":30},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"League record","content":{"application/json":{"schema":{"type":"object","properties":{"competition":{"type":"object","properties":{"slug":{"type":"string","minLength":1},"name":{"type":"string","minLength":1}},"required":["slug","name"]},"matches":{"type":"integer","minimum":0},"from":{"type":["string","null"],"format":"date-time"},"to":{"type":["string","null"],"format":"date-time"},"scores":{"type":"object","properties":{"matches":{"type":"integer","minimum":0},"favouriteHitRate":{"type":["number","null"],"minimum":0,"maximum":1},"logLoss":{"type":["number","null"],"minimum":0},"brier":{"type":["number","null"],"minimum":0},"marketMatches":{"type":"integer","minimum":0},"marketLogLoss":{"type":["number","null"],"minimum":0},"modelLogLossOnMarketSubset":{"type":["number","null"],"minimum":0},"favouriteHitCi":{"type":["object","null"],"properties":{"lo":{"type":"number","minimum":0,"maximum":1},"hi":{"type":"number","minimum":0,"maximum":1}},"required":["lo","hi"]},"logLossDiff":{"type":["object","null"],"properties":{"mean":{"type":"number"},"lo":{"type":"number"},"hi":{"type":"number"},"n":{"type":"integer","minimum":0}},"required":["mean","lo","hi","n"]}},"required":["matches","favouriteHitRate","logLoss","brier","marketMatches","marketLogLoss","modelLogLossOnMarketSubset"]},"closer":{"type":"object","properties":{"model":{"type":"integer","minimum":0},"market":{"type":"integer","minimum":0},"level":{"type":"integer","minimum":0}},"required":["model","market","level"]}},"required":["competition","matches","from","to","scores","closer"]}}}},"400":{"description":"Invalid slug or limit","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"404":{"description":"Unknown competition","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/billing/stores/config":{"get":{"tags":["billing"],"summary":"Which app stores the server verifies, plus the caller’s store account binding id (T028)","responses":{"200":{"description":"Store config","content":{"application/json":{"schema":{"type":"object","properties":{"google":{"type":"object","properties":{"enabled":{"type":"boolean"},"packageName":{"type":["string","null"]}},"required":["enabled","packageName"]},"apple":{"type":"object","properties":{"enabled":{"type":"boolean"},"bundleId":{"type":["string","null"]}},"required":["enabled","bundleId"]},"productIds":{"type":"array","items":{"type":"string","enum":["premium_monthly_ron","premium_yearly_ron","pro_monthly_ron"]}},"accountId":{"type":"string","format":"uuid"}},"required":["google","apple","productIds","accountId"]}}}},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/billing/stores/verify":{"post":{"tags":["billing"],"summary":"Verify a Google Play / App Store subscription purchase and record it (T028)","description":"Google: purchase token checked with the Play Developer API (subscriptionsv2) and acknowledged. Apple: StoreKit 2 JWS verified against the pinned Apple Root CA - G3. The purchase must carry the account id from /stores/config.","requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"provider":{"type":"string","enum":["google"]},"productId":{"type":"string","enum":["premium_monthly_ron","premium_yearly_ron","pro_monthly_ron"]},"purchaseToken":{"type":"string","minLength":10,"maxLength":4096}},"required":["provider","productId","purchaseToken"]},{"type":"object","properties":{"provider":{"type":"string","enum":["apple"]},"signedTransaction":{"type":"string","minLength":20,"maxLength":16384}},"required":["provider","signedTransaction"]}]}}}},"responses":{"200":{"description":"Effective plan","content":{"application/json":{"schema":{"type":"object","properties":{"plan":{"type":"string","enum":["free","premium","pro"]},"subscription":{"type":["object","null"],"properties":{"plan":{"type":"string","enum":["premium","pro"]},"status":{"type":"string","enum":["trialing","active","past_due","canceled","expired"]},"currentPeriodEnd":{"type":"string","format":"date-time"},"cancelAtPeriodEnd":{"type":"boolean"}},"required":["plan","status","currentPeriodEnd","cancelAtPeriodEnd"]}},"required":["plan","subscription"]}}}},"400":{"description":"Invalid body","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"409":{"description":"Purchase belongs to another account","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"422":{"description":"Purchase invalid, pending, unknown or for another app","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Store not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/me/telegram":{"get":{"tags":["telegram"],"summary":"Telegram alerts: is the bot configured and is a chat linked to my account (T042)","responses":{"200":{"description":"Link status","content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"bot":{"type":["string","null"]},"linked":{"type":"boolean"},"username":{"type":["string","null"]},"blocked":{"type":"boolean"},"linkedAt":{"type":["string","null"],"format":"date-time"}},"required":["enabled","bot","linked","username","blocked","linkedAt"]}}}},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}},"delete":{"tags":["telegram"],"summary":"Unlink the Telegram chat (alerts stop)","responses":{"204":{"description":"Unlinked (idempotent)"},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/me/telegram/link":{"post":{"tags":["telegram"],"summary":"One-time t.me deep link (10 min, single use) that links the chat which opens it","responses":{"200":{"description":"Deep link","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"expiresAt":{"type":"string","format":"date-time"}},"required":["url","expiresAt"]}}}},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Bot not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/tennis/matches":{"get":{"tags":["matches"],"summary":"Tennis matches (ATP/WTA) with the match-winner model and the anonymous market consensus (T021)","description":"Two-way market: `home`/`away` follow the event order. Premium/Pro get both probabilities; anonymous and Free get the favourite only (`limited: true`, D23). Odds carry only the masked source code.","parameters":[{"schema":{"type":"string","enum":["scheduled","live","finished"]},"required":false,"name":"status","in":"query"},{"schema":{"type":"string","enum":["atp","wta"]},"required":false,"name":"tour","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Tennis matches","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"tour":{"type":"string","enum":["atp","wta"]},"tournament":{"type":"string","minLength":1},"home":{"type":"string","minLength":1},"away":{"type":"string","minLength":1},"kickoff":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["scheduled","live","finished"]},"score":{"type":"object","properties":{"home":{"type":"integer","minimum":0},"away":{"type":"integer","minimum":0}},"required":["home","away"]},"prediction":{"type":"object","properties":{"model":{"type":"string","minLength":1},"probabilities":{"type":"object","properties":{"home":{"type":["number","null"],"exclusiveMinimum":0},"away":{"type":["number","null"],"exclusiveMinimum":0}},"required":["home","away"]},"fairOdds":{"type":"object","properties":{"home":{"type":["number","null"],"exclusiveMinimum":0},"away":{"type":["number","null"],"exclusiveMinimum":0}},"required":["home","away"]},"surface":{"type":"string","enum":["hard","clay","grass","carpet"]},"createdAt":{"type":"string","format":"date-time"},"limited":{"type":"boolean"}},"required":["model","probabilities","fairOdds","createdAt"]},"odds":{"type":"object","properties":{"prices":{"type":"object","properties":{"home":{"type":"number","exclusiveMinimum":0},"away":{"type":"number","exclusiveMinimum":0}},"required":["home","away"]},"source":{"type":"string","minLength":1},"observedAt":{"type":"string","format":"date-time"}},"required":["prices","source","observedAt"]},"source":{"type":"string","minLength":1}},"required":["id","tour","tournament","home","away","kickoff","status"]}}},"required":["items"]}}}}}}},"/v1/billing/withdrawal":{"get":{"tags":["billing"],"summary":"Can the signed-in user withdraw from the subscription contract now (T085)","responses":{"200":{"description":"Eligibility","content":{"application/json":{"schema":{"type":"object","properties":{"eligible":{"type":"boolean"},"reason":{"type":"string","enum":["none","window_over","already_withdrawn"]},"deadline":{"type":"string","format":"date-time"},"provider":{"type":"string","enum":["stripe","google","apple"]},"contractId":{"type":"string"},"name":{"type":"string"},"email":{"type":"string","format":"email"}},"required":["eligible"]}}}},"401":{"description":"Sign in required","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}},"post":{"tags":["billing"],"summary":"Right-of-withdrawal statement (art. 11^1 OUG 34/2014), signed in or public (T085)","description":"Second step of the withdrawal function (\"Confirmați retragerea\"). Signed in: applies to the caller’s subscription (trial cancelled; paid cancelled + prorated refund; store purchases get the store refund link). Anonymous: matched by account e-mail (+ contract id), else recorded for manual handling. Always returns a receipt with the reference and the time of receipt; the same receipt is e-mailed.","parameters":[{"schema":{"type":"string","enum":["ro","en"]},"required":false,"name":"locale","in":"query"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":120},"email":{"type":"string","maxLength":254,"format":"email"},"contractId":{"type":"string","maxLength":120},"confirm":{"type":"boolean","enum":[true]}},"required":["name","email","confirm"]}}}},"responses":{"201":{"description":"Receipt","content":{"application/json":{"schema":{"type":"object","properties":{"reference":{"type":"string"},"receivedAt":{"type":"string","format":"date-time"},"outcome":{"type":"string","enum":["cancelled_trial","refunded","store","manual"]},"refundAmount":{"type":"integer","minimum":0},"currency":{"type":"string","minLength":3,"maxLength":3},"storeRefundUrl":{"type":"string","format":"uri"},"emailed":{"type":"boolean"}},"required":["reference","receivedAt","outcome","emailed"]}}}},"400":{"description":"Invalid body","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"429":{"description":"Too many public statements from this address","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/contact":{"post":{"tags":["support"],"summary":"Help-page contact form: e-mails the operator inbox, stores nothing (T178)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":120},"email":{"type":"string","maxLength":254,"format":"email"},"topic":{"type":"string","enum":["general","account","gdpr","dsa","bug"]},"message":{"type":"string","minLength":20,"maxLength":2000},"website":{"type":"string","maxLength":200}},"required":["email","topic","message"]}}}},"responses":{"202":{"description":"Accepted","content":{"application/json":{"schema":{"type":"object","properties":{"reference":{"type":"string"},"delivered":{"type":"boolean"}},"required":["reference","delivered"]}}}},"400":{"description":"Invalid body","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"429":{"description":"Too many messages from this address","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/clubs/{id}":{"get":{"tags":["entities"],"summary":"Club profile: ground, coach, squad, lineage, rivalries, seasons, transfers, records","parameters":[{"schema":{"type":"string","pattern":"^\\d{1,18}$"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Club","content":{"application/json":{"schema":{"type":"object","properties":{"club":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1},"shortName":{"type":"string"},"country":{"type":"string"},"foundedYear":{"type":"integer"}},"required":["id","name"]},"venue":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1},"city":{"type":"string"},"capacity":{"type":"integer","exclusiveMinimum":0}},"required":["id","name"]},"coach":{"type":"object","properties":{"person":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1},"role":{"type":"string","enum":["player","coach","referee"]}},"required":["id","name","role"]},"since":{"type":"string","format":"date"}},"required":["person"]},"squad":{"type":"array","items":{"type":"object","properties":{"person":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1},"role":{"type":"string","enum":["player","coach","referee"]}},"required":["id","name","role"]},"position":{"type":"string","enum":["GK","DF","MF","FW"]},"shirtNumber":{"type":"integer","exclusiveMinimum":0},"nationality":{"type":"string"},"birthDate":{"type":"string","format":"date"},"since":{"type":"string","format":"date"}},"required":["person"]}},"formerCoaches":{"type":"array","items":{"type":"object","properties":{"person":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1},"role":{"type":"string","enum":["player","coach","referee"]}},"required":["id","name","role"]},"from":{"type":"string","format":"date"},"to":{"type":"string","format":"date"}},"required":["person"]}},"lineage":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["renamed","refounded","merged","claims_record"]},"direction":{"type":"string","enum":["from","to"]},"other":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1}},"required":["id","name"]},"year":{"type":"integer"},"note":{"type":"string"}},"required":["kind","direction","other"]}},"rivalries":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"opponents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1}},"required":["id","name"]}}},"required":["slug","name","opponents"]}},"seasons":{"type":"array","items":{"type":"object","properties":{"competition":{"type":"object","properties":{"slug":{"type":"string","minLength":1},"name":{"type":"string","minLength":1}},"required":["slug","name"]},"season":{"type":"string","minLength":1},"seasonKey":{"type":"string","pattern":"^\\d{4}-\\d{2}$"},"position":{"type":"integer","exclusiveMinimum":0},"played":{"type":"integer","minimum":0},"points":{"type":"integer"}},"required":["competition","season","seasonKey","played"]}},"transfers":{"type":"array","items":{"type":"object","properties":{"person":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1},"role":{"type":"string","enum":["player","coach","referee"]}},"required":["id","name","role"]},"direction":{"type":"string","enum":["in","out"]},"date":{"type":"string","format":"date"},"club":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1}},"required":["id","name"]}},"required":["person","direction"]}},"records":{"type":"object","properties":{"biggestWin":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kickoff":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["scheduled","live","finished"]},"competition":{"type":"string","minLength":1},"home":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1}},"required":["id","name"]},"away":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1}},"required":["id","name"]},"score":{"type":"object","properties":{"home":{"type":"integer","minimum":0},"away":{"type":"integer","minimum":0}},"required":["home","away"]}},"required":["id","kickoff","status","competition","home","away"]},"biggestLoss":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kickoff":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["scheduled","live","finished"]},"competition":{"type":"string","minLength":1},"home":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1}},"required":["id","name"]},"away":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1}},"required":["id","name"]},"score":{"type":"object","properties":{"home":{"type":"integer","minimum":0},"away":{"type":"integer","minimum":0}},"required":["home","away"]}},"required":["id","kickoff","status","competition","home","away"]},"longestUnbeaten":{"type":"integer","minimum":0}}}},"required":["club","squad","formerCoaches","lineage","rivalries","seasons","transfers","records"]}}}},"400":{"description":"Invalid request","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"404":{"description":"Club not found","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/competitions/{slug}/seasons":{"get":{"tags":["entities"],"summary":"Seasons of a competition with match counts, champion (when complete) and data credit","parameters":[{"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,63}$"},"required":true,"name":"slug","in":"path"}],"responses":{"200":{"description":"Seasons","content":{"application/json":{"schema":{"type":"object","properties":{"competition":{"type":"object","properties":{"slug":{"type":"string","minLength":1},"name":{"type":"string","minLength":1}},"required":["slug","name"]},"seasons":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1},"key":{"type":"string","pattern":"^\\d{4}-\\d{2}$"},"matches":{"type":"integer","minimum":0},"champion":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1}},"required":["id","name"]},"credit":{"type":"string"}},"required":["name","key","matches"]}}},"required":["competition","seasons"]}}}},"400":{"description":"Invalid request","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"404":{"description":"Competition not found","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/competitions/{slug}/seasons/{season}":{"get":{"tags":["entities"],"summary":"One season: recomputed table (3/1/0), matches, top scorers, grounds, totals","parameters":[{"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,63}$"},"required":true,"name":"slug","in":"path"},{"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}$"},"required":true,"name":"season","in":"path"}],"responses":{"200":{"description":"Season","content":{"application/json":{"schema":{"type":"object","properties":{"competition":{"type":"object","properties":{"slug":{"type":"string","minLength":1},"name":{"type":"string","minLength":1}},"required":["slug","name"]},"season":{"type":"object","properties":{"name":{"type":"string","minLength":1},"key":{"type":"string","pattern":"^\\d{4}-\\d{2}$"},"matches":{"type":"integer","minimum":0},"champion":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1}},"required":["id","name"]},"credit":{"type":"string"}},"required":["name","key","matches"]},"table":{"type":"array","items":{"type":"object","properties":{"position":{"type":"integer","exclusiveMinimum":0},"team":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1}},"required":["id","name"]},"played":{"type":"integer","minimum":0},"won":{"type":"integer","minimum":0},"drawn":{"type":"integer","minimum":0},"lost":{"type":"integer","minimum":0},"goalsFor":{"type":"integer","minimum":0},"goalsAgainst":{"type":"integer","minimum":0},"goalDifference":{"type":"integer"},"points":{"type":"integer","minimum":0},"form":{"type":"array","items":{"type":"string","enum":["W","D","L"]}}},"required":["position","team","played","won","drawn","lost","goalsFor","goalsAgainst","goalDifference","points","form"]}},"matches":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kickoff":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["scheduled","live","finished"]},"competition":{"type":"string","minLength":1},"home":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1}},"required":["id","name"]},"away":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1}},"required":["id","name"]},"score":{"type":"object","properties":{"home":{"type":"integer","minimum":0},"away":{"type":"integer","minimum":0}},"required":["home","away"]}},"required":["id","kickoff","status","competition","home","away"]}},"topScorers":{"type":"array","items":{"type":"object","properties":{"person":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1},"role":{"type":"string","enum":["player","coach","referee"]}},"required":["id","name","role"]},"team":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1}},"required":["id","name"]},"goals":{"type":"integer","minimum":0},"apps":{"type":"integer","minimum":0}},"required":["person","goals"]}},"venues":{"type":"array","items":{"type":"object","properties":{"venue":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1},"city":{"type":"string"},"capacity":{"type":"integer","exclusiveMinimum":0}},"required":["id","name"]},"club":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1}},"required":["id","name"]}},"required":["venue","club"]}},"totals":{"type":"object","properties":{"matches":{"type":"integer","minimum":0},"goals":{"type":"integer","minimum":0},"homeWins":{"type":"integer","minimum":0},"draws":{"type":"integer","minimum":0},"awayWins":{"type":"integer","minimum":0}},"required":["matches","goals","homeWins","draws","awayWins"]}},"required":["competition","season","table","matches","topScorers","venues","totals"]}}}},"400":{"description":"Invalid request","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"404":{"description":"Season not found","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/venues":{"get":{"tags":["entities"],"summary":"Grounds with the clubs that play there","responses":{"200":{"description":"Venues","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"venue":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1},"city":{"type":"string"},"capacity":{"type":"integer","exclusiveMinimum":0}},"required":["id","name"]},"clubs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1}},"required":["id","name"]}},"country":{"type":"string"}},"required":["venue","clubs"]}}},"required":["items"]}}}}}}},"/v1/venues/{id}":{"get":{"tags":["entities"],"summary":"Ground profile: clubs, recent matches and results record","parameters":[{"schema":{"type":"string","pattern":"^\\d{1,18}$"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Venue","content":{"application/json":{"schema":{"type":"object","properties":{"venue":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1},"city":{"type":"string"},"capacity":{"type":"integer","exclusiveMinimum":0},"country":{"type":"string"},"lat":{"type":"number","minimum":-90,"maximum":90},"lon":{"type":"number","minimum":-180,"maximum":180},"openedYear":{"type":"integer"}},"required":["id","name"]},"clubs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1}},"required":["id","name"]}},"recent":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kickoff":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["scheduled","live","finished"]},"competition":{"type":"string","minLength":1},"home":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1}},"required":["id","name"]},"away":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1}},"required":["id","name"]},"score":{"type":"object","properties":{"home":{"type":"integer","minimum":0},"away":{"type":"integer","minimum":0}},"required":["home","away"]}},"required":["id","kickoff","status","competition","home","away"]}},"record":{"type":"object","properties":{"played":{"type":"integer","minimum":0},"homeWins":{"type":"integer","minimum":0},"draws":{"type":"integer","minimum":0},"awayWins":{"type":"integer","minimum":0},"goalsHome":{"type":"integer","minimum":0},"goalsAway":{"type":"integer","minimum":0}},"required":["played","homeWins","draws","awayWins","goalsHome","goalsAway"]}},"required":["venue","clubs","recent","record"]}}}},"400":{"description":"Invalid request","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"404":{"description":"Venue not found","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/people":{"get":{"tags":["entities"],"summary":"Players, coaches or referees ordered by matches","parameters":[{"schema":{"type":"string","enum":["player","coach","referee"]},"required":true,"name":"role","in":"query"},{"schema":{"type":"string","pattern":"^[A-Z]{2}(-[A-Z]{3})?$"},"required":false,"name":"country","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":200,"default":100},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"People","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"person":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1},"role":{"type":"string","enum":["player","coach","referee"]}},"required":["id","name","role"]},"nationality":{"type":"string"},"matches":{"type":"integer","minimum":0}},"required":["person","matches"]}}},"required":["items"]}}}},"400":{"description":"Invalid query","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/people/{id}":{"get":{"tags":["entities"],"summary":"Person profile: clubs, appearances, neutral officiating averages, coaching form","parameters":[{"schema":{"type":"string","pattern":"^\\d{1,18}$"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Person","content":{"application/json":{"schema":{"type":"object","properties":{"person":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1},"role":{"type":"string","enum":["player","coach","referee"]},"birthDate":{"type":"string","format":"date"},"birthPlace":{"type":"string"},"nationality":{"type":"string"},"position":{"type":"string","enum":["GK","DF","MF","FW"]},"heightCm":{"type":"integer","exclusiveMinimum":0}},"required":["id","name","role"]},"clubs":{"type":"array","items":{"type":"object","properties":{"team":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1}},"required":["id","name"]},"role":{"type":"string","enum":["player","coach"]},"from":{"type":"string","format":"date"},"to":{"type":"string","format":"date"},"apps":{"type":"integer","minimum":0},"goals":{"type":"integer","minimum":0}},"required":["team","role"]}},"appearances":{"type":"array","items":{"type":"object","properties":{"match":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kickoff":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["scheduled","live","finished"]},"competition":{"type":"string","minLength":1},"home":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1}},"required":["id","name"]},"away":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1}},"required":["id","name"]},"score":{"type":"object","properties":{"home":{"type":"integer","minimum":0},"away":{"type":"integer","minimum":0}},"required":["home","away"]}},"required":["id","kickoff","status","competition","home","away"]},"team":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1}},"required":["id","name"]},"role":{"type":"string","enum":["start","sub","bench"]},"minuteOn":{"type":"integer","minimum":0},"minuteOff":{"type":"integer","minimum":0},"goals":{"type":"integer","minimum":0},"yellow":{"type":"integer","minimum":0},"red":{"type":"integer","minimum":0}},"required":["match","team","role","goals","yellow","red"]}},"totals":{"type":"object","properties":{"apps":{"type":"integer","minimum":0},"starts":{"type":"integer","minimum":0},"goals":{"type":"integer","minimum":0},"yellow":{"type":"integer","minimum":0},"red":{"type":"integer","minimum":0}},"required":["apps","starts","goals","yellow","red"]},"officiating":{"type":"object","properties":{"matches":{"type":"integer","minimum":0},"yellowPerMatch":{"type":"number","minimum":0},"redPerMatch":{"type":"number","minimum":0},"homeWinShare":{"type":"number","minimum":0,"maximum":1},"drawShare":{"type":"number","minimum":0,"maximum":1},"awayWinShare":{"type":"number","minimum":0,"maximum":1}},"required":["matches","yellowPerMatch","redPerMatch","homeWinShare","drawShare","awayWinShare"]},"officiated":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kickoff":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["scheduled","live","finished"]},"competition":{"type":"string","minLength":1},"home":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1}},"required":["id","name"]},"away":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1}},"required":["id","name"]},"score":{"type":"object","properties":{"home":{"type":"integer","minimum":0},"away":{"type":"integer","minimum":0}},"required":["home","away"]}},"required":["id","kickoff","status","competition","home","away"]}},"coaching":{"type":"object","properties":{"matches":{"type":"integer","minimum":0},"form":{"type":"array","items":{"type":"string","enum":["W","D","L"]}}},"required":["matches","form"]}},"required":["person","clubs","appearances","totals","officiated"]}}}},"400":{"description":"Invalid request","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"404":{"description":"Person not found","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/rivalries":{"get":{"tags":["entities"],"summary":"Derbies and rivalries with their clubs","responses":{"200":{"description":"Rivalries","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"opponents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1}},"required":["id","name"]}}},"required":["slug","name","opponents"]}}},"required":["items"]}}}}}}},"/v1/rivalries/{slug}":{"get":{"tags":["entities"],"summary":"Rivalry: head-to-head summary and matches between member clubs","parameters":[{"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,79}$"},"required":true,"name":"slug","in":"path"}],"responses":{"200":{"description":"Rivalry","content":{"application/json":{"schema":{"type":"object","properties":{"rivalry":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"country":{"type":"string"}},"required":["slug","name"]},"teams":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1}},"required":["id","name"]}},"summary":{"type":"object","properties":{"matches":{"type":"integer","minimum":0},"draws":{"type":"integer","minimum":0},"wins":{"type":"array","items":{"type":"object","properties":{"team":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1}},"required":["id","name"]},"wins":{"type":"integer","minimum":0}},"required":["team","wins"]}},"goals":{"type":"integer","minimum":0}},"required":["matches","draws","wins","goals"]},"matches":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"kickoff":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["scheduled","live","finished"]},"competition":{"type":"string","minLength":1},"home":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1}},"required":["id","name"]},"away":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1}},"required":["id","name"]},"score":{"type":"object","properties":{"home":{"type":"integer","minimum":0},"away":{"type":"integer","minimum":0}},"required":["home","away"]}},"required":["id","kickoff","status","competition","home","away"]}}},"required":["rivalry","teams","summary","matches"]}}}},"400":{"description":"Invalid request","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"404":{"description":"Rivalry not found","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/countries/{code}":{"get":{"tags":["entities"],"summary":"Country: competitions, clubs, grounds, player and referee counts","parameters":[{"schema":{"type":"string","pattern":"^[A-Z]{2}(-[A-Z]{3})?$"},"required":true,"name":"code","in":"path"}],"responses":{"200":{"description":"Country","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"competitions":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"tier":{"type":"integer"}},"required":["slug","name"]}},"clubs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1}},"required":["id","name"]}},"venues":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"name":{"type":"string","minLength":1},"city":{"type":"string"},"capacity":{"type":"integer","exclusiveMinimum":0}},"required":["id","name"]}},"players":{"type":"integer","minimum":0},"referees":{"type":"integer","minimum":0}},"required":["code","competitions","clubs","venues","players","referees"]}}}},"400":{"description":"Invalid request","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"404":{"description":"Country not found","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/entities/search":{"get":{"tags":["entities"],"summary":"Search clubs, people, grounds, competitions and rivalries (diacritics-insensitive)","parameters":[{"schema":{"type":"string","minLength":2,"maxLength":80},"required":true,"name":"q","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":30,"default":12},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Results","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["club","person","venue","competition","rivalry","country"]},"key":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"role":{"type":"string","enum":["player","coach","referee"]},"detail":{"type":"string"}},"required":["kind","key","name"]}}},"required":["items"]}}}},"400":{"description":"Invalid query","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/entities/index":{"get":{"tags":["entities"],"summary":"Paged index of indexable entities for sitemaps (500 per page)","parameters":[{"schema":{"type":"string","enum":["club","person","venue","rivalry"]},"required":true,"name":"kind","in":"query"},{"schema":{"type":["integer","null"],"minimum":0,"maximum":1000,"default":0},"required":false,"name":"page","in":"query"}],"responses":{"200":{"description":"Index","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["club","person","venue","competition","rivalry","country"]},"key":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"role":{"type":"string","enum":["player","coach","referee"]},"detail":{"type":"string"}},"required":["kind","key","name"]}},"next":{"type":"integer","minimum":0}},"required":["items"]}}}},"400":{"description":"Invalid query","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/entities/counts":{"get":{"tags":["entities"],"summary":"Entity counts (navigation hides empty sections)","responses":{"200":{"description":"Counts","content":{"application/json":{"schema":{"type":"object","properties":{"clubs":{"type":"integer","minimum":0},"players":{"type":"integer","minimum":0},"coaches":{"type":"integer","minimum":0},"referees":{"type":"integer","minimum":0},"venues":{"type":"integer","minimum":0},"rivalries":{"type":"integer","minimum":0}},"required":["clubs","players","coaches","referees","venues","rivalries"]}}}}}}},"/v1/ai-tickets/today":{"get":{"tags":["ai-tickets"],"summary":"Today's AI tickets: daily, weekly (Fridays) and the free single (D39)","description":"The deterministic builder picks the legs; the codai agent explains and may veto, never adds. Anonymous/Free: legs carry only the event and market type (`locked: true`; selection, prices, probabilities and analysis are omitted, not hidden). The daily single and every fully settled ticket are open to all; Premium/Pro (`ai_tickets`) see everything.","responses":{"200":{"description":"Today's tickets","content":{"application/json":{"schema":{"type":"object","properties":{"forDate":{"type":"string","format":"date"},"daily":{"type":["object","null"],"properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"kind":{"type":"string","enum":["daily","weekly","single"]},"forDate":{"type":"string","format":"date"},"status":{"type":"string","enum":["pending","won","lost","void","partial"]},"locked":{"type":"boolean"},"legs":{"type":"array","items":{"type":"object","properties":{"eventId":{"type":"string","pattern":"^\\d{1,18}$"},"home":{"type":"string","minLength":1},"away":{"type":"string","minLength":1},"league":{"type":["string","null"],"minLength":1},"kickoff":{"type":"string","format":"date-time"},"market":{"type":"string","enum":["1x2","dc"]},"basis":{"type":"string","enum":["model","market"]},"selection":{"type":"integer","minimum":0,"maximum":2},"price":{"type":"number","exclusiveMinimum":1},"probModel":{"type":"number","minimum":0,"maximum":1},"probMarket":{"type":["number","null"],"minimum":0,"maximum":1},"edge":{"type":"number"},"explanation":{"type":"object","properties":{"ro":{"type":"string"},"en":{"type":"string"}},"required":["ro","en"]},"result":{"type":"string","enum":["pending","won","lost","void"]},"clv":{"type":["number","null"]},"minPrice":{"type":"number","exclusiveMinimum":1},"priceAt":{"type":"string","format":"date-time"},"modelProb":{"type":"number","minimum":0,"maximum":1}},"required":["eventId","home","away","league","kickoff","market"]},"minItems":1},"basis":{"type":"string","enum":["model","market","mixed"]},"combinedPrice":{"type":"number","exclusiveMinimum":1},"combinedProb":{"type":"number","minimum":0,"maximum":1},"oneIn":{"type":"integer","exclusiveMinimum":0},"margin":{"type":"number"},"ranking":{"type":"string","enum":["market-first"]},"summary":{"type":"object","properties":{"ro":{"type":"string"},"en":{"type":"string"}},"required":["ro","en"]},"source":{"type":"string","enum":["agent","fallback"]},"valueEnabled":{"type":"boolean"},"vetoes":{"type":"array","items":{"type":"object","properties":{"eventId":{"type":"string","pattern":"^\\d{1,18}$"},"home":{"type":"string","minLength":1},"away":{"type":"string","minLength":1},"kickoff":{"type":"string","format":"date-time"},"reason":{"type":"object","properties":{"ro":{"type":"string"},"en":{"type":"string"}},"required":["ro","en"]}},"required":["eventId","home","away","kickoff","reason"]}},"modelVersion":{"type":"string","minLength":1},"agentModel":{"type":["string","null"],"minLength":1},"hash":{"type":"string","pattern":"^[0-9a-f]{64}$"},"prevHash":{"type":["string","null"],"pattern":"^[0-9a-f]{64}$"},"publishedAt":{"type":"string","format":"date-time"},"settledAt":{"type":["string","null"],"format":"date-time"},"clv":{"type":["number","null"]},"brier":{"type":["number","null"]}},"required":["id","kind","forDate","status","locked","legs","source","valueEnabled","vetoes","modelVersion","agentModel","hash","prevHash","publishedAt","settledAt"]},"weekly":{"type":["object","null"],"properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"kind":{"type":"string","enum":["daily","weekly","single"]},"forDate":{"type":"string","format":"date"},"status":{"type":"string","enum":["pending","won","lost","void","partial"]},"locked":{"type":"boolean"},"legs":{"type":"array","items":{"type":"object","properties":{"eventId":{"type":"string","pattern":"^\\d{1,18}$"},"home":{"type":"string","minLength":1},"away":{"type":"string","minLength":1},"league":{"type":["string","null"],"minLength":1},"kickoff":{"type":"string","format":"date-time"},"market":{"type":"string","enum":["1x2","dc"]},"basis":{"type":"string","enum":["model","market"]},"selection":{"type":"integer","minimum":0,"maximum":2},"price":{"type":"number","exclusiveMinimum":1},"probModel":{"type":"number","minimum":0,"maximum":1},"probMarket":{"type":["number","null"],"minimum":0,"maximum":1},"edge":{"type":"number"},"explanation":{"type":"object","properties":{"ro":{"type":"string"},"en":{"type":"string"}},"required":["ro","en"]},"result":{"type":"string","enum":["pending","won","lost","void"]},"clv":{"type":["number","null"]},"minPrice":{"type":"number","exclusiveMinimum":1},"priceAt":{"type":"string","format":"date-time"},"modelProb":{"type":"number","minimum":0,"maximum":1}},"required":["eventId","home","away","league","kickoff","market"]},"minItems":1},"basis":{"type":"string","enum":["model","market","mixed"]},"combinedPrice":{"type":"number","exclusiveMinimum":1},"combinedProb":{"type":"number","minimum":0,"maximum":1},"oneIn":{"type":"integer","exclusiveMinimum":0},"margin":{"type":"number"},"ranking":{"type":"string","enum":["market-first"]},"summary":{"type":"object","properties":{"ro":{"type":"string"},"en":{"type":"string"}},"required":["ro","en"]},"source":{"type":"string","enum":["agent","fallback"]},"valueEnabled":{"type":"boolean"},"vetoes":{"type":"array","items":{"type":"object","properties":{"eventId":{"type":"string","pattern":"^\\d{1,18}$"},"home":{"type":"string","minLength":1},"away":{"type":"string","minLength":1},"kickoff":{"type":"string","format":"date-time"},"reason":{"type":"object","properties":{"ro":{"type":"string"},"en":{"type":"string"}},"required":["ro","en"]}},"required":["eventId","home","away","kickoff","reason"]}},"modelVersion":{"type":"string","minLength":1},"agentModel":{"type":["string","null"],"minLength":1},"hash":{"type":"string","pattern":"^[0-9a-f]{64}$"},"prevHash":{"type":["string","null"],"pattern":"^[0-9a-f]{64}$"},"publishedAt":{"type":"string","format":"date-time"},"settledAt":{"type":["string","null"],"format":"date-time"},"clv":{"type":["number","null"]},"brier":{"type":["number","null"]}},"required":["id","kind","forDate","status","locked","legs","source","valueEnabled","vetoes","modelVersion","agentModel","hash","prevHash","publishedAt","settledAt"]},"single":{"type":["object","null"],"properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"kind":{"type":"string","enum":["daily","weekly","single"]},"forDate":{"type":"string","format":"date"},"status":{"type":"string","enum":["pending","won","lost","void","partial"]},"locked":{"type":"boolean"},"legs":{"type":"array","items":{"type":"object","properties":{"eventId":{"type":"string","pattern":"^\\d{1,18}$"},"home":{"type":"string","minLength":1},"away":{"type":"string","minLength":1},"league":{"type":["string","null"],"minLength":1},"kickoff":{"type":"string","format":"date-time"},"market":{"type":"string","enum":["1x2","dc"]},"basis":{"type":"string","enum":["model","market"]},"selection":{"type":"integer","minimum":0,"maximum":2},"price":{"type":"number","exclusiveMinimum":1},"probModel":{"type":"number","minimum":0,"maximum":1},"probMarket":{"type":["number","null"],"minimum":0,"maximum":1},"edge":{"type":"number"},"explanation":{"type":"object","properties":{"ro":{"type":"string"},"en":{"type":"string"}},"required":["ro","en"]},"result":{"type":"string","enum":["pending","won","lost","void"]},"clv":{"type":["number","null"]},"minPrice":{"type":"number","exclusiveMinimum":1},"priceAt":{"type":"string","format":"date-time"},"modelProb":{"type":"number","minimum":0,"maximum":1}},"required":["eventId","home","away","league","kickoff","market"]},"minItems":1},"basis":{"type":"string","enum":["model","market","mixed"]},"combinedPrice":{"type":"number","exclusiveMinimum":1},"combinedProb":{"type":"number","minimum":0,"maximum":1},"oneIn":{"type":"integer","exclusiveMinimum":0},"margin":{"type":"number"},"ranking":{"type":"string","enum":["market-first"]},"summary":{"type":"object","properties":{"ro":{"type":"string"},"en":{"type":"string"}},"required":["ro","en"]},"source":{"type":"string","enum":["agent","fallback"]},"valueEnabled":{"type":"boolean"},"vetoes":{"type":"array","items":{"type":"object","properties":{"eventId":{"type":"string","pattern":"^\\d{1,18}$"},"home":{"type":"string","minLength":1},"away":{"type":"string","minLength":1},"kickoff":{"type":"string","format":"date-time"},"reason":{"type":"object","properties":{"ro":{"type":"string"},"en":{"type":"string"}},"required":["ro","en"]}},"required":["eventId","home","away","kickoff","reason"]}},"modelVersion":{"type":"string","minLength":1},"agentModel":{"type":["string","null"],"minLength":1},"hash":{"type":"string","pattern":"^[0-9a-f]{64}$"},"prevHash":{"type":["string","null"],"pattern":"^[0-9a-f]{64}$"},"publishedAt":{"type":"string","format":"date-time"},"settledAt":{"type":["string","null"],"format":"date-time"},"clv":{"type":["number","null"]},"brier":{"type":["number","null"]}},"required":["id","kind","forDate","status","locked","legs","source","valueEnabled","vetoes","modelVersion","agentModel","hash","prevHash","publishedAt","settledAt"]}},"required":["forDate","daily","weekly","single"]}}}}}}},"/v1/ai-tickets":{"get":{"tags":["ai-tickets"],"summary":"AI ticket history, newest first (cursor `before` = forDate)","description":"Anonymous/Free: legs carry only the event and market type (`locked: true`; selection, prices, probabilities and analysis are omitted, not hidden). The daily single and every fully settled ticket are open to all; Premium/Pro (`ai_tickets`) see everything.","parameters":[{"schema":{"type":"string","enum":["daily","weekly","single"]},"required":false,"name":"kind","in":"query"},{"schema":{"type":"string","format":"date"},"required":false,"name":"before","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":50,"default":20},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"One page of tickets","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^\\d{1,18}$"},"kind":{"type":"string","enum":["daily","weekly","single"]},"forDate":{"type":"string","format":"date"},"status":{"type":"string","enum":["pending","won","lost","void","partial"]},"locked":{"type":"boolean"},"legs":{"type":"array","items":{"type":"object","properties":{"eventId":{"type":"string","pattern":"^\\d{1,18}$"},"home":{"type":"string","minLength":1},"away":{"type":"string","minLength":1},"league":{"type":["string","null"],"minLength":1},"kickoff":{"type":"string","format":"date-time"},"market":{"type":"string","enum":["1x2","dc"]},"basis":{"type":"string","enum":["model","market"]},"selection":{"type":"integer","minimum":0,"maximum":2},"price":{"type":"number","exclusiveMinimum":1},"probModel":{"type":"number","minimum":0,"maximum":1},"probMarket":{"type":["number","null"],"minimum":0,"maximum":1},"edge":{"type":"number"},"explanation":{"type":"object","properties":{"ro":{"type":"string"},"en":{"type":"string"}},"required":["ro","en"]},"result":{"type":"string","enum":["pending","won","lost","void"]},"clv":{"type":["number","null"]},"minPrice":{"type":"number","exclusiveMinimum":1},"priceAt":{"type":"string","format":"date-time"},"modelProb":{"type":"number","minimum":0,"maximum":1}},"required":["eventId","home","away","league","kickoff","market"]},"minItems":1},"basis":{"type":"string","enum":["model","market","mixed"]},"combinedPrice":{"type":"number","exclusiveMinimum":1},"combinedProb":{"type":"number","minimum":0,"maximum":1},"oneIn":{"type":"integer","exclusiveMinimum":0},"margin":{"type":"number"},"ranking":{"type":"string","enum":["market-first"]},"summary":{"type":"object","properties":{"ro":{"type":"string"},"en":{"type":"string"}},"required":["ro","en"]},"source":{"type":"string","enum":["agent","fallback"]},"valueEnabled":{"type":"boolean"},"vetoes":{"type":"array","items":{"type":"object","properties":{"eventId":{"type":"string","pattern":"^\\d{1,18}$"},"home":{"type":"string","minLength":1},"away":{"type":"string","minLength":1},"kickoff":{"type":"string","format":"date-time"},"reason":{"type":"object","properties":{"ro":{"type":"string"},"en":{"type":"string"}},"required":["ro","en"]}},"required":["eventId","home","away","kickoff","reason"]}},"modelVersion":{"type":"string","minLength":1},"agentModel":{"type":["string","null"],"minLength":1},"hash":{"type":"string","pattern":"^[0-9a-f]{64}$"},"prevHash":{"type":["string","null"],"pattern":"^[0-9a-f]{64}$"},"publishedAt":{"type":"string","format":"date-time"},"settledAt":{"type":["string","null"],"format":"date-time"},"clv":{"type":["number","null"]},"brier":{"type":["number","null"]}},"required":["id","kind","forDate","status","locked","legs","source","valueEnabled","vetoes","modelVersion","agentModel","hash","prevHash","publishedAt","settledAt"]}},"nextBefore":{"type":["string","null"],"format":"date"}},"required":["items","nextBefore"]}}}},"400":{"description":"Invalid query","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/ai-tickets/record":{"get":{"tags":["ai-tickets"],"summary":"Public track record by kind: mean CLV, Brier, hit rate with n, flat-stake ROI","responses":{"200":{"description":"Track record","content":{"application/json":{"schema":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["daily","weekly","single"]},"n":{"type":"integer","minimum":0},"won":{"type":"integer","minimum":0},"hitRate":{"type":["number","null"]},"meanClv":{"type":["number","null"]},"clvN":{"type":"integer","minimum":0},"brier":{"type":["number","null"]},"roi":{"type":["number","null"]},"from":{"type":["string","null"],"format":"date"},"to":{"type":["string","null"],"format":"date"},"hitRateCi":{"type":["object","null"],"properties":{"lo":{"type":"number","minimum":0,"maximum":1},"hi":{"type":"number","minimum":0,"maximum":1}},"required":["lo","hi"]}},"required":["kind","n","won","hitRate","meanClv","clvN","brier","roi","from","to"]}},"computedAt":{"type":"string","format":"date-time"}},"required":["rows","computedAt"]}}}}}}},"/v1/mail/unsubscribe":{"get":{"tags":["account"],"summary":"One-click unsubscribe (weekly digest, alert emails) with the HMAC-signed token from the message","parameters":[{"schema":{"type":"string","maxLength":512},"required":true,"name":"token","in":"query"}],"responses":{"200":{"description":"HTML confirmation page","content":{"text/html":{"schema":{"type":"string"}}}},"400":{"description":"Invalid or expired token (HTML page)","content":{"text/html":{"schema":{"type":"string"}}}},"503":{"description":"Not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}},"post":{"tags":["account"],"summary":"One-click unsubscribe (weekly digest, alert emails) with the HMAC-signed token from the message","parameters":[{"schema":{"type":"string","maxLength":512},"required":true,"name":"token","in":"query"}],"responses":{"200":{"description":"HTML confirmation page","content":{"text/html":{"schema":{"type":"string"}}}},"400":{"description":"Invalid or expired token (HTML page)","content":{"text/html":{"schema":{"type":"string"}}}},"503":{"description":"Not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/funnel":{"post":{"tags":["analytics"],"summary":"First-party product event beacon (allow-listed names, no personal data, anonymous)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"event":{"type":"string","enum":["paywall_open","upgrade_cta","pricing_view","checkout_click","onboarding_shown","onboarding_done","push_prompt_shown","push_granted","push_denied","digest_optin_signup"]},"anonId":{"type":"string","pattern":"^[A-Za-z0-9-]{8,64}$"},"source":{"type":"string","maxLength":64,"pattern":"^[a-z0-9_/-]*$"},"props":{"type":"object","additionalProperties":{"anyOf":[{"type":"string","maxLength":64,"pattern":"^[^@]*$"},{"type":"number"},{"type":"boolean"}]}}},"required":["event","anonId"]}},"text/plain":{"schema":{"type":"string"}}}},"responses":{"204":{"description":"Recorded (or dropped when the database is not configured)"},"400":{"description":"Invalid event","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"429":{"description":"Too many events from this address","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/waitlist":{"post":{"tags":["analytics"],"summary":"Founders waitlist: sends a double opt-in confirmation e-mail (same answer for every address)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","maxLength":254,"format":"email"},"locale":{"type":"string","enum":["ro","en"],"default":"ro"},"source":{"type":"string","enum":["upgrade_dialog","pricing"]},"consent":{"type":"boolean","enum":[true]},"website":{"type":"string","maxLength":200}},"required":["email","source","consent"]}}}},"responses":{"202":{"description":"Pending confirmation","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["pending"]}},"required":["status"]}}}},"400":{"description":"Invalid body","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"429":{"description":"Too many requests from this address","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}},"503":{"description":"Not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/waitlist/confirm":{"get":{"tags":["analytics"],"summary":"Founders waitlist: confirm the address (link from the e-mail)","parameters":[{"schema":{"type":"string","maxLength":512},"required":true,"name":"token","in":"query"}],"responses":{"200":{"description":"HTML confirmation page","content":{"text/html":{"schema":{"type":"string"}}}},"400":{"description":"Invalid or expired link (HTML page)","content":{"text/html":{"schema":{"type":"string"}}}},"503":{"description":"Not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}},"/v1/waitlist/unsubscribe":{"get":{"tags":["analytics"],"summary":"Founders waitlist: leave the list (signed link, one click)","parameters":[{"schema":{"type":"string","maxLength":512},"required":true,"name":"token","in":"query"}],"responses":{"200":{"description":"HTML confirmation page","content":{"text/html":{"schema":{"type":"string"}}}},"400":{"description":"Invalid or expired link (HTML page)","content":{"text/html":{"schema":{"type":"string"}}}},"503":{"description":"Not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}},"post":{"tags":["analytics"],"summary":"Founders waitlist: leave the list (signed link, one click)","parameters":[{"schema":{"type":"string","maxLength":512},"required":true,"name":"token","in":"query"}],"responses":{"200":{"description":"HTML confirmation page","content":{"text/html":{"schema":{"type":"string"}}}},"400":{"description":"Invalid or expired link (HTML page)","content":{"text/html":{"schema":{"type":"string"}}}},"503":{"description":"Not configured","content":{"application/problem+json":{"schema":{"type":"object","properties":{"type":{"type":"string"},"title":{"type":"string"},"status":{"type":"integer","minimum":400,"maximum":599},"detail":{"type":"string"},"instance":{"type":"string"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status"]}}}}}}}},"webhooks":{}}