No contract means standalone
A direct public URL keeps the game's complete menus, navigation, solo play, and browser state.
Hosted game platform
Launch versioned HTML5 games with verified players, direct modes, realtime rooms, cross-device progress, scores, and signed results. The API is publisher-neutral—social apps, learning products, communities, portals, and native apps all use the same contract.
Stable by design
A direct public URL keeps the game's complete menus, navigation, solo play, and browser state.
Your trusted server selects the game, experience, roster, seats, bot policy, and callbacks.
Every human receives a short-lived URL bound to their own match seat and game version.
The live catalog—not a hardcoded app menu—decides which games support each profile.
Quickstart
Your backend calls ZenXGames. Mobile and web clients never receive the publisher API key.
curl https://games.zenxgames.com/v1/matches \
-H 'Content-Type: application/json' \
-H 'X-API-Key: zenx_srv_REDACTED' \
-H 'Idempotency-Key: session-8841-pool-1' \
--data '{
"gameId": "pool-master",
"experience": "private",
"externalRoomId": "session-8841",
"seatCount": 2,
"players": [
{ "id": "usr_7b81", "name": "Maya" },
{ "id": "usr_f192", "name": "Noah" }
],
"allowBots": false,
"gameConfig": {
"modeMenu": {
"source": "api",
"playerCount": 2,
"lockPlayerCount": true,
"offeredModes": [
{ "id": "versus_2p", "label": "2 Players", "players": 2, "default": true }
],
"autoSelectWhenSingle": true,
"returnLabel": "Done"
}
},
"callbacks": {
"matchResultUrl": "https://api.publisher.example/zenx/results"
}
}'
playerId belongs to the authenticated
caller.
Launch profiles
Profiles are normal request compositions. They are not tied to a chat, call, room type, or customer application.
Open the versioned catalog URL without a launch token. The full game is unchanged.
No API request
One verified human. The manifest selects native solo play or a computer challenger.
experience: practice
Two frozen human seats, ready barrier, direct approved mode, authoritative result.
experience: private
A shared board or same-challenge race for the exact roster, when the manifest supports its capacity.
seatCount: roster.length
Queue one player, prefer humans, then use bot fallback only where the game permits it.
experience: matchmaking
Direct-start presentation
The host does not inject scripts or manually click through a game
menu. A signed gameConfig.modeMenu narrows the title
to the exact allowed experience.
{
"modeMenu": {
"source": "api",
"playerCount": 2,
"lockPlayerCount": true,
"offeredModes": [{
"id": "race_2p",
"label": "2 Players",
"players": 2,
"default": true
}],
"blockedModes": [
"single", "bot", "online"
],
"autoSelectWhenSingle": true,
"returnLabel": "Done"
}
}
offeredModes
The complete allow-list. Use IDs returned by the game capability.
blockedModes
A defensive deny-list for aliases already present in a native bundle.
autoSelectWhenSingle
Skips the chooser only when exactly one approved mode remains.
returnLabel
Labels the platform-owned result/return action. The host
handles go_home.
modeMenu is a contractual instruction to
leave the original full game UI untouched.
Signed launches
{
"match": {
"matchId": "m_01J…",
"roomId": "r_01J…",
"gameId": "pool-master",
"gameVersion": "0.1.10",
"protocolVersion": "1.0.0",
"status": "waiting"
},
"launches": [{
"playerId": "usr_7b81",
"token": "REDACTED",
"url": "https://games.zenxgames.com/…"
}]
}
GET /v1/launch/resolve only with the assigned
token.
Client SDK
const launch = await window.ZenXGame.ready;
const me = launch.player;
const players = window.ZenXGame.getPlayers();
const configuration = window.ZenXGame.getConfiguration();
window.ZenXGame.on("STATE", state => renderStandings(state.players));
window.ZenXGames.setState({
state: "playing",
metadata: { level: 12, checkpoint: "round-2" }
});
window.ZenXGames.setState({
state: "over", score: 8400, leaderboard: "weekly"
});
game_loadedmatch_foundmatch_not_found match_startmatch_playinground_over
match_overmatch_resultscore_submitted progress_savedgo_homeerror
window.postMessage(event, origin)
AndroidBridge.getGameEvents(json)
AndroidBridge.postMessage(json)
gameState.postMessage(json)
Client events improve the immediate UI but can be duplicated, delayed, or lost if the operating system destroys a WebView. Use the signed server result for durable business actions.
Server callbacks
X-ZenX-Event: match_result
X-ZenX-Delivery: dlv_01J…
X-ZenX-Timestamp: 1789430400000
X-ZenX-Signature: v1=<base64url-hmac>
signature_input =
timestamp + "." + raw_request_body
One-to-one economics
Preview The contract is defined for future publisher wallets; Platform API 0.1 does not yet accept live settlement instructions.
{
"settlement": {
"profileId": "duel-standard-v1",
"stake": {
"currency": "publisher.credit",
"amount": 20
}
}
}
Mobile WebViews
Fit the catalog's portrait or landscape frame inside available bounds. Never use cover/fill for the game board.
Keep game navigation on games.zenxgames.com and
open outside links externally.
Persist immutable versioned assets, but never launch URLs, tokens, API responses, or user-specific HTML.
Call window.ZenXGame.close() before destroying the
WebView, then use destruction as the fallback.
Availability
A platform feature can be live while an individual title remains closed for that profile. Always read the current catalog.
Signed player launches, practice derivation, private rooms, matchmaking, realtime transport, progress, scores, events, and signed callbacks.
Enable only when embeddedPlay.enabled is true and
one offered mode matches the exact human seat count.
Enable only when supportsBots is true. Native solo
games do not need a fake opponent.
Read groupPlay for the 2–4 player capacity,
scoring order, and whether the title uses one shared board, a
synchronized challenge, or signed parallel practice.
The generic three-beneficiary contract is specified but not a live wallet endpoint in API 0.1.
Security checklist
Reference
The OpenAPI file describes the live API. The integration contract explains profile composition, WebView behavior, callbacks, and availability boundaries.