Server API reference
Every RPC the platform exposes, and who may call it. Generated from server/nakama/src/rpc/manifest.ts — do not edit this file by hand; run pnpm api:docs instead.
If you are building a game, you almost certainly do not need this page: a game bundle has no network access at all, and a match handler talks to the platform through its dispatcher. See writing the server rules.
This is for building a client — a web front end, a mobile app — against the platform. Start with client integration, which covers authentication, the response envelope, and the socket.
Authorisation policies
| Policy | Who can call it | Count |
|---|---|---|
| Public | Anyone, signed in or not. | 10 |
| Player | Any signed-in account. | 47 |
| Developer | Accounts in the developers group. |
11 |
| Operator | Accounts in the operators group. |
16 |
| Finance | Accounts in the finance group. |
11 |
| Staff | Accounts in the operators group or the finance group. |
2 |
| Server | Nobody with an account. Callable only with the platform's HTTP key. | 45 |
A handler enforces its own policy as its first statement, and a test walks this manifest calling every handler with a session it should reject. An RPC cannot be exposed without a policy, and a policy cannot be declared for something never registered.
Public — 10 RPCs
Nakama still requires a credential on the wire for a call with no session — server-side callers use the HTTP key. Never ship that key in a client.
| RPC | What it does |
|---|---|
GetCatalogueGame |
One published game's public detail. |
GetGameOfTheWeek |
The week running now, today's board, earlier days' winners and — signed in — the caller's goes. |
GetLobby |
Who is online, who is in a match, and how many are waiting at each stake of each game. |
GetPrizeSplit |
How a pot is divided, as the platform is currently paying it. Public, because a player being shown what they would win has to be shown what they would be paid. |
GetPublicFeatures |
Which features are on, so the app can hide a button rather than show one that fails. |
GetPushPublicKey |
The public VAPID key a browser needs to create a push subscription. |
GetTournamentBoard |
A tournament leaderboard, tonight's by default or any past evening by date. Public, like the games list it is reached from. |
Health |
Liveness probe. Returns build version and server time. |
ListCatalogue |
Every published game. Browsing does not require an account. |
ListTournaments |
Every game's tournament tonight, with its state and the caller's own standing in each. One call draws the whole screen. |
Player — 47 RPCs
Send the player's session token as Authorization: Bearer <token>.
| RPC | What it does |
|---|---|
ApproveWithdrawal |
Confirm a password and receive an approval for one specific withdrawal. A session token alone cannot move money off the platform. |
CancelBankWithdrawal |
Pull back the caller's own queued withdrawal and refund it, while it is still unapproved and inside the cancel window. |
ClaimQuest |
Claim a finished quest's reward. Idempotent: a retry is refused rather than paid twice. Rewards are non-monetary by construction. |
CreatePracticeMatch |
Create a free practice match. No stake and no settlement, but a signed-in player like any other RPC. |
CreatePrivateMatch |
Reserve a match and a share code. Costs nothing until someone sits down. |
DeletePushSubscription |
Remove the caller's Web Push subscription. |
GetAccountEmail |
The player's address and whether it is verified, for the account page. |
GetHeldStakes |
The caller's stakes held in games — not yet paid out or given back — with their total and when each is decided. |
GetMatchStatus |
Whether a match the caller is seated in is ready to start. |
GetMyFriendCode |
The caller's code for playing a friend head to head — their referral code, allocated if absent. Not gated on the referral programme. |
GetMyProfile |
The caller's identity and platform roles, used to gate documentation. |
GetMyReferralCode |
The caller's shareable referral code, allocating one if absent. |
GetMyReferralStatus |
Whether the caller was referred and how long their window has left. |
GetNotificationPrefs |
Which notifications this player wants, by category and channel. |
GetPaymentStatus |
The caller's own deposit or withdrawal. Never anyone else's. |
GetPoolRun |
Where the caller's run stands: still being played, placed in a pool (and which, with its score), or refunded. |
GetPoolStandings |
The standings inside one pool the caller is in — every entrant's position and score, provisional until the server has scored every run. Never an input log. |
GetPrivateMatch |
The host's view of their own invitation. Readable only by the host. |
GetReferralSummary |
Total commission the caller has earned from referrals. |
GetRetentionProfile |
The caller's own standing: league, trophies, level, streak and quest progress. Read-only, and moves no money. |
GetStorefront |
What the caller should see on one storefront surface, with level gating and frequency caps applied. Counts the visit, because a cap a client can decline to report is not a cap. |
GetWalletBalance |
The caller's wallet balance in minor units. |
GetWalletHistory |
A page of the caller's ledger entries, newest first. |
Heartbeat |
Record that this player is still here, so they count as online. |
JoinMatch |
Seat the caller in a match at a stake tier, taking their stake into escrow. The only path by which a real-money match begins. With a friendCode, seats them only opposite the other player who entered it. |
JoinPrivateMatch |
Take the other seat in a private match, at the stake the invitation set. |
JoinTournament |
Register for tonight's tournament, taking the entry fee into escrow. Refused once the window has opened. |
LeaveQueue |
Leave a match that has not started and return the stake. Refused once the match is under way, where leaving is a forfeit rather than a cancel. |
ListMyBankWithdrawals |
The caller's own bank withdrawals, newest first, with how long each can still be cancelled. Account numbers masked. |
ListMyPools |
Every pool this player has entered, pending and finished, with where they came and what it paid. |
ListMyReferrals |
The people the caller referred, and what each has earned them. |
ListOpenPools |
Every pool the caller could help fill now, one per game and stake, closest to full first: scores in, when it closes, first prize. Counts only — nothing about who else is in it. |
RecordDailyVisit |
Count today towards the caller's streak. Idempotent within a day, so it is safe to call on every app open. Pays trophies, XP or cosmetics — never money. |
RegisterAsDeveloper |
Become a developer. Self-service, and needs only a player account and a name. |
ReportDisconnect |
Record what a client knew about its own disappearance mid-match, so the outcome can be decided from evidence rather than assumed. Settles nothing; no verdict can pay the player who vanished. |
RequestBankWithdrawal |
Request a manual bank payout. Debits immediately. |
SavePushSubscription |
Store the caller's Web Push subscription, replacing any previous one. |
SendVerificationEmail |
Send the email-confirmation link again. Rate-limited. |
SetNotificationPrefs |
Change which notifications this player wants. |
SimulateBankWithdrawal |
Preview a withdrawal: the exact fee, the exact amount that will land, and the most that would currently go through. Moves and writes nothing, so it is safe to call on every keystroke. |
StartDeposit |
Ask the provider to take money from the caller's mobile money account. Credits nothing — the wallet moves only on a confirmed callback. |
StartPoolRun |
Take the caller's stake into escrow and start a pool run on the server, on a board the platform chooses. Returns the match the page joins; the run's score goes into a pool when it ends. |
StartPracticeRun |
Start a free solo run: a pooled game is played on the server, like any run, and the match to join is returned; a live-action game is handed its seed and plays itself. Uses one of the day's free runs. No pool, no stake, no settlement — the solo counterpart of CreatePracticeMatch. |
StartTournamentMatch |
Pair the caller with another entrant in an arena tournament, or put them in the waiting room. The match it creates is stake-free. |
StartTournamentRun |
Start one of tonight's goes in a solo tournament, played on the server. Everyone gets the same board for the same attempt number; the go counts from this moment. |
StartWeeklyRun |
Start one of today's Game of the Week goes, played on the server. The go counts from this moment. |
StartWithdrawal |
Debit the caller and ask the provider to pay out, against an approval from ApproveWithdrawal. Refunds in the same call if the provider refuses. |
Developer — 11 RPCs
A developer may only ever act on their own games; the handler enforces that itself.
| RPC | What it does |
|---|---|
DiscardGameDraft |
Throw the working copy away. Published versions are untouched. |
GetDeveloperEarnings |
Developer share, totalled and broken down by game. |
GetDeveloperProfile |
The caller's developer profile and masked payout details. |
GetGameDraft |
The working copy of a game, if there is one. |
ListGameVersions |
A game's version history, newest first. |
PublishGameVersion |
Record a new version of a game. Does not change what players see. |
RequestGoLive |
Ask an operator to put a game in front of players. |
RollbackGame |
Restore an earlier version by publishing a copy of it as a new one. |
SaveBankDetails |
Update the caller's payout bank details. |
SaveDeveloperProfile |
Update the caller's developer profile. |
SaveGameDraft |
Save the working copy of a game. Nothing here reaches a player. |
Operator — 16 RPCs
Every action is attributed to the operator who took it.
| RPC | What it does |
|---|---|
CancelGameOfTheWeek |
Cancel a week that has not started, putting its prizes back in the game account. |
DecideGoLive |
Approve a game and put it live, or decline it with a reason. |
GetDispute |
One contest against a pool, match or escrow id: who played, the score the server counted (and, for pools from before 2026-09-30, what the device claimed), and where every minor unit went. Read-only. |
GetEmailHealth |
Bounce and complaint rates, and whether non-security email is paused because of them. |
GetFeatures |
Every feature switch, its configured default, and what the platform is doing. |
GetPlatformOverview |
The operations dashboard, in one consistent snapshot. |
GetPlatformStakes |
What the platform currently charges. |
GetPublishedStorefront |
The published storefront as stored, unresolved. Operator only — it is the whole merchandising config. |
ImportPublishedGames |
Give every already-published game a record and a version 1. |
ListGamesOfTheWeek |
Every Game of the Week, the games that may be scheduled, and what the game account holds. |
ListGoLiveRequests |
Games waiting on an operator's decision, and what was decided before. |
ListManagedGames |
Every game an operator may act on, whatever its state. |
ResumeEmail |
Resume non-security email after a health pause, counting afresh from now. |
ScheduleGameOfTheWeek |
Schedule a week: the game, the start day, the daily prize and the banner. Sets the week's prizes aside from the game account. |
SetGameStatus |
Decide what players see: draft, staged, live or retired. |
SetPlatformStakes |
Set the one stake ladder every game is offered at. |
Finance — 11 RPCs
The finance desk: the platform's own money and the payouts made by hand. Every action is attributed to the person who took it, and the ones that move money ask for their password again.
| RPC | What it does |
|---|---|
AdjustPlayerBalance |
A capped, attributed manual balance correction. |
ApproveBankWithdrawal |
Approve a payout for transfer. |
DecideGameAccountWithdrawal |
Approve or decline a game account withdrawal another finance person asked for. |
GetDeveloperBankDetails |
Full bank details for making a payment. Every read is logged. |
GetGameAccount |
The game account's balance, what is set aside for prizes, and recent movements. |
GetPlatformReport |
Contests, stakes, what the platform kept, per game and per day, with daily, weekly and monthly actives and a mobile-money summary. |
ListBankWithdrawals |
The manual payout queue. |
MarkBankWithdrawalPaid |
Record that a transfer was made, with its bank reference. |
RejectBankWithdrawal |
Reject a payout and refund the player. |
RequestGameAccountWithdrawal |
Take money out of the game account by MoMo. Password each time; a second person at or above the threshold. |
StartGameAccountDeposit |
Put money into the game account by MoMo, from a number the finance person approves on. |
Staff — 2 RPCs
Read by both desks of the console.
| RPC | What it does |
|---|---|
ListAuditLog |
What happened: a day, a person, or a person on a day. |
LookupPlayer |
One player's account, roles, balance and recent ledger. |
Server — 45 RPCs
These decide what people are paid, or who holds a role. A client that could reach one could mint operators or confirm payments that never happened.
| RPC | What it does |
|---|---|
CheckPasswordResetToken |
Whether a reset link is still good, so the page can say so before anyone types a password. |
CompletePasswordReset |
Set a new password from a reset link; signs the account out everywhere and emails a notice. |
ConfirmEmail |
The link in the verification email. Marks the account's current address verified. |
ExpireStalePools |
Return the stakes of pools that never filled. Cron-driven; never callable by a client. The sweep existed and was tested from the start but had no RPC, so nothing could run it. |
ExportEmailList |
Players' email addresses for the System page's CSV download: those who opted in to news (confirmed and deliverable), or every account with its state. Recorded on every call. |
GetContent |
Every page of the platform's own text an operator has edited — terms, privacy, how it works, the shared game rules. A text with no edit shows the default file the apps ship. |
GetPlatformSettings |
The settings the web apps read, as the platform is currently running them. Values only — who changed one and when are questions for the System page. |
GetReadiness |
Whether deposits, withdrawals and email can actually be used — switched on and configured — and so whether real stakes are offered. For the System page's setup status. |
GetReconciliation |
Ledger totals that must agree with the provider's statement. Read-only: a control that could adjust what it measures is not one. |
GetSystemSettings |
Everything the system user may change, and what the platform is currently doing. One read, because the System page renders the lot and six calls would show six moments. |
GrantRole |
Add a user to a role group. Cluster access required, not just an account. |
GuardSystemSignIn |
The System user's wrong passwords, counted for the operations console: asked before the system password is tried, told after. Pauses after 10 in 15 minutes, or 100 from one address. Email sign-ins are counted by the server itself. |
HasOperator |
Whether anybody holds the operator role yet: the System page signs in on top of an operator's session once one exists. |
ListPendingEmails |
Emails waiting for notify-svc, with addresses and links. Holds non-security email while sending is paused for health. |
ListPendingPushes |
Web pushes waiting to be sent, with the endpoint and keys to send them. notify-svc's queue; never reachable from a player's session. |
ListStuckWithdrawals |
Withdrawals started and never resolved. Every row is a player already debited and still waiting. |
ListSystemActions |
The system audit trail: what was run, by whom, and how it went. |
MarkEmailSent |
Report what became of one queued email: accepted, rejected for good, or a transient failure. |
MarkPushSent |
Report what became of one queued push — delivered, the subscription is dead, or a transient failure to be retried. |
MomoCallback |
MTN's callback, forwarded by the receiver on the registered callback host. Treated as a notification: the outcome is read from MTN, never from the body. |
PaymentCallback |
The provider reporting what happened. Decides whether a balance goes up, so it is never reachable from an account. |
ReconcileMomoPayments |
Ask MTN about payments no callback resolved, and settle them. Idempotent. |
RecordEmailEvents |
SendGrid's delivery events, signature-checked by callbacks-svc: bounces, spam reports and deliveries that decide whether we email an address again. |
RecordSystemAction |
Record a system action in the audit trail. Used for operations run elsewhere. |
RefundStuckEscrow |
Refund escrow whose match never reported a result. |
RemindTournamentEntrants |
Push and email tonight's entrants shortly before the start, once each. Run by a CronJob; a no-op outside the quarter hour before the window. |
ReportEmailSender |
notify-svc saying whether it has a SendGrid API key. Email is treated as off until it has. |
RequestPasswordReset |
Send a password reset link if the address has an account. Answers the same either way, so it cannot reveal who plays here. Rate-limited per address and per caller. |
RunSettlement |
Settle outcomes reported by game pods. Cron-driven; never callable by a client. |
RunSystemOperation |
Run one named system operation — seeding role groups, granting or revoking a role. |
SeedRoleGroups |
Create the developer, operator and finance groups. Idempotent. |
SetContent |
Change one of the platform's texts, or restore its default file. The system user only: the terms and privacy policy are what players agree to at registration. |
SetFeature |
Turn a feature on, off, or back to its configured default. The system user only — a feature switch is a decision about the platform, not about a player. |
SetSetting |
Change one platform setting, or restore the default its config file seeded. The system user only. Refused rather than repaired: a setting quietly corrected would leave the page showing one thing and the platform doing another. |
SettleGamesOfTheWeek |
Pay each closed Game of the Week day to its winner, or put the prize back. Run by the weekly CronJob. |
SettleTournaments |
Pay the places for a finished tournament, or refund everybody when the field was too small. Cron-driven; never callable by a client. |
SweepAuditLog |
Drop the day that has fallen out of the one-year retention window. |
SweepFinishedEscrow |
Remove escrow that finished — settled or refunded — more than 90 days ago. Never touches money still held. |
SweepPresence |
Delete presence rows past their keep window. Cron-driven; never callable by a client. |
SweepRateLimits |
Remove rate-limit rows nobody has written to for two days — the counts behind sign-in pauses, password-reset limits and the like. The longest window is a day, so nothing still counted goes. |
SweepReporting |
Drop the reporting day that has fallen out of the retention window. |
SyncFirstPartyGames |
Replace the first-party games in the registry from config/games.yaml. Never touches a developer's published game. |
SyncStorefront |
Replace the published storefront from config/storefront.yaml. Validated on the way in, so a storefront that would misbehave is refused rather than served. There is deliberately no operator equivalent — an ad-hoc publish would be a second source of truth. |
UnsubscribeTournamentEmail |
The one-click unsubscribe link in a tournament reminder. Turns off that one optional category. |
VisitorHeartbeat |
A signed-out visitor is on the site, by a hash of an anonymous cookie. New visitors are limited per network address so a script cannot inflate the count. |
Related
- Client integration — how to call these at all
- Writing the server rules — the game side, which uses none of this
- Getting started — the path end to end
