{"components":{"headers":{"RequestId":{"description":"The id this request was logged under","schema":{"type":"string"}}},"parameters":{"IdempotencyKey":{"description":"A key of your own for this call. A retry with the same key and input replays the first answer for 24 hours; the same key with different input is refused with IDEMPOTENCY_KEY_REUSED.","in":"header","name":"idempotency-key","required":false,"schema":{"maxLength":255,"minLength":1,"type":"string"}},"RequestId":{"description":"A request id of your own to carry through the logs; echoed back on the response","in":"header","name":"x-request-id","required":false,"schema":{"maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$","type":"string"}}},"schemas":{"Box":{"additionalProperties":false,"properties":{"columnIndex":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"createdAt":{"format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"id":{"type":"string"},"index":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"paymentMethod":{"anyOf":[{"enum":["ALTERNATIVE","VENMO","PAYPAL","CASHAPP"],"type":"string"},{"type":"null"}]},"periods":{"items":{"$ref":"#/components/schemas/BoxPeriod"},"type":"array"},"rowIndex":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"selectionState":{"enum":["UNSELECTED","RESERVED","UNPAID","PENDING_CONFIRMATION","PAID"],"type":"string"},"squareId":{"type":"string"},"squareMemberId":{"type":["string","null"]},"updatedAt":{"format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"}},"required":["id","squareId","index","rowIndex","columnIndex","selectionState","paymentMethod","squareMemberId","createdAt","updatedAt","periods"],"type":"object"},"BoxPeriod":{"additionalProperties":false,"properties":{"awayValues":{"items":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"type":"array"},"boxId":{"type":"string"},"homeValues":{"items":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"type":"array"},"id":{"type":"string"},"isDefault":{"type":"boolean"},"isOvertime":{"type":"boolean"},"period":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["id","boxId","period","isOvertime","isDefault","homeValues","awayValues"],"type":"object"},"CreditBundle":{"additionalProperties":false,"properties":{"badge":{"type":["string","null"]},"credits":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"description":{"type":["string","null"]},"id":{"type":"string"},"isActive":{"type":"boolean"},"name":{"type":"string"},"priceInCents":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"priceInDollars":{"minimum":0,"multipleOf":0.01,"type":"number"},"sortOrder":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"useCase":{"type":["string","null"]}},"required":["id","name","description","useCase","badge","credits","priceInCents","priceInDollars","isActive","sortOrder"],"type":"object"},"ErrorEnvelope":{"properties":{"error":{"properties":{"code":{"enum":["VALIDATION_ERROR","UNAUTHENTICATED","FORBIDDEN","NOT_FOUND","GAME_NOT_FOUND","GAME_NOT_ELIGIBLE","RESOURCE_CONFLICT","HOSTING_CREDITS_REQUIRED","ALREADY_PUBLISHED","NOT_PUBLISHABLE","PICK_LOCKED","BOX_UNAVAILABLE","ENTRY_LIMIT_REACHED","POOL_NOT_OPEN","PASSWORD_REQUIRED","LEAGUE_NOT_AVAILABLE","IDEMPOTENCY_KEY_REUSED","RATE_LIMITED","INTERNAL_ERROR"],"type":"string"},"details":{"additionalProperties":true,"description":"Code-specific extras: fieldErrors on VALIDATION_ERROR, requiredScope on FORBIDDEN, creditsRequired, creditsAvailable, and creditsUrl on HOSTING_CREDITS_REQUIRED, retryAfter on RESOURCE_CONFLICT and RATE_LIMITED","type":"object"},"message":{"description":"Safe to show a person","type":"string"},"retryable":{"description":"Whether the same call may succeed if repeated without changes","type":"boolean"}},"required":["code","message","retryable"],"type":"object"},"ok":{"const":false}},"required":["ok","error"],"type":"object"},"Game":{"additionalProperties":false,"properties":{"areTeamsConfirmed":{"type":"boolean"},"awayTeam":{"anyOf":[{"$ref":"#/components/schemas/Team"},{"type":"null"}]},"awayTeamId":{"type":["string","null"]},"createdAt":{"format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"displayName":{"type":["string","null"]},"gameClock":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"gameDate":{"format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"gameDayId":{"type":["string","null"]},"homeTeam":{"anyOf":[{"$ref":"#/components/schemas/Team"},{"type":"null"}]},"homeTeamId":{"type":["string","null"]},"id":{"type":"string"},"isCompleted":{"type":"boolean"},"league":{"enum":["NFL","NCAAF","NBA","NCAAB","WNBA","NCAAW","MLB","NHL","NWSL","WPHL"],"type":"string"},"metadata":{"anyOf":[{"$ref":"#/components/schemas/GameSeeds"},{"type":"null"}]},"overUnder":{"type":["number","null"]},"periods":{"items":{"$ref":"#/components/schemas/GamePeriod"},"type":"array"},"seasonType":{"enum":["PRESEASON","REGULAR_SEASON","CONFERENCE_TOURNAMENT","POSTSEASON"],"type":"string"},"seasonYear":{"type":"string"},"sport":{"enum":["FOOTBALL","BASKETBALL","BASEBALL","HOCKEY","SOCCER"],"type":"string"},"spread":{"type":["number","null"]},"spreadDetails":{"type":["string","null"]},"state":{"enum":["SCHEDULED","IN_PROGRESS","FINAL","POSTPONED","CANCELLED"],"type":"string"},"tournament":{"anyOf":[{"$ref":"#/components/schemas/Tournament"},{"type":"null"}]},"tournamentId":{"type":["string","null"]},"updatedAt":{"format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"venue":{"type":["string","null"]},"week":{"type":["string","null"]},"weekLabel":{"type":["string","null"]}},"required":["id","sport","league","seasonType","seasonYear","week","weekLabel","gameDate","gameClock","isCompleted","state","displayName","gameDayId","spread","overUnder","spreadDetails","homeTeamId","awayTeamId","areTeamsConfirmed","tournamentId","venue","metadata","createdAt","updatedAt","periods","homeTeam","awayTeam","tournament"],"type":"object"},"GamePeriod":{"additionalProperties":false,"properties":{"awayScore":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"gameId":{"type":"string"},"homeScore":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"id":{"type":"string"},"isOvertime":{"type":"boolean"},"period":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"periodClock":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"type":{"enum":["QUARTER","HALF","PERIOD","INNING","GAME"],"type":"string"}},"required":["id","period","gameId","type","isOvertime","homeScore","awayScore","periodClock"],"type":"object"},"GameSeeds":{"additionalProperties":false,"properties":{"awaySeed":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"homeSeed":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["homeSeed","awaySeed"],"type":"object"},"HostViewPoolMember":{"additionalProperties":false,"properties":{"createdAt":{"format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"eliminatedWeek":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"id":{"type":"string"},"isEliminated":{"type":"boolean"},"name":{"type":"string"},"paidOutAmount":{"type":["number","null"]},"paidOutAt":{"anyOf":[{"format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"paidOutMethod":{"anyOf":[{"enum":["ALTERNATIVE","VENMO","PAYPAL","CASHAPP"],"type":"string"},{"type":"null"}]},"paidState":{"enum":["UNPAID","PENDING_CONFIRMATION","PAID"],"type":"string"},"paymentMethod":{"anyOf":[{"enum":["ALTERNATIVE","VENMO","PAYPAL","CASHAPP"],"type":"string"},{"type":"null"}]},"poolId":{"type":"string"},"strikesUsed":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"updatedAt":{"format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"userId":{"type":"string"},"userProfile":{"$ref":"#/components/schemas/MemberContactProfile"}},"required":["id","userId","poolId","name","paidState","paymentMethod","paidOutAt","paidOutMethod","paidOutAmount","strikesUsed","isEliminated","eliminatedWeek","createdAt","updatedAt","userProfile"],"type":"object"},"HostViewSquareMember":{"additionalProperties":false,"properties":{"createdAt":{"format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"id":{"type":"string"},"nickname":{"type":["string","null"]},"paidOutAmount":{"type":["number","null"]},"paidOutAt":{"anyOf":[{"format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"paidOutMethod":{"anyOf":[{"enum":["ALTERNATIVE","VENMO","PAYPAL","CASHAPP"],"type":"string"},{"type":"null"}]},"selectedBoxes":{"items":{"$ref":"#/components/schemas/Box"},"type":"array"},"squareId":{"type":"string"},"updatedAt":{"format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"userId":{"type":"string"},"userProfile":{"$ref":"#/components/schemas/MemberContactProfile"}},"required":["id","userId","squareId","nickname","paidOutAt","paidOutMethod","paidOutAmount","createdAt","updatedAt","selectedBoxes","userProfile"],"type":"object"},"HostedFourway":{"additionalProperties":false,"properties":{"id":{"type":"string"},"league":{"enum":["NFL","NCAAF","NBA","NCAAB","WNBA","NCAAW","MLB","NHL","NWSL","WPHL"],"type":"string"},"manageUrl":{"format":"uri","type":"string"},"name":{"type":"string"},"publicUrl":{"format":"uri","type":"string"},"role":{"enum":["host","participant"],"type":"string"},"startsAt":{"anyOf":[{"format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"state":{"enum":["draft","upcoming","active","completed"],"type":"string"},"type":{"const":"fourway","type":"string"}},"required":["type","id","name","state","role","league","publicUrl","startsAt"],"type":"object"},"HostedPool":{"additionalProperties":false,"properties":{"aliveCount":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"completion":{"anyOf":[{"$ref":"#/components/schemas/HostedPoolCompletion"},{"type":"null"}]},"currentWeek":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"endWeek":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"entryCount":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"entryPrice":{"type":"number"},"format":{"enum":["SURVIVOR","LOSERS"],"type":"string"},"id":{"type":"string"},"league":{"enum":["NFL","NCAAF","NBA","NCAAB","WNBA","NCAAW","MLB","NHL","NWSL","WPHL"],"type":"string"},"manageUrl":{"format":"uri","type":"string"},"myEntryCount":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"name":{"type":"string"},"publicUrl":{"format":"uri","type":"string"},"role":{"enum":["host","participant"],"type":"string"},"seasonYear":{"type":"string"},"startWeek":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"startsAt":{"anyOf":[{"format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"state":{"enum":["draft","upcoming","active","completed"],"type":"string"},"type":{"const":"pool","type":"string"}},"required":["type","id","name","state","role","league","publicUrl","startsAt","format","seasonYear","startWeek","endWeek","currentWeek","entryPrice","entryCount","aliveCount","myEntryCount","completion"],"type":"object"},"HostedPoolCompletion":{"additionalProperties":false,"properties":{"endReason":{"anyOf":[{"enum":["WINNER","WIPEOUT_SPLIT","SEASON_SPLIT"],"type":"string"},{"type":"null"}]},"endedAt":{"anyOf":[{"format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"isWinner":{"type":"boolean"},"outWeek":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"winnings":{"type":"number"}},"required":["endedAt","winnings","isWinner","outWeek","endReason"],"type":"object"},"HostedSquare":{"additionalProperties":false,"properties":{"boxCount":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"boxPrice":{"type":"number"},"claimedBoxCount":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"completion":{"anyOf":[{"$ref":"#/components/schemas/HostedSquareCompletion"},{"type":"null"}]},"id":{"type":"string"},"league":{"enum":["NFL","NCAAF","NBA","NCAAB","WNBA","NCAAW","MLB","NHL","NWSL","WPHL"],"type":"string"},"manageUrl":{"format":"uri","type":"string"},"matchup":{"anyOf":[{"additionalProperties":false,"properties":{"away":{"$ref":"#/components/schemas/Team"},"home":{"$ref":"#/components/schemas/Team"}},"required":["away","home"],"type":"object"},{"type":"null"}]},"myBoxCount":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"name":{"type":"string"},"publicUrl":{"format":"uri","type":"string"},"role":{"enum":["host","participant"],"type":"string"},"selectionState":{"enum":["OPEN","CLOSED"],"type":"string"},"startsAt":{"anyOf":[{"format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"state":{"enum":["draft","upcoming","active","completed"],"type":"string"},"type":{"const":"square","type":"string"}},"required":["type","id","name","state","role","league","publicUrl","startsAt","boxPrice","boxCount","claimedBoxCount","myBoxCount","selectionState","matchup","completion"],"type":"object"},"HostedSquareCompletion":{"additionalProperties":false,"properties":{"endedAt":{"anyOf":[{"format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"finalScore":{"anyOf":[{"additionalProperties":false,"properties":{"away":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"home":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["away","home"],"type":"object"},{"type":"null"}]},"winCount":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"winnings":{"type":"number"}},"required":["endedAt","winnings","winCount","finalScore"],"type":"object"},"JsonValue":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"items":{"$ref":"#/components/schemas/JsonValue"},"type":"array"},{"additionalProperties":{"$ref":"#/components/schemas/JsonValue"},"propertyNames":{"type":"string"},"type":"object"}]},"MemberContactProfile":{"additionalProperties":false,"properties":{"cashAppHandle":{"type":["string","null"]},"displayName":{"type":"string"},"email":{"type":"string"},"id":{"type":"string"},"image":{"type":["string","null"]},"paypalHandle":{"type":["string","null"]},"venmoHandle":{"type":["string","null"]}},"required":["id","displayName","image","email","venmoHandle","paypalHandle","cashAppHandle"],"type":"object"},"MemberProfile":{"additionalProperties":false,"properties":{"cashAppHandle":{"type":["string","null"]},"displayName":{"type":"string"},"email":{"type":"string"},"id":{"type":"string"},"image":{"type":["string","null"]},"paypalHandle":{"type":["string","null"]},"venmoHandle":{"type":["string","null"]}},"required":["id","displayName","image"],"type":"object"},"OpenBoxBonus":{"additionalProperties":false,"properties":{"createdAt":{"format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"drawnAt":{"anyOf":[{"format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"eligibleCount":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"id":{"type":"string"},"randomObject":{"anyOf":[{"$ref":"#/components/schemas/JsonValue"},{"type":"null"}]},"randomSignature":{"type":["string","null"]},"squareId":{"type":"string"},"updatedAt":{"format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"winnerBoxId":{"type":["string","null"]},"winnerIndex":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]}},"required":["id","squareId","winnerBoxId","winnerIndex","eligibleCount","drawnAt","randomObject","randomSignature","createdAt","updatedAt"],"type":"object"},"PayoutPeriod":{"additionalProperties":false,"properties":{"awayValues":{"items":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"type":"array"},"homeValues":{"items":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"type":"array"},"id":{"type":"string"},"isOvertime":{"type":"boolean"},"percentage":{"type":"number"},"period":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"randomGeneratedAt":{"anyOf":[{"format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"randomObject":{"anyOf":[{"$ref":"#/components/schemas/JsonValue"},{"type":"null"}]},"randomSignature":{"type":["string","null"]},"reversePercentage":{"type":["number","null"]},"squareId":{"type":"string"}},"required":["id","squareId","period","percentage","reversePercentage","isOvertime","homeValues","awayValues","randomObject","randomSignature","randomGeneratedAt"],"type":"object"},"Pool":{"additionalProperties":false,"properties":{"cashAppHandle":{"type":["string","null"]},"completedAt":{"anyOf":[{"format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"createdAt":{"format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"creditsCharged":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"description":{"type":["string","null"]},"endReason":{"anyOf":[{"enum":["WINNER","WIPEOUT_SPLIT","SEASON_SPLIT"],"type":"string"},{"type":"null"}]},"endWeek":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"entryPrice":{"type":"number"},"format":{"enum":["SURVIVOR","LOSERS"],"type":"string"},"hasPassword":{"type":"boolean"},"host":{"$ref":"#/components/schemas/SafeUserProfile"},"hostContactEmail":{"type":["string","null"]},"hostId":{"type":"string"},"id":{"type":"string"},"isPublic":{"type":"boolean"},"league":{"enum":["NFL","NCAAF","NBA","NCAAB","WNBA","NCAAW","MLB","NHL","NWSL","WPHL"],"type":"string"},"maxEntriesPerUser":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"missedPickRule":{"enum":["STRIKE","AUTO_PICK"],"type":"string"},"name":{"type":"string"},"paidState":{"enum":["UNPAID","PENDING_CONFIRMATION","PAID"],"type":"string"},"paymentInstructions":{"type":["string","null"]},"payoutPercentages":{"items":{"type":"number"},"type":"array"},"paypalHandle":{"type":["string","null"]},"seasonYear":{"type":"string"},"shortCode":{"type":"string"},"slug":{"type":"string"},"sport":{"enum":["FOOTBALL","BASKETBALL","BASEBALL","HOCKEY","SOCCER"],"type":"string"},"startWeek":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"state":{"enum":["OPEN","ACTIVE","COMPLETE"],"type":"string"},"strikes":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"tieRule":{"enum":["STRIKE","SURVIVE"],"type":"string"},"totalPayout":{"type":"number"},"updatedAt":{"format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"venmoHandle":{"type":["string","null"]},"winnerMemberIds":{"items":{"type":"string"},"type":"array"}},"required":["id","hostId","shortCode","name","slug","state","format","paidState","creditsCharged","sport","league","seasonYear","startWeek","endWeek","strikes","tieRule","missedPickRule","maxEntriesPerUser","endReason","winnerMemberIds","completedAt","description","isPublic","entryPrice","totalPayout","payoutPercentages","paymentInstructions","venmoHandle","paypalHandle","cashAppHandle","createdAt","updatedAt","hasPassword","host","hostContactEmail"],"type":"object"},"PoolHostAction":{"additionalProperties":false,"properties":{"action":{"enum":["STRIKE_ADJUST","PICK_OVERRIDE","PAYMENT_MARK_PAID","PAYMENT_MARK_UNPAID","PAYMENT_DECLINE","ENTRY_ADD","PAYOUT_MARK_PAID","PAYOUT_MARK_UNPAID"],"type":"string"},"createdAt":{"format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"id":{"type":"string"},"memberName":{"type":"string"},"note":{"type":"string"},"reason":{"type":["string","null"]},"strikeDelta":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]}},"required":["id","action","strikeDelta","note","reason","memberName","createdAt"],"type":"object"},"PoolMember":{"additionalProperties":false,"properties":{"createdAt":{"format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"eliminatedWeek":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"id":{"type":"string"},"isEliminated":{"type":"boolean"},"name":{"type":"string"},"paidOutAmount":{"type":["number","null"]},"paidOutAt":{"anyOf":[{"format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"paidOutMethod":{"anyOf":[{"enum":["ALTERNATIVE","VENMO","PAYPAL","CASHAPP"],"type":"string"},{"type":"null"}]},"paidState":{"enum":["UNPAID","PENDING_CONFIRMATION","PAID"],"type":"string"},"paymentMethod":{"anyOf":[{"enum":["ALTERNATIVE","VENMO","PAYPAL","CASHAPP"],"type":"string"},{"type":"null"}]},"poolId":{"type":"string"},"strikesUsed":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"updatedAt":{"format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"userId":{"type":"string"},"userProfile":{"$ref":"#/components/schemas/MemberProfile"}},"required":["id","userId","poolId","name","paidState","paymentMethod","paidOutAt","paidOutMethod","paidOutAmount","strikesUsed","isEliminated","eliminatedWeek","createdAt","updatedAt","userProfile"],"type":"object"},"PoolPick":{"additionalProperties":false,"properties":{"createdAt":{"format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"gameId":{"type":"string"},"id":{"type":"string"},"isAutoPick":{"type":"boolean"},"poolId":{"type":"string"},"poolMemberId":{"type":"string"},"result":{"enum":["PENDING","SURVIVED","STRUCK","VOID"],"type":"string"},"team":{"$ref":"#/components/schemas/Team"},"teamId":{"type":"string"},"updatedAt":{"format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"week":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"}},"required":["id","poolId","poolMemberId","week","gameId","teamId","result","isAutoPick","createdAt","updatedAt","team"],"type":"object"},"SafeUserProfile":{"additionalProperties":false,"properties":{"displayName":{"type":"string"},"id":{"type":"string"},"image":{"type":["string","null"]}},"required":["id","displayName","image"],"type":"object"},"Square":{"additionalProperties":false,"properties":{"autoCloseOnFill":{"type":"boolean"},"boxPrice":{"type":"number"},"cashAppHandle":{"type":["string","null"]},"createdAt":{"format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"description":{"type":["string","null"]},"game":{"anyOf":[{"$ref":"#/components/schemas/Game"},{"type":"null"}]},"gameId":{"type":["string","null"]},"hasPassword":{"type":"boolean"},"host":{"$ref":"#/components/schemas/SafeUserProfile"},"hostContactEmail":{"type":["string","null"]},"hostId":{"type":"string"},"id":{"type":"string"},"isPublic":{"type":"boolean"},"league":{"enum":["NFL","NCAAF","NBA","NCAAB","WNBA","NCAAW","MLB","NHL","NWSL","WPHL"],"type":"string"},"name":{"type":"string"},"openBoxBonus":{"anyOf":[{"$ref":"#/components/schemas/OpenBoxBonus"},{"type":"null"}]},"openBoxBonusEnabled":{"type":"boolean"},"paidState":{"enum":["UNPAID","PENDING_CONFIRMATION","PAID"],"type":"string"},"paymentInstructions":{"type":["string","null"]},"payoutPeriods":{"items":{"$ref":"#/components/schemas/PayoutPeriod"},"type":"array"},"paypalHandle":{"type":["string","null"]},"rotateBoxes":{"type":"boolean"},"selectionState":{"enum":["OPEN","CLOSED"],"type":"string"},"shortCode":{"type":"string"},"size":{"enum":["FIVE_BY_FIVE","TEN_BY_TEN"],"type":"string"},"slug":{"type":"string"},"sport":{"enum":["FOOTBALL","BASKETBALL","BASEBALL","HOCKEY","SOCCER"],"type":"string"},"startTime":{"format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"totalPayout":{"type":"number"},"updatedAt":{"format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"venmoHandle":{"type":["string","null"]}},"required":["id","hostId","shortCode","size","boxPrice","startTime","rotateBoxes","selectionState","autoCloseOnFill","paidState","sport","league","gameId","name","slug","description","isPublic","paymentInstructions","venmoHandle","paypalHandle","cashAppHandle","totalPayout","openBoxBonusEnabled","createdAt","updatedAt","payoutPeriods","openBoxBonus","hasPassword","host","game","hostContactEmail"],"type":"object"},"SquareMember":{"additionalProperties":false,"properties":{"createdAt":{"format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"id":{"type":"string"},"nickname":{"type":["string","null"]},"paidOutAmount":{"type":["number","null"]},"paidOutAt":{"anyOf":[{"format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"paidOutMethod":{"anyOf":[{"enum":["ALTERNATIVE","VENMO","PAYPAL","CASHAPP"],"type":"string"},{"type":"null"}]},"selectedBoxes":{"items":{"$ref":"#/components/schemas/Box"},"type":"array"},"squareId":{"type":"string"},"updatedAt":{"format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"userId":{"type":"string"},"userProfile":{"$ref":"#/components/schemas/MemberProfile"}},"required":["id","userId","squareId","nickname","paidOutAt","paidOutMethod","paidOutAmount","createdAt","updatedAt","selectedBoxes","userProfile"],"type":"object"},"Team":{"additionalProperties":false,"properties":{"abbreviation":{"type":["string","null"]},"createdAt":{"format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"displayName":{"type":"string"},"id":{"type":"string"},"league":{"enum":["NFL","NCAAF","NBA","NCAAB","WNBA","NCAAW","MLB","NHL","NWSL","WPHL"],"type":"string"},"location":{"type":["string","null"]},"logoUrl":{"type":["string","null"]},"logoUrlOverride":{"type":["string","null"]},"primaryColor":{"type":["string","null"]},"primaryColorOverride":{"type":["string","null"]},"secondaryColor":{"type":["string","null"]},"secondaryColorOverride":{"type":["string","null"]},"secondaryTextColor":{"type":["string","null"]},"secondaryTextColorOverride":{"type":["string","null"]},"shortDisplayName":{"type":"string"},"sport":{"enum":["FOOTBALL","BASKETBALL","BASEBALL","HOCKEY","SOCCER"],"type":"string"},"tertiaryColor":{"type":["string","null"]},"tertiaryColorOverride":{"type":["string","null"]},"textColor":{"type":["string","null"]},"textColorOverride":{"type":["string","null"]},"updatedAt":{"format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"}},"required":["id","displayName","shortDisplayName","abbreviation","location","sport","league","logoUrl","primaryColor","secondaryColor","tertiaryColor","textColor","secondaryTextColor","primaryColorOverride","secondaryColorOverride","tertiaryColorOverride","textColorOverride","secondaryTextColorOverride","logoUrlOverride","createdAt","updatedAt"],"type":"object"},"Tournament":{"additionalProperties":false,"properties":{"createdAt":{"format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"displayName":{"type":"string"},"id":{"type":"string"},"isNcaamChampionship":{"type":"boolean"},"league":{"enum":["NFL","NCAAF","NBA","NCAAB","WNBA","NCAAW","MLB","NHL","NWSL","WPHL"],"type":"string"},"logoUrl":{"type":["string","null"]},"primaryColor":{"type":["string","null"]},"seasonYear":{"type":"string"},"secondaryColor":{"type":["string","null"]},"secondaryTextColor":{"type":["string","null"]},"shortDisplayName":{"type":"string"},"sport":{"enum":["FOOTBALL","BASKETBALL","BASEBALL","HOCKEY","SOCCER"],"type":"string"},"startDate":{"anyOf":[{"format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},{"type":"null"}]},"tertiaryColor":{"type":["string","null"]},"textColor":{"type":["string","null"]},"updatedAt":{"format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"}},"required":["isNcaamChampionship","id","displayName","shortDisplayName","sport","league","seasonYear","startDate","logoUrl","primaryColor","secondaryColor","tertiaryColor","textColor","secondaryTextColor","createdAt","updatedAt"],"type":"object"}},"securitySchemes":{"ApiKeyAuth":{"description":"An API key from the profile page; 120 requests per minute per key","in":"header","name":"x-api-key","type":"apiKey"}}},"info":{"description":"The Sunday Squares API for agents: every public action, as REST.\n\nSend an API key in the x-api-key header; a signed-in person mints one on their profile page and it acts as them for games only, never for the account. 120 requests per minute per key.\n\nEvery response is the same envelope: { \"ok\": true, \"data\": ... } on success, { \"ok\": false, \"error\": { \"code\", \"message\", \"details\", \"retryable\" } } on a refusal, with the status the code maps to. Validation refuses with 400 and VALIDATION_ERROR.\n\nReads page with a cursor: pass the previous page's nextCursor back. Mutations marked idempotent replay their first answer when the same Idempotency-Key is sent again with the same input.\n\nMoney never moves here: a checkout answers a page a person opens and pays on, and player-to-player money settles off the site.","title":"Sunday Squares API","version":"1.0.0"},"openapi":"3.1.0","paths":{"/api/v1/credits/balance":{"get":{"description":"How many Hosting Credits the signed-in person holds, beside what publishing a Square or a Pool spends. Buying more is a step the person takes on the credits page.\n\nNeeds a key holding: credits:read.","operationId":"get_credit_balance","parameters":[{"$ref":"#/components/parameters/RequestId"}],"responses":{"200":{"content":{"application/json":{"examples":{"enough-for-a-square-not-yet-for-a-pool":{"summary":"Enough for a Square, not yet for a Pool","value":{"data":{"balance":2,"creditsUrl":"https://sundaysquares.com/credits","poolPublishCost":3,"squarePublishCost":1},"ok":true}}},"schema":{"properties":{"data":{"additionalProperties":false,"properties":{"balance":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"creditsUrl":{"format":"uri","type":"string"},"poolPublishCost":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"squarePublishCost":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"}},"required":["balance","squarePublishCost","poolPublishCost","creditsUrl"],"type":"object"},"ok":{"const":true}},"required":["ok","data"],"type":"object"}}},"description":"The answer","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["VALIDATION_ERROR"]}},"type":"object"}},"type":"object"}]}}},"description":"VALIDATION_ERROR: Something in the request is not right.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["UNAUTHENTICATED"]}},"type":"object"}},"type":"object"}]}}},"description":"UNAUTHENTICATED: You need to sign in for that.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["FORBIDDEN"]}},"type":"object"}},"type":"object"}]}}},"description":"FORBIDDEN: You are not allowed to do that.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"429":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["RATE_LIMITED"]}},"type":"object"}},"type":"object"}]}}},"description":"RATE_LIMITED: Too many requests. Slow down and try again.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["INTERNAL_ERROR"]}},"type":"object"}},"type":"object"}]}}},"description":"INTERNAL_ERROR: That didn't go through on our end. Try again in a minute.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}}},"security":[{"ApiKeyAuth":[]}],"summary":"Check your Hosting Credits","tags":["credits"],"x-auth":"user","x-scopes":["credits:read"]}},"/api/v1/credits/bundles":{"get":{"description":"The Hosting Credits bundles a person can buy, in the order the credits page shows them, each with its price in dollars and the credits it holds. A bundle's id is what create_credit_checkout takes. Anyone may read the list.\n\nNo key needed. A key that is sent must hold: credits:read.","operationId":"list_credit_bundles","parameters":[{"$ref":"#/components/parameters/RequestId"}],"responses":{"200":{"content":{"application/json":{"examples":{"two-bundles-on-sale":{"summary":"Two bundles on sale","value":{"data":{"bundles":[{"badge":null,"credits":3,"description":"Enough for three Squares or one Pool.","id":"cmf3bundle0001","isActive":true,"name":"Starter","priceInCents":1499,"priceInDollars":14.99,"sortOrder":1,"useCase":"A season of Sundays"},{"badge":"Best value","credits":10,"description":"Ten credits for the hosts who run everything.","id":"cmf3bundle0002","isActive":true,"name":"Season pass","priceInCents":3999,"priceInDollars":39.99,"sortOrder":2,"useCase":"The whole season"}]},"ok":true}}},"schema":{"properties":{"data":{"additionalProperties":false,"properties":{"bundles":{"items":{"$ref":"#/components/schemas/CreditBundle"},"type":"array"}},"required":["bundles"],"type":"object"},"ok":{"const":true}},"required":["ok","data"],"type":"object"}}},"description":"The answer","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["VALIDATION_ERROR"]}},"type":"object"}},"type":"object"}]}}},"description":"VALIDATION_ERROR: Something in the request is not right.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["UNAUTHENTICATED"]}},"type":"object"}},"type":"object"}]}}},"description":"UNAUTHENTICATED: You need to sign in for that.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["FORBIDDEN"]}},"type":"object"}},"type":"object"}]}}},"description":"FORBIDDEN: You are not allowed to do that.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"429":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["RATE_LIMITED"]}},"type":"object"}},"type":"object"}]}}},"description":"RATE_LIMITED: Too many requests. Slow down and try again.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["INTERNAL_ERROR"]}},"type":"object"}},"type":"object"}]}}},"description":"INTERNAL_ERROR: That didn't go through on our end. Try again in a minute.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}}},"security":[{"ApiKeyAuth":[]},{}],"summary":"List the Hosting Credits bundles on sale","tags":["credits"],"x-auth":"public","x-scopes":["credits:read"]}},"/api/v1/credits/checkout":{"post":{"description":"Opens a Stripe checkout for a Hosting Credits bundle and answers the payment page. A person has to open that page and pay; this action never completes a payment, and the credits land on the account once Stripe confirms it. Each call starts a fresh checkout. Bundle ids come from list_credit_bundles. A site-relative returnTo, such as a game's page, is where Stripe sends the person afterwards; without one they land on the credits pages.\n\nNeeds a key holding: credits:checkout.","operationId":"create_credit_checkout","parameters":[{"$ref":"#/components/parameters/RequestId"}],"requestBody":{"content":{"application/json":{"examples":{"starting-a-checkout-for-the-starter-bundle":{"summary":"Starting a checkout for the starter bundle","value":{"bundleId":"cmf3bundle0001"}}},"schema":{"properties":{"bundleId":{"minLength":1,"type":"string"},"promoCode":{"type":"string"},"returnTo":{"maxLength":200,"pattern":"^\\/(?![/\\\\])\\S*$","type":"string"}},"required":["bundleId"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"starting-a-checkout-for-the-starter-bundle":{"summary":"Starting a checkout for the starter bundle","value":{"data":{"bundle":{"badge":null,"credits":3,"description":"Enough for three Squares or one Pool.","id":"cmf3bundle0001","isActive":true,"name":"Starter","priceInCents":1499,"priceInDollars":14.99,"sortOrder":1,"useCase":"A season of Sundays"},"checkoutUrl":"https://checkout.stripe.com/c/pay/cs_test_example"},"ok":true}}},"schema":{"properties":{"data":{"additionalProperties":false,"properties":{"bundle":{"$ref":"#/components/schemas/CreditBundle"},"checkoutUrl":{"format":"uri","type":"string"}},"required":["checkoutUrl","bundle"],"type":"object"},"ok":{"const":true}},"required":["ok","data"],"type":"object"}}},"description":"Done","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["VALIDATION_ERROR"]}},"type":"object"}},"type":"object"}]}}},"description":"VALIDATION_ERROR: Something in the request is not right.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["UNAUTHENTICATED"]}},"type":"object"}},"type":"object"}]}}},"description":"UNAUTHENTICATED: You need to sign in for that.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["FORBIDDEN"]}},"type":"object"}},"type":"object"}]}}},"description":"FORBIDDEN: You are not allowed to do that.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["NOT_FOUND"]}},"type":"object"}},"type":"object"}]}}},"description":"NOT_FOUND: We could not find that.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["RESOURCE_CONFLICT"]}},"type":"object"}},"type":"object"}]}}},"description":"RESOURCE_CONFLICT: That request is still in progress. Try again shortly.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"429":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["RATE_LIMITED"]}},"type":"object"}},"type":"object"}]}}},"description":"RATE_LIMITED: Too many requests. Slow down and try again.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["INTERNAL_ERROR"]}},"type":"object"}},"type":"object"}]}}},"description":"INTERNAL_ERROR: That didn't go through on our end. Try again in a minute.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}}},"security":[{"ApiKeyAuth":[]}],"summary":"Start a Hosting Credits purchase","tags":["credits"],"x-auth":"user","x-idempotent":false,"x-scopes":["credits:checkout"]}},"/api/v1/games":{"get":{"description":"Lists games in kickoff order, upcoming ones by default. Filter by league and status, or search by team name; a search with a league also matches close spellings. Page with the cursor the previous page handed back. A game's id is what creating a Square asks for.\n\nNo key needed. A key that is sent must hold: games:read.","operationId":"find_games","parameters":[{"in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"example":1,"in":"query","name":"limit","required":false,"schema":{"default":25,"maximum":100,"minimum":1,"type":"integer"}},{"example":"NFL","in":"query","name":"league","required":false,"schema":{"enum":["NFL","NCAAF","NBA","NCAAB","WNBA","NCAAW","MLB","NHL","NWSL","WPHL"],"type":"string"}},{"example":"chiefs","in":"query","name":"search","required":false,"schema":{"maxLength":100,"type":"string"}},{"explode":false,"in":"query","name":"states","required":false,"schema":{"items":{"enum":["SCHEDULED","IN_PROGRESS","FINAL","POSTPONED","CANCELLED"],"type":"string"},"minItems":1,"type":"array"},"style":"form"},{"in":"query","name":"includePast","required":false,"schema":{"default":false,"type":"boolean"}},{"$ref":"#/components/parameters/RequestId"}],"responses":{"200":{"content":{"application/json":{"examples":{"upcoming-nfl-games-with-the-chiefs-in-them":{"summary":"Upcoming NFL games with the Chiefs in them","value":{"data":{"items":[{"areTeamsConfirmed":true,"awayTeam":{"abbreviation":"BUF","createdAt":"2026-05-01T12:00:00.000Z","displayName":"Buffalo Bills","id":"cmf3team0002","league":"NFL","location":"Buffalo","logoUrl":"https://a.espncdn.com/i/teamlogos/nfl/500/buf.png","logoUrlOverride":null,"primaryColor":"#00338D","primaryColorOverride":null,"secondaryColor":"#C60C30","secondaryColorOverride":null,"secondaryTextColor":null,"secondaryTextColorOverride":null,"shortDisplayName":"Bills","sport":"FOOTBALL","tertiaryColor":null,"tertiaryColorOverride":null,"textColor":"#FFFFFF","textColorOverride":null,"updatedAt":"2026-05-01T12:00:00.000Z"},"awayTeamId":"cmf3team0002","createdAt":"2026-05-01T12:00:00.000Z","displayName":null,"gameClock":null,"gameDate":"2026-09-13T17:00:00.000Z","gameDayId":null,"homeTeam":{"abbreviation":"KC","createdAt":"2026-05-01T12:00:00.000Z","displayName":"Kansas City Chiefs","id":"cmf3team0001","league":"NFL","location":"Kansas City","logoUrl":"https://a.espncdn.com/i/teamlogos/nfl/500/kc.png","logoUrlOverride":null,"primaryColor":"#E31837","primaryColorOverride":null,"secondaryColor":"#FFB81C","secondaryColorOverride":null,"secondaryTextColor":null,"secondaryTextColorOverride":null,"shortDisplayName":"Chiefs","sport":"FOOTBALL","tertiaryColor":null,"tertiaryColorOverride":null,"textColor":"#FFFFFF","textColorOverride":null,"updatedAt":"2026-05-01T12:00:00.000Z"},"homeTeamId":"cmf3team0001","id":"cmf3game0001","isCompleted":false,"league":"NFL","metadata":null,"overUnder":47.5,"periods":[],"seasonType":"REGULAR_SEASON","seasonYear":"2026","sport":"FOOTBALL","spread":-3.5,"spreadDetails":"KC -3.5","state":"SCHEDULED","tournament":null,"tournamentId":null,"updatedAt":"2026-09-10T12:00:00.000Z","venue":"Arrowhead Stadium","week":"1","weekLabel":"Week 1"}],"nextCursor":"eyJvZmZzZXQiOjF9","total":3},"ok":true}}},"schema":{"properties":{"data":{"additionalProperties":false,"properties":{"items":{"items":{"$ref":"#/components/schemas/Game"},"type":"array"},"nextCursor":{"type":"string"},"total":{"maximum":9007199254740991,"minimum":0,"type":"integer"}},"required":["items","total"],"type":"object"},"ok":{"const":true}},"required":["ok","data"],"type":"object"}}},"description":"The answer","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["VALIDATION_ERROR"]}},"type":"object"}},"type":"object"}]}}},"description":"VALIDATION_ERROR: Something in the request is not right.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["UNAUTHENTICATED"]}},"type":"object"}},"type":"object"}]}}},"description":"UNAUTHENTICATED: You need to sign in for that.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["FORBIDDEN"]}},"type":"object"}},"type":"object"}]}}},"description":"FORBIDDEN: You are not allowed to do that.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"429":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["RATE_LIMITED"]}},"type":"object"}},"type":"object"}]}}},"description":"RATE_LIMITED: Too many requests. Slow down and try again.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["INTERNAL_ERROR"]}},"type":"object"}},"type":"object"}]}}},"description":"INTERNAL_ERROR: That didn't go through on our end. Try again in a minute.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}}},"security":[{"ApiKeyAuth":[]},{}],"summary":"Find games to host a Square on","tags":["games"],"x-auth":"public","x-scopes":["games:read"]}},"/api/v1/me/games":{"get":{"description":"Every Square and Pool the signed-in person hosts or holds boxes or entries in, as one list with a type on each row. Filter by product, by role, or by where the game is in its life: draft, upcoming, active, or completed. Hosts get a manage link beside the public one.\n\nNeeds a key holding: hosting:read.","operationId":"list_my_games","parameters":[{"in":"query","name":"cursor","required":false,"schema":{"type":"string"}},{"in":"query","name":"limit","required":false,"schema":{"default":25,"maximum":100,"minimum":1,"type":"integer"}},{"example":"square","in":"query","name":"type","required":false,"schema":{"enum":["square","pool","fourway"],"type":"string"}},{"example":"host","in":"query","name":"role","required":false,"schema":{"enum":["host","participant"],"type":"string"}},{"in":"query","name":"state","required":false,"schema":{"enum":["draft","upcoming","active","completed"],"type":"string"}},{"$ref":"#/components/parameters/RequestId"}],"responses":{"200":{"content":{"application/json":{"examples":{"a-pool-the-caller-plays-in":{"summary":"A Pool the caller plays in","value":{"data":{"items":[{"aliveCount":9,"completion":null,"currentWeek":2,"endWeek":18,"entryCount":12,"entryPrice":20,"format":"SURVIVOR","id":"cmf3pool0001","league":"NFL","myEntryCount":1,"name":"Office Survivor","publicUrl":"https://sundaysquares.com/pools/office-survivor","role":"participant","seasonYear":"2026","startWeek":1,"startsAt":"2026-09-13T17:00:00.000Z","state":"active","type":"pool"}],"nextCursor":"eyJvZmZzZXQiOjF9","total":2},"ok":true}},"the-squares-the-caller-hosts":{"summary":"The Squares the caller hosts","value":{"data":{"items":[{"boxCount":100,"boxPrice":10,"claimedBoxCount":61,"completion":null,"id":"cmf3square0001","league":"NFL","manageUrl":"https://sundaysquares.com/squares/cmf3square0001?tab=manage","matchup":{"away":{"abbreviation":"BUF","createdAt":"2026-05-01T12:00:00.000Z","displayName":"Buffalo Bills","id":"cmf3team0002","league":"NFL","location":"Buffalo","logoUrl":"https://a.espncdn.com/i/teamlogos/nfl/500/buf.png","logoUrlOverride":null,"primaryColor":"#00338D","primaryColorOverride":null,"secondaryColor":"#C60C30","secondaryColorOverride":null,"secondaryTextColor":null,"secondaryTextColorOverride":null,"shortDisplayName":"Bills","sport":"FOOTBALL","tertiaryColor":null,"tertiaryColorOverride":null,"textColor":"#FFFFFF","textColorOverride":null,"updatedAt":"2026-05-01T12:00:00.000Z"},"home":{"abbreviation":"KC","createdAt":"2026-05-01T12:00:00.000Z","displayName":"Kansas City Chiefs","id":"cmf3team0001","league":"NFL","location":"Kansas City","logoUrl":"https://a.espncdn.com/i/teamlogos/nfl/500/kc.png","logoUrlOverride":null,"primaryColor":"#E31837","primaryColorOverride":null,"secondaryColor":"#FFB81C","secondaryColorOverride":null,"secondaryTextColor":null,"secondaryTextColorOverride":null,"shortDisplayName":"Chiefs","sport":"FOOTBALL","tertiaryColor":null,"tertiaryColorOverride":null,"textColor":"#FFFFFF","textColorOverride":null,"updatedAt":"2026-05-01T12:00:00.000Z"}},"myBoxCount":2,"name":"Sunday Night Squares","publicUrl":"https://sundaysquares.com/squares/cmf3square0001","role":"host","selectionState":"OPEN","startsAt":"2026-09-13T17:00:00.000Z","state":"upcoming","type":"square"}],"total":1},"ok":true}}},"schema":{"properties":{"data":{"additionalProperties":false,"properties":{"items":{"items":{"oneOf":[{"$ref":"#/components/schemas/HostedSquare"},{"$ref":"#/components/schemas/HostedPool"},{"$ref":"#/components/schemas/HostedFourway"}]},"type":"array"},"nextCursor":{"type":"string"},"total":{"maximum":9007199254740991,"minimum":0,"type":"integer"}},"required":["items","total"],"type":"object"},"ok":{"const":true}},"required":["ok","data"],"type":"object"}}},"description":"The answer","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["VALIDATION_ERROR"]}},"type":"object"}},"type":"object"}]}}},"description":"VALIDATION_ERROR: Something in the request is not right.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["UNAUTHENTICATED"]}},"type":"object"}},"type":"object"}]}}},"description":"UNAUTHENTICATED: You need to sign in for that.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["FORBIDDEN"]}},"type":"object"}},"type":"object"}]}}},"description":"FORBIDDEN: You are not allowed to do that.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"429":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["RATE_LIMITED"]}},"type":"object"}},"type":"object"}]}}},"description":"RATE_LIMITED: Too many requests. Slow down and try again.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["INTERNAL_ERROR"]}},"type":"object"}},"type":"object"}]}}},"description":"INTERNAL_ERROR: That didn't go through on our end. Try again in a minute.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}}},"security":[{"ApiKeyAuth":[]}],"summary":"List the games you host or play","tags":["games"],"x-auth":"user","x-scopes":["hosting:read"]}},"/api/v1/pools":{"post":{"description":"Call get_pool_creation_options first and offer only its available leagues, seasons, and weeks. Creates a draft Survivor or Losers Pool on one of those league seasons. Drafts cost nothing and are visible only to their host; publishing spends Hosting Credits and opens the Pool to entries. The start and end weeks must be on the season's schedule and the start week must not have been played yet. The place payouts must add up to 100. A password makes the Pool private.\n\nNeeds a key holding: pools:write.\n\nIdempotent: send an Idempotency-Key and a retry with the same input replays the first answer, marked in meta.replayed.","operationId":"create_pool","parameters":[{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"examples":{"a-20-survivor-pool-for-the-whole-nfl-season":{"summary":"A $20 Survivor Pool for the whole NFL season","value":{"description":"Winner takes the pot.","endWeek":18,"entryPrice":20,"league":"NFL","name":"Office Survivor","password":"survive","paymentInstructions":"Venmo preferred. Put your entry name in the note.","seasonYear":"2026","startWeek":1,"venmoHandle":"@sam-ellis"}}},"schema":{"properties":{"cashAppHandle":{"type":["string","null"]},"description":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}]},"endWeek":{"maximum":9007199254740991,"minimum":1,"type":"integer"},"entryPrice":{"default":0,"minimum":0,"type":"number"},"format":{"default":"SURVIVOR","enum":["SURVIVOR","LOSERS"],"type":"string"},"league":{"enum":["NFL","NCAAF"],"type":"string"},"maxEntriesPerUser":{"default":5,"maximum":10,"minimum":1,"type":"integer"},"missedPickRule":{"default":"STRIKE","enum":["STRIKE","AUTO_PICK"],"type":"string"},"name":{"maxLength":100,"minLength":1,"type":"string"},"password":{"type":["string","null"]},"paymentInstructions":{"type":["string","null"]},"payoutPercentages":{"default":[100],"items":{"maximum":100,"minimum":0,"type":"number"},"maxItems":10,"minItems":1,"type":"array"},"paypalHandle":{"type":["string","null"]},"seasonYear":{"minLength":4,"type":"string"},"startWeek":{"maximum":9007199254740991,"minimum":1,"type":"integer"},"strikes":{"default":1,"maximum":5,"minimum":1,"type":"integer"},"tieRule":{"default":"STRIKE","enum":["STRIKE","SURVIVE"],"type":"string"},"totalPayout":{"default":100,"maximum":100,"minimum":0,"type":"number"},"venmoHandle":{"type":["string","null"]}},"required":["name","league","seasonYear","startWeek","endWeek"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"a-20-survivor-pool-for-the-whole-nfl-season":{"summary":"A $20 Survivor Pool for the whole NFL season","value":{"data":{"manageUrl":"https://sundaysquares.com/pools/office-survivor?tab=manage","pool":{"cashAppHandle":null,"completedAt":null,"createdAt":"2026-08-15T12:00:00.000Z","creditsCharged":0,"description":"Winner takes the pot.","endReason":null,"endWeek":18,"entryPrice":20,"format":"SURVIVOR","hasPassword":true,"host":{"displayName":"Sam Ellis","id":"cmf3user0001","image":null},"hostContactEmail":null,"hostId":"cmf3user0001","id":"cmf3pool0001","isPublic":false,"league":"NFL","maxEntriesPerUser":5,"missedPickRule":"STRIKE","name":"Office Survivor","paidState":"UNPAID","paymentInstructions":"Venmo preferred. Put your entry name in the note.","payoutPercentages":[100],"paypalHandle":null,"seasonYear":"2026","shortCode":"SURV26","slug":"office-survivor","sport":"FOOTBALL","startWeek":1,"state":"OPEN","strikes":1,"tieRule":"STRIKE","totalPayout":100,"updatedAt":"2026-09-10T12:00:00.000Z","venmoHandle":"sam-ellis","winnerMemberIds":[]},"publicUrl":"https://sundaysquares.com/pools/office-survivor"},"ok":true}}},"schema":{"properties":{"data":{"additionalProperties":false,"properties":{"manageUrl":{"format":"uri","type":"string"},"pool":{"$ref":"#/components/schemas/Pool"},"publicUrl":{"format":"uri","type":"string"}},"required":["pool","publicUrl","manageUrl"],"type":"object"},"meta":{"description":"Present only when this answer is a replay of an earlier call with the same key","properties":{"replayed":{"const":true}},"type":"object"},"ok":{"const":true}},"required":["ok","data"],"type":"object"}}},"description":"Done","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["VALIDATION_ERROR"]}},"type":"object"}},"type":"object"}]}}},"description":"VALIDATION_ERROR: Something in the request is not right.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["UNAUTHENTICATED"]}},"type":"object"}},"type":"object"}]}}},"description":"UNAUTHENTICATED: You need to sign in for that.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["FORBIDDEN","LEAGUE_NOT_AVAILABLE"]}},"type":"object"}},"type":"object"}]}}},"description":"FORBIDDEN: You are not allowed to do that. LEAGUE_NOT_AVAILABLE: That league is not available right now.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["RESOURCE_CONFLICT","IDEMPOTENCY_KEY_REUSED"]}},"type":"object"}},"type":"object"}]}}},"description":"RESOURCE_CONFLICT: That request is still in progress. Try again shortly. IDEMPOTENCY_KEY_REUSED: That idempotency key was already used with a different request.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"429":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["RATE_LIMITED"]}},"type":"object"}},"type":"object"}]}}},"description":"RATE_LIMITED: Too many requests. Slow down and try again.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["INTERNAL_ERROR"]}},"type":"object"}},"type":"object"}]}}},"description":"INTERNAL_ERROR: That didn't go through on our end. Try again in a minute.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}}},"security":[{"ApiKeyAuth":[]}],"summary":"Create a draft Pool","tags":["pools"],"x-auth":"user","x-idempotent":true,"x-scopes":["pools:write"]}},"/api/v1/pools/options":{"get":{"description":"Call this before offering Pool creation choices or calling create_pool. Returns the leagues currently enabled for you and the ingested weeks in seasons with games still to start, matching the Pool wizard. Choose a returned league and season, a first week with canStart true, and a returned last week at or after it. An enabled league with no weekWindows has no schedule available yet. No windows means no Pool can be created now. Choices are checked again when creating the draft.\n\nWorks signed out. A key that is sent must hold: games:read.","operationId":"get_pool_creation_options","parameters":[{"$ref":"#/components/parameters/RequestId"}],"responses":{"200":{"content":{"application/json":{"examples":{"an-nfl-season-with-a-scheduled-opening-week":{"summary":"An NFL season with a scheduled opening week","value":{"data":{"allowedLeagues":["NFL"],"defaultSeason":"2026","weekWindows":[{"canStart":true,"firstKickoff":"2026-09-10T00:00:00.000Z","lastKickoff":"2026-09-15T00:15:00.000Z","league":"NFL","seasonYear":"2026","week":1}]},"ok":true}}},"schema":{"properties":{"data":{"additionalProperties":false,"properties":{"allowedLeagues":{"items":{"enum":["NFL","NCAAF","NBA","NCAAB","WNBA","NCAAW","MLB","NHL","NWSL","WPHL"],"type":"string"},"type":"array"},"defaultSeason":{"type":["string","null"]},"weekWindows":{"items":{"additionalProperties":false,"properties":{"canStart":{"type":"boolean"},"firstKickoff":{"format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"lastKickoff":{"format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","type":"string"},"league":{"enum":["NFL","NCAAF","NBA","NCAAB","WNBA","NCAAW","MLB","NHL","NWSL","WPHL"],"type":"string"},"seasonYear":{"type":"string"},"week":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"}},"required":["league","seasonYear","week","firstKickoff","lastKickoff","canStart"],"type":"object"},"type":"array"}},"required":["allowedLeagues","defaultSeason","weekWindows"],"type":"object"},"ok":{"const":true}},"required":["ok","data"],"type":"object"}}},"description":"The answer","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["VALIDATION_ERROR"]}},"type":"object"}},"type":"object"}]}}},"description":"VALIDATION_ERROR: Something in the request is not right.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["UNAUTHENTICATED"]}},"type":"object"}},"type":"object"}]}}},"description":"UNAUTHENTICATED: You need to sign in for that.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["FORBIDDEN"]}},"type":"object"}},"type":"object"}]}}},"description":"FORBIDDEN: You are not allowed to do that.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"429":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["RATE_LIMITED"]}},"type":"object"}},"type":"object"}]}}},"description":"RATE_LIMITED: Too many requests. Slow down and try again.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["INTERNAL_ERROR"]}},"type":"object"}},"type":"object"}]}}},"description":"INTERNAL_ERROR: That didn't go through on our end. Try again in a minute.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}}},"security":[{"ApiKeyAuth":[]},{}],"summary":"Read the available Pool leagues, seasons, and weeks","tags":["pools"],"x-auth":"optional_user","x-scopes":["games:read"]}},"/api/v1/pools/{poolId}":{"delete":{"description":"Deletes an unpublished Pool. A published Pool cannot be deleted, because it can hold entries and their history. Host only.\n\nNeeds a key holding: pools:write.","operationId":"delete_pool","parameters":[{"example":"cmf3pool0001","in":"path","name":"poolId","required":true,"schema":{"minLength":1,"type":"string"}},{"$ref":"#/components/parameters/RequestId"}],"responses":{"200":{"content":{"application/json":{"examples":{"deleting-a-draft":{"summary":"Deleting a draft","value":{"data":{"deleted":true},"ok":true}}},"schema":{"properties":{"data":{"additionalProperties":false,"properties":{"deleted":{"const":true,"type":"boolean"}},"required":["deleted"],"type":"object"},"ok":{"const":true}},"required":["ok","data"],"type":"object"}}},"description":"Done","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["VALIDATION_ERROR"]}},"type":"object"}},"type":"object"}]}}},"description":"VALIDATION_ERROR: Something in the request is not right.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["UNAUTHENTICATED"]}},"type":"object"}},"type":"object"}]}}},"description":"UNAUTHENTICATED: You need to sign in for that.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["FORBIDDEN","LEAGUE_NOT_AVAILABLE"]}},"type":"object"}},"type":"object"}]}}},"description":"FORBIDDEN: You are not allowed to do that. LEAGUE_NOT_AVAILABLE: That league is not available right now.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["NOT_FOUND"]}},"type":"object"}},"type":"object"}]}}},"description":"NOT_FOUND: We could not find that.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["RESOURCE_CONFLICT"]}},"type":"object"}},"type":"object"}]}}},"description":"RESOURCE_CONFLICT: That request is still in progress. Try again shortly.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"429":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["RATE_LIMITED"]}},"type":"object"}},"type":"object"}]}}},"description":"RATE_LIMITED: Too many requests. Slow down and try again.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["INTERNAL_ERROR"]}},"type":"object"}},"type":"object"}]}}},"description":"INTERNAL_ERROR: That didn't go through on our end. Try again in a minute.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}}},"security":[{"ApiKeyAuth":[]}],"summary":"Delete a draft Pool","tags":["pools"],"x-auth":"user","x-idempotent":false,"x-scopes":["pools:write"]},"get":{"description":"The Pool and, for a player or the host, its entries and picks. Use this to read what you picked in any week: match each pick's poolMemberId to its entry and read its week and team. Players see all their own picks; other entries' picks appear only when revealed by the game starting or grading. The host sees every pick. A visitor admitted by the Pool being public, or by the password given inline, gets the Pool's name, league, and season with the private parts left out. Pools only answer for leagues that are switched on.\n\nWorks signed out. A key that is sent must hold: games:read.","operationId":"get_pool","parameters":[{"example":"cmf3pool0001","in":"path","name":"poolId","required":true,"schema":{"minLength":1,"type":"string"}},{"in":"query","name":"password","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/RequestId"}],"responses":{"200":{"content":{"application/json":{"examples":{"a-player-reads-their-pool":{"summary":"A player reads their Pool","value":{"data":{"isHost":false,"isMember":true,"members":[{"createdAt":"2026-08-20T12:00:00.000Z","eliminatedWeek":null,"id":"cmf3entry0001","isEliminated":false,"name":"Dana 1","paidOutAmount":null,"paidOutAt":null,"paidOutMethod":null,"paidState":"PAID","paymentMethod":"VENMO","poolId":"cmf3pool0001","strikesUsed":0,"updatedAt":"2026-08-20T12:00:00.000Z","userId":"cmf3user0002","userProfile":{"displayName":"Dana Reyes","id":"cmf3user0002","image":null}}],"picks":[{"createdAt":"2026-09-08T15:00:00.000Z","gameId":"cmf3game0001","id":"cmf3pick0001","isAutoPick":false,"poolId":"cmf3pool0001","poolMemberId":"cmf3entry0001","result":"PENDING","team":{"abbreviation":"KC","createdAt":"2026-05-01T12:00:00.000Z","displayName":"Kansas City Chiefs","id":"cmf3team0001","league":"NFL","location":"Kansas City","logoUrl":"https://a.espncdn.com/i/teamlogos/nfl/500/kc.png","logoUrlOverride":null,"primaryColor":"#E31837","primaryColorOverride":null,"secondaryColor":"#FFB81C","secondaryColorOverride":null,"secondaryTextColor":null,"secondaryTextColorOverride":null,"shortDisplayName":"Chiefs","sport":"FOOTBALL","tertiaryColor":null,"tertiaryColorOverride":null,"textColor":"#FFFFFF","textColorOverride":null,"updatedAt":"2026-05-01T12:00:00.000Z"},"teamId":"cmf3team0001","updatedAt":"2026-09-08T15:00:00.000Z","week":1}],"pool":{"cashAppHandle":null,"completedAt":null,"createdAt":"2026-08-15T12:00:00.000Z","creditsCharged":3,"description":"Winner takes the pot.","endReason":null,"endWeek":18,"entryPrice":20,"format":"SURVIVOR","hasPassword":true,"host":{"displayName":"Sam Ellis","id":"cmf3user0001","image":null},"hostContactEmail":null,"hostId":"cmf3user0001","id":"cmf3pool0001","isPublic":false,"league":"NFL","maxEntriesPerUser":5,"missedPickRule":"STRIKE","name":"Office Survivor","paidState":"PAID","paymentInstructions":"Venmo preferred. Put your entry name in the note.","payoutPercentages":[100],"paypalHandle":null,"seasonYear":"2026","shortCode":"SURV26","slug":"office-survivor","sport":"FOOTBALL","startWeek":1,"state":"OPEN","strikes":1,"tieRule":"STRIKE","totalPayout":100,"updatedAt":"2026-09-10T12:00:00.000Z","venmoHandle":"sam-ellis","winnerMemberIds":[]}},"ok":true}},"a-visitor-admitted-by-the-password-holding-no-entry":{"summary":"A visitor admitted by the password, holding no entry","value":{"data":{"isHost":false,"isMember":false,"pool":{"cashAppHandle":null,"completedAt":null,"createdAt":"2026-08-15T12:00:00.000Z","creditsCharged":3,"description":null,"endReason":null,"endWeek":18,"entryPrice":20,"format":"SURVIVOR","hasPassword":true,"host":{"displayName":"Sam Ellis","id":"cmf3user0001","image":null},"hostContactEmail":null,"hostId":"cmf3user0001","id":"cmf3pool0001","isPublic":false,"league":"NFL","maxEntriesPerUser":5,"missedPickRule":"STRIKE","name":"Office Survivor","paidState":"PAID","paymentInstructions":null,"payoutPercentages":[100],"paypalHandle":null,"seasonYear":"2026","shortCode":"SURV26","slug":"office-survivor","sport":"FOOTBALL","startWeek":1,"state":"OPEN","strikes":1,"tieRule":"STRIKE","totalPayout":100,"updatedAt":"2026-09-10T12:00:00.000Z","venmoHandle":null,"winnerMemberIds":[]}},"ok":true}}},"schema":{"properties":{"data":{"additionalProperties":false,"properties":{"isHost":{"type":"boolean"},"isMember":{"type":"boolean"},"members":{"items":{"$ref":"#/components/schemas/PoolMember"},"type":"array"},"picks":{"items":{"$ref":"#/components/schemas/PoolPick"},"type":"array"},"pool":{"$ref":"#/components/schemas/Pool"}},"required":["pool","isMember","isHost"],"type":"object"},"ok":{"const":true}},"required":["ok","data"],"type":"object"}}},"description":"The answer","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["VALIDATION_ERROR"]}},"type":"object"}},"type":"object"}]}}},"description":"VALIDATION_ERROR: Something in the request is not right.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["UNAUTHENTICATED"]}},"type":"object"}},"type":"object"}]}}},"description":"UNAUTHENTICATED: You need to sign in for that.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["FORBIDDEN","PASSWORD_REQUIRED","LEAGUE_NOT_AVAILABLE"]}},"type":"object"}},"type":"object"}]}}},"description":"FORBIDDEN: You are not allowed to do that. PASSWORD_REQUIRED: This game needs a password. LEAGUE_NOT_AVAILABLE: That league is not available right now.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["NOT_FOUND"]}},"type":"object"}},"type":"object"}]}}},"description":"NOT_FOUND: We could not find that.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"429":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["RATE_LIMITED"]}},"type":"object"}},"type":"object"}]}}},"description":"RATE_LIMITED: Too many requests. Slow down and try again.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["INTERNAL_ERROR"]}},"type":"object"}},"type":"object"}]}}},"description":"INTERNAL_ERROR: That didn't go through on our end. Try again in a minute.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}}},"security":[{"ApiKeyAuth":[]},{}],"summary":"Read a Pool","tags":["pools"],"x-auth":"optional_user","x-scopes":["games:read"]},"patch":{"description":"Changes a Pool's settings. The name, description, payment handles, payment instructions, and password can change at any time; a null password makes the Pool public again. The format, strikes, tie rule, missed-pick rule, entries per person, payouts, and week span lock once the Pool is published, and sending one then is refused by name. Entry price can change until another player has an entry, even after publishing; a changed price resets existing entry payment marks. A changed week span must stay on the season's schedule. Host only.\n\nNeeds a key holding: pools:write.","operationId":"update_pool","parameters":[{"example":"cmf3pool0001","in":"path","name":"poolId","required":true,"schema":{"minLength":1,"type":"string"}},{"$ref":"#/components/parameters/RequestId"}],"requestBody":{"content":{"application/json":{"examples":{"rename-a-published-pool-and-add-a-cash-app-handle":{"summary":"Rename a published Pool and add a Cash App handle","value":{"cashAppHandle":"$samellis","name":"Office Survivor 2026"}}},"schema":{"properties":{"cashAppHandle":{"type":["string","null"]},"description":{"anyOf":[{"maxLength":500,"type":"string"},{"type":"null"}]},"endWeek":{"maximum":9007199254740991,"minimum":1,"type":"integer"},"entryPrice":{"maximum":1000,"minimum":0,"type":"number"},"format":{"enum":["SURVIVOR","LOSERS"],"type":"string"},"maxEntriesPerUser":{"maximum":10,"minimum":1,"type":"integer"},"missedPickRule":{"enum":["STRIKE","AUTO_PICK"],"type":"string"},"name":{"maxLength":100,"minLength":1,"type":"string"},"password":{"type":["string","null"]},"paymentInstructions":{"type":["string","null"]},"payoutPercentages":{"items":{"maximum":100,"minimum":0,"type":"number"},"maxItems":10,"minItems":1,"type":"array"},"paypalHandle":{"type":["string","null"]},"startWeek":{"maximum":9007199254740991,"minimum":1,"type":"integer"},"strikes":{"maximum":5,"minimum":1,"type":"integer"},"tieRule":{"enum":["STRIKE","SURVIVE"],"type":"string"},"totalPayout":{"maximum":100,"minimum":0,"type":"number"},"venmoHandle":{"type":["string","null"]}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"rename-a-published-pool-and-add-a-cash-app-handle":{"summary":"Rename a published Pool and add a Cash App handle","value":{"data":{"manageUrl":"https://sundaysquares.com/pools/office-survivor?tab=manage","pool":{"cashAppHandle":"samellis","completedAt":null,"createdAt":"2026-08-15T12:00:00.000Z","creditsCharged":3,"description":"Winner takes the pot.","endReason":null,"endWeek":18,"entryPrice":20,"format":"SURVIVOR","hasPassword":true,"host":{"displayName":"Sam Ellis","id":"cmf3user0001","image":null},"hostContactEmail":null,"hostId":"cmf3user0001","id":"cmf3pool0001","isPublic":false,"league":"NFL","maxEntriesPerUser":5,"missedPickRule":"STRIKE","name":"Office Survivor 2026","paidState":"PAID","paymentInstructions":"Venmo preferred. Put your entry name in the note.","payoutPercentages":[100],"paypalHandle":null,"seasonYear":"2026","shortCode":"SURV26","slug":"office-survivor","sport":"FOOTBALL","startWeek":1,"state":"OPEN","strikes":1,"tieRule":"STRIKE","totalPayout":100,"updatedAt":"2026-09-10T12:00:00.000Z","venmoHandle":"sam-ellis","winnerMemberIds":[]},"publicUrl":"https://sundaysquares.com/pools/office-survivor"},"ok":true}}},"schema":{"properties":{"data":{"additionalProperties":false,"properties":{"manageUrl":{"format":"uri","type":"string"},"members":{"items":{"$ref":"#/components/schemas/HostViewPoolMember"},"type":"array"},"pool":{"$ref":"#/components/schemas/Pool"},"publicUrl":{"format":"uri","type":"string"}},"required":["pool","publicUrl","manageUrl"],"type":"object"},"ok":{"const":true}},"required":["ok","data"],"type":"object"}}},"description":"Done","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["VALIDATION_ERROR"]}},"type":"object"}},"type":"object"}]}}},"description":"VALIDATION_ERROR: Something in the request is not right.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["UNAUTHENTICATED"]}},"type":"object"}},"type":"object"}]}}},"description":"UNAUTHENTICATED: You need to sign in for that.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["FORBIDDEN","LEAGUE_NOT_AVAILABLE"]}},"type":"object"}},"type":"object"}]}}},"description":"FORBIDDEN: You are not allowed to do that. LEAGUE_NOT_AVAILABLE: That league is not available right now.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["NOT_FOUND"]}},"type":"object"}},"type":"object"}]}}},"description":"NOT_FOUND: We could not find that.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["RESOURCE_CONFLICT"]}},"type":"object"}},"type":"object"}]}}},"description":"RESOURCE_CONFLICT: That request is still in progress. Try again shortly.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"429":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["RATE_LIMITED"]}},"type":"object"}},"type":"object"}]}}},"description":"RATE_LIMITED: Too many requests. Slow down and try again.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["INTERNAL_ERROR"]}},"type":"object"}},"type":"object"}]}}},"description":"INTERNAL_ERROR: That didn't go through on our end. Try again in a minute.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}}},"security":[{"ApiKeyAuth":[]}],"summary":"Edit a Pool's settings","tags":["pools"],"x-auth":"user","x-idempotent":false,"x-scopes":["pools:write"]}},"/api/v1/pools/{poolId}/entries":{"get":{"description":"Every entry in a Pool, oldest first, with its paid state, strikes, and elimination, plus the email and payment handles the host settles money with. A person can hold several entries. Host only; nobody else sees contact details.\n\nNeeds a key holding: members:read.","operationId":"list_pool_entries","parameters":[{"example":"cmf3pool0001","in":"path","name":"poolId","required":true,"schema":{"minLength":1,"type":"string"}},{"$ref":"#/components/parameters/RequestId"}],"responses":{"200":{"content":{"application/json":{"examples":{"one-entry-paid-on-venmo":{"summary":"One entry, paid on Venmo","value":{"data":{"entries":[{"createdAt":"2026-08-20T12:00:00.000Z","eliminatedWeek":null,"id":"cmf3entry0001","isEliminated":false,"name":"Dana 1","paidOutAmount":null,"paidOutAt":null,"paidOutMethod":null,"paidState":"PAID","paymentMethod":"VENMO","poolId":"cmf3pool0001","strikesUsed":0,"updatedAt":"2026-08-20T12:00:00.000Z","userId":"cmf3user0002","userProfile":{"cashAppHandle":null,"displayName":"Dana Reyes","email":"dana@example.com","id":"cmf3user0002","image":null,"paypalHandle":null,"venmoHandle":"dana-reyes"}}]},"ok":true}}},"schema":{"properties":{"data":{"additionalProperties":false,"properties":{"entries":{"items":{"$ref":"#/components/schemas/HostViewPoolMember"},"type":"array"}},"required":["entries"],"type":"object"},"ok":{"const":true}},"required":["ok","data"],"type":"object"}}},"description":"The answer","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["VALIDATION_ERROR"]}},"type":"object"}},"type":"object"}]}}},"description":"VALIDATION_ERROR: Something in the request is not right.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["UNAUTHENTICATED"]}},"type":"object"}},"type":"object"}]}}},"description":"UNAUTHENTICATED: You need to sign in for that.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["FORBIDDEN","LEAGUE_NOT_AVAILABLE"]}},"type":"object"}},"type":"object"}]}}},"description":"FORBIDDEN: You are not allowed to do that. LEAGUE_NOT_AVAILABLE: That league is not available right now.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["NOT_FOUND"]}},"type":"object"}},"type":"object"}]}}},"description":"NOT_FOUND: We could not find that.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"429":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["RATE_LIMITED"]}},"type":"object"}},"type":"object"}]}}},"description":"RATE_LIMITED: Too many requests. Slow down and try again.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["INTERNAL_ERROR"]}},"type":"object"}},"type":"object"}]}}},"description":"INTERNAL_ERROR: That didn't go through on our end. Try again in a minute.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}}},"security":[{"ApiKeyAuth":[]}],"summary":"List a Pool's entries","tags":["members"],"x-auth":"user","x-scopes":["members:read"]},"post":{"description":"Takes one or more entries in a published Pool for the signed-in person, up to the Pool's limit per person. Entries are open until the start week's last kickoff. A private Pool admits a first join by the password given inline; the host needs none. Each entry is named after the person and is held unpaid until the host marks it paid, except in a free Pool. Answers the new entries and the Pool as a player sees it.\n\nNeeds a key holding: pools:write.\n\nIdempotent: send an Idempotency-Key and a retry with the same input replays the first answer, marked in meta.replayed.","operationId":"join_pool","parameters":[{"example":"cmf3pool0001","in":"path","name":"poolId","required":true,"schema":{"minLength":1,"type":"string"}},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"examples":{"two-entries-in-a-private-pool-password-inline":{"summary":"Two entries in a private Pool, password inline","value":{"entryCount":2,"password":"survive"}}},"schema":{"properties":{"entryCount":{"default":1,"maximum":10,"minimum":1,"type":"integer"},"password":{"type":"string"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"two-entries-in-a-private-pool-password-inline":{"summary":"Two entries in a private Pool, password inline","value":{"data":{"entries":[{"createdAt":"2026-08-20T12:00:00.000Z","eliminatedWeek":null,"id":"cmf3entry0001","isEliminated":false,"name":"Dana 1","paidOutAmount":null,"paidOutAt":null,"paidOutMethod":null,"paidState":"UNPAID","paymentMethod":null,"poolId":"cmf3pool0001","strikesUsed":0,"updatedAt":"2026-08-20T12:00:00.000Z","userId":"cmf3user0002","userProfile":{"displayName":"Dana Reyes","id":"cmf3user0002","image":null}},{"createdAt":"2026-08-20T12:00:00.000Z","eliminatedWeek":null,"id":"cmf3entry0002","isEliminated":false,"name":"Dana 2","paidOutAmount":null,"paidOutAt":null,"paidOutMethod":null,"paidState":"UNPAID","paymentMethod":null,"poolId":"cmf3pool0001","strikesUsed":0,"updatedAt":"2026-08-20T12:00:00.000Z","userId":"cmf3user0002","userProfile":{"displayName":"Dana Reyes","id":"cmf3user0002","image":null}}],"pool":{"cashAppHandle":null,"completedAt":null,"createdAt":"2026-08-15T12:00:00.000Z","creditsCharged":3,"description":"Winner takes the pot.","endReason":null,"endWeek":18,"entryPrice":20,"format":"SURVIVOR","hasPassword":true,"host":{"displayName":"Sam Ellis","id":"cmf3user0001","image":null},"hostContactEmail":"sam@example.com","hostId":"cmf3user0001","id":"cmf3pool0001","isPublic":false,"league":"NFL","maxEntriesPerUser":5,"missedPickRule":"STRIKE","name":"Office Survivor","paidState":"PAID","paymentInstructions":"Venmo preferred. Put your entry name in the note.","payoutPercentages":[100],"paypalHandle":null,"seasonYear":"2026","shortCode":"SURV26","slug":"office-survivor","sport":"FOOTBALL","startWeek":1,"state":"OPEN","strikes":1,"tieRule":"STRIKE","totalPayout":100,"updatedAt":"2026-09-10T12:00:00.000Z","venmoHandle":null,"winnerMemberIds":[]}},"ok":true}}},"schema":{"properties":{"data":{"additionalProperties":false,"properties":{"entries":{"items":{"$ref":"#/components/schemas/PoolMember"},"type":"array"},"pool":{"$ref":"#/components/schemas/Pool"}},"required":["entries","pool"],"type":"object"},"meta":{"description":"Present only when this answer is a replay of an earlier call with the same key","properties":{"replayed":{"const":true}},"type":"object"},"ok":{"const":true}},"required":["ok","data"],"type":"object"}}},"description":"Done","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["VALIDATION_ERROR"]}},"type":"object"}},"type":"object"}]}}},"description":"VALIDATION_ERROR: Something in the request is not right.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["UNAUTHENTICATED"]}},"type":"object"}},"type":"object"}]}}},"description":"UNAUTHENTICATED: You need to sign in for that.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["FORBIDDEN","PASSWORD_REQUIRED","LEAGUE_NOT_AVAILABLE"]}},"type":"object"}},"type":"object"}]}}},"description":"FORBIDDEN: You are not allowed to do that. PASSWORD_REQUIRED: This game needs a password. LEAGUE_NOT_AVAILABLE: That league is not available right now.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["NOT_FOUND"]}},"type":"object"}},"type":"object"}]}}},"description":"NOT_FOUND: We could not find that.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["RESOURCE_CONFLICT","ENTRY_LIMIT_REACHED","POOL_NOT_OPEN","IDEMPOTENCY_KEY_REUSED"]}},"type":"object"}},"type":"object"}]}}},"description":"RESOURCE_CONFLICT: That request is still in progress. Try again shortly. ENTRY_LIMIT_REACHED: You have reached the entry limit for this Pool. POOL_NOT_OPEN: This Pool is not open for entries. IDEMPOTENCY_KEY_REUSED: That idempotency key was already used with a different request.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"429":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["RATE_LIMITED"]}},"type":"object"}},"type":"object"}]}}},"description":"RATE_LIMITED: Too many requests. Slow down and try again.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["INTERNAL_ERROR"]}},"type":"object"}},"type":"object"}]}}},"description":"INTERNAL_ERROR: That didn't go through on our end. Try again in a minute.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}}},"security":[{"ApiKeyAuth":[]}],"summary":"Join a Pool","tags":["pools"],"x-auth":"user","x-idempotent":true,"x-scopes":["pools:write"]}},"/api/v1/pools/{poolId}/entries/{entryId}/payment":{"patch":{"description":"Records whether an entry's fee has been paid. Paid settles an entry that is still owed or pending; unpaid takes a paid mark back, the undo for a slip. Each mark lands in the Pool's Host history. Answers the entry as it now stands and the history rows written, none when the status already stood. Host only.\n\nNeeds a key holding: members:write.\n\nIdempotent: send an Idempotency-Key and a retry with the same input replays the first answer, marked in meta.replayed.\n\nRecorded in the game's Host history.","operationId":"update_pool_entry_payment","parameters":[{"example":"cmf3pool0001","in":"path","name":"poolId","required":true,"schema":{"minLength":1,"type":"string"}},{"example":"cmf3entry0001","in":"path","name":"entryId","required":true,"schema":{"minLength":1,"type":"string"}},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"examples":{"the-host-records-dana-s-entry-as-paid":{"summary":"The host records Dana's entry as paid","value":{"status":"paid"}}},"schema":{"properties":{"status":{"enum":["paid","unpaid"],"type":"string"}},"required":["status"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"the-host-records-dana-s-entry-as-paid":{"summary":"The host records Dana's entry as paid","value":{"data":{"actions":[{"action":"PAYMENT_MARK_PAID","createdAt":"2026-09-09T15:00:00.000Z","id":"cmf3action0001","memberName":"Dana 1","note":"Marked 1 entry paid","reason":null,"strikeDelta":null}],"entry":{"createdAt":"2026-08-20T12:00:00.000Z","eliminatedWeek":null,"id":"cmf3entry0001","isEliminated":false,"name":"Dana 1","paidOutAmount":null,"paidOutAt":null,"paidOutMethod":null,"paidState":"PAID","paymentMethod":"VENMO","poolId":"cmf3pool0001","strikesUsed":0,"updatedAt":"2026-08-20T12:00:00.000Z","userId":"cmf3user0002","userProfile":{"cashAppHandle":null,"displayName":"Dana Reyes","email":"dana@example.com","id":"cmf3user0002","image":null,"paypalHandle":null,"venmoHandle":"dana-reyes"}},"status":"paid"},"ok":true}}},"schema":{"properties":{"data":{"additionalProperties":false,"properties":{"actions":{"items":{"$ref":"#/components/schemas/PoolHostAction"},"type":"array"},"entry":{"$ref":"#/components/schemas/HostViewPoolMember"},"status":{"enum":["paid","unpaid"],"type":"string"}},"required":["entry","status","actions"],"type":"object"},"meta":{"description":"Present only when this answer is a replay of an earlier call with the same key","properties":{"replayed":{"const":true}},"type":"object"},"ok":{"const":true}},"required":["ok","data"],"type":"object"}}},"description":"Done","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["VALIDATION_ERROR"]}},"type":"object"}},"type":"object"}]}}},"description":"VALIDATION_ERROR: Something in the request is not right.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["UNAUTHENTICATED"]}},"type":"object"}},"type":"object"}]}}},"description":"UNAUTHENTICATED: You need to sign in for that.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["FORBIDDEN","LEAGUE_NOT_AVAILABLE"]}},"type":"object"}},"type":"object"}]}}},"description":"FORBIDDEN: You are not allowed to do that. LEAGUE_NOT_AVAILABLE: That league is not available right now.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["NOT_FOUND"]}},"type":"object"}},"type":"object"}]}}},"description":"NOT_FOUND: We could not find that.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["RESOURCE_CONFLICT","IDEMPOTENCY_KEY_REUSED"]}},"type":"object"}},"type":"object"}]}}},"description":"RESOURCE_CONFLICT: That request is still in progress. Try again shortly. IDEMPOTENCY_KEY_REUSED: That idempotency key was already used with a different request.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"429":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["RATE_LIMITED"]}},"type":"object"}},"type":"object"}]}}},"description":"RATE_LIMITED: Too many requests. Slow down and try again.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["INTERNAL_ERROR"]}},"type":"object"}},"type":"object"}]}}},"description":"INTERNAL_ERROR: That didn't go through on our end. Try again in a minute.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}}},"security":[{"ApiKeyAuth":[]}],"summary":"Record an entry as paid or unpaid","tags":["members"],"x-auth":"user","x-idempotent":true,"x-scopes":["members:write"]}},"/api/v1/pools/{poolId}/entries/{entryId}/pick":{"delete":{"description":"Takes back one entry's pending pick for a week, so the week needs a pick again. A pick whose game has kicked off is locked, and a graded pick is final. The person who holds the entry clears its picks; the host may clear any entry's, and that is recorded with the reason given.\n\nNeeds a key holding: pools:write.\n\nIdempotent: send an Idempotency-Key and a retry with the same input replays the first answer, marked in meta.replayed.\n\nRecorded in the game's Host history.","operationId":"clear_pool_pick","parameters":[{"example":"cmf3pool0001","in":"path","name":"poolId","required":true,"schema":{"minLength":1,"type":"string"}},{"example":"cmf3entry0001","in":"path","name":"entryId","required":true,"schema":{"minLength":1,"type":"string"}},{"example":1,"in":"query","name":"week","required":true,"schema":{"maximum":9007199254740991,"minimum":1,"type":"integer"}},{"example":"Asked to clear it","in":"query","name":"reason","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"content":{"application/json":{"examples":{"the-host-clears-a-player-s-week-1-pick":{"summary":"The host clears a player's Week 1 pick","value":{"data":{"action":{"action":"PICK_OVERRIDE","createdAt":"2026-09-08T15:00:00.000Z","id":"cmf3action0001","memberName":"Dana 1","note":"Cleared Week 1 pick (was Chiefs)","reason":"Asked to clear it","strikeDelta":null},"cleared":true},"ok":true}}},"schema":{"properties":{"data":{"additionalProperties":false,"properties":{"action":{"anyOf":[{"$ref":"#/components/schemas/PoolHostAction"},{"type":"null"}]},"cleared":{"const":true,"type":"boolean"}},"required":["cleared","action"],"type":"object"},"meta":{"description":"Present only when this answer is a replay of an earlier call with the same key","properties":{"replayed":{"const":true}},"type":"object"},"ok":{"const":true}},"required":["ok","data"],"type":"object"}}},"description":"Done","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["VALIDATION_ERROR"]}},"type":"object"}},"type":"object"}]}}},"description":"VALIDATION_ERROR: Something in the request is not right.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["UNAUTHENTICATED"]}},"type":"object"}},"type":"object"}]}}},"description":"UNAUTHENTICATED: You need to sign in for that.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["FORBIDDEN","LEAGUE_NOT_AVAILABLE"]}},"type":"object"}},"type":"object"}]}}},"description":"FORBIDDEN: You are not allowed to do that. LEAGUE_NOT_AVAILABLE: That league is not available right now.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["NOT_FOUND"]}},"type":"object"}},"type":"object"}]}}},"description":"NOT_FOUND: We could not find that.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["RESOURCE_CONFLICT","PICK_LOCKED","IDEMPOTENCY_KEY_REUSED"]}},"type":"object"}},"type":"object"}]}}},"description":"RESOURCE_CONFLICT: That request is still in progress. Try again shortly. PICK_LOCKED: That pick is locked. IDEMPOTENCY_KEY_REUSED: That idempotency key was already used with a different request.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"429":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["RATE_LIMITED"]}},"type":"object"}},"type":"object"}]}}},"description":"RATE_LIMITED: Too many requests. Slow down and try again.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["INTERNAL_ERROR"]}},"type":"object"}},"type":"object"}]}}},"description":"INTERNAL_ERROR: That didn't go through on our end. Try again in a minute.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}}},"security":[{"ApiKeyAuth":[]}],"summary":"Clear an entry's pick for a week","tags":["pools"],"x-auth":"user","x-idempotent":true,"x-scopes":["pools:write"]},"put":{"description":"Sets or changes one entry's pick for a week: a team in a game that week that has not kicked off. An entry never picks the same team twice in a season, a pick locks at its game's kickoff, and a graded pick is final. The person who holds the entry sets its picks; the host may set any entry's unlocked pick, and that override is recorded with the reason given. Answers the pick as saved and, for a host override, the audit row.\n\nNeeds a key holding: pools:write.\n\nIdempotent: send an Idempotency-Key and a retry with the same input replays the first answer, marked in meta.replayed.\n\nRecorded in the game's Host history.","operationId":"set_pool_pick","parameters":[{"example":"cmf3pool0001","in":"path","name":"poolId","required":true,"schema":{"minLength":1,"type":"string"}},{"example":"cmf3entry0001","in":"path","name":"entryId","required":true,"schema":{"minLength":1,"type":"string"}},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"examples":{"a-player-picks-the-chiefs-in-week-1":{"summary":"A player picks the Chiefs in Week 1","value":{"gameId":"cmf3game0001","teamId":"cmf3team0001","week":1}},"the-host-sets-a-player-s-pick-for-them-with-a-reason":{"summary":"The host sets a player's pick for them, with a reason","value":{"gameId":"cmf3game0001","reason":"Asked in the group chat","teamId":"cmf3team0001","week":1}}},"schema":{"properties":{"gameId":{"minLength":1,"type":"string"},"reason":{"type":"string"},"teamId":{"minLength":1,"type":"string"},"week":{"maximum":9007199254740991,"minimum":1,"type":"integer"}},"required":["week","gameId","teamId"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"a-player-picks-the-chiefs-in-week-1":{"summary":"A player picks the Chiefs in Week 1","value":{"data":{"action":null,"pick":{"createdAt":"2026-09-08T15:00:00.000Z","gameId":"cmf3game0001","id":"cmf3pick0001","isAutoPick":false,"poolId":"cmf3pool0001","poolMemberId":"cmf3entry0001","result":"PENDING","team":{"abbreviation":"KC","createdAt":"2026-05-01T12:00:00.000Z","displayName":"Kansas City Chiefs","id":"cmf3team0001","league":"NFL","location":"Kansas City","logoUrl":"https://a.espncdn.com/i/teamlogos/nfl/500/kc.png","logoUrlOverride":null,"primaryColor":"#E31837","primaryColorOverride":null,"secondaryColor":"#FFB81C","secondaryColorOverride":null,"secondaryTextColor":null,"secondaryTextColorOverride":null,"shortDisplayName":"Chiefs","sport":"FOOTBALL","tertiaryColor":null,"tertiaryColorOverride":null,"textColor":"#FFFFFF","textColorOverride":null,"updatedAt":"2026-05-01T12:00:00.000Z"},"teamId":"cmf3team0001","updatedAt":"2026-09-08T15:00:00.000Z","week":1}},"ok":true}},"the-host-sets-a-player-s-pick-for-them-with-a-reason":{"summary":"The host sets a player's pick for them, with a reason","value":{"data":{"action":{"action":"PICK_OVERRIDE","createdAt":"2026-09-08T15:00:00.000Z","id":"cmf3action0001","memberName":"Dana 1","note":"Set Week 1 pick to Chiefs","reason":"Asked in the group chat","strikeDelta":null},"pick":{"createdAt":"2026-09-08T15:00:00.000Z","gameId":"cmf3game0001","id":"cmf3pick0001","isAutoPick":false,"poolId":"cmf3pool0001","poolMemberId":"cmf3entry0001","result":"PENDING","team":{"abbreviation":"KC","createdAt":"2026-05-01T12:00:00.000Z","displayName":"Kansas City Chiefs","id":"cmf3team0001","league":"NFL","location":"Kansas City","logoUrl":"https://a.espncdn.com/i/teamlogos/nfl/500/kc.png","logoUrlOverride":null,"primaryColor":"#E31837","primaryColorOverride":null,"secondaryColor":"#FFB81C","secondaryColorOverride":null,"secondaryTextColor":null,"secondaryTextColorOverride":null,"shortDisplayName":"Chiefs","sport":"FOOTBALL","tertiaryColor":null,"tertiaryColorOverride":null,"textColor":"#FFFFFF","textColorOverride":null,"updatedAt":"2026-05-01T12:00:00.000Z"},"teamId":"cmf3team0001","updatedAt":"2026-09-08T15:00:00.000Z","week":1}},"ok":true}}},"schema":{"properties":{"data":{"additionalProperties":false,"properties":{"action":{"anyOf":[{"$ref":"#/components/schemas/PoolHostAction"},{"type":"null"}]},"pick":{"$ref":"#/components/schemas/PoolPick"}},"required":["pick","action"],"type":"object"},"meta":{"description":"Present only when this answer is a replay of an earlier call with the same key","properties":{"replayed":{"const":true}},"type":"object"},"ok":{"const":true}},"required":["ok","data"],"type":"object"}}},"description":"Done","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["VALIDATION_ERROR"]}},"type":"object"}},"type":"object"}]}}},"description":"VALIDATION_ERROR: Something in the request is not right.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["UNAUTHENTICATED"]}},"type":"object"}},"type":"object"}]}}},"description":"UNAUTHENTICATED: You need to sign in for that.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["FORBIDDEN","LEAGUE_NOT_AVAILABLE"]}},"type":"object"}},"type":"object"}]}}},"description":"FORBIDDEN: You are not allowed to do that. LEAGUE_NOT_AVAILABLE: That league is not available right now.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["NOT_FOUND"]}},"type":"object"}},"type":"object"}]}}},"description":"NOT_FOUND: We could not find that.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["GAME_NOT_ELIGIBLE","RESOURCE_CONFLICT","PICK_LOCKED","IDEMPOTENCY_KEY_REUSED"]}},"type":"object"}},"type":"object"}]}}},"description":"GAME_NOT_ELIGIBLE: That game is not open for this. RESOURCE_CONFLICT: That request is still in progress. Try again shortly. PICK_LOCKED: That pick is locked. IDEMPOTENCY_KEY_REUSED: That idempotency key was already used with a different request.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"429":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["RATE_LIMITED"]}},"type":"object"}},"type":"object"}]}}},"description":"RATE_LIMITED: Too many requests. Slow down and try again.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["INTERNAL_ERROR"]}},"type":"object"}},"type":"object"}]}}},"description":"INTERNAL_ERROR: That didn't go through on our end. Try again in a minute.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}}},"security":[{"ApiKeyAuth":[]}],"summary":"Set an entry's pick for a week","tags":["pools"],"x-auth":"user","x-idempotent":true,"x-scopes":["pools:write"]}},"/api/v1/pools/{poolId}/publish":{"post":{"description":"Publishes a draft Pool, spending its Hosting Credits and opening it to entries. When the host does not hold enough credits the refusal says how many are needed and where a person can buy more; nothing is charged. Host only, and once per Pool.\n\nNeeds a key holding: pools:write.\n\nIdempotent: send an Idempotency-Key and a retry with the same input replays the first answer, marked in meta.replayed.\n\nRecorded in the game's Host history.","operationId":"publish_pool","parameters":[{"example":"cmf3pool0001","in":"path","name":"poolId","required":true,"schema":{"minLength":1,"type":"string"}},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"content":{"application/json":{"examples":{"publishing-with-five-credits-in-hand":{"summary":"Publishing with five credits in hand","value":{"data":{"creditsRemaining":2,"manageUrl":"https://sundaysquares.com/pools/office-survivor?tab=manage","pool":{"cashAppHandle":null,"completedAt":null,"createdAt":"2026-08-15T12:00:00.000Z","creditsCharged":3,"description":"Winner takes the pot.","endReason":null,"endWeek":18,"entryPrice":20,"format":"SURVIVOR","hasPassword":true,"host":{"displayName":"Sam Ellis","id":"cmf3user0001","image":null},"hostContactEmail":null,"hostId":"cmf3user0001","id":"cmf3pool0001","isPublic":false,"league":"NFL","maxEntriesPerUser":5,"missedPickRule":"STRIKE","name":"Office Survivor","paidState":"PAID","paymentInstructions":"Venmo preferred. Put your entry name in the note.","payoutPercentages":[100],"paypalHandle":null,"seasonYear":"2026","shortCode":"SURV26","slug":"office-survivor","sport":"FOOTBALL","startWeek":1,"state":"OPEN","strikes":1,"tieRule":"STRIKE","totalPayout":100,"updatedAt":"2026-09-10T12:00:00.000Z","venmoHandle":"sam-ellis","winnerMemberIds":[]},"publicUrl":"https://sundaysquares.com/pools/office-survivor","transactionId":"cmf3txn0001"},"ok":true}}},"schema":{"properties":{"data":{"additionalProperties":false,"properties":{"creditsRemaining":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"manageUrl":{"format":"uri","type":"string"},"pool":{"$ref":"#/components/schemas/Pool"},"publicUrl":{"format":"uri","type":"string"},"transactionId":{"type":"string"}},"required":["pool","publicUrl","manageUrl","creditsRemaining","transactionId"],"type":"object"},"meta":{"description":"Present only when this answer is a replay of an earlier call with the same key","properties":{"replayed":{"const":true}},"type":"object"},"ok":{"const":true}},"required":["ok","data"],"type":"object"}}},"description":"Done","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["VALIDATION_ERROR"]}},"type":"object"}},"type":"object"}]}}},"description":"VALIDATION_ERROR: Something in the request is not right.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["UNAUTHENTICATED"]}},"type":"object"}},"type":"object"}]}}},"description":"UNAUTHENTICATED: You need to sign in for that.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"402":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["HOSTING_CREDITS_REQUIRED"]}},"type":"object"}},"type":"object"}]}}},"description":"HOSTING_CREDITS_REQUIRED: You need more Hosting Credits for that.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["FORBIDDEN","LEAGUE_NOT_AVAILABLE"]}},"type":"object"}},"type":"object"}]}}},"description":"FORBIDDEN: You are not allowed to do that. LEAGUE_NOT_AVAILABLE: That league is not available right now.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["NOT_FOUND"]}},"type":"object"}},"type":"object"}]}}},"description":"NOT_FOUND: We could not find that.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["RESOURCE_CONFLICT","ALREADY_PUBLISHED","NOT_PUBLISHABLE","IDEMPOTENCY_KEY_REUSED"]}},"type":"object"}},"type":"object"}]}}},"description":"RESOURCE_CONFLICT: That request is still in progress. Try again shortly. ALREADY_PUBLISHED: This game is already published. NOT_PUBLISHABLE: This game is not ready to publish. IDEMPOTENCY_KEY_REUSED: That idempotency key was already used with a different request.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"429":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["RATE_LIMITED"]}},"type":"object"}},"type":"object"}]}}},"description":"RATE_LIMITED: Too many requests. Slow down and try again.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["INTERNAL_ERROR"]}},"type":"object"}},"type":"object"}]}}},"description":"INTERNAL_ERROR: That didn't go through on our end. Try again in a minute.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}}},"security":[{"ApiKeyAuth":[]}],"summary":"Publish a Pool","tags":["pools"],"x-auth":"user","x-idempotent":true,"x-scopes":["pools:write"]}},"/api/v1/squares":{"post":{"description":"Creates a draft Squares board for a real sporting event that has not kicked off. Drafts cost nothing and are visible only to their host; publishing spends one Hosting Credit and opens the grid to players. The payout periods' percentages, reverse percentages included, must add up to 100. A password makes the Square private.\n\nNeeds a key holding: squares:write.\n\nIdempotent: send an Idempotency-Key and a retry with the same input replays the first answer, marked in meta.replayed.","operationId":"create_square","parameters":[{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"examples":{"a-10-board-on-an-nfl-game-paying-out-every-quarter":{"summary":"A $10 board on an NFL game, paying out every quarter","value":{"boxPrice":10,"gameId":"cmf3game0001","league":"NFL","name":"Sunday Night Squares","payoutPeriods":[{"percentage":20,"period":1},{"percentage":20,"period":2},{"percentage":20,"period":3},{"percentage":40,"period":4}],"size":"TEN_BY_TEN","sport":"FOOTBALL","totalPayout":100,"venmoHandle":"sam-ellis"}}},"schema":{"properties":{"autoCloseOnFill":{"default":true,"type":"boolean"},"boxPrice":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"cashAppHandle":{"type":["string","null"]},"description":{"type":["string","null"]},"gameId":{"type":"string"},"isPublic":{"type":"boolean"},"league":{"minLength":1,"type":"string"},"name":{"minLength":1,"type":"string"},"openBoxBonusEnabled":{"default":false,"type":"boolean"},"password":{"type":["string","null"]},"paymentInstructions":{"type":["string","null"]},"payoutPeriods":{"items":{"properties":{"percentage":{"maximum":100,"minimum":0,"type":"number"},"period":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"reversePercentage":{"anyOf":[{"maximum":100,"type":"number"},{"type":"null"}]}},"required":["period","percentage"],"type":"object"},"type":"array"},"paypalHandle":{"type":["string","null"]},"size":{"enum":["TEN_BY_TEN","FIVE_BY_FIVE"],"type":"string"},"slug":{"type":["string","null"]},"sport":{"minLength":1,"type":"string"},"startTime":{"format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","type":"string"},"totalPayout":{"maximum":100,"minimum":0,"type":"number"},"venmoHandle":{"type":["string","null"]}},"required":["size","boxPrice","totalPayout","payoutPeriods","name","league","sport"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"a-10-board-on-an-nfl-game-paying-out-every-quarter":{"summary":"A $10 board on an NFL game, paying out every quarter","value":{"data":{"manageUrl":"https://sundaysquares.com/squares/cmf3square0001?tab=manage","publicUrl":"https://sundaysquares.com/squares/cmf3square0001","square":{"autoCloseOnFill":true,"boxPrice":10,"cashAppHandle":null,"createdAt":"2026-09-01T15:00:00.000Z","description":null,"game":{"areTeamsConfirmed":true,"awayTeam":{"abbreviation":"BUF","createdAt":"2026-05-01T12:00:00.000Z","displayName":"Buffalo Bills","id":"cmf3team0002","league":"NFL","location":"Buffalo","logoUrl":"https://a.espncdn.com/i/teamlogos/nfl/500/buf.png","logoUrlOverride":null,"primaryColor":"#00338D","primaryColorOverride":null,"secondaryColor":"#C60C30","secondaryColorOverride":null,"secondaryTextColor":null,"secondaryTextColorOverride":null,"shortDisplayName":"Bills","sport":"FOOTBALL","tertiaryColor":null,"tertiaryColorOverride":null,"textColor":"#FFFFFF","textColorOverride":null,"updatedAt":"2026-05-01T12:00:00.000Z"},"awayTeamId":"cmf3team0002","createdAt":"2026-05-01T12:00:00.000Z","displayName":null,"gameClock":null,"gameDate":"2026-09-13T17:00:00.000Z","gameDayId":null,"homeTeam":{"abbreviation":"KC","createdAt":"2026-05-01T12:00:00.000Z","displayName":"Kansas City Chiefs","id":"cmf3team0001","league":"NFL","location":"Kansas City","logoUrl":"https://a.espncdn.com/i/teamlogos/nfl/500/kc.png","logoUrlOverride":null,"primaryColor":"#E31837","primaryColorOverride":null,"secondaryColor":"#FFB81C","secondaryColorOverride":null,"secondaryTextColor":null,"secondaryTextColorOverride":null,"shortDisplayName":"Chiefs","sport":"FOOTBALL","tertiaryColor":null,"tertiaryColorOverride":null,"textColor":"#FFFFFF","textColorOverride":null,"updatedAt":"2026-05-01T12:00:00.000Z"},"homeTeamId":"cmf3team0001","id":"cmf3game0001","isCompleted":false,"league":"NFL","metadata":null,"overUnder":47.5,"periods":[],"seasonType":"REGULAR_SEASON","seasonYear":"2026","sport":"FOOTBALL","spread":-3.5,"spreadDetails":"KC -3.5","state":"SCHEDULED","tournament":null,"tournamentId":null,"updatedAt":"2026-09-10T12:00:00.000Z","venue":"Arrowhead Stadium","week":"1","weekLabel":"Week 1"},"gameId":"cmf3game0001","hasPassword":false,"host":{"displayName":"Sam Ellis","id":"cmf3user0001","image":null},"hostContactEmail":null,"hostId":"cmf3user0001","id":"cmf3square0001","isPublic":true,"league":"NFL","name":"Sunday Night Squares","openBoxBonus":null,"openBoxBonusEnabled":false,"paidState":"UNPAID","paymentInstructions":null,"payoutPeriods":[{"awayValues":[],"homeValues":[],"id":"cmf3period0001","isOvertime":false,"percentage":20,"period":1,"randomGeneratedAt":null,"randomObject":null,"randomSignature":null,"reversePercentage":null,"squareId":"cmf3square0001"},{"awayValues":[],"homeValues":[],"id":"cmf3period0002","isOvertime":false,"percentage":20,"period":2,"randomGeneratedAt":null,"randomObject":null,"randomSignature":null,"reversePercentage":null,"squareId":"cmf3square0001"},{"awayValues":[],"homeValues":[],"id":"cmf3period0003","isOvertime":false,"percentage":20,"period":3,"randomGeneratedAt":null,"randomObject":null,"randomSignature":null,"reversePercentage":null,"squareId":"cmf3square0001"},{"awayValues":[],"homeValues":[],"id":"cmf3period0004","isOvertime":false,"percentage":40,"period":4,"randomGeneratedAt":null,"randomObject":null,"randomSignature":null,"reversePercentage":null,"squareId":"cmf3square0001"}],"paypalHandle":null,"rotateBoxes":false,"selectionState":"OPEN","shortCode":"SUNDAY","size":"TEN_BY_TEN","slug":"sunday-night-squares","sport":"FOOTBALL","startTime":"2026-09-13T17:00:00.000Z","totalPayout":100,"updatedAt":"2026-09-01T15:00:00.000Z","venmoHandle":"sam-ellis"}},"ok":true}}},"schema":{"properties":{"data":{"additionalProperties":false,"properties":{"manageUrl":{"format":"uri","type":"string"},"publicUrl":{"format":"uri","type":"string"},"square":{"$ref":"#/components/schemas/Square"}},"required":["square","publicUrl","manageUrl"],"type":"object"},"meta":{"description":"Present only when this answer is a replay of an earlier call with the same key","properties":{"replayed":{"const":true}},"type":"object"},"ok":{"const":true}},"required":["ok","data"],"type":"object"}}},"description":"Done","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["VALIDATION_ERROR"]}},"type":"object"}},"type":"object"}]}}},"description":"VALIDATION_ERROR: Something in the request is not right.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["UNAUTHENTICATED"]}},"type":"object"}},"type":"object"}]}}},"description":"UNAUTHENTICATED: You need to sign in for that.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["FORBIDDEN"]}},"type":"object"}},"type":"object"}]}}},"description":"FORBIDDEN: You are not allowed to do that.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["GAME_NOT_FOUND"]}},"type":"object"}},"type":"object"}]}}},"description":"GAME_NOT_FOUND: We could not find that game.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["GAME_NOT_ELIGIBLE","RESOURCE_CONFLICT","IDEMPOTENCY_KEY_REUSED"]}},"type":"object"}},"type":"object"}]}}},"description":"GAME_NOT_ELIGIBLE: That game is not open for this. RESOURCE_CONFLICT: That request is still in progress. Try again shortly. IDEMPOTENCY_KEY_REUSED: That idempotency key was already used with a different request.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"429":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["RATE_LIMITED"]}},"type":"object"}},"type":"object"}]}}},"description":"RATE_LIMITED: Too many requests. Slow down and try again.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["INTERNAL_ERROR"]}},"type":"object"}},"type":"object"}]}}},"description":"INTERNAL_ERROR: That didn't go through on our end. Try again in a minute.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}}},"security":[{"ApiKeyAuth":[]}],"summary":"Create a draft Square","tags":["squares"],"x-auth":"user","x-idempotent":true,"x-scopes":["squares:write"]}},"/api/v1/squares/{squareId}":{"delete":{"description":"Deletes an unpublished Square, its grid included. A published Square cannot be deleted, because it can hold paid boxes. Host only.\n\nNeeds a key holding: squares:write.","operationId":"delete_square","parameters":[{"example":"cmf3square0001","in":"path","name":"squareId","required":true,"schema":{"minLength":1,"type":"string"}},{"$ref":"#/components/parameters/RequestId"}],"responses":{"200":{"content":{"application/json":{"examples":{"deleting-a-draft":{"summary":"Deleting a draft","value":{"data":{"deleted":true},"ok":true}}},"schema":{"properties":{"data":{"additionalProperties":false,"properties":{"deleted":{"const":true,"type":"boolean"}},"required":["deleted"],"type":"object"},"ok":{"const":true}},"required":["ok","data"],"type":"object"}}},"description":"Done","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["VALIDATION_ERROR"]}},"type":"object"}},"type":"object"}]}}},"description":"VALIDATION_ERROR: Something in the request is not right.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["UNAUTHENTICATED"]}},"type":"object"}},"type":"object"}]}}},"description":"UNAUTHENTICATED: You need to sign in for that.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["FORBIDDEN"]}},"type":"object"}},"type":"object"}]}}},"description":"FORBIDDEN: You are not allowed to do that.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["NOT_FOUND"]}},"type":"object"}},"type":"object"}]}}},"description":"NOT_FOUND: We could not find that.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["RESOURCE_CONFLICT"]}},"type":"object"}},"type":"object"}]}}},"description":"RESOURCE_CONFLICT: That request is still in progress. Try again shortly.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"429":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["RATE_LIMITED"]}},"type":"object"}},"type":"object"}]}}},"description":"RATE_LIMITED: Too many requests. Slow down and try again.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["INTERNAL_ERROR"]}},"type":"object"}},"type":"object"}]}}},"description":"INTERNAL_ERROR: That didn't go through on our end. Try again in a minute.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}}},"security":[{"ApiKeyAuth":[]}],"summary":"Delete a draft Square","tags":["squares"],"x-auth":"user","x-idempotent":false,"x-scopes":["squares:write"]},"get":{"description":"The Square with its grid. A player gets every box, the members holding boxes, and their own membership. Anyone else admitted by the Square being public, or by the password given inline, gets the grid and the settings with nothing sold, which is enough to claim a first box. An unpublished draft answers only to its host.\n\nWorks signed out. A key that is sent must hold: games:read.","operationId":"get_square","parameters":[{"example":"cmf3square0001","in":"path","name":"squareId","required":true,"schema":{"minLength":1,"type":"string"}},{"example":"touchdown","in":"query","name":"password","required":false,"schema":{"type":"string"}},{"$ref":"#/components/parameters/RequestId"}],"responses":{"200":{"content":{"application/json":{"examples":{"a-visitor-admitted-by-a-private-square-s-password":{"summary":"A visitor admitted by a private Square's password","value":{"data":{"boxes":[{"columnIndex":0,"createdAt":"2026-09-01T15:00:00.000Z","id":"cmf3box0001","index":0,"paymentMethod":null,"periods":[],"rowIndex":0,"selectionState":"UNSELECTED","squareId":"cmf3square0001","squareMemberId":null,"updatedAt":"2026-09-01T15:00:00.000Z"},{"columnIndex":1,"createdAt":"2026-09-01T15:00:00.000Z","id":"cmf3box0002","index":1,"paymentMethod":"VENMO","periods":[],"rowIndex":0,"selectionState":"PAID","squareId":"cmf3square0001","squareMemberId":"cmf3member0002","updatedAt":"2026-09-03T18:20:00.000Z"}],"isPasswordRequired":false,"loggedInUserSquareMember":null,"profiles":{},"square":{"autoCloseOnFill":true,"boxPrice":10,"cashAppHandle":null,"createdAt":"2026-09-01T15:00:00.000Z","description":null,"game":{"areTeamsConfirmed":true,"awayTeam":{"abbreviation":"BUF","createdAt":"2026-05-01T12:00:00.000Z","displayName":"Buffalo Bills","id":"cmf3team0002","league":"NFL","location":"Buffalo","logoUrl":"https://a.espncdn.com/i/teamlogos/nfl/500/buf.png","logoUrlOverride":null,"primaryColor":"#00338D","primaryColorOverride":null,"secondaryColor":"#C60C30","secondaryColorOverride":null,"secondaryTextColor":null,"secondaryTextColorOverride":null,"shortDisplayName":"Bills","sport":"FOOTBALL","tertiaryColor":null,"tertiaryColorOverride":null,"textColor":"#FFFFFF","textColorOverride":null,"updatedAt":"2026-05-01T12:00:00.000Z"},"awayTeamId":"cmf3team0002","createdAt":"2026-05-01T12:00:00.000Z","displayName":null,"gameClock":null,"gameDate":"2026-09-13T17:00:00.000Z","gameDayId":null,"homeTeam":{"abbreviation":"KC","createdAt":"2026-05-01T12:00:00.000Z","displayName":"Kansas City Chiefs","id":"cmf3team0001","league":"NFL","location":"Kansas City","logoUrl":"https://a.espncdn.com/i/teamlogos/nfl/500/kc.png","logoUrlOverride":null,"primaryColor":"#E31837","primaryColorOverride":null,"secondaryColor":"#FFB81C","secondaryColorOverride":null,"secondaryTextColor":null,"secondaryTextColorOverride":null,"shortDisplayName":"Chiefs","sport":"FOOTBALL","tertiaryColor":null,"tertiaryColorOverride":null,"textColor":"#FFFFFF","textColorOverride":null,"updatedAt":"2026-05-01T12:00:00.000Z"},"homeTeamId":"cmf3team0001","id":"cmf3game0001","isCompleted":false,"league":"NFL","metadata":null,"overUnder":47.5,"periods":[],"seasonType":"REGULAR_SEASON","seasonYear":"2026","sport":"FOOTBALL","spread":-3.5,"spreadDetails":"KC -3.5","state":"SCHEDULED","tournament":null,"tournamentId":null,"updatedAt":"2026-09-10T12:00:00.000Z","venue":"Arrowhead Stadium","week":"1","weekLabel":"Week 1"},"gameId":"cmf3game0001","hasPassword":true,"host":{"displayName":"Sam Ellis","id":"cmf3user0001","image":null},"hostContactEmail":null,"hostId":"cmf3user0001","id":"cmf3square0001","isPublic":false,"league":"NFL","name":"Sunday Night Squares","openBoxBonus":null,"openBoxBonusEnabled":false,"paidState":"PAID","paymentInstructions":null,"payoutPeriods":[],"paypalHandle":null,"rotateBoxes":false,"selectionState":"OPEN","shortCode":"SUNDAY","size":"TEN_BY_TEN","slug":"sunday-night-squares","sport":"FOOTBALL","startTime":"2026-09-13T17:00:00.000Z","totalPayout":100,"updatedAt":"2026-09-01T15:00:00.000Z","venmoHandle":null}},"ok":true}}},"schema":{"properties":{"data":{"additionalProperties":false,"properties":{"boxes":{"items":{"$ref":"#/components/schemas/Box"},"type":"array"},"isPasswordRequired":{"type":"boolean"},"loggedInUserSquareMember":{"anyOf":[{"$ref":"#/components/schemas/SquareMember"},{"type":"null"}]},"profiles":{"additionalProperties":{"$ref":"#/components/schemas/SquareMember"},"propertyNames":{"type":"string"},"type":"object"},"square":{"$ref":"#/components/schemas/Square"}},"required":["square","boxes","loggedInUserSquareMember","profiles","isPasswordRequired"],"type":"object"},"ok":{"const":true}},"required":["ok","data"],"type":"object"}}},"description":"The answer","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["VALIDATION_ERROR"]}},"type":"object"}},"type":"object"}]}}},"description":"VALIDATION_ERROR: Something in the request is not right.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["UNAUTHENTICATED"]}},"type":"object"}},"type":"object"}]}}},"description":"UNAUTHENTICATED: You need to sign in for that.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["FORBIDDEN","PASSWORD_REQUIRED"]}},"type":"object"}},"type":"object"}]}}},"description":"FORBIDDEN: You are not allowed to do that. PASSWORD_REQUIRED: This game needs a password.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["NOT_FOUND"]}},"type":"object"}},"type":"object"}]}}},"description":"NOT_FOUND: We could not find that.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"429":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["RATE_LIMITED"]}},"type":"object"}},"type":"object"}]}}},"description":"RATE_LIMITED: Too many requests. Slow down and try again.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["INTERNAL_ERROR"]}},"type":"object"}},"type":"object"}]}}},"description":"INTERNAL_ERROR: That didn't go through on our end. Try again in a minute.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}}},"security":[{"ApiKeyAuth":[]},{}],"summary":"Read a Square","tags":["squares"],"x-auth":"optional_user","x-scopes":["games:read"]},"patch":{"description":"Changes a Square's settings. The name, description, payment handles, payment instructions, and password can change at any time; a null password makes the Square public again. The box price, total payout, and payout periods lock once the Square is published, and sending one then is refused by name. Host only.\n\nNeeds a key holding: squares:write.","operationId":"update_square","parameters":[{"example":"cmf3square0001","in":"path","name":"squareId","required":true,"schema":{"minLength":1,"type":"string"}},{"$ref":"#/components/parameters/RequestId"}],"requestBody":{"content":{"application/json":{"examples":{"rename-a-published-square-and-add-a-cash-app-handle":{"summary":"Rename a published Square and add a Cash App handle","value":{"cashAppHandle":"$samellis","name":"SNF Squares"}}},"schema":{"properties":{"boxPrice":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"cashAppHandle":{"type":["string","null"]},"description":{"type":["string","null"]},"name":{"minLength":1,"type":"string"},"password":{"type":["string","null"]},"paymentInstructions":{"type":["string","null"]},"payoutPeriods":{"items":{"properties":{"percentage":{"maximum":100,"minimum":0,"type":"number"},"period":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"reversePercentage":{"anyOf":[{"maximum":100,"type":"number"},{"type":"null"}]}},"required":["period","percentage"],"type":"object"},"type":"array"},"paypalHandle":{"type":["string","null"]},"totalPayout":{"maximum":100,"minimum":0,"type":"number"},"venmoHandle":{"type":["string","null"]}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"rename-a-published-square-and-add-a-cash-app-handle":{"summary":"Rename a published Square and add a Cash App handle","value":{"data":{"manageUrl":"https://sundaysquares.com/squares/cmf3square0001?tab=manage","publicUrl":"https://sundaysquares.com/squares/cmf3square0001","square":{"autoCloseOnFill":true,"boxPrice":10,"cashAppHandle":"samellis","createdAt":"2026-09-01T15:00:00.000Z","description":null,"game":{"areTeamsConfirmed":true,"awayTeam":{"abbreviation":"BUF","createdAt":"2026-05-01T12:00:00.000Z","displayName":"Buffalo Bills","id":"cmf3team0002","league":"NFL","location":"Buffalo","logoUrl":"https://a.espncdn.com/i/teamlogos/nfl/500/buf.png","logoUrlOverride":null,"primaryColor":"#00338D","primaryColorOverride":null,"secondaryColor":"#C60C30","secondaryColorOverride":null,"secondaryTextColor":null,"secondaryTextColorOverride":null,"shortDisplayName":"Bills","sport":"FOOTBALL","tertiaryColor":null,"tertiaryColorOverride":null,"textColor":"#FFFFFF","textColorOverride":null,"updatedAt":"2026-05-01T12:00:00.000Z"},"awayTeamId":"cmf3team0002","createdAt":"2026-05-01T12:00:00.000Z","displayName":null,"gameClock":null,"gameDate":"2026-09-13T17:00:00.000Z","gameDayId":null,"homeTeam":{"abbreviation":"KC","createdAt":"2026-05-01T12:00:00.000Z","displayName":"Kansas City Chiefs","id":"cmf3team0001","league":"NFL","location":"Kansas City","logoUrl":"https://a.espncdn.com/i/teamlogos/nfl/500/kc.png","logoUrlOverride":null,"primaryColor":"#E31837","primaryColorOverride":null,"secondaryColor":"#FFB81C","secondaryColorOverride":null,"secondaryTextColor":null,"secondaryTextColorOverride":null,"shortDisplayName":"Chiefs","sport":"FOOTBALL","tertiaryColor":null,"tertiaryColorOverride":null,"textColor":"#FFFFFF","textColorOverride":null,"updatedAt":"2026-05-01T12:00:00.000Z"},"homeTeamId":"cmf3team0001","id":"cmf3game0001","isCompleted":false,"league":"NFL","metadata":null,"overUnder":47.5,"periods":[],"seasonType":"REGULAR_SEASON","seasonYear":"2026","sport":"FOOTBALL","spread":-3.5,"spreadDetails":"KC -3.5","state":"SCHEDULED","tournament":null,"tournamentId":null,"updatedAt":"2026-09-10T12:00:00.000Z","venue":"Arrowhead Stadium","week":"1","weekLabel":"Week 1"},"gameId":"cmf3game0001","hasPassword":true,"host":{"displayName":"Sam Ellis","id":"cmf3user0001","image":null},"hostContactEmail":null,"hostId":"cmf3user0001","id":"cmf3square0001","isPublic":false,"league":"NFL","name":"SNF Squares","openBoxBonus":null,"openBoxBonusEnabled":false,"paidState":"PAID","paymentInstructions":null,"payoutPeriods":[],"paypalHandle":null,"rotateBoxes":false,"selectionState":"OPEN","shortCode":"SUNDAY","size":"TEN_BY_TEN","slug":"sunday-night-squares","sport":"FOOTBALL","startTime":"2026-09-13T17:00:00.000Z","totalPayout":100,"updatedAt":"2026-09-01T15:00:00.000Z","venmoHandle":null}},"ok":true}}},"schema":{"properties":{"data":{"additionalProperties":false,"properties":{"manageUrl":{"format":"uri","type":"string"},"publicUrl":{"format":"uri","type":"string"},"square":{"$ref":"#/components/schemas/Square"}},"required":["square","publicUrl","manageUrl"],"type":"object"},"ok":{"const":true}},"required":["ok","data"],"type":"object"}}},"description":"Done","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["VALIDATION_ERROR"]}},"type":"object"}},"type":"object"}]}}},"description":"VALIDATION_ERROR: Something in the request is not right.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["UNAUTHENTICATED"]}},"type":"object"}},"type":"object"}]}}},"description":"UNAUTHENTICATED: You need to sign in for that.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["FORBIDDEN"]}},"type":"object"}},"type":"object"}]}}},"description":"FORBIDDEN: You are not allowed to do that.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["NOT_FOUND"]}},"type":"object"}},"type":"object"}]}}},"description":"NOT_FOUND: We could not find that.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["RESOURCE_CONFLICT"]}},"type":"object"}},"type":"object"}]}}},"description":"RESOURCE_CONFLICT: That request is still in progress. Try again shortly.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"429":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["RATE_LIMITED"]}},"type":"object"}},"type":"object"}]}}},"description":"RATE_LIMITED: Too many requests. Slow down and try again.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["INTERNAL_ERROR"]}},"type":"object"}},"type":"object"}]}}},"description":"INTERNAL_ERROR: That didn't go through on our end. Try again in a minute.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}}},"security":[{"ApiKeyAuth":[]}],"summary":"Edit a Square's settings","tags":["squares"],"x-auth":"user","x-idempotent":false,"x-scopes":["squares:write"]}},"/api/v1/squares/{squareId}/boxes/{boxId}/claim":{"post":{"description":"Claims one open box on a published Square for the signed-in person, joining them as a player on their first claim. An unpublished draft takes no claims but its host's. A private Square admits a first claim by the password given inline; players already in it need none. The box is held unpaid until the host marks it paid, or pending the host's confirmation on a free Square. A box someone else holds is refused with its id.\n\nNeeds a key holding: squares:write.\n\nIdempotent: send an Idempotency-Key and a retry with the same input replays the first answer, marked in meta.replayed.","operationId":"claim_square_box","parameters":[{"example":"cmf3square0001","in":"path","name":"squareId","required":true,"schema":{"minLength":1,"type":"string"}},{"example":"cmf3box0001","in":"path","name":"boxId","required":true,"schema":{"minLength":1,"type":"string"}},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"examples":{"a-first-claim-on-a-private-square-password-inline":{"summary":"A first claim on a private Square, password inline","value":{"password":"touchdown"}}},"schema":{"properties":{"password":{"type":"string"}},"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"a-first-claim-on-a-private-square-password-inline":{"summary":"A first claim on a private Square, password inline","value":{"data":{"box":{"columnIndex":0,"createdAt":"2026-09-01T15:00:00.000Z","id":"cmf3box0001","index":0,"paymentMethod":null,"periods":[],"rowIndex":0,"selectionState":"UNPAID","squareId":"cmf3square0001","squareMemberId":"cmf3member0003","updatedAt":"2026-09-01T15:00:00.000Z"},"member":{"createdAt":"2026-09-03T18:20:00.000Z","id":"cmf3member0003","nickname":null,"paidOutAmount":null,"paidOutAt":null,"paidOutMethod":null,"selectedBoxes":[{"columnIndex":0,"createdAt":"2026-09-01T15:00:00.000Z","id":"cmf3box0001","index":0,"paymentMethod":null,"periods":[],"rowIndex":0,"selectionState":"UNPAID","squareId":"cmf3square0001","squareMemberId":"cmf3member0003","updatedAt":"2026-09-01T15:00:00.000Z"}],"squareId":"cmf3square0001","updatedAt":"2026-09-03T18:20:00.000Z","userId":"cmf3user0003","userProfile":{"displayName":"Chris Park","id":"cmf3user0003","image":null}}},"ok":true}}},"schema":{"properties":{"data":{"additionalProperties":false,"properties":{"box":{"$ref":"#/components/schemas/Box"},"member":{"$ref":"#/components/schemas/SquareMember"}},"required":["box","member"],"type":"object"},"meta":{"description":"Present only when this answer is a replay of an earlier call with the same key","properties":{"replayed":{"const":true}},"type":"object"},"ok":{"const":true}},"required":["ok","data"],"type":"object"}}},"description":"Done","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["VALIDATION_ERROR"]}},"type":"object"}},"type":"object"}]}}},"description":"VALIDATION_ERROR: Something in the request is not right.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["UNAUTHENTICATED"]}},"type":"object"}},"type":"object"}]}}},"description":"UNAUTHENTICATED: You need to sign in for that.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["FORBIDDEN","PASSWORD_REQUIRED"]}},"type":"object"}},"type":"object"}]}}},"description":"FORBIDDEN: You are not allowed to do that. PASSWORD_REQUIRED: This game needs a password.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["NOT_FOUND"]}},"type":"object"}},"type":"object"}]}}},"description":"NOT_FOUND: We could not find that.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["RESOURCE_CONFLICT","BOX_UNAVAILABLE","IDEMPOTENCY_KEY_REUSED"]}},"type":"object"}},"type":"object"}]}}},"description":"RESOURCE_CONFLICT: That request is still in progress. Try again shortly. BOX_UNAVAILABLE: That box is taken. Pick another. IDEMPOTENCY_KEY_REUSED: That idempotency key was already used with a different request.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"429":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["RATE_LIMITED"]}},"type":"object"}},"type":"object"}]}}},"description":"RATE_LIMITED: Too many requests. Slow down and try again.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["INTERNAL_ERROR"]}},"type":"object"}},"type":"object"}]}}},"description":"INTERNAL_ERROR: That didn't go through on our end. Try again in a minute.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}}},"security":[{"ApiKeyAuth":[]}],"summary":"Claim a box on a Square","tags":["squares"],"x-auth":"user","x-idempotent":true,"x-scopes":["squares:write"]}},"/api/v1/squares/{squareId}/members":{"get":{"description":"Every person holding a box in a Square, oldest first, with their boxes and each box's paid state, plus the email and payment handles the host settles money with. Host only; nobody else sees contact details.\n\nNeeds a key holding: members:read.","operationId":"list_square_members","parameters":[{"example":"cmf3square0001","in":"path","name":"squareId","required":true,"schema":{"minLength":1,"type":"string"}},{"$ref":"#/components/parameters/RequestId"}],"responses":{"200":{"content":{"application/json":{"examples":{"one-player-holding-a-paid-box":{"summary":"One player holding a paid box","value":{"data":{"members":[{"createdAt":"2026-09-03T18:20:00.000Z","id":"cmf3member0002","nickname":null,"paidOutAmount":null,"paidOutAt":null,"paidOutMethod":null,"selectedBoxes":[{"columnIndex":1,"createdAt":"2026-09-01T15:00:00.000Z","id":"cmf3box0002","index":1,"paymentMethod":"VENMO","periods":[],"rowIndex":0,"selectionState":"PAID","squareId":"cmf3square0001","squareMemberId":"cmf3member0002","updatedAt":"2026-09-03T18:20:00.000Z"}],"squareId":"cmf3square0001","updatedAt":"2026-09-03T18:20:00.000Z","userId":"cmf3user0002","userProfile":{"cashAppHandle":null,"displayName":"Dana Reyes","email":"dana@example.com","id":"cmf3user0002","image":null,"paypalHandle":null,"venmoHandle":"dana-reyes"}}]},"ok":true}}},"schema":{"properties":{"data":{"additionalProperties":false,"properties":{"members":{"items":{"$ref":"#/components/schemas/HostViewSquareMember"},"type":"array"}},"required":["members"],"type":"object"},"ok":{"const":true}},"required":["ok","data"],"type":"object"}}},"description":"The answer","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["VALIDATION_ERROR"]}},"type":"object"}},"type":"object"}]}}},"description":"VALIDATION_ERROR: Something in the request is not right.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["UNAUTHENTICATED"]}},"type":"object"}},"type":"object"}]}}},"description":"UNAUTHENTICATED: You need to sign in for that.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["FORBIDDEN"]}},"type":"object"}},"type":"object"}]}}},"description":"FORBIDDEN: You are not allowed to do that.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["NOT_FOUND"]}},"type":"object"}},"type":"object"}]}}},"description":"NOT_FOUND: We could not find that.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"429":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["RATE_LIMITED"]}},"type":"object"}},"type":"object"}]}}},"description":"RATE_LIMITED: Too many requests. Slow down and try again.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["INTERNAL_ERROR"]}},"type":"object"}},"type":"object"}]}}},"description":"INTERNAL_ERROR: That didn't go through on our end. Try again in a minute.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}}},"security":[{"ApiKeyAuth":[]}],"summary":"List a Square's members","tags":["members"],"x-auth":"user","x-scopes":["members:read"]}},"/api/v1/squares/{squareId}/members/{memberId}/payment":{"patch":{"description":"Records whether a member has paid for their boxes. Paid marks every box they hold that is still owed or pending; unpaid takes a paid mark back, the undo for a slip. The boxes stay theirs either way. Answers the member as they now stand and how many boxes moved, zero when the status already stood. Host only.\n\nNeeds a key holding: members:write.\n\nIdempotent: send an Idempotency-Key and a retry with the same input replays the first answer, marked in meta.replayed.","operationId":"update_square_member_payment","parameters":[{"example":"cmf3square0001","in":"path","name":"squareId","required":true,"schema":{"minLength":1,"type":"string"}},{"example":"cmf3member0002","in":"path","name":"memberId","required":true,"schema":{"minLength":1,"type":"string"}},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"content":{"application/json":{"examples":{"the-host-records-dana-s-box-as-paid":{"summary":"The host records Dana's box as paid","value":{"status":"paid"}}},"schema":{"properties":{"status":{"enum":["paid","unpaid"],"type":"string"}},"required":["status"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"examples":{"the-host-records-dana-s-box-as-paid":{"summary":"The host records Dana's box as paid","value":{"data":{"member":{"createdAt":"2026-09-03T18:20:00.000Z","id":"cmf3member0002","nickname":null,"paidOutAmount":null,"paidOutAt":null,"paidOutMethod":null,"selectedBoxes":[{"columnIndex":1,"createdAt":"2026-09-01T15:00:00.000Z","id":"cmf3box0002","index":1,"paymentMethod":"VENMO","periods":[],"rowIndex":0,"selectionState":"PAID","squareId":"cmf3square0001","squareMemberId":"cmf3member0002","updatedAt":"2026-09-03T18:20:00.000Z"}],"squareId":"cmf3square0001","updatedAt":"2026-09-03T18:20:00.000Z","userId":"cmf3user0002","userProfile":{"cashAppHandle":null,"displayName":"Dana Reyes","email":"dana@example.com","id":"cmf3user0002","image":null,"paypalHandle":null,"venmoHandle":"dana-reyes"}},"status":"paid","updatedBoxCount":1},"ok":true}}},"schema":{"properties":{"data":{"additionalProperties":false,"properties":{"member":{"$ref":"#/components/schemas/HostViewSquareMember"},"status":{"enum":["paid","unpaid"],"type":"string"},"updatedBoxCount":{"maximum":9007199254740991,"minimum":0,"type":"integer"}},"required":["member","status","updatedBoxCount"],"type":"object"},"meta":{"description":"Present only when this answer is a replay of an earlier call with the same key","properties":{"replayed":{"const":true}},"type":"object"},"ok":{"const":true}},"required":["ok","data"],"type":"object"}}},"description":"Done","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["VALIDATION_ERROR"]}},"type":"object"}},"type":"object"}]}}},"description":"VALIDATION_ERROR: Something in the request is not right.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["UNAUTHENTICATED"]}},"type":"object"}},"type":"object"}]}}},"description":"UNAUTHENTICATED: You need to sign in for that.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["FORBIDDEN"]}},"type":"object"}},"type":"object"}]}}},"description":"FORBIDDEN: You are not allowed to do that.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["NOT_FOUND"]}},"type":"object"}},"type":"object"}]}}},"description":"NOT_FOUND: We could not find that.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["RESOURCE_CONFLICT","IDEMPOTENCY_KEY_REUSED"]}},"type":"object"}},"type":"object"}]}}},"description":"RESOURCE_CONFLICT: That request is still in progress. Try again shortly. IDEMPOTENCY_KEY_REUSED: That idempotency key was already used with a different request.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"429":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["RATE_LIMITED"]}},"type":"object"}},"type":"object"}]}}},"description":"RATE_LIMITED: Too many requests. Slow down and try again.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["INTERNAL_ERROR"]}},"type":"object"}},"type":"object"}]}}},"description":"INTERNAL_ERROR: That didn't go through on our end. Try again in a minute.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}}},"security":[{"ApiKeyAuth":[]}],"summary":"Record a member's boxes as paid or unpaid","tags":["members"],"x-auth":"user","x-idempotent":true,"x-scopes":["members:write"]}},"/api/v1/squares/{squareId}/publish":{"post":{"description":"Publishes a draft Square, spending one Hosting Credit and opening the grid to players. When the host does not hold enough credits the refusal says how many are needed and where a person can buy more; nothing is charged. Host only, and once per Square.\n\nNeeds a key holding: squares:write.\n\nIdempotent: send an Idempotency-Key and a retry with the same input replays the first answer, marked in meta.replayed.\n\nRecorded in the game's Host history.","operationId":"publish_square","parameters":[{"example":"cmf3square0001","in":"path","name":"squareId","required":true,"schema":{"minLength":1,"type":"string"}},{"$ref":"#/components/parameters/RequestId"},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"content":{"application/json":{"examples":{"publishing-with-two-credits-in-hand":{"summary":"Publishing with two credits in hand","value":{"data":{"creditsRemaining":1,"manageUrl":"https://sundaysquares.com/squares/cmf3square0001?tab=manage","publicUrl":"https://sundaysquares.com/squares/cmf3square0001","square":{"autoCloseOnFill":true,"boxPrice":10,"cashAppHandle":null,"createdAt":"2026-09-01T15:00:00.000Z","description":null,"game":{"areTeamsConfirmed":true,"awayTeam":{"abbreviation":"BUF","createdAt":"2026-05-01T12:00:00.000Z","displayName":"Buffalo Bills","id":"cmf3team0002","league":"NFL","location":"Buffalo","logoUrl":"https://a.espncdn.com/i/teamlogos/nfl/500/buf.png","logoUrlOverride":null,"primaryColor":"#00338D","primaryColorOverride":null,"secondaryColor":"#C60C30","secondaryColorOverride":null,"secondaryTextColor":null,"secondaryTextColorOverride":null,"shortDisplayName":"Bills","sport":"FOOTBALL","tertiaryColor":null,"tertiaryColorOverride":null,"textColor":"#FFFFFF","textColorOverride":null,"updatedAt":"2026-05-01T12:00:00.000Z"},"awayTeamId":"cmf3team0002","createdAt":"2026-05-01T12:00:00.000Z","displayName":null,"gameClock":null,"gameDate":"2026-09-13T17:00:00.000Z","gameDayId":null,"homeTeam":{"abbreviation":"KC","createdAt":"2026-05-01T12:00:00.000Z","displayName":"Kansas City Chiefs","id":"cmf3team0001","league":"NFL","location":"Kansas City","logoUrl":"https://a.espncdn.com/i/teamlogos/nfl/500/kc.png","logoUrlOverride":null,"primaryColor":"#E31837","primaryColorOverride":null,"secondaryColor":"#FFB81C","secondaryColorOverride":null,"secondaryTextColor":null,"secondaryTextColorOverride":null,"shortDisplayName":"Chiefs","sport":"FOOTBALL","tertiaryColor":null,"tertiaryColorOverride":null,"textColor":"#FFFFFF","textColorOverride":null,"updatedAt":"2026-05-01T12:00:00.000Z"},"homeTeamId":"cmf3team0001","id":"cmf3game0001","isCompleted":false,"league":"NFL","metadata":null,"overUnder":47.5,"periods":[],"seasonType":"REGULAR_SEASON","seasonYear":"2026","sport":"FOOTBALL","spread":-3.5,"spreadDetails":"KC -3.5","state":"SCHEDULED","tournament":null,"tournamentId":null,"updatedAt":"2026-09-10T12:00:00.000Z","venue":"Arrowhead Stadium","week":"1","weekLabel":"Week 1"},"gameId":"cmf3game0001","hasPassword":true,"host":{"displayName":"Sam Ellis","id":"cmf3user0001","image":null},"hostContactEmail":null,"hostId":"cmf3user0001","id":"cmf3square0001","isPublic":false,"league":"NFL","name":"Sunday Night Squares","openBoxBonus":null,"openBoxBonusEnabled":false,"paidState":"PAID","paymentInstructions":null,"payoutPeriods":[],"paypalHandle":null,"rotateBoxes":false,"selectionState":"OPEN","shortCode":"SUNDAY","size":"TEN_BY_TEN","slug":"sunday-night-squares","sport":"FOOTBALL","startTime":"2026-09-13T17:00:00.000Z","totalPayout":100,"updatedAt":"2026-09-01T15:00:00.000Z","venmoHandle":null},"transactionId":"cmf3txn0001"},"ok":true}}},"schema":{"properties":{"data":{"additionalProperties":false,"properties":{"creditsRemaining":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"manageUrl":{"format":"uri","type":"string"},"publicUrl":{"format":"uri","type":"string"},"square":{"$ref":"#/components/schemas/Square"},"transactionId":{"type":"string"}},"required":["square","publicUrl","manageUrl","creditsRemaining","transactionId"],"type":"object"},"meta":{"description":"Present only when this answer is a replay of an earlier call with the same key","properties":{"replayed":{"const":true}},"type":"object"},"ok":{"const":true}},"required":["ok","data"],"type":"object"}}},"description":"Done","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["VALIDATION_ERROR"]}},"type":"object"}},"type":"object"}]}}},"description":"VALIDATION_ERROR: Something in the request is not right.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["UNAUTHENTICATED"]}},"type":"object"}},"type":"object"}]}}},"description":"UNAUTHENTICATED: You need to sign in for that.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"402":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["HOSTING_CREDITS_REQUIRED"]}},"type":"object"}},"type":"object"}]}}},"description":"HOSTING_CREDITS_REQUIRED: You need more Hosting Credits for that.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["FORBIDDEN"]}},"type":"object"}},"type":"object"}]}}},"description":"FORBIDDEN: You are not allowed to do that.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["NOT_FOUND"]}},"type":"object"}},"type":"object"}]}}},"description":"NOT_FOUND: We could not find that.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["RESOURCE_CONFLICT","ALREADY_PUBLISHED","NOT_PUBLISHABLE","IDEMPOTENCY_KEY_REUSED"]}},"type":"object"}},"type":"object"}]}}},"description":"RESOURCE_CONFLICT: That request is still in progress. Try again shortly. ALREADY_PUBLISHED: This game is already published. NOT_PUBLISHABLE: This game is not ready to publish. IDEMPOTENCY_KEY_REUSED: That idempotency key was already used with a different request.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"429":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["RATE_LIMITED"]}},"type":"object"}},"type":"object"}]}}},"description":"RATE_LIMITED: Too many requests. Slow down and try again.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/ErrorEnvelope"},{"properties":{"error":{"properties":{"code":{"enum":["INTERNAL_ERROR"]}},"type":"object"}},"type":"object"}]}}},"description":"INTERNAL_ERROR: That didn't go through on our end. Try again in a minute.","headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}}},"security":[{"ApiKeyAuth":[]}],"summary":"Publish a Square","tags":["squares"],"x-auth":"user","x-idempotent":true,"x-scopes":["squares:write"]}}},"servers":[{"url":"https://sundaysquares.com"}],"tags":[{"description":"Sporting events to host on, and the games the caller hosts or plays","name":"games"},{"description":"Squares boards: drafts, publishing, the grid, and claiming boxes","name":"squares"},{"description":"Survivor and Losers Pools: drafts, publishing, entries, and picks","name":"pools"},{"description":"The people in a game and their payments, as the host sees them","name":"members"},{"description":"Hosting Credits: the balance, and starting a purchase","name":"credits"}]}