API Docs

REST API

AdminUpdated Sep 19, 2026

REST API

Base URL: https://api.coolgptgames.com (prod). Locally it's http://localhost:5001.

Method & path

Purpose

POST /v1/games

Create a game (draft). Body: { title, description?, categorySlug?, instructions? }{ game: { id, slug, status } }. Send an Idempotency-Key header so a retried create returns the same game instead of orphaning a duplicate draft.

POST /v1/upload/init

Start a bundle upload. Body: { gameId, runtime, filename, realtime?, connectHosts? }{ uploadUrl, uploadId }. connectHosts = external hosts the game may reach (see §6).

PUT <uploadUrl>

Upload the zipped bundle bytes (content-type: application/zip).

POST /v1/upload/complete

Finalize → runs moderation. Body: { uploadId }

GET /v1/me/games

Your games (id, slug, title, status, plays, rating) — drafts included. (Public GET /v1/games is the catalogue; GET /v1/games/:id 404s on a draft.)

GET /v1/me/games/:id

Full manage view: versions, moderation feedback (verdict, confidence), analytics.

POST /v1/games/:id

Edit metadata (title/description/categorySlug/instructions).

POST /v1/games/:id/versions

Upload a new version (re-moderated). Same body fields as upload/init, including connectHosts.

DELETE /v1/games/:id

Delist / soft-delete a game (also removes an unpublished draft).

GET /v1/me/summary

Lifetime/last-30d earnings, available balance, plays, games.

GET /v1/me/earnings

Per-day earnings series.

GET /v1/me/payouts

Payout history + accrued balance.

GET /v1/me/reports

Player reports across your games.

POST /v1/me/keys · GET /v1/me/keys · DELETE /v1/me/keys/:id

Manage API keys.

A published game's manage view exposes a playUrl carrying a short-lived access ticket (?t=…); that's what the portal embeds. Direct/deep-linked bundle URLs without a fresh ticket are rejected by the CDN.


Was this page helpful?