Sonolus Wiki

POST /sonolus/rooms/create

/sonolus/rooms/create allows Sonolus app to create a room.

URL Parameters

None.

Query Parameters

Query ParameterValueDescription
localizationstringSee localization.
Configuration OptionsanySee Options Query Parameters.

Request Headers

HeaderValueDescription
Sonolus-SessionstringOptional, see Sonolus-Session.

Request Body

type ServerCreateRoomRequest = {}

Response Code

CodeDescription
200 OK
401 UnauthorizedAuthentication required or expired.

Response Headers

HeaderValueDescription
Sonolus-VersionstringOptional, see Sonolus-Version.

Response Body

type ServerCreateRoomResponse = {
    name: string
    key: string
}

name

Name of the room.

key

Server defined room key.

Examples

{
    "name": "...",
    "key": "..."
}

Remarks

Server should create the room immediately and reserve a spot for the room creator, or reserve the room until the room creator has finished creating.

When the room creator has finished creating, client joins the room with Sonolus-Room-Key header containing the value of key. Server can use the header to verify the client is the room creator, and create/configure the room based on query parameters.