BOISE IQBY TOTALLY BOISE
TOTALLY BOISE INTEGRATION

Developer API

Use the same versioned endpoints as the web game. All times are Unix milliseconds unless identified as a Boise calendar date.

Authentication

The base path is /api/v1 on the deployed game origin. The browser uses an HttpOnly session. Native clients send Authorization: Bearer <player token> and keep the token in protected device storage. Browser writes accept same-origin JSON. Never embed a platform service credential or an AI key in a mobile build.

Play a guest game

POST /api/v1/auth/guest
{"client":"native"}

POST /api/v1/games
Authorization: Bearer <player token>
Content-Type: application/json

{"mode":"solo","requestId":"<unique request ID>"}

Send the returned game ID with the zero-based round. Repeating the same answer for that player, game, and round returns current state. A conflicting replacement gets HTTP 409. Private game views return HTTP 404 to outsiders.

Synchronization

Poll active live games about every 1.5 seconds. Async games can poll less often. Use the server deadline for countdowns. Only the game view’s history contains answers and points that have unlocked. Poll after a reconnect or submission to recover authoritative state.

Endpoints

OpenAPI 3.1 specification (JSON)

MethodPathBehavior
GET/meRead the current player, account availability, and browser moderator status.
POST/auth/guestCreate a guest. For native clients, send {"client":"native"} to receive a bearer token.
POST/auth/registerCreate a free profile from a verified Netlify Identity sign-in. Send name and city. Browser session required.
POST/auth/tokenIssue a 30-day mobile token for the signed-in account. Use the verified browser session.
POST/auth/revokeRevoke all native tokens for the signed-in player.
POST/auth/logoutInvalidate the current session. Browser sign-out also uses the hosted sign-out route.
GET / POST/profileRead personal stats and games, or update a registered display name and city.
POST/gamesSend mode and a unique requestId. Modes are live, friend, async, solo, and daily. A friend challenge accepts pace live or async.
POST/games/joinJoin a private invitation using its code.
GET/games/{id}Poll the participant-only game view. Use serverNow and deadline for the local clock.
POST/games/{id}/answersSubmit {round, answer}. Round is zero-based. An empty string passes. The first submission locks the round.
POST/games/{id}/nextAdvance a revealed solo or daily round with {round}.
POST/games/{id}/cancelCancel a still-unmatched challenge as its creator.
POST/games/{id}/rematchOffer or accept a rematch with {requestId}. Solo and daily replay as fresh practice.
POST/games/{id}/disputesRequest review of a revealed answer with {round, reason}.
GET/dailyRead the current Boise day and optional sponsor.
GET/leaderboardFilter with period=week|month|all and type=players|cities.
GET / POST/submissionsRead your proposals or submit a sourced question.
GET / POST/adminRead moderation queues or apply question, suggestion, decision or sponsor actions. Authorized moderator browser session required.

Launch configuration

AI equivalence checks require a server-side AI key. Without it, canonical answers and common spellings are scored and uncertain responses enter the human review queue. Live play uses authenticated polling. Public access, domain verification, and native app sign-in handoff are deployment and mobile integration steps.