NexusHub public API

JSON: /?format=json - OpenAPI 3: /openapi.json

MethodPathAuthSummaryRequestResponseExample
GET/healthnoneLiveness probe.ok:boolean, service:string{"ok":true,"service":"nexushub-api"}
POST/v1/account/resolvenoneResolve the account behind an install id.installId:stringok:boolean{"installId":"<install-id>"}
GET/v1/balancesession cookie (signed nh_session); optional unless statedCoin balance of the caller (query installId when no session).ok:boolean, balanceCoins:numberGET /v1/balance?installId=<install-id>
POST/v1/coins/creditsession cookie (signed nh_session); optional unless statedCredit coins (idempotent by key).installId:string, coins:number, key:stringok:boolean, balanceAfterCoins:number{"installId":"<install-id>","coins":10,"key":"<idem-key>"}
POST/v1/coins/purchasesession cookie (signed nh_session); optional unless statedRecord a coin purchase.installId:string, coins:number, key:stringok:boolean, balanceAfterCoins:number{"installId":"<install-id>","coins":100,"key":"<idem-key>"}
POST/v1/coins/debitsession cookie (signed nh_session); optional unless statedSpend coins (idempotent by key).installId:string, coins:number, key:stringok:boolean, balanceAfterCoins:number{"installId":"<install-id>","coins":5,"key":"<idem-key>"}
GET/v1/highscores/{game}noneTop 10 scores of a game.ok:boolean, game:string, top:arrayGET /v1/highscores/atomarium
POST/v1/highscores/{game}session cookie (signed nh_session); optional unless statedSubmit a score.installId:string, score:number, name:stringok:boolean, rank:number, personalBest:boolean, top:array{"installId":"<install-id>","score":1200,"name":"Player"}
GET/v1/cataloguenoneApps in the portfolio (aliases /v1/apps, /v1/lobby/catalogue).ok:boolean, apps:array, count:numberGET /v1/catalogue
POST/v1/pair/newnoneWebsite asks for a QR pairing token.ok:boolean, token:string{}
POST/v1/pair/claimnoneApp claims a pairing token.token:string, installId:stringok:boolean{"token":"<token>","installId":"<install-id>"}
GET/v1/pair/statusnoneWebsite polls a pairing token.ok:boolean, status:stringGET /v1/pair/status?token=<token>
POST/v1/roomssession cookie (signed nh_session); optional unless statedCreate a game room; /v1/rooms/{code}/{action} joins/starts.installId:stringok:boolean, room:object{"installId":"<install-id>"}
GET/v1/rooms/{code}noneRead a room's public state.ok:boolean, room:objectGET /v1/rooms/ABCD
POST/v1/loginnoneSign in (also /login on the site host).installId:stringok:boolean{"installId":"<install-id>"}
POST/v1/logoutsession cookie (signed nh_session); optional unless statedSign out.ok:boolean{}
GET/v1/sessionsession cookie (signed nh_session); optional unless statedWho am I.ok:boolean, authenticated:booleanGET /v1/session
GET/v1/subscriptionsession cookie (signed nh_session); optional unless statedSubscriber flag of the caller.ok:boolean, subscribed:booleanGET /v1/subscription
POST/v1/subscription/reportsession cookie (signed nh_session); optional unless statedApp reports its subscription state.installId:string, subscribed:booleanok:boolean{"installId":"<install-id>","subscribed":true}
GET/v1/coins/historysession cookie requiredCoin history of the caller.ok:boolean, entries:arrayGET /v1/coins/history
GET/v1/entitlementsession cookie (signed nh_session); optional unless statedEntitlement decision of the caller.ok:boolean, state:stringGET /v1/entitlement
POST/v1/entitlement/first-runsession cookie (signed nh_session); optional unless statedRecord first run of an app.installId:stringok:boolean{"installId":"<install-id>"}
POST/v1/subscription/purchasesession cookie (signed nh_session); optional unless statedRecord a subscription purchase.purchaseToken:stringok:boolean{"purchaseToken":"<token>"}
POST/v1/trial/touchnoneStart or touch this device's trial.deviceId:stringok:boolean{"deviceId":"<device-id>"}
GET/v1/trial/statusnoneTrial status of this device.ok:boolean, active:booleanGET /v1/trial/status
POST/v1/trial/linksession cookie requiredLink this device's trial to the signed-in account.ok:boolean{}
POST/v1/account/play-provisionnoneProvision an account from a Play sign-in.token:stringok:boolean{"token":"<play-token>"}
GET/v1/account/play-install/noncenoneNonce for a Play Integrity install proof.ok:boolean, nonce:stringGET /v1/account/play-install/nonce
POST/v1/account/play-installnoneProve a Play install (Integrity token).nonce:string, integrityToken:stringok:boolean{"nonce":"<nonce>","integrityToken":"<token>"}