Skip to content
Tò He Docs
Search
Ctrl
K
Cancel
GitHub
Select theme
Dark
Light
Auto
Menu
Start here
Overview
Vision & scope
Local development
Architecture
Contracts
Guides
Conventions
Decisions (ADR)
Roadmap
Research
Platform API (generated)
Overview
Platform
Runtime configuration for the hub.
Identity
Remove a provider from the account (needs step-up level 2); never the last way in.
A profile's card by its public ID, as this account may find it: never a child of another account.
Allowed avatars and age bands, and how many profiles an account may own.
A proof-of-work to solve before signing up or asking for a password reset, when /api/config says proofOfWork.
Start signing up: a code goes to the email. 202 whether or not the address has an account.
The code from the email creates the account and its first profile, which plays at once.
Sign in; sets the session cookie. An only profile without a PIN plays at once.
A code to set a new password goes to the email, if it has an account. 202 either way.
The code sets a new password; every other session ends.
Sign out this device.
The device session (account, profiles, active profile, parent gate); 204 when signed out.
A code goes to the new email. Needs step-up level 2, or the password with the request.
The code makes the new email the one that signs in; every other session ends.
Set or change the manage PIN (needs step-up level 2); opens profile management.
Set or change the password (needs step-up level 2); every other session ends.
Accept the terms and privacy notice in the version the hub shows.
Delete the account (needs step-up level 2): it stops now, and goes for good after seven days unless someone signs in to it.
Turn the account's telemetry on or off.
The step a sign-in back from a provider waits for, on this browser; 404 when none.
Forget the sign-in waiting on this browser.
The provider vouched for no address: a code goes to this one.
The code proves the address: an account with it is linked at once; otherwise sign-up follows.
A code to the account's address, to prove it before the provider is linked.
The code, or the account's password, links the provider to the account and signs in.
A name and the terms finish signing up with the provider; the first profile plays at once.
Choose who plays on this device. Locks the parent gate.
Back to the profile picker.
The manage PIN opens profile management on this device for 10 minutes (step-up level 1).
Lock profile management again.
The password opens account security, and profile management, for 10 minutes (level 2).
A code to the account's email, for stepping up without the password.
The code opens account security, and profile management, for 10 minutes (level 2).
Add a profile to the account (at most five).
Bring a device profile into the account with its id, saves and scores (ADR 0043); 409 id_taken when the id cannot be taken.
Upload a device profile's saves and scores under one of the account's profiles: the newer save wins (ADR 0043).
Delete one of the account's profiles — never the last one — and everything of it, for good.
Edit one of the account's profiles.
Registry
Games available in the hub, filtered by the active profile's age band.
One game by id (not found if the active profile is too young for it).
Progress
Every save of the active profile, for a device to catch up.
Store the active profile's save of a game; the last write wins.
Record runs of the active profile; the same clientId again raises that run's score.
Boards
The account's board of a game: each profile's best this week or of all time.
A community's or the server's board of a game: the first 50 and the viewer's place, by trust.
Open a ranked run of a game (ADR 0030): its id and the seed to play it from; it closes the last one.
Hand a ranked run's moves and score in; the server replays them with the game's verify module.
Telemetry
Store a batch of technical telemetry from a device (sent by the hub with sendBeacon).
Errors, frame times, metrics and counts per game version over the last days (operator token).
Rooms
Rooms of a game the active profile may see: public ones it may join, and the ones it sits at.
Open a room for a game; the active profile hosts it and takes the first seat.
Open rooms the active profile sits at, to go back to one.
The active profile's online results in a game, and its account's board of the week.
The active profile's last 20 finished online hands of a game, newest first.
A finished hand the active profile played, with its seed and actions, to replay it in the game.
A room by its 6-digit code (spaces ignored), to preview before joining; rate limited.
A room the active profile sits at, or may see in the lobby.
The host changes the room before a hand: seats, visibility, lock, bots, timer, house rules.
Sit at a room: an empty seat, or between hands a bot's.
Watch a table without a seat, if its host allows spectators: only what is public is shown.
Ask a profile to the table — of the account, or another account's as its owner allows (ADR 0033): it shows in their hub for 10 minutes.
Tables someone asked the active profile to — by its ID, or from its own account — for the next 10 minutes.
Leave the seat; during a hand a bot finishes it. The room closes when the last person leaves.
The host seats a bot, or empties a seat (removing a bot or a player).
The host starts the first hand; empty seats get bots if the room fills them.
Console
Whether the account has an authenticator for the console (accounts with a platform role).
A new authenticator key for the console, while two-factor authentication is off (a platform role and a password, step-up level 2).
A code from the new key turns two-factor authentication on; recovery codes once (a platform role and a password, step-up level 2).
Admin API (generated)
Overview
Admin
What the console needs before anyone signs in: the hub's address.
Sign in to the console: email, password and a code; sets the console's own session cookie for twelve hours.
End the console's session on this browser; the hub's session stays.
Whether the deployment still waits for its first owner.
With the setup token, the account of this email and password becomes the platform's first owner; setup ends for good.
The account signed in to the console: its role, what the role may do, and its session; 204 when nobody is.
Accounts, players, rooms, errors, the catalog and the outbox at a glance.
Every game in the registry, listed or not, with its players in the last week and open rooms.
Device telemetry over the last days (1 to 30): errors, frames, metrics per game version.
The running build, its database migrations, background workers and settings without secrets.
The audit log, newest first, a page at a time.
The password, or a code from the authenticator, opens step-up level 2 in this console session for 10 minutes.
Whether two-factor authentication is on, until when this console session lasts, recovery codes left.
Turn two-factor authentication off: every session of the account ends, this one too (needs step-up level 2).
New recovery codes in place of the old ones (needs step-up level 2).
Accounts by email, username, name or profile ID (four digits or more); the newest first, fifty at most.
One account: sign-in methods, role, two-factor authentication, suspension, profiles and their names.
Suspend an account: no way in, and its sessions end.
Lift a suspension.
Delete for good an account whose owner asked and whose seven days are over (ADR 0038).
End every session of an account.
Give an account a platform role, or take it away (owners only).
Rename a profile, under the same name rules; its history keeps the old name.
Hide a profile from public boards; its owner's switch does not bring it back.
Let a hidden profile back on public boards, as its owner's switch says.
The sign-in methods, which are on and who signs in only by each; the registration mode.
Switch sign-in methods and the registration mode; one method stays on, and you keep a way in.
Communities, how many accounts came with each, and their invite codes.
A new community.
A new invite code for the community: given or made up, with an end and a limit of uses if wanted.
Revoke an invite code: no sign-up uses it again.
Held results, waiting for a person: oldest first, fifty at a time.
Results people decided about or the engine rejected: the latest decision first, fifty at a time.
One result: where it stands, what its profile did before on the board, its evidence, every decision.
A ranked run's seed and moves to watch in the game itself, and the build that played it while the games origin serves it.
Approve a held result: verified when the server refereed or replayed it, checked otherwise.
Reject a result, at any level: it counts on no board.
Reopen a decided result — rejected, checked or verified: held again, for another look.
GitHub
Select theme
Dark
Light
Auto
Overview
Tò He Platform API
1.0.0
Section titled “Tò He Platform API 1.0.0”
Backend for the Tò He hub. Games never call it directly; see docs/contracts.
Information
OpenAPI version:
3.1.1
Operations
Section titled “Operations”
GET
/api/config
DELETE
/api/account/logins/{provider}
GET
/api/profiles/by-id/{publicId}
GET
/api/profiles/options
GET
/api/auth/challenge
POST
/api/auth/register
POST
/api/auth/register/confirm
POST
/api/auth/login
POST
/api/auth/password/forgot
POST
/api/auth/password/reset
POST
/api/auth/logout
GET
/api/auth/me
POST
/api/account/email
POST
/api/account/email/confirm
PUT
/api/account/manage-pin
PUT
/api/account/password
POST
/api/account/terms
DELETE
/api/account
PATCH
/api/account
GET
/api/auth/external/pending
DELETE
/api/auth/external/pending
POST
/api/auth/external/pending/email
POST
/api/auth/external/pending/email/confirm
POST
/api/auth/external/pending/link-code
POST
/api/auth/external/pending/link
POST
/api/auth/external/pending/signup
PUT
/api/session/profile
DELETE
/api/session/profile
POST
/api/session/parent-gate
DELETE
/api/session/parent-gate
POST
/api/session/step-up
POST
/api/session/step-up/code
POST
/api/session/step-up/confirm
POST
/api/profiles
POST
/api/profiles/adopt
POST
/api/profiles/{id}/merge
DELETE
/api/profiles/{id}
PATCH
/api/profiles/{id}
GET
/api/games
GET
/api/games/{id}
GET
/api/progress/saves
PUT
/api/progress/saves/{gameId}
POST
/api/progress/scores
GET
/api/boards/{gameId}
GET
/api/boards/{gameId}/public
POST
/api/runs
POST
/api/runs/{id}/finish
POST
/api/telemetry
GET
/api/telemetry/report
GET
/api/rooms
POST
/api/rooms
GET
/api/rooms/mine
GET
/api/rooms/stats
GET
/api/rooms/history
GET
/api/rooms/{id}/hands/{hand}
GET
/api/rooms/code/{code}
GET
/api/rooms/{id}
PATCH
/api/rooms/{id}
POST
/api/rooms/{id}/join
POST
/api/rooms/{id}/watch
POST
/api/rooms/{id}/invite
GET
/api/rooms/invites
POST
/api/rooms/{id}/leave
PUT
/api/rooms/{id}/seats/{seat}
POST
/api/rooms/{id}/start
GET
/api/account/two-factor
POST
/api/account/two-factor/setup
POST
/api/account/two-factor/enable