JSON: /?format=json - OpenAPI 3: /openapi.json
| Method | Path | Auth | Summary | Request | Response | Example |
|---|---|---|---|---|---|---|
| GET | /health | none | Liveness probe. | ok:boolean, service:string | {"ok":true,"service":"nexushub-api"} | |
| POST | /v1/account/resolve | none | Resolve the account behind an install id. | installId:string | ok:boolean | {"installId":"<install-id>"} |
| GET | /v1/balance | session cookie (signed nh_session); optional unless stated | Coin balance of the caller (query installId when no session). | ok:boolean, balanceCoins:number | GET /v1/balance?installId=<install-id> | |
| POST | /v1/coins/credit | session cookie (signed nh_session); optional unless stated | Credit coins (idempotent by key). | installId:string, coins:number, key:string | ok:boolean, balanceAfterCoins:number | {"installId":"<install-id>","coins":10,"key":"<idem-key>"} |
| POST | /v1/coins/purchase | session cookie (signed nh_session); optional unless stated | Record a coin purchase. | installId:string, coins:number, key:string | ok:boolean, balanceAfterCoins:number | {"installId":"<install-id>","coins":100,"key":"<idem-key>"} |
| POST | /v1/coins/debit | session cookie (signed nh_session); optional unless stated | Spend coins (idempotent by key). | installId:string, coins:number, key:string | ok:boolean, balanceAfterCoins:number | {"installId":"<install-id>","coins":5,"key":"<idem-key>"} |
| GET | /v1/highscores/{game} | none | Top 10 scores of a game. | ok:boolean, game:string, top:array | GET /v1/highscores/atomarium | |
| POST | /v1/highscores/{game} | session cookie (signed nh_session); optional unless stated | Submit a score. | installId:string, score:number, name:string | ok:boolean, rank:number, personalBest:boolean, top:array | {"installId":"<install-id>","score":1200,"name":"Player"} |
| GET | /v1/catalogue | none | Apps in the portfolio (aliases /v1/apps, /v1/lobby/catalogue). | ok:boolean, apps:array, count:number | GET /v1/catalogue | |
| POST | /v1/pair/new | none | Website asks for a QR pairing token. | ok:boolean, token:string | {} | |
| POST | /v1/pair/claim | none | App claims a pairing token. | token:string, installId:string | ok:boolean | {"token":"<token>","installId":"<install-id>"} |
| GET | /v1/pair/status | none | Website polls a pairing token. | ok:boolean, status:string | GET /v1/pair/status?token=<token> | |
| POST | /v1/rooms | session cookie (signed nh_session); optional unless stated | Create a game room; /v1/rooms/{code}/{action} joins/starts. | installId:string | ok:boolean, room:object | {"installId":"<install-id>"} |
| GET | /v1/rooms/{code} | none | Read a room's public state. | ok:boolean, room:object | GET /v1/rooms/ABCD | |
| POST | /v1/login | none | Sign in (also /login on the site host). | installId:string | ok:boolean | {"installId":"<install-id>"} |
| POST | /v1/logout | session cookie (signed nh_session); optional unless stated | Sign out. | ok:boolean | {} | |
| GET | /v1/session | session cookie (signed nh_session); optional unless stated | Who am I. | ok:boolean, authenticated:boolean | GET /v1/session | |
| GET | /v1/subscription | session cookie (signed nh_session); optional unless stated | Subscriber flag of the caller. | ok:boolean, subscribed:boolean | GET /v1/subscription | |
| POST | /v1/subscription/report | session cookie (signed nh_session); optional unless stated | App reports its subscription state. | installId:string, subscribed:boolean | ok:boolean | {"installId":"<install-id>","subscribed":true} |
| GET | /v1/coins/history | session cookie required | Coin history of the caller. | ok:boolean, entries:array | GET /v1/coins/history | |
| GET | /v1/entitlement | session cookie (signed nh_session); optional unless stated | Entitlement decision of the caller. | ok:boolean, state:string | GET /v1/entitlement | |
| POST | /v1/entitlement/first-run | session cookie (signed nh_session); optional unless stated | Record first run of an app. | installId:string | ok:boolean | {"installId":"<install-id>"} |
| POST | /v1/subscription/purchase | session cookie (signed nh_session); optional unless stated | Record a subscription purchase. | purchaseToken:string | ok:boolean | {"purchaseToken":"<token>"} |
| POST | /v1/trial/touch | none | Start or touch this device's trial. | deviceId:string | ok:boolean | {"deviceId":"<device-id>"} |
| GET | /v1/trial/status | none | Trial status of this device. | ok:boolean, active:boolean | GET /v1/trial/status | |
| POST | /v1/trial/link | session cookie required | Link this device's trial to the signed-in account. | ok:boolean | {} | |
| POST | /v1/account/play-provision | none | Provision an account from a Play sign-in. | token:string | ok:boolean | {"token":"<play-token>"} |
| GET | /v1/account/play-install/nonce | none | Nonce for a Play Integrity install proof. | ok:boolean, nonce:string | GET /v1/account/play-install/nonce | |
| POST | /v1/account/play-install | none | Prove a Play install (Integrity token). | nonce:string, integrityToken:string | ok:boolean | {"nonce":"<nonce>","integrityToken":"<token>"} |