API
const response = await fetch('/api/v1/rooms', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({})
})
const { url, code, hostToken } = await response.json()
// Share url with your players. Keep hostToken private.POST
/api/v1/roomsCreate a room. Returns a link and a private host key.
GET
/api/v1/rooms/:codeGet the room capacity and expiry.
POST
/api/v1/rooms/:code/joinGet room connection details.
PATCH
/api/v1/rooms/:codeLock or unlock a room. Requires the host key.
DELETE
/api/v1/rooms/:code/participants/:idRemove a person. Requires the host key.
DELETE
/api/v1/rooms/:codeClose a room for everyone. Requires the host key.
No API key needed to create rooms. 10 rooms per minute per IP; 120 API requests per minute. Host actions use Authorization: Bearer <hostToken>. For server-to-server calls, use the API Worker’s URL.