API
The loader-facing JSON API. Requests and responses are compact JSON, plain
HTTP on port 25735. Session tokens are JWTs; send one as
X-Token: <token>, Authorization: Bearer <token>,
or as "token" in the body.
Loader
| Method | Path | Body / notes |
|---|---|---|
| GET | /api/status | Service name, version, uptime, user count. |
| GET | /api/health | Plain ok, for monitors. |
| POST | /api/login | {"username","password"} → success, token, username, expires_in, license, discord |
| POST | /api/register | {"username","password","license_key"?} → same shape as login |
| POST | /api/verify | {"token"} → {"valid":true,…} or {"valid":false,"message"} |
| POST | /api/logout | {"token"} revokes the session server-side. |
| POST | /api/account | Profile, licence, devices, linked Discord. |
| POST | /api/license | Current licence state. |
| POST | /api/license/redeem | {"token","key"} applies a licence key. |
| GET | /api/avatar | Linked Discord avatar as image/png. Needs a token; 404 when nothing is linked. |
Example
curl -s -X POST http://www.synapsemenu.lol/api/login \
-H "Content-Type: application/json" \
-d '{"username":"owner","password":"…"}'
curl -s http://www.synapsemenu.lol/api/avatar -H "X-Token: <token>" -o avatar.png
Operator
/api/admin/* accepts X-Admin-Token: <MSP_ADMIN_TOKEN>
or an administrator's session token. Mint keys, list users, grant days and
read the audit log. The Discord bot wraps the same operations as slash
commands.
Web
| Method | Path | Notes |
|---|---|---|
| GET | /dashboard | Account, licence, Discord link, devices. |
| GET | /oauth/discord | Starts the Discord handshake (identify scope). |
| GET | /oauth/discord/callback | Registered redirect URI. |