Skip to content

API Reference

The current api version is v0 and paths are prefixed with /api/v0.

Returns information about the server like the name but no sensitive information.

{
"description": "A simple server",
"application": "linwood-swamp",
"max_players": 10
}

Connect to the websocket to receive real-time updates.

0x00Sender (2 Bytes)Receiver (2 Bytes)Message (String)

If we change a room or request a room info.

0x01Flags (1 Byte)Max Players (2 Bytes)Your ID (2 Bytes)Room ID (Bytes)

See Room Flags for more information.

If you join the server.

0x02

If you are kicked from a room.

0x03Reason (Byte)Message (String)
ReasonDescription
0x00Room closed
0x01Kicked from room
0x02Banned from room
0x03Host left
0xFFUnknown error

If you want to join a room but it fails.

0x04Reason (Byte)
ReasonDescription
0x00Room does not exist
0x01Room is full
0x02Banned from room
0x03Application mismatch
0xFFUnknown error

If you create a room but it fails.

0x05Reason (Byte)
ReasonDescription
0x00Room limit reached
0x01In room already
0xFFUnknown error
TypeDescription
0x00Joined websocket server
0x01Kicked from room
0x02Room does not exist
0x03Room is full
0x04Room creation

Dark Room Event

0x06Player ID (2 Bytes)

Dark Room Event

0x07Player ID (2 Bytes)

Dark Room Event (toggleable), but returns empty error if not permitted

0x08Length (2 Bytes)Player ID (2 Bytes)
0x00Player ID (2 Bytes)Message (String)

Send a message to the receiver. There are some special player ids:

  • 0 - Send to all players
  • 1 - Send to the host
0x01Room ID (Bytes)
0x02Room ID (Bytes)
0x03Max Players (2 Bytes)

Host only

0x04Player ID (2 Bytes)Reason (String)
0x05

Allows you to restrict the supported rooms.

You can use:

0x06Version (4 Bytes)Application (String)

to set the application or:

0x07

to remove the application restriction.

Currently not implemented

FlagDescription
0x01Dark Room (Restrict some events to only be seen by the host)
0x02Toggle Player Visibility (On dark rooms, players can see each other, on normal rooms, they can’t)
0x04Switch Host on Host Leave (If the host leaves, the host will be changed instead of closing the room)