Home

API

Create a room
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/rooms

Create a room. Returns a link and a private host key.

GET/api/v1/rooms/:code

Get the room capacity and expiry.

POST/api/v1/rooms/:code/join

Get room connection details.

PATCH/api/v1/rooms/:code

Lock or unlock a room. Requires the host key.

DELETE/api/v1/rooms/:code/participants/:id

Remove a person. Requires the host key.

DELETE/api/v1/rooms/:code

Close 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.

Create room