{"openapi":"3.1.0","info":{"title":"SquadRide agent API","version":"1.0.0","description":"Turn a list of picks into one shareable link that opens those picks in any US sportsbook with the selections loaded. Free. Share the slip URL with the user; it shows every book they can open and the right responsible-gaming line for their state.","contact":{"url":"https://squadride.app/docs"}},"servers":[{"url":"https://squadride.app"}],"security":[{"bearer":[]},{}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. Free keys from POST /v1/keys raise the rate limit and attribute slips to your agent."}},"schemas":{"LooseLeg":{"type":"object","required":["selection"],"properties":{"selection":{"type":"string","description":"The pick: a team (\"Chiefs\", \"KC\", \"Chiefs -3.5\", \"Bills ML\"), \"Over\"/\"Under\", or a player name for a prop."},"market":{"type":"string","description":"Optional. \"Moneyline\", \"Spread\", \"Total\", or a prop stat such as \"Passing Yards\", \"Points\", \"Anytime TD Scorer\". Inferred when missing."},"line":{"oneOf":[{"type":"string"},{"type":"number"}],"description":"Spread (\"-3.5\"), total (47.5 or \"O 47.5\"), or prop threshold (\"over 250.5\", \"250+\"). A bare number on a prop means over."},"player":{"type":"string","description":"Player name for a prop when selection is not already the player."},"odds":{"oneOf":[{"type":"string"},{"type":"number"}],"description":"American odds you saw, for display only."},"league":{"type":"string","description":"NFL, NBA, MLB, NHL, NCAAF, NCAAB. Aliases such as \"college football\" work. Searched across all leagues when missing."},"event":{"type":"string","description":"\"Chiefs @ Ravens\", \"KC vs BAL\". Required for totals; recommended everywhere."},"startTime":{"type":"string","format":"date-time","description":"ISO kickoff time, to pick a specific game."},"team":{"type":"string","description":"The player's team, for props."}}},"LegMatch":{"type":"object","properties":{"ok":{"type":"boolean"},"reason":{"type":"string"},"line":{"type":"string","nullable":true},"odds":{"type":"string","nullable":true},"lineChanged":{"type":"object","nullable":true,"properties":{"from":{"type":"string"},"to":{"type":"string"},"equivalent":{"type":"boolean"}}}}}}},"paths":{"/v1/links":{"post":{"operationId":"translateBets","summary":"Turn picks into a slip link plus per-sportsbook deep links","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["legs"],"properties":{"legs":{"type":"array","minItems":1,"maxItems":20,"items":{"$ref":"#/components/schemas/LooseLeg"}},"books":{"type":"array","items":{"type":"string","enum":["fanduel","draftkings","betmgm","caesars","fanatics","hardrock","thescore","betrivers","prizepicks"]},"description":"Limit to these books. Default: every available book."},"stake":{"oneOf":[{"type":"string"},{"type":"number"}],"description":"Display only."},"agent":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string","format":"uri"}},"description":"Shown on the slip as \"via <name>\"."}}},"example":{"legs":[{"selection":"Chiefs","line":-3.5,"league":"NFL"},{"selection":"Over","line":47.5,"event":"Chiefs @ Ravens"}],"agent":{"name":"MyBettingAgent"}}}}},"responses":{"201":{"description":"Slip created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri","description":"The link to share."},"share":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"image":{"type":"string","format":"uri"}}},"betType":{"type":"string","enum":["single","parlay","sgp"]},"legs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"resolved":{"type":"boolean"},"reason":{"type":"string"},"warnings":{"type":"array","items":{"type":"string"}},"leg":{"type":"object","nullable":true,"description":"The normalised leg: league, event, market, selection, line, startTime."},"books":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/LegMatch"}}}}},"books":{"type":"object","additionalProperties":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string","nullable":true,"description":"Deep link that opens this book with the matched picks loaded. Null when nothing matched."},"matched":{"type":"integer"},"total":{"type":"integer"},"error":{"type":"string"}}}},"unresolved":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"selection":{"type":"string"},"reason":{"type":"string"}}}},"warnings":{"type":"array","items":{"type":"string"}},"disclosure":{"type":"object","description":"Age and responsible-gaming lines to relay to the user."}}}}}},"400":{"description":"Invalid body"},"422":{"description":"No leg could be resolved; the error names each reason."},"429":{"description":"Rate limited; see Retry-After."}}}},"/v1/slips/{id}":{"get":{"operationId":"getSlip","summary":"Read a slip by id","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The slip"},"404":{"description":"Not found"}}}},"/v1/books":{"get":{"operationId":"listBooks","summary":"Sportsbooks this server can open, with health from the daily check","responses":{"200":{"description":"Books and known prop markets per league"}}}},"/v1/status":{"get":{"operationId":"status","summary":"Service status","responses":{"200":{"description":"OK"}}}},"/v1/keys":{"post":{"operationId":"createKey","summary":"Create a free API key (shown once)","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"contact":{"type":"string"}}}}}},"responses":{"201":{"description":"Key created"}}}}}}