Server
Stage
The stage endpoints for live_stream rooms.
A live_stream room has a stage instead of seats. There's no participant cap, and the room has unlimited viewers.
Paths start with https://stream.zavryn.online/api/v1/rooms/:name. The person acting is worked out from the user_token bearer, and targets go in the body. These routes return 400 on a seated room.
Roles
| Role | Meaning | Publishes | Moderates |
|---|---|---|---|
host | The verified room owner | Yes | Yes |
guest | A co-publisher the host invited | Yes | No |
admin | A moderator | No | Yes |
audience | Everyone else | No | No |
A non-owner joins as audience unless they're on the room's admin list. The engine ignores any higher role a client asks for.
Endpoints
| Endpoint | Who | Result | Common errors |
|---|---|---|---|
GET /stage | Anyone | { "members": [{ "identity", "name", "role" }] }, ordered by join time | |
POST /stage/add with target_identity | Host or admin | The target becomes guest | 404 Target user not in room, 409 if the target is an admin |
POST /stage/remove with target_identity | Host or admin | The target returns to audience | 404 Target is not on stage, 403 The room owner cannot leave the stage |
POST /stage/leave | A publisher | Returns to audience | 404 Not on stage, 403 The room owner cannot leave the stage |
POST /stage/request | A viewer | Notifies the host and admins. Nothing is queued. |
Updates in the room
The room metadata holds the current members under _stage, so late joiners see them immediately. Two data messages keep clients up to date:
_stage_update, sent to the whole room:{ "type": "_stage_update", "members": [...] }_stage_request, sent only to the host and admins:{ "type": "_stage_request", "identity": "user-7" }
PK score
Your backend posts battle points to POST /api/v1/pk/:battleId/score. See PK battles.