API reference
Every endpoint, its auth scope, and a request/response example. Most games use the @triggair/sdk client instead of raw HTTP — this is the underlying contract. Machine-readable: /openapi.json (OpenAPI 3.1). Auth scopes: a publishable key goes in X-Triggair-Key; a player token and the developer/operator sessions go in Authorization: Bearer.
Players
/v1/players/anonymous publishable key Mint an anonymous player token
Exchanges a stable device id for a 24h player token. The player is created on first use. This is what the SDK's tg.login() calls; every player-scoped call sends the returned token as `Authorization: Bearer`.
{
"device_id": "a-stable-device-uuid",
"turnstile_token": "optional-if-challenge-on"
} {
"player_id": "p_1a2b3c",
"token": "eyJ…",
"expires_in": 86400
} /v1/players/recover publishable key Recover a player on a new device
Consumes a recovery code (from /v1/players/me/recovery-code) to rebind the same player to a new device, returning a fresh token.
{
"code": "RECOVERY-CODE",
"device_id": "new-device-uuid"
} {
"player_id": "p_1a2b3c",
"token": "eyJ…",
"expires_in": 86400
} /v1/players/me player token Get the current player
{
"player_id": "p_1a2b3c",
"display_name": null,
"created_at": "2026-07-01T00:00:00Z"
} /v1/players/me/recovery-code player token Mint a cross-device recovery code
Returns a single-use code the player saves/shares once; redeem it later with /v1/players/recover on another device.
{
"code": "RECOVERY-CODE",
"expires_at": "2026-08-01T00:00:00Z"
} /v1/players/me/moderation player token Get the caller's own ban/mute status
The player's active bans and restrictions (shadow actions are hidden from self-view).
{
"banned": false,
"restrictions": []
} /v1/players/me/stats player token Get the player's own stats
{
"stats": [
{
"key": "kills",
"value": 12
}
]
} /v1/players/me/stats player token Update stats (set / increment)
Applies one or more stat operations atomically. Stats back leaderboards, achievements, and segment targeting.
{
"ops": [
{
"key": "kills",
"op": "increment",
"value": 1
}
]
} {
"stats": [
{
"key": "kills",
"value": 13
}
]
} /v1/players/me player token Update the player's profile (e.g. display name)
{
"display_name": "AceRunner"
} {
"player_id": "p_1a2b3c",
"display_name": "AceRunner"
} /v1/players player token Look up players (public fields)
-
ids(query) — Comma-separated player ids.
{
"players": [
{
"player_id": "p_9",
"display_name": "Rival"
}
]
} /v1/players/:id player token Get another player's public profile
-
id(path) — Player id.
{
"player_id": "p_9",
"display_name": "Rival"
} Saves
/v1/saves player token List the player's save slots
{
"saves": [
{
"slot": "slot1",
"version": 3,
"updated_at": "2026-07-01T00:00:00Z"
}
]
} /v1/saves/:slot player token Read a save slot
-
slot(path) — Slot name (game-defined).
{
"slot": "slot1",
"data": {
"level": 4,
"coins": 120
},
"version": 3
} /v1/saves/:slot player token Write a save slot
Last-write-wins by default. Send `If-Match: <version>` for optimistic concurrency — a stale version returns 409 save_conflict. Returns 201 on first write, 200 on update.
-
slot(path) — Slot name.
{
"data": {
"level": 5,
"coins": 90
}
} {
"slot": "slot1",
"data": {
"level": 5,
"coins": 90
},
"version": 4
} /v1/saves/:slot player token Delete a save slot
-
slot(path) — Slot name.
null Leaderboards
/v1/leaderboards/:board/scores player token Submit a score
Submits a score to a configured board. The board's aggregation (best/last/sum) and period (all-time/daily/weekly) are set by the developer; the response reports the player's kept score for the current period.
-
board(path) — Board key.
{
"score": 9000
} {
"ok": true,
"best_score": 9000,
"period_key": "2026-07"
} /v1/leaderboards/:board/top player token Read the top entries
-
board(path) — Board key. -
limit(query) — Max entries (default 10).
{
"board": "high_scores",
"period_key": "2026-07",
"entries": [
{
"rank": 1,
"player_id": "p_9",
"score": 12000
}
]
} /v1/leaderboards/:board/around-me player token Read entries around the player
-
board(path) — Board key.
{
"board": "high_scores",
"period_key": "2026-07",
"me": {
"rank": 42,
"score": 8000
},
"entries": []
} /v1/leaderboards/:board/friends player token Read the friends-only board
-
board(path) — Board key.
{
"board": "high_scores",
"period_key": "2026-07",
"me": {
"rank": 2,
"score": 8000
},
"entries": []
} Achievements
/v1/achievements player token List achievements + the caller's progress
Definitions plus this player's progress; secret achievements are hidden until unlocked.
{
"achievements": [
{
"key": "first_win",
"unlocked": true,
"progress": 1,
"target": 1
}
]
} /v1/achievements/:key/progress player token Report achievement progress
The server clamps progress, unlocks exactly once, and escrows any reward into the inbox. The client reports progress but never grants the reward.
-
key(path) — Achievement key.
{
"amount": 1
} {
"key": "first_win",
"unlocked": true,
"progress": 1
} Daily
/v1/daily player token Get daily-reward status
{
"claimable": true,
"streak": 3,
"next_claim_at": "2026-07-11T00:00:00Z"
} /v1/daily/claim player token Claim today's reward
Server-day gated; the reward is escrowed into the inbox. Re-claiming the same day → 409 conflict.
{
"claimed": true,
"streak": 4
} Inbox
/v1/inbox player token List inbox items
-
limit(query) — Max items.
{
"items": [
{
"id": "in_1",
"kind": "reward",
"claimable": true,
"read": false
}
]
} /v1/inbox/:id/read player token Mark an inbox item read
-
id(path) — Inbox item id.
{
"ok": true
} /v1/inbox/:id/claim player token Claim an inbox item's reward
The single hardened grant path — exactly-once (idempotent per item). Grants currency, items, or stat rewards.
-
id(path) — Inbox item id.
{
"claimed": true,
"granted": {
"currency": [
{
"code": "gold",
"amount": 100
}
]
}
} Moderation
/v1/moderate/check player token Pre-check text before submit
Runs the same moderation the write paths use, so you can validate a chosen name/message without a round-trip failure. Stateless (writes nothing).
{
"surface": "username",
"text": "player name to check"
} {
"verdict": "mask",
"masked_text": "player ****",
"categories": [
"profanity"
],
"severity": 2
} /v1/reports player token Report a player / message / UGC
{
"target_type": "player",
"target_id": "p_9",
"reason": "harassment",
"note": "optional"
} {
"id": "cr_1",
"state": "open"
} /v1/appeals player token Appeal a ban
{
"ban_id": "bn_1",
"body": "why the ban should be lifted"
} {
"id": "ap_1",
"state": "pending"
} Compliance
/v1/players/me/age player token Set the player's age bracket
Neutral age screen. A birth year is mapped to a bracket and DISCARDED (no DOB stored). Returns the compliance view with the gated-feature map.
{
"birth_year": 2013
} {
"bracket": "13_15",
"consent_state": "pending",
"gated": {
"open_chat": true,
"lootbox": true
}
} /v1/players/me/compliance player token Get the compliance view (bracket + gated map)
{
"bracket": "13_15",
"consent_state": "pending",
"gated": {
"open_chat": true
}
} /v1/compliance/policy publishable key Get the game's gate policy (pre-token)
pk-only so the client can pre-disable regulated UI before a player token exists.
{
"gates": {
"open_chat": "13_15",
"lootbox": "adult"
},
"coppa_mode": false,
"default_jurisdiction": "US"
} /v1/players/me/consent/request player token Request parental consent (emails the parent)
{
"parent_email": "parent@example.com"
} {
"id": "pc_1",
"state": "pending",
"expires_at": "2026-07-24T00:00:00Z"
} /v1/players/me/consent player token Get the player's consent record
{
"consent": {
"id": "pc_1",
"state": "pending"
}
} /v1/consent/:token no auth Parent consent landing page (HTML)
The signed link a parent receives by email; renders Approve/Decline. No pk/token — the signed token IS the credential.
-
token(path) — Signed consent token from the email.
/v1/consent/:token/decide no auth Record the parent's decision
-
token(path) — Signed consent token.
{
"grant": true,
"note": "optional"
} {
"state": "granted"
} Crashes
/v1/crashes player token Report a crash
Grouped server-side by a normalized-stack fingerprint into a handful of issues with a crash-free-users %.
{
"message": "TypeError: x is undefined",
"stack": "at play (game.js:42)",
"platform": "web",
"appVersion": "1.4.0"
} {
"ok": true,
"group_id": "cg_1"
} RNG
/v1/rng/:stream player token Deterministic server-seeded random values
A verifiable per-player, per-period stream — the same request returns the same values, so loot/crit rolls can't be client-forged.
-
stream(path) — Stream name (e.g. 'loot'). -
count(query) — How many values.
{
"stream": "loot",
"period_key": "2026-07",
"values": [
0.42,
0.88
]
} Realtime
/v1/realtime/rooms/:room player token Join a realtime room (WebSocket upgrade)
A WebSocket upgrade. Because a browser WS can't send headers, the pk + player token go in the query (?key=&token=). Presence + broadcast; chat is moderated in transit. Rooms named team:<id> / match:<id> require membership. Use tg.realtime.join(room) from the SDK.
-
room(path) — Room name; team:/match: prefixes enforce membership. -
key(query) — Publishable key (query, since a WS can't set headers). -
token(query) — Player token.
Economy
/v1/wallet player token Get all currency balances
{
"balances": [
{
"currency": "gold",
"amount": 250
}
]
} /v1/wallet/history player token Get currency transaction history
-
limit(query) — Max lines.
{
"lines": [
{
"currency": "gold",
"delta": -100,
"reason": "store_buy",
"created_at": "2026-07-01T00:00:00Z"
}
]
} /v1/wallet/:currency player token Get one currency's balance
-
currency(path) — Currency code.
{
"currency": "gold",
"amount": 250
} /v1/stores player token List stores
{
"stores": [
{
"key": "main_store",
"name": "Shop"
}
]
} /v1/stores/:key player token Get a store's listings
-
key(path) — Store key.
{
"key": "main_store",
"listings": [
{
"id": "l_1",
"item": "sword",
"price": {
"gold": 100
}
}
]
} /v1/stores/:key/buy player token Buy a store listing
Server-authoritative price + balance check; idempotent (pass idem). Fails with insufficient_funds / out_of_stock / store_limit_reached.
-
key(path) — Store key.
{
"listing_id": "l_1",
"idem": "uuid"
} {
"ok": true,
"granted": {
"items": [
{
"item": "sword",
"qty": 1
}
]
}
} /v1/inventory player token List the player's inventory
{
"items": [
{
"item": "sword",
"qty": 1,
"equipped": true
}
]
} /v1/inventory/:item/consume player token Consume an item
-
item(path) — Item id.
{
"qty": 1,
"idem": "uuid"
} {
"ok": true,
"remaining": 0
} /v1/inventory/:item/equip player token Equip an item
-
item(path) — Item id.
{
"ok": true,
"equipped": true
} /v1/inventory/:item/unequip player token Unequip an item
-
item(path) — Item id.
{
"ok": true,
"equipped": false
} /v1/loot/:key/odds player token Get a loot box's disclosed odds
-
key(path) — Loot box key.
{
"key": "bronze_box",
"odds": [
{
"item": "common",
"weight": 0.9
},
{
"item": "rare",
"weight": 0.1
}
]
} /v1/loot/:key/open player token Open a loot box
Server-rolled (verifiable RNG), idempotent. loot_not_enabled if the box isn't configured; age-gated where required.
-
key(path) — Loot box key.
{
"idem": "uuid"
} {
"rolled": [
{
"item": "rare",
"qty": 1
}
]
} /v1/energy player token List energy meters
{
"meters": [
{
"meter": "stamina",
"current": 4,
"max": 5,
"refill_at": "2026-07-10T01:00:00Z"
}
]
} /v1/energy/:meter player token Get one energy meter
-
meter(path) — Meter name.
{
"meter": "stamina",
"current": 4,
"max": 5
} /v1/energy/:meter/spend player token Spend energy
out_of_energy if the balance is insufficient. Idempotent.
-
meter(path) — Meter name.
{
"amount": 1,
"idem": "uuid"
} {
"meter": "stamina",
"current": 3
} /v1/energy/:meter/refill player token Refill energy (e.g. with a currency)
-
meter(path) — Meter name.
{
"idem": "uuid"
} {
"meter": "stamina",
"current": 5
} /v1/codes/redeem player token Redeem a promo code
Grants the campaign reward into the inbox. code_invalid / code_expired / code_already_redeemed / code_campaign_exhausted on failure.
{
"code": "LAUNCH2026"
} {
"ok": true,
"granted": {
"stats": [
{
"key": "gold",
"amount": 100
}
]
}
} /v1/gifts player token Send a gift to another player
Delivers an item/currency gift into the recipient's inbox (subject to gifting limits).
{
"to": "p_9",
"item": "sword",
"qty": 1,
"idem": "uuid"
} {
"ok": true
} Teams
/v1/teams player token Create a team
{
"name": "Alpha Squad",
"tag": "ALPHA",
"privacy": "open"
} {
"id": "tm_1",
"name": "Alpha Squad",
"tag": "ALPHA"
} /v1/teams player token List / search teams
-
q(query) — Search query.
{
"teams": [
{
"id": "tm_1",
"name": "Alpha Squad",
"member_count": 4
}
]
} /v1/teams/mine player token Get the caller's team
{
"team": {
"id": "tm_1",
"role": "owner"
}
} /v1/teams/leaderboards/:board player token Team leaderboard
-
board(path) — Board key.
{
"entries": [
{
"team_id": "tm_1",
"score": 5000
}
]
} /v1/teams/:id player token Get a team + members
-
id(path) — Team id.
{
"id": "tm_1",
"name": "Alpha Squad",
"members": [
{
"player_id": "p_1",
"role": "owner"
}
]
} /v1/teams/:id/join player token Join a team (open teams)
-
id(path) — Team id.
{
"ok": true,
"role": "member"
} /v1/teams/:id/leave player token Leave a team
-
id(path) — Team id.
{
"ok": true
} /v1/teams/:id/members/:pid/kick player token Kick a member (admin/owner)
-
id(path) — Team id. -
pid(path) — Member player id.
{
"ok": true
} /v1/teams/:id/members/:pid/role player token Change a member's role
-
id(path) — Team id. -
pid(path) — Member player id.
{
"role": "admin"
} {
"ok": true
} /v1/teams/:id/transfer player token Transfer ownership
-
id(path) — Team id.
{
"to": "p_2"
} {
"ok": true
} /v1/teams/:id/disband player token Disband a team (owner)
-
id(path) — Team id.
{
"ok": true
} /v1/teams/mine/invites player token List the caller's team invites
{
"invites": [
{
"id": "ti_1",
"team_id": "tm_1"
}
]
} /v1/teams/:id/invites player token Invite a player
-
id(path) — Team id.
{
"player_id": "p_7"
} {
"id": "ti_1",
"state": "pending"
} /v1/teams/invites/:iid/accept player token Accept an invite
-
iid(path) — Invite id.
{
"ok": true
} /v1/teams/invites/:iid/reject player token Reject an invite
-
iid(path) — Invite id.
{
"ok": true
} /v1/teams/:id/requests player token Request to join (closed teams)
-
id(path) — Team id.
{
"id": "tr_1",
"state": "pending"
} /v1/teams/:id/requests player token List join requests (admin)
-
id(path) — Team id.
{
"requests": [
{
"id": "tr_1",
"player_id": "p_7"
}
]
} /v1/teams/:id/requests/:rid/approve player token Approve a join request
-
id(path) — Team id. -
rid(path) — Request id.
{
"ok": true
} /v1/teams/:id/requests/:rid/reject player token Reject a join request
-
id(path) — Team id. -
rid(path) — Request id.
{
"ok": true
} /v1/teams/:id/members/:pid/ban player token Ban a member from the team
-
id(path) — Team id. -
pid(path) — Player id.
{
"ok": true
} /v1/teams/:id/members/:pid/unban player token Unban a player
-
id(path) — Team id. -
pid(path) — Player id.
{
"ok": true
} /v1/teams/:id/bans player token List team bans
-
id(path) — Team id.
{
"bans": [
{
"player_id": "p_9"
}
]
} Competition
/v1/tournaments player token List tournaments
{
"tournaments": [
{
"id": "to_1",
"title": "Weekend Cup",
"state": "live"
}
]
} /v1/tournaments/mine player token Tournaments the player has joined
{
"tournaments": []
} /v1/tournaments/:id player token Get a tournament
-
id(path) — Tournament id.
{
"id": "to_1",
"title": "Weekend Cup",
"starts_at": "2026-07-12T00:00:00Z"
} /v1/tournaments/:id/standings player token Get tournament standings
-
id(path) — Tournament id.
{
"entries": [
{
"rank": 1,
"player_id": "p_9",
"score": 12000
}
]
} /v1/tournaments/:id/join player token Join a tournament
tournament_not_open if entry is closed; may require an entry fee.
-
id(path) — Tournament id.
{
"ok": true
} /v1/tournaments/:id/me player token The player's tournament entry
-
id(path) — Tournament id.
{
"rank": 42,
"score": 8000
} /v1/leagues/:key/join player token Join a league
-
key(path) — League key.
{
"division": "bronze",
"tier": 3
} /v1/leagues/:key/me player token The player's league standing
-
key(path) — League key.
{
"division": "bronze",
"tier": 3,
"rank": 5
} /v1/leagues/:key/divisions/:tier/top player token Top of a league division
-
key(path) — League key. -
tier(path) — Division tier.
{
"entries": [
{
"rank": 1,
"player_id": "p_9"
}
]
} /v1/boards/:board/submit player token Submit to a keyed board (team / UGC / custom entity)
-
board(path) — Keyed board key.
{
"entity_id": "tm_1",
"score": 5000
} {
"ok": true,
"best_score": 5000
} /v1/boards/:board/top player token Top entries of a keyed board
-
board(path) — Keyed board key.
{
"entries": [
{
"rank": 1,
"entity_id": "tm_1",
"score": 5000
}
]
} /v1/boards/:board/entries/:entity_id player token One entity's keyed-board entry
-
board(path) — Keyed board key. -
entity_id(path) — Entity id (team/UGC/…).
{
"entity_id": "tm_1",
"score": 5000,
"rank": 1
} Progression
/v1/quests player token List quests + the caller's progress
{
"quests": [
{
"key": "daily_login",
"progress": 1,
"target": 1,
"claimable": true
}
]
} /v1/quests/:key/claim player token Claim a completed quest's reward
quest_not_complete if objectives aren't met; the reward is escrowed into the inbox.
-
key(path) — Quest key.
{
"claimed": true
} /v1/battle-pass/:season player token Get battle-pass tiers + the caller's progress
-
season(path) — Season key.
{
"season": "s1",
"tier": 4,
"xp": 1200,
"premium": false
} /v1/battle-pass/:season/claim player token Claim a battle-pass tier reward
tier_not_earned if not reached; premium_required for a premium lane without the pass.
-
season(path) — Season key.
{
"tier": 4,
"lane": "free"
} {
"claimed": true
} /v1/progression player token Get XP / level curve progress
{
"level": 7,
"xp": 3400,
"next_level_xp": 4000
} Storage
/v1/storage/:collection player token List keys in the player's collection
-
collection(path) — Collection key.
{
"keys": [
"settings",
"deck"
]
} /v1/storage/:collection/:key player token Read a collection entry
-
collection(path) — Collection key. -
key(path) — Entry key.
{
"key": "settings",
"data": {
"sfx": true
},
"version": 2
} /v1/storage/:collection/:key player token Write a collection entry
Optional If-Match for OCC (storage_conflict on a stale version).
-
collection(path) — Collection key. -
key(path) — Entry key.
{
"data": {
"sfx": false
}
} {
"key": "settings",
"version": 3
} /v1/storage/:collection/:key player token Delete a collection entry
-
collection(path) — Collection key. -
key(path) — Entry key.
null /v1/storage/:collection/:key/mutate player token Atomic server-side mutation of an entry
Apply structured ops (e.g. list append, counter add) server-side to avoid read-modify-write races.
-
collection(path) — Collection key. -
key(path) — Entry key.
{
"ops": [
{
"op": "append",
"path": "deck",
"value": "card_9"
}
]
} {
"key": "deck",
"version": 5
} /v1/storage/shared/:collection/:key player token Read a shared (game-wide) entry
-
collection(path) — Collection key. -
key(path) — Entry key.
{
"key": "motd",
"data": {
"text": "Welcome!"
}
} /v1/storage/shared/:collection/:key player token Write a shared entry (per the collection's write policy)
-
collection(path) — Collection key. -
key(path) — Entry key.
{
"data": {
"text": "Welcome!"
}
} {
"key": "motd",
"version": 1
} /v1/storage/team/:teamId/:collection player token List a team collection's keys (members only)
-
teamId(path) — Team id. -
collection(path) — Collection key.
{
"keys": [
"roster"
]
} /v1/storage/team/:teamId/:collection/:key player token Read a team entry
-
teamId(path) — Team id. -
collection(path) — Collection key. -
key(path) — Entry key.
{
"key": "roster",
"data": {}
} /v1/storage/team/:teamId/:collection/:key player token Write a team entry (members only)
-
teamId(path) — Team id. -
collection(path) — Collection key. -
key(path) — Entry key.
{
"data": {}
} {
"key": "roster",
"version": 1
} /v1/storage/team/:teamId/:collection/:key player token Delete a team entry
-
teamId(path) — Team id. -
collection(path) — Collection key. -
key(path) — Entry key.
null UGC
/v1/ugc player token Browse published content
-
sort(query) — e.g. top, new.
{
"items": [
{
"id": "ug_1",
"title": "My Level",
"plays": 42,
"rating": 4.5
}
]
} /v1/ugc/mine player token List the caller's content
{
"items": [
{
"id": "ug_1",
"title": "My Level",
"status": "published"
}
]
} /v1/ugc player token Create a draft
Title/content are moderated. Publish it with POST /v1/ugc/:id/submit.
{
"title": "My Level",
"data": {
"grid": []
}
} {
"id": "ug_1",
"status": "draft"
} /v1/ugc/:id player token Get a content item
-
id(path) — Content id.
{
"id": "ug_1",
"title": "My Level",
"data": {},
"author": "p_1"
} /v1/ugc/:id player token Update a draft
-
id(path) — Content id.
{
"title": "My Level v2"
} {
"id": "ug_1"
} /v1/ugc/:id player token Delete content
-
id(path) — Content id.
null /v1/ugc/:id/submit player token Publish a draft
-
id(path) — Content id.
{
"id": "ug_1",
"status": "published"
} /v1/ugc/:id/play player token Record a play
-
id(path) — Content id.
{
"ok": true
} /v1/ugc/:id/lineage player token Get remix lineage (attribution)
-
id(path) — Content id.
{
"ancestors": [
{
"id": "ug_0",
"author": "p_0"
}
]
} /v1/ugc/:id/remix player token Remix content (forks with attribution)
-
id(path) — Source content id.
{
"title": "My Remix"
} {
"id": "ug_2",
"remixed_from": "ug_1"
} /v1/ugc/:id/rate player token Rate content
-
id(path) — Content id.
{
"rating": 5
} {
"ok": true,
"rating": 4.6
} /v1/ugc/:id/like player token Like content
-
id(path) — Content id.
{
"ok": true,
"likes": 13
} /v1/ugc/:id/like player token Unlike content
-
id(path) — Content id.
{
"ok": true,
"likes": 12
} Async
/v1/async player token Create a turn-based match
No realtime/Durable Object needed — turns are submitted over HTTP with server-enforced turn order + OCC.
{
"type": "chess",
"opponents": [
"p_9"
]
} {
"match": {
"id": "am_1",
"state": {},
"turn": "p_1a2b3c"
}
} /v1/async/mine player token List the player's active matches
{
"matches": [
{
"id": "am_1",
"type": "chess",
"turn": "p_9"
}
]
} /v1/async/:id player token Get a match (participants only)
-
id(path) — Match id.
{
"match": {
"id": "am_1",
"state": {},
"turn_number": 4
}
} /v1/async/:id/turn player token Submit a turn
Rejected with not_your_turn out of order, or async_conflict on a stale version (send the version you read).
-
id(path) — Match id.
{
"state": {
"board": []
},
"version": 4,
"end": false
} {
"match": {
"id": "am_1",
"turn_number": 5
}
} /v1/async/:id/forfeit player token Forfeit a match
-
id(path) — Match id.
{
"match": {
"id": "am_1",
"status": "complete",
"winner": "p_9"
}
} LiveOps
/v1/config publishable key Get the game's published config blob
The developer's key→value tuning blob (server-controlled, no client deploy to change).
{
"config": {
"spawn_rate": 1.5,
"event_banner": "summer"
},
"version": 12
} /v1/flags player token Get feature flags resolved for the player
Each flag resolves per the player's segments, with a break-glass kill switch honoured.
{
"flags": {
"new_hud": true,
"checkout_v2": "variant_b"
}
} /v1/flags/:key player token Get one resolved flag value
-
key(path) — Flag key.
{
"key": "new_hud",
"value": true
} /v1/liveops/events/live player token Get currently-live events
{
"events": [
{
"key": "summer_fest",
"ends_at": "2026-08-01T00:00:00Z"
}
]
} /v1/players/me/segments player token Get the player's segment memberships
{
"segments": [
"whales",
"new_players"
]
} Analytics
/v1/events player token Ingest analytics events
Usually called via the SDK's durable outbox (tg.track), which coalesces + retries. Counts only — no per-player PII.
{
"events": [
{
"name": "level_complete",
"count": 1
}
]
} {
"accepted": 1
} Dev · Games
/v1/dev/games developer session Create a game
{
"name": "Neon Drift"
} {
"id": "g_1",
"name": "Neon Drift",
"tier": "shared",
"env": "prod"
} /v1/dev/games developer session List your games
{
"games": [
{
"id": "g_1",
"name": "Neon Drift",
"status": "active"
}
]
} /v1/dev/games/:id developer session Get a game
-
id(path) — Game id.
{
"id": "g_1",
"name": "Neon Drift",
"allowed_origins": [
"https://mygame.com"
]
} /v1/dev/games/:id developer session Update a game (name, CORS allowlist, pause)
Set allowed_origins (CORS) — an empty list is open to any origin. status paused takes the game offline.
-
id(path) — Game id.
{
"allowed_origins": [
"https://mygame.com"
],
"status": "active"
} {
"id": "g_1",
"allowed_origins": [
"https://mygame.com"
]
} /v1/dev/games/:id developer session Delete a game (and its keys/data)
-
id(path) — Game id.
null /v1/dev/me developer session Get the developer account
{
"id": "d_1",
"email": "dev@studio.com"
} Dev · Keys
/v1/dev/games/:id/keys developer session Issue an API key
The full secret is returned ONCE. tg_pk_ (publishable) is safe in clients; tg_sk_ (secret) is server-only.
-
id(path) — Game id.
{
"kind": "publishable"
} {
"id": "key_1",
"prefix": "tg_pk_ab12",
"key": "tg_pk_ab12…full-shown-once",
"note": "Store this now — it won't be shown again."
} /v1/dev/games/:id/keys developer session List key metadata (never the secret)
-
id(path) — Game id.
{
"keys": [
{
"id": "key_1",
"kind": "publishable",
"prefix": "tg_pk_ab12",
"last_used_at": "2026-07-01T00:00:00Z",
"revoked_at": null
}
]
} /v1/dev/games/:id/keys/:keyId/rotate developer session Rotate a key (revoke + mint a replacement)
-
id(path) — Game id. -
keyId(path) — Key id.
{
"id": "key_2",
"key": "tg_pk_cd34…full-shown-once"
} /v1/dev/games/:id/keys/:keyId developer session Revoke a key
-
id(path) — Game id. -
keyId(path) — Key id.
null Dev · Leaderboards
/v1/dev/games/:id/leaderboards developer session List leaderboard definitions
-
id(path) — Game id.
{
"boards": [
{
"board": "high_scores",
"aggregation": "best",
"period": "all_time"
}
]
} /v1/dev/games/:id/leaderboards/:board developer session Create / update a leaderboard
-
id(path) — Game id. -
board(path) — Board key.
{
"aggregation": "best",
"period": "weekly",
"higher_is_better": true
} {
"board": "high_scores"
} /v1/dev/games/:id/leaderboards/:board developer session Delete a leaderboard (scores cascade)
-
id(path) — Game id. -
board(path) — Board key.
null /v1/dev/games/:id/boards developer session Create a keyed board (team/UGC/custom entity)
-
id(path) — Game id.
{
"board_key": "team_wars",
"entity_type": "team",
"aggregation": "sum",
"period": "weekly"
} {
"board_key": "team_wars"
} /v1/dev/games/:id/boards developer session List keyed boards
-
id(path) — Game id.
{
"boards": [
{
"board_key": "team_wars",
"entity_type": "team"
}
]
} /v1/dev/games/:id/boards/:board developer session Delete a keyed board
-
id(path) — Game id. -
board(path) — Keyed board key.
null Dev · Economy
/v1/dev/games/:id/economy/currencies developer session List currencies
-
id(path) — Game id.
{
"currencies": [
{
"code": "gold",
"name": "Gold"
}
]
} /v1/dev/games/:id/economy/items developer session Create / upsert an item
-
id(path) — Game id.
{
"key": "sword",
"name": "Sword",
"stackable": false
} {
"key": "sword"
} /v1/dev/games/:id/economy/items developer session List items
-
id(path) — Game id.
{
"items": [
{
"key": "sword"
}
]
} /v1/dev/games/:id/economy/stores developer session Create / upsert a store
-
id(path) — Game id.
{
"key": "main_store",
"listings": [
{
"id": "l_1",
"item": "sword",
"price": {
"gold": 100
}
}
]
} {
"key": "main_store"
} /v1/dev/games/:id/economy/stores developer session List stores
-
id(path) — Game id.
{
"stores": [
{
"key": "main_store"
}
]
} /v1/dev/games/:id/economy/loot developer session Create / upsert a loot box (with odds)
-
id(path) — Game id.
{
"key": "bronze_box",
"drops": [
{
"item": "common",
"weight": 0.9
},
{
"item": "rare",
"weight": 0.1
}
]
} {
"key": "bronze_box"
} /v1/dev/games/:id/economy/loot developer session List loot boxes
-
id(path) — Game id.
{
"loot": [
{
"key": "bronze_box"
}
]
} /v1/dev/games/:id/economy/energy developer session Create / upsert an energy meter
-
id(path) — Game id.
{
"meter": "stamina",
"max": 5,
"refill_seconds": 600
} {
"meter": "stamina"
} /v1/dev/games/:id/economy/energy developer session List energy meters
-
id(path) — Game id.
{
"meters": [
{
"meter": "stamina",
"max": 5
}
]
} /v1/dev/games/:id/economy/grant developer session Grant currency/items to a player (support tool)
Escrows the grant into the player's inbox (the one hardened grant path). Idempotent.
-
id(path) — Game id.
{
"player_id": "p_9",
"currency": [
{
"code": "gold",
"amount": 500
}
],
"idem": "uuid"
} {
"ok": true
} /v1/dev/games/:id/economy/ledger developer session Read the currency ledger
-
id(path) — Game id.
{
"lines": [
{
"player_id": "p_9",
"currency": "gold",
"delta": 500
}
]
} /v1/dev/games/:id/economy/players/:pid/wallet developer session Inspect a player's wallet
-
id(path) — Game id. -
pid(path) — Player id.
{
"balances": [
{
"currency": "gold",
"amount": 500
}
]
} /v1/dev/games/:id/economy/players/:pid/inventory developer session Inspect a player's inventory
-
id(path) — Game id. -
pid(path) — Player id.
{
"items": [
{
"item": "sword",
"qty": 1
}
]
} /v1/dev/games/:id/economy/currencies developer session Create / upsert a currency
-
id(path) — Game id.
{
"code": "gold",
"name": "Gold",
"max": 999999
} {
"code": "gold"
} Dev · Progression
/v1/dev/games/:id/achievements developer session List achievement definitions
-
id(path) — Game id.
{
"achievements": [
{
"key": "first_win",
"target": 1
}
]
} /v1/dev/games/:id/achievements/:key developer session Delete an achievement
-
id(path) — Game id. -
key(path) — Achievement key.
null /v1/dev/games/:id/daily developer session Get the daily-reward config
-
id(path) — Game id.
{
"cycle_length": 7,
"enabled": true
} /v1/dev/games/:id/daily developer session Set the daily-reward config
-
id(path) — Game id.
{
"cycle_length": 7,
"rewards": [
{
"day": 1,
"stats": [
{
"key": "gold",
"amount": 50
}
]
}
]
} {
"enabled": true
} /v1/dev/games/:id/daily developer session Disable daily rewards
-
id(path) — Game id.
null /v1/dev/games/:id/quests developer session Create / upsert a quest
-
id(path) — Game id.
{
"key": "win_3",
"period": "weekly",
"objectives": [
{
"stat": "wins",
"target": 3
}
]
} {
"key": "win_3"
} /v1/dev/games/:id/quests developer session List quests
-
id(path) — Game id.
{
"quests": [
{
"key": "win_3"
}
]
} /v1/dev/games/:id/battle-pass developer session Create / upsert a battle-pass season
-
id(path) — Game id.
{
"season": "s1",
"starts_at": "2026-07-01T00:00:00Z",
"tiers": []
} {
"season": "s1"
} /v1/dev/games/:id/battle-pass developer session List battle-pass seasons
-
id(path) — Game id.
{
"seasons": [
{
"season": "s1"
}
]
} /v1/dev/games/:id/progression developer session Set the XP / level curve
-
id(path) — Game id.
{
"xp_key": "xp",
"base": 100,
"growth": 1.5,
"max_level": 50
} {
"max_level": 50
} /v1/dev/games/:id/progression developer session Get the level curve
-
id(path) — Game id.
{
"base": 100,
"growth": 1.5,
"max_level": 50
} /v1/dev/games/:id/achievements/:key developer session Create / update an achievement
-
id(path) — Game id. -
key(path) — Achievement key.
{
"name": "First Win",
"target": 1,
"reward": {
"stats": [
{
"key": "gold",
"amount": 50
}
]
},
"secret": false
} {
"key": "first_win"
} /v1/dev/games/:id/battle-pass/:season/premium developer session Configure a season's premium track
-
id(path) — Game id. -
season(path) — Season key.
{
"price": {
"gold": 1000
}
} {
"ok": true
} Dev · Competition
/v1/dev/games/:id/tournaments developer session Schedule a tournament
-
id(path) — Game id.
{
"key": "weekend_cup",
"board": "high_scores",
"starts_at": "2026-07-12T00:00:00Z",
"ends_at": "2026-07-14T00:00:00Z",
"reward_table": []
} {
"id": "to_1"
} /v1/dev/games/:id/tournaments developer session List tournaments
-
id(path) — Game id.
{
"tournaments": [
{
"id": "to_1",
"state": "live"
}
]
} /v1/dev/games/:id/tournaments/:tid/finalize developer session Force-finalize a tournament (pays prizes)
-
id(path) — Game id. -
tid(path) — Tournament id.
{
"finalized": true
} /v1/dev/games/:id/leagues developer session Create / upsert a league (tiered divisions)
-
id(path) — Game id.
{
"key": "ranked",
"divisions": [
"bronze",
"silver",
"gold"
]
} {
"key": "ranked"
} /v1/dev/games/:id/leagues developer session List leagues
-
id(path) — Game id.
{
"leagues": [
{
"key": "ranked"
}
]
} /v1/dev/games/:id/leagues/:key/advance developer session Advance a league season (promotion/relegation)
-
id(path) — Game id. -
key(path) — League key.
{
"advanced": true,
"season": 2
} Dev · LiveOps
/v1/dev/games/:id/config developer session Get the config blob
-
id(path) — Game id.
{
"config": {},
"version": 12
} /v1/dev/games/:id/config developer session Replace the config blob
Whole-blob replace (≤64 KB); bumps config_version. Served to clients at GET /v1/config.
-
id(path) — Game id.
{
"config": {
"spawn_rate": 1.5
}
} {
"version": 13
} /v1/dev/games/:id/events developer session Read remote-event counters
-
id(path) — Game id.
{
"events": [
{
"name": "level_complete",
"count": 1240
}
]
} /v1/dev/games/:id/liveops/flags developer session Create / upsert a feature flag
-
id(path) — Game id.
{
"key": "new_hud",
"type": "boolean",
"default_value": true,
"safe_value": false
} {
"key": "new_hud",
"state": "on"
} /v1/dev/games/:id/liveops/flags developer session List feature flags
-
id(path) — Game id.
{
"flags": [
{
"key": "new_hud",
"state": "on"
}
]
} /v1/dev/games/:id/liveops/flags/:key/kill developer session Break-glass: kill / restore a flag
-
id(path) — Game id. -
key(path) — Flag key.
{
"on": true
} {
"key": "new_hud",
"state": "killed"
} /v1/dev/games/:id/liveops/segments developer session Create / upsert a targeting segment
-
id(path) — Game id.
{
"key": "whales",
"definition": {
"all": [
{
"stat": "coins",
"op": ">=",
"value": 1000
}
]
}
} {
"id": "sg_1",
"key": "whales"
} /v1/dev/games/:id/liveops/segments developer session List segments
-
id(path) — Game id.
{
"segments": [
{
"id": "sg_1",
"key": "whales",
"approx_size": 1200
}
]
} /v1/dev/games/:id/liveops/segments/:sid developer session Get a segment's rule definition
-
id(path) — Game id. -
sid(path) — Segment id.
{
"definition": {
"all": [
{
"stat": "coins",
"op": ">=",
"value": 1000
}
]
}
} /v1/dev/games/:id/liveops/segments/:sid/materialize developer session Materialize a segment's membership
-
id(path) — Game id. -
sid(path) — Segment id.
{
"size": 1200
} /v1/dev/games/:id/liveops/code-campaigns developer session Create a promo-code campaign
-
id(path) — Game id.
{
"key": "launch",
"reward": {
"stats": [
{
"key": "gold",
"amount": 100
}
]
},
"max_redemptions": 1000
} {
"key": "launch"
} /v1/dev/games/:id/liveops/code-campaigns developer session List code campaigns
-
id(path) — Game id.
{
"campaigns": [
{
"key": "launch",
"redeemed": 42
}
]
} /v1/dev/games/:id/liveops/code-campaigns/:cid/redemptions developer session List a campaign's redemptions
-
id(path) — Game id. -
cid(path) — Campaign id.
{
"redemptions": [
{
"player_id": "p_9",
"at": "2026-07-01T00:00:00Z"
}
]
} /v1/dev/games/:id/liveops/events developer session Create / upsert a live event
-
id(path) — Game id.
{
"key": "summer_fest",
"starts_at": "2026-07-01T00:00:00Z",
"ends_at": "2026-08-01T00:00:00Z"
} {
"key": "summer_fest"
} /v1/dev/games/:id/liveops/events developer session List live events
-
id(path) — Game id.
{
"events": [
{
"key": "summer_fest"
}
]
} /v1/dev/games/:id/liveops/code-campaigns/:cid/generate developer session Generate promo codes for a campaign
-
id(path) — Game id. -
cid(path) — Campaign id.
{
"count": 100
} {
"codes": [
"ABCD-1234"
]
} /v1/dev/games/:id/liveops/segments/preview developer session Preview a segment's size (dry-run)
-
id(path) — Game id.
{
"definition": {
"all": [
{
"stat": "coins",
"op": ">=",
"value": 1000
}
]
}
} {
"count": 1200
} Dev · Moderation
/v1/dev/games/:id/moderation developer session Set the moderation policy
-
id(path) — Game id.
{
"custom_terms": [
"voldemort"
],
"allowlist": [
"scunthorpe"
]
} {
"ok": true
} /v1/dev/games/:id/moderation developer session Get the moderation policy
-
id(path) — Game id.
{
"customTerms": [
"voldemort"
],
"allowlist": [
"scunthorpe"
]
} /v1/dev/games/:id/moderation/check developer session Dry-run moderate a string
-
id(path) — Game id.
{
"surface": "chat",
"text": "test a string"
} {
"verdict": "allow"
} /v1/dev/games/:id/moderation/reports developer session List content reports (review queue)
-
id(path) — Game id. -
state(query) — Filter by state.
{
"reports": [
{
"id": "cr_1",
"state": "open",
"target_type": "player"
}
]
} /v1/dev/games/:id/moderation/reports/:rp developer session Get a report
-
id(path) — Game id. -
rp(path) — Report id.
{
"id": "cr_1",
"state": "open"
} /v1/dev/games/:id/moderation/reports/:rp/assign developer session Assign / resolve a report
-
id(path) — Game id. -
rp(path) — Report id.
{
"resolution": "warn"
} {
"state": "actioned"
} /v1/dev/games/:id/moderation/audit developer session Read the moderation audit feed
-
id(path) — Game id.
{
"actions": [
{
"action": "ban",
"actor": "p_1",
"target_id": "p_9"
}
]
} /v1/dev/games/:id/moderation/players/:pid developer session Get a player's moderation view
-
id(path) — Game id. -
pid(path) — Player id.
{
"player_id": "p_9",
"reports_against": [],
"actions": []
} /v1/dev/games/:id/moderation/players/:pid/ban developer session Ban a player
-
id(path) — Game id. -
pid(path) — Player id.
{
"kind": "permanent",
"scope": "account",
"reason": "cheating"
} {
"ok": true,
"banned": true
} /v1/dev/games/:id/moderation/players/:pid/unban developer session Unban a player
-
id(path) — Game id. -
pid(path) — Player id.
{
"ok": true,
"lifted": true
} /v1/dev/games/:id/moderation/players/:pid/unmute developer session Unmute a player
-
id(path) — Game id. -
pid(path) — Player id.
{
"ok": true,
"lifted": true
} /v1/dev/games/:id/moderation/appeals developer session List ban appeals; decide grants/denies
-
id(path) — Game id.
{
"appeals": [
{
"id": "ap_1",
"state": "pending"
}
]
} /v1/dev/games/:id/moderation/players/:pid/mute developer session Mute / restrict a player
-
id(path) — Game id. -
pid(path) — Player id.
{
"effect": "mute",
"expires_at": "2026-07-15T00:00:00Z"
} {
"ok": true
} /v1/dev/games/:id/moderation/reports/:rp/resolve developer session Resolve a report (warn / dismiss / duplicate)
-
id(path) — Game id. -
rp(path) — Report id.
{
"resolution": "warn"
} {
"state": "actioned"
} /v1/dev/games/:id/moderation/appeals/:ap/decide developer session Decide a ban appeal (grant lifts the ban)
-
id(path) — Game id. -
ap(path) — Appeal id.
{
"grant": true,
"note": "first offense"
} {
"appeal": {
"id": "ap_1",
"state": "granted"
}
} Dev · Compliance
/v1/dev/games/:id/compliance developer session Set the age-gate / COPPA policy
-
id(path) — Game id.
{
"coppa_mode": false,
"default_jurisdiction": "US",
"gates": {
"open_chat": "13_15",
"lootbox": "adult"
}
} {
"ok": true
} /v1/dev/games/:id/compliance developer session Get the compliance policy
-
id(path) — Game id.
{
"coppa_mode": false,
"gates": {}
} /v1/dev/games/:id/compliance/players/:pid developer session Inspect a player's compliance state
-
id(path) — Game id. -
pid(path) — Player id.
{
"bracket": "13_15",
"consent_state": "granted"
} Dev · Analytics
/v1/dev/games/:id/analytics/metrics developer session DAU/MAU/new-players/events by day
-
id(path) — Game id.
{
"days": [
{
"day": "2026-07-01",
"dau": 1200,
"mau": 8000,
"new_players": 90
}
]
} /v1/dev/games/:id/analytics/retention developer session Cohort retention grid
-
id(path) — Game id.
{
"cohorts": [
{
"day": "2026-07-01",
"d1": 0.42,
"d7": 0.18
}
]
} /v1/dev/games/:id/analytics/sessions developer session Session counts + lengths
-
id(path) — Game id.
{
"days": [
{
"day": "2026-07-01",
"sessions": 3400,
"avg_ms": 480000
}
]
} /v1/dev/games/:id/analytics/economy developer session Per-currency sources/sinks/net (economy health)
-
id(path) — Game id.
{
"currencies": [
{
"currency": "gold",
"sources": 150,
"sinks": 30,
"net": 120
}
]
} /v1/dev/games/:id/analytics/funnels developer session Define a funnel (ordered event list)
-
id(path) — Game id.
{
"key": "onboarding",
"steps": [
"install",
"tutorial",
"first_purchase"
]
} {
"key": "onboarding"
} /v1/dev/games/:id/analytics/funnels developer session List funnels + their results
-
id(path) — Game id.
{
"funnels": [
{
"key": "onboarding",
"steps": [
{
"event": "install",
"reached": 1000
}
]
}
]
} /v1/dev/games/:id/analytics/funnels/:key developer session Delete a funnel
-
id(path) — Game id. -
key(path) — Funnel key.
null /v1/dev/games/:id/analytics/crashes developer session List crash groups (open-first)
-
id(path) — Game id.
{
"groups": [
{
"id": "cg_1",
"title": "TypeError",
"occurrences": 42,
"status": "open"
}
]
} /v1/dev/games/:id/analytics/rollup developer session Trigger an analytics rollup (manual)
-
id(path) — Game id.
{
"ok": true
} /v1/dev/games/:id/analytics/crashes/:group/daily developer session A crash group's daily rate + crash-free %
-
id(path) — Game id. -
group(path) — Crash group id.
{
"days": [
{
"day": "2026-07-01",
"occurrences": 12,
"crash_free": 0.98
}
]
} /v1/dev/games/:id/analytics/crashes/:group/status developer session Set a crash group's status (open/resolved/ignored)
-
id(path) — Game id. -
group(path) — Crash group id.
{
"status": "resolved"
} {
"ok": true
} /v1/dev/games/:id/analytics/funnels/:key/results developer session A funnel's per-step results
-
id(path) — Game id. -
key(path) — Funnel key.
{
"steps": [
{
"event": "install",
"reached": 1000,
"conversion": 1
},
{
"event": "tutorial",
"reached": 660,
"conversion": 0.66
}
]
} Dev · Storage
/v1/dev/games/:id/storage-collections developer session Create / upsert a storage collection
-
id(path) — Game id.
{
"key": "decks",
"scope": "player",
"read": "owner",
"write": "owner",
"max_bytes": 65536
} {
"key": "decks"
} /v1/dev/games/:id/storage-collections developer session List storage collections
-
id(path) — Game id.
{
"collections": [
{
"key": "decks",
"scope": "player"
}
]
} /v1/dev/games/:id/storage/shared/:collection/:key developer session Write a shared storage entry (developer)
-
id(path) — Game id. -
collection(path) — Collection key. -
key(path) — Entry key.
{
"data": {
"motd": "Season 2 is live!"
}
} {
"key": "motd",
"version": 2
} Dev · Inbox
/v1/dev/games/:id/inbox developer session Send an inbox message / announcement (optionally with a reward)
-
id(path) — Game id.
{
"audience": "all",
"kind": "announcement",
"body": {
"text": "Season 2 is live!"
},
"rewards": {
"stats": [
{
"key": "gold",
"amount": 100
}
]
}
} {
"sent": 8000
} Dev · Usage
/v1/dev/games/:id/usage developer session Get this month's usage vs quota
-
id(path) — Game id.
{
"month": "2026-07",
"players": 8000,
"ops": {
"saves": 320,
"leaderboards": 145
}
} Dev · Verify
/v1/dev/games/:id/verify developer session Run a server-side integration self-test
Live-probes player → save → leaderboard → CORS in-process and reports pass/fail per service with fixes.
-
id(path) — Game id.
{
"ok": true,
"services": [
{
"name": "saves",
"status": "pass"
}
]
} Admin
/v1/admin/me operator session Get the signed-in operator
{
"id": "op_1",
"email": "ops@triggair.com",
"role": "owner"
} /v1/admin/developers operator session List developers (cross-tenant)
-
limit(query) — Page size. -
offset(query) — Offset.
{
"developers": [
{
"id": "d_1",
"email": "dev@x.com",
"plan": "indie",
"games": 2,
"mau": 8000
}
]
} /v1/admin/developers/:id operator session Get a developer (subscription + games)
-
id(path) — Developer id.
{
"developer": {
"id": "d_1",
"email": "dev@x.com",
"status": "active"
},
"subscription": {
"plan": "indie"
},
"games": []
} /v1/admin/games operator session List games (cross-tenant)
{
"games": [
{
"id": "g_1",
"name": "Neon Drift",
"developer_id": "d_1",
"players": 42
}
]
} /v1/admin/games/:id operator session Get a game (metadata + key metadata + counts)
Key metadata only — never a hash/secret. Every operator read is audited.
-
id(path) — Game id.
{
"game": {
"id": "g_1",
"tier": "shared",
"status": "active"
},
"keys": [
{
"prefix": "tg_pk_ab12",
"kind": "publishable"
}
],
"players": 42,
"ops": 525
} /v1/admin/audit operator session Read the operator audit trail
-
limit(query) — Page size.
{
"entries": [
{
"action": "developer.read",
"actor_email": "ops@triggair.com",
"created_at": "2026-07-01T00:00:00Z"
}
]
} /v1/admin/games/:id/suspend operator session Suspend a game (takes it dark at the edge)
-
id(path) — Game id.
{
"reason": "ToS abuse"
} {
"id": "g_1",
"status": "suspended"
} /v1/admin/games/:id/unsuspend operator session Unsuspend a game
-
id(path) — Game id.
{
"id": "g_1",
"status": "active"
} /v1/admin/developers/:id/suspend operator session Suspend a developer (cascades to all their games)
-
id(path) — Developer id.
{
"reason": "account abuse"
} {
"id": "d_1",
"status": "suspended"
} /v1/admin/developers/:id/unsuspend operator session Unsuspend a developer
-
id(path) — Developer id.
{
"id": "d_1",
"status": "active"
} /v1/admin/games/:id/keys/:keyId/revoke operator session Revoke a leaked key (incident lever)
-
id(path) — Game id. -
keyId(path) — Key id.
null /v1/admin/games/:id/players/:pid/moderation operator session Cross-tenant player moderation view
-
id(path) — Game id. -
pid(path) — Player id.
{
"player_id": "p_9",
"reports_against": [],
"actions": []
} /v1/admin/games/:id/players/:pid/ban operator session Ban a player (cross-tenant)
-
id(path) — Game id. -
pid(path) — Player id.
{
"kind": "permanent",
"reason": "cheating"
} {
"ok": true,
"banned": true
} /v1/admin/games/:id/players/:pid/unban operator session Unban a player
-
id(path) — Game id. -
pid(path) — Player id.
{
"ok": true,
"lifted": true
} /v1/admin/games/:id/players/:pid/mute operator session Mute a player
-
id(path) — Game id. -
pid(path) — Player id.
{
"effect": "mute"
} {
"ok": true
} /v1/admin/games/:id/players/:pid/unmute operator session Unmute a player
-
id(path) — Game id. -
pid(path) — Player id.
{
"ok": true,
"lifted": true
} /v1/admin/games/:id/moderation/appeals operator session List ban appeals (cross-tenant)
-
id(path) — Game id.
{
"appeals": [
{
"id": "ap_1",
"state": "pending"
}
]
} /v1/admin/games/:id/moderation/appeals/:ap/decide operator session Decide a ban appeal
-
id(path) — Game id. -
ap(path) — Appeal id.
{
"grant": true
} {
"appeal": {
"id": "ap_1",
"state": "granted"
}
} /v1/admin/developers/:id/impersonate operator session Mint a developer impersonation token
Returns a session-lived token to act AS the developer (full read/write) on /v1/dev/*, for support. Audited.
-
id(path) — Developer id.
{
"token": "eyJ…",
"developer": {
"id": "d_1",
"email": "dev@x.com"
},
"expires_at": "2026-07-11T00:00:00Z"
} Docs & meta
/openapi.json no auth This OpenAPI 3.1 definition
{
"openapi": "3.1.0"
} /llms.txt no auth Agent index (concise integration guide)
/llms-full.txt no auth Full agent integration guide
/dropin no auth Copy-paste Drop-In prompt
/docs/errors/:code no auth Per-error-code fix doc
-
code(path) — Error code.
/status no auth Liveness + resolved game/env echo
{
"status": "ok",
"game_id": null,
"env": "prod"
} /healthz no auth Health check
/time no auth Authoritative server time (for client clocks)
{
"now": "2026-07-10T00:00:00Z",
"epoch_ms": 1783000000000
} MCP
/v1/mcp developer session Model Context Protocol endpoint (streamable HTTP, JSON-RPC 2.0)
The agent-facing management surface: the triggair_* tools (configure games/boards/economy/flags/moderation/compliance, verify_integration, search_docs) over the Web-standard streamable-HTTP MCP transport, stateless JSON mode. Point an MCP client (Cursor, Claude, …) here with your developer session token as `Authorization: Bearer <jwt>`. Tool calls run in-process against your own games — ownership is enforced exactly as on /v1/dev/*.
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
} {
"jsonrpc": "2.0",
"id": 1,
"result": {
"tools": [
{
"name": "triggair_list_games"
}
]
}
}
Social
/v1/friendsplayer tokenList friends
/v1/friends/requestsplayer tokenList incoming friend requests
/v1/friends/:idplayer tokenSend or accept a friend request
id(path) — The other player's id./v1/friends/:idplayer tokenRemove a friend / cancel a request
id(path) — The other player's id./v1/friends/:id/blockplayer tokenBlock a player
id(path) — The player to block./v1/shareplayer tokenMint a share / invite link
Creates a short code carrying an opaque context blob (a level, a challenge, a referral). Resolve it with GET /v1/share/:code on the recipient's device.
/v1/share/:codeplayer tokenResolve a share link
code(path) — Share code.