Skip to content

Manage active rooms

Use the server-wide admin token from trusted operator tooling. An active host may instead use its room host token for operations limited to its own room.

List every room:

Terminal window
curl http://relay.example.com:7771/rooms \
-H "Authorization: Bearer $BLITZ_RELAY_HTTP_ADMIN_TOKEN"

Fetch one room by its case-insensitive code:

Terminal window
curl http://relay.example.com:7771/rooms/ABC12345 \
-H "Authorization: Bearer $BLITZ_RELAY_HTTP_ADMIN_TOKEN"

connectedClientCount excludes the host. hasPendingHostClaim indicates that one client is currently transitioning into the host role.

Terminal window
curl -X PATCH http://relay.example.com:7771/rooms/ABC12345 \
-H "Authorization: Bearer $BLITZ_RELAY_HTTP_ADMIN_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"displayName": "Final round",
"metadataToAdd": { "map": "citadel" },
"metadataToRemove": ["queue"]
}'

Removal happens before addition, so a key included in both collections ends with the added value.

The host learns each virtual client ID through its networking framework’s connection events. Disconnect one client with:

Terminal window
curl -X DELETE http://relay.example.com:7771/rooms/ABC12345/clients/7 \
-H "Authorization: Bearer $BLITZ_RELAY_HTTP_ADMIN_TOKEN"

The relay sends Disconnected to that client and closes its relay connection.

Terminal window
curl -X DELETE http://relay.example.com:7771/rooms/ABC12345 \
-H "Authorization: Bearer $BLITZ_RELAY_HTTP_ADMIN_TOKEN"

The relay sends an Error frame with RoomClosed to the active host, clients, and any pending promoted peer before disconnecting them.

See the HTTP API reference for exact request defaults and status codes.