Machine-readable spec: GET /api/docs (for coding agents).
Auth: website login via POST /api/login {code} (code from ingame /bank code), then per-player key via header X-API-Key, ?key= or JSON key. Rate: 1 diamond = 100 coins. Account fee: 3200 coins.
| Method | Path | Auth | Params |
|---|---|---|---|
| GET | /api/stats | public | – |
| GET | /api/me | key | key |
| GET | /api/accounts | key | key, iban? |
| GET | /api/history | key | iban, key, limit? |
| POST | /api/transfer | key | from, to, amount, reason?, key |
| POST | /api/konto/nutzen | master | iban (aktiv setzen) |
| POST | /api/konto/schliessen | master | iban (nur leer) |
| POST | /api/gutschein/create | key | from, amount (Code kommt raus) |
| POST | /api/gutschein/redeem | master | code, to (einlösen) |
| GET | /api/gutschein/list | master | eigene Gutscheine |
| POST | /api/gutschein/cancel | master | code (Erstattung) |
| POST | /api/iban/create | key | name, key |
| POST | /api/abo/create | key | from, to, amount, reason?, mode=realtime|mcdays, interval (sec|MC-days), runs? (-1 endless), key |
| GET | /api/abo/list | key | key |
| POST | /api/abo/cancel | key | id oder Code, key |
| POST | /api/login | – | code (aus /bank code) |
| GET | /api/time | public | – (Tag, Uhr, gameTime) |
| POST | /api/oauth/verify | – | code → name + Hauptkonto |
| GET | /oauth | – | Zustimmung (app, redirect, state) |
| POST | /api/kredit/create | key | Kredit: from, amount, runs, mode, interval |
| GET | /api/kredit/list | key | key (Restschuld) |
| POST | /api/kredit/payoff | key | id|code, from? |
| POST | /api/apikey/rotate | master | neuer Master-Key |
| POST | /api/apikey/create | master | name, account (10.000 Coins) |
| GET | /api/apikey/list | master | eigene Keys |
| POST | /api/apikey/revoke | master | id |
| GET | /pay | – | Zahlen-Seite (to, amount, reason, redirect, state) |
Anmelden mit zBank: Button zeigt auf /oauth?app=NAME&redirect=URL&state=RANDOM. Nach Zustimmung landet der User auf URL?zbank_code=ZB-...&state=RANDOM – Backend prüft state und ruft POST /api/oauth/verify {code} auf.
Abos run every ~20s. realtime = real seconds, mcdays = Minecraft days (1 day = 24000 ticks, see GET /api/time for current day/clock). Each abo has a unique code like ABO-7X2K9P (shown on create/list); cancel accepts id or code. runs=-1 = endless abo, runs=N = N installments. 3 missed payments auto-cancel. All errors: {"ok":false,"error":"..."}.