InZoneInZone
02 — Integrate

Five endpoints. Under thirty minutes.

Coins, challenge, progress, leaderboard, chat. Each line of code lights a feature in the live game. The reference key for your game is on the Upload screen.

POST/api/game-sdk/coins/tier-{10,50,150,400}

Coins

Purchase microtransaction coins at one of four tiers. Debits the player wallet and credits your game's revenue summary.

microtxwallet4-tier
Live · responding 200 OK
game-sdk/coins.js
// POST /api/game-sdk/coins/tier-10
await fetch('/api/game-sdk/coins/tier-10', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    userId: 'usr_4982',
    gameId: ctx.gameId,
    sessionId: ctx.sessionId,
  }),
});
// Tiers: 10 / 50 / 150 / 400
POST/api/game-sdk/send-challenge

Challenge

Challenge a friend — sends a game link with your score, generates a share card, and writes to game_challenges. Like the "Challenge a Friend" button.

socialdeep-linkshare
Live · responding 200 OK
game-sdk/challenge.js
// POST /api/game-sdk/send-challenge
await fetch('/api/game-sdk/send-challenge', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    gameId: ctx.gameId,
    senderId: ctx.playerId,
    recipientId: 'friend_abc',
    score: 14820,
    message: 'Can you beat this score?',
  }),
});
POST/api/game-sdk/progress/share

Progress

Share a progress snapshot — generates a shareable visual of an achievement or run. Like the "Share Progress" button in the app.

feedvisualshare
Live · responding 200 OK
game-sdk/progress.js
// POST /api/game-sdk/progress/share
await fetch('/api/game-sdk/progress/share', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    gameId: ctx.gameId,
    userId: ctx.playerId,
    score: 14820,
    title: 'New high score — Wind Cup',
    visual: 'auto',
    metrics: { score: 14820, lap: 3 },
  }),
});
POST/api/game-sdk/post-score

Leaderboard

Submit a score — writes to the game's leaderboard subcollection. Retrieve rankings with GET /api/game-sdk/leaderboard.

runsglobalranked
Live · responding 200 OK
game-sdk/leaderboard.js
// POST /api/game-sdk/post-score
await fetch('/api/game-sdk/post-score', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    gameId: ctx.gameId,
    playerId: ctx.playerId,
    playerName: 'ProGamer42',
    score: 14820,
    metadata: { lap: 3 },
  }),
});

// GET /api/game-sdk/leaderboard?gameId=...&limit=50
POST/api/game-sdk/open-chat

Chat

Open or join the game's designated group chat. Sends a message to the conversation thread and merges participants automatically.

groupchatlivesocial
Live · responding 200 OK
game-sdk/chat.js
// POST /api/game-sdk/open-chat
await fetch('/api/game-sdk/open-chat', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    gameId: ctx.gameId,
    userId: ctx.playerId,
    message: 'Just joined the game!',
    sessionId: ctx.sessionId,
  }),
});
Integration healthlast 24h
Requests
awaiting traffic
Error rate
no errors yet
p95 latency
awaiting data